[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] xen: infrastructure to have cross-platform video drivers


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Mon, 04 Feb 2013 15:44:21 +0000
  • Delivery-date: Mon, 04 Feb 2013 15:44:48 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
# Date 1359031671 0
# Node ID 3e93c50982de4f2f7db99d92b04684556320541c
# Parent  814a4f471fffe742f8499e4f3133ad5409f1b943
xen: infrastructure to have cross-platform video drivers

- introduce a new HAS_VIDEO config variable;
- build xen/drivers/video/font* if HAS_VIDEO;
- rename vga_puts to video_puts;
- rename vga_init to video_init;
- rename vga_endboot to video_endboot.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Keir Fraser <keir@xxxxxxx>
Committed-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---


diff -r 814a4f471fff -r 3e93c50982de xen/arch/arm/Rules.mk
--- a/xen/arch/arm/Rules.mk     Thu Jan 24 12:47:50 2013 +0000
+++ b/xen/arch/arm/Rules.mk     Thu Jan 24 12:47:51 2013 +0000
@@ -7,6 +7,7 @@
 #
 
 HAS_DEVICE_TREE := y
+HAS_VIDEO := y
 
 CFLAGS += -fno-builtin -fno-common -Wredundant-decls
 CFLAGS += -iwithprefix include -Werror -Wno-pointer-arith -pipe
diff -r 814a4f471fff -r 3e93c50982de xen/arch/x86/Rules.mk
--- a/xen/arch/x86/Rules.mk     Thu Jan 24 12:47:50 2013 +0000
+++ b/xen/arch/x86/Rules.mk     Thu Jan 24 12:47:51 2013 +0000
@@ -3,6 +3,7 @@
 
 HAS_ACPI := y
 HAS_VGA  := y
+HAS_VIDEO  := y
 HAS_CPUFREQ := y
 HAS_PCI := y
 HAS_PASSTHROUGH := y
diff -r 814a4f471fff -r 3e93c50982de xen/drivers/Makefile
--- a/xen/drivers/Makefile      Thu Jan 24 12:47:50 2013 +0000
+++ b/xen/drivers/Makefile      Thu Jan 24 12:47:51 2013 +0000
@@ -3,4 +3,4 @@ subdir-$(HAS_CPUFREQ) += cpufreq
 subdir-$(HAS_PCI) += pci
 subdir-$(HAS_PASSTHROUGH) += passthrough
 subdir-$(HAS_ACPI) += acpi
-subdir-$(HAS_VGA) += video
+subdir-$(HAS_VIDEO) += video
diff -r 814a4f471fff -r 3e93c50982de xen/drivers/char/console.c
--- a/xen/drivers/char/console.c        Thu Jan 24 12:47:50 2013 +0000
+++ b/xen/drivers/char/console.c        Thu Jan 24 12:47:51 2013 +0000
@@ -21,7 +21,7 @@
 #include <xen/delay.h>
 #include <xen/guest_access.h>
 #include <xen/shutdown.h>
-#include <xen/vga.h>
+#include <xen/video.h>
 #include <xen/kexec.h>
 #include <asm/debugger.h>
 #include <asm/div64.h>
@@ -297,7 +297,7 @@ static void dump_console_ring_key(unsign
     buf[sofar] = '\0';
 
     sercon_puts(buf);
-    vga_puts(buf);
+    video_puts(buf);
 
     free_xenheap_pages(buf, order);
 }
@@ -383,7 +383,7 @@ static long guest_console_write(XEN_GUES
         spin_lock_irq(&console_lock);
 
         sercon_puts(kbuf);
-        vga_puts(kbuf);
+        video_puts(kbuf);
 
         if ( opt_console_to_ring )
         {
@@ -458,7 +458,7 @@ static void __putstr(const char *str)
     ASSERT(spin_is_locked(&console_lock));
 
     sercon_puts(str);
-    vga_puts(str);
+    video_puts(str);
 
     if ( !console_locks_busted )
     {
@@ -586,7 +586,7 @@ void __init console_init_preirq(void)
         if ( *p == ',' )
             p++;
         if ( !strncmp(p, "vga", 3) )
-            vga_init();
+            video_init();
         else if ( !strncmp(p, "none", 4) )
             continue;
         else if ( (sh = serial_parse_handle(p)) >= 0 )
@@ -688,7 +688,7 @@ void __init console_endboot(void)
         printk("\n");
     }
 
-    vga_endboot();
+    video_endboot();
 
     /*
      * If user specifies so, we fool the switch routine to redirect input
diff -r 814a4f471fff -r 3e93c50982de xen/drivers/video/Makefile
--- a/xen/drivers/video/Makefile        Thu Jan 24 12:47:50 2013 +0000
+++ b/xen/drivers/video/Makefile        Thu Jan 24 12:47:51 2013 +0000
@@ -1,5 +1,5 @@
-obj-y := vga.o
-obj-$(CONFIG_X86) += font_8x14.o
-obj-$(CONFIG_X86) += font_8x16.o
-obj-$(CONFIG_X86) += font_8x8.o
-obj-$(CONFIG_X86) += vesa.o
+obj-$(HAS_VGA) := vga.o
+obj-$(HAS_VIDEO) += font_8x14.o
+obj-$(HAS_VIDEO) += font_8x16.o
+obj-$(HAS_VIDEO) += font_8x8.o
+obj-$(HAS_VGA) += vesa.o
diff -r 814a4f471fff -r 3e93c50982de xen/drivers/video/vesa.c
--- a/xen/drivers/video/vesa.c  Thu Jan 24 12:47:50 2013 +0000
+++ b/xen/drivers/video/vesa.c  Thu Jan 24 12:47:51 2013 +0000
@@ -108,7 +108,7 @@ void __init vesa_init(void)
 
     memset(lfb, 0, vram_remap);
 
-    vga_puts = vesa_redraw_puts;
+    video_puts = vesa_redraw_puts;
 
     printk(XENLOG_INFO "vesafb: framebuffer at %#x, mapped to 0x%p, "
            "using %uk, total %uk\n",
@@ -193,7 +193,7 @@ void __init vesa_endboot(bool_t keep)
     if ( keep )
     {
         xpos = 0;
-        vga_puts = vesa_scroll_puts;
+        video_puts = vesa_scroll_puts;
     }
     else
     {
diff -r 814a4f471fff -r 3e93c50982de xen/drivers/video/vga.c
--- a/xen/drivers/video/vga.c   Thu Jan 24 12:47:50 2013 +0000
+++ b/xen/drivers/video/vga.c   Thu Jan 24 12:47:51 2013 +0000
@@ -21,7 +21,7 @@ static unsigned char *video;
 
 static void vga_text_puts(const char *s);
 static void vga_noop_puts(const char *s) {}
-void (*vga_puts)(const char *) = vga_noop_puts;
+void (*video_puts)(const char *) = vga_noop_puts;
 
 /*
  * 'vga=<mode-specifier>[,keep]' where <mode-specifier> is one of:
@@ -62,7 +62,7 @@ void vesa_endboot(bool_t keep);
 #define vesa_endboot(x)   ((void)0)
 #endif
 
-void __init vga_init(void)
+void __init video_init(void)
 {
     char *p;
 
@@ -85,7 +85,7 @@ void __init vga_init(void)
         columns = vga_console_info.u.text_mode_3.columns;
         lines   = vga_console_info.u.text_mode_3.rows;
         memset(video, 0, columns * lines * 2);
-        vga_puts = vga_text_puts;
+        video_puts = vga_text_puts;
         break;
     case XEN_VGATYPE_VESA_LFB:
     case XEN_VGATYPE_EFI_LFB:
@@ -97,16 +97,16 @@ void __init vga_init(void)
     }
 }
 
-void __init vga_endboot(void)
+void __init video_endboot(void)
 {
-    if ( vga_puts == vga_noop_puts )
+    if ( video_puts == vga_noop_puts )
         return;
 
     printk("Xen is %s VGA console.\n",
            vgacon_keep ? "keeping" : "relinquishing");
 
     if ( !vgacon_keep )
-        vga_puts = vga_noop_puts;
+        video_puts = vga_noop_puts;
     else
     {
         int bus, devfn;
diff -r 814a4f471fff -r 3e93c50982de xen/include/asm-x86/config.h
--- a/xen/include/asm-x86/config.h      Thu Jan 24 12:47:50 2013 +0000
+++ b/xen/include/asm-x86/config.h      Thu Jan 24 12:47:51 2013 +0000
@@ -40,6 +40,7 @@
 #define CONFIG_ACPI_CSTATE 1
 
 #define CONFIG_VGA 1
+#define CONFIG_VIDEO 1
 
 #define CONFIG_HOTPLUG 1
 #define CONFIG_HOTPLUG_CPU 1
diff -r 814a4f471fff -r 3e93c50982de xen/include/xen/vga.h
--- a/xen/include/xen/vga.h     Thu Jan 24 12:47:50 2013 +0000
+++ b/xen/include/xen/vga.h     Thu Jan 24 12:47:51 2013 +0000
@@ -9,17 +9,10 @@
 #ifndef _XEN_VGA_H
 #define _XEN_VGA_H
 
-#include <public/xen.h>
+#include <xen/video.h>
 
 #ifdef CONFIG_VGA
 extern struct xen_vga_console_info vga_console_info;
-void vga_init(void);
-void vga_endboot(void);
-extern void (*vga_puts)(const char *);
-#else
-#define vga_init()    ((void)0)
-#define vga_endboot() ((void)0)
-#define vga_puts(s)   ((void)0)
 #endif
 
 #endif /* _XEN_VGA_H */
diff -r 814a4f471fff -r 3e93c50982de xen/include/xen/video.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/xen/include/xen/video.h   Thu Jan 24 12:47:51 2013 +0000
@@ -0,0 +1,24 @@
+/*
+ *  video.h
+ *
+ *  This file is subject to the terms and conditions of the GNU General Public
+ *  License.  See the file COPYING in the main directory of this archive
+ *  for more details.
+ */
+
+#ifndef _XEN_VIDEO_H
+#define _XEN_VIDEO_H
+
+#include <public/xen.h>
+
+#ifdef CONFIG_VIDEO
+void video_init(void);
+extern void (*video_puts)(const char *);
+void video_endboot(void);
+#else
+#define video_init()    ((void)0)
+#define video_puts(s)   ((void)0)
+#define video_endboot() ((void)0)
+#endif
+
+#endif /* _XEN_VIDEO_H */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.