summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu/qemu-1.2.0/qemu-vmware-vga-depth.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2012-09-06 15:22:55 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-09-10 13:01:55 +0100
commit11432c69fa396eaad3eb5bd1644e9c86b80b5e55 (patch)
tree23ff736edd81ad50969cb9a68e6c95af8c182b17 /meta/recipes-devtools/qemu/qemu-1.2.0/qemu-vmware-vga-depth.patch
parentf6cc0772504f3af0869f31abb0da0e5686c61aa8 (diff)
downloadpoky-11432c69fa396eaad3eb5bd1644e9c86b80b5e55.tar.gz
qemu: Update from 0.15 to 1.2
Forward port the patches which were not applied upstream (From OE-Core rev: 0c1328a27881f1b3046ed527447608a9fa91b1ea) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu-1.2.0/qemu-vmware-vga-depth.patch')
-rw-r--r--meta/recipes-devtools/qemu/qemu-1.2.0/qemu-vmware-vga-depth.patch106
1 files changed, 106 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu-1.2.0/qemu-vmware-vga-depth.patch b/meta/recipes-devtools/qemu/qemu-1.2.0/qemu-vmware-vga-depth.patch
new file mode 100644
index 0000000000..a1b8035b70
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu-1.2.0/qemu-vmware-vga-depth.patch
@@ -0,0 +1,106 @@
1# fix VMware VGA driver depth calculation error, which may cause segmentation fault
2#
3# ktian1, 06/29/2010
4
5Upstream-Status: Pending
6
7Index: qemu-1.2.0/console.h
8===================================================================
9--- qemu-1.2.0.orig/console.h 2012-09-06 14:12:23.371832381 -0700
10+++ qemu-1.2.0/console.h 2012-09-06 14:12:23.627832390 -0700
11@@ -171,6 +171,12 @@
12 void (*free_displaysurface)(DisplaySurface *surface);
13 };
14
15+struct DisplayPostCallback {
16+ void (*postcall) (void *);
17+ void *parm;
18+ struct DisplayPostCallback *next;
19+};
20+
21 struct DisplayState {
22 struct DisplaySurface *surface;
23 void *opaque;
24@@ -178,6 +184,7 @@
25
26 struct DisplayAllocator* allocator;
27 struct DisplayChangeListener* listeners;
28+ struct DisplayPostCallback* postcalls;
29
30 void (*mouse_set)(int x, int y, int on);
31 void (*cursor_define)(QEMUCursor *cursor);
32@@ -233,6 +240,12 @@
33 ds->listeners = dcl;
34 }
35
36+static inline void register_displaypostcallback(DisplayState *ds, DisplayPostCallback *dpc)
37+{
38+ dpc->next = ds->postcalls;
39+ ds->postcalls = dpc;
40+}
41+
42 static inline void dpy_update(DisplayState *s, int x, int y, int w, int h)
43 {
44 struct DisplayChangeListener *dcl = s->listeners;
45Index: qemu-1.2.0/hw/vmware_vga.c
46===================================================================
47--- qemu-1.2.0.orig/hw/vmware_vga.c 2012-09-06 14:12:23.371832381 -0700
48+++ qemu-1.2.0/hw/vmware_vga.c 2012-09-06 14:18:05.595845288 -0700
49@@ -1081,6 +1081,8 @@
50 static void vmsvga_init(struct vmsvga_state_s *s,
51 MemoryRegion *address_space, MemoryRegion *io)
52 {
53+ DisplayPostCallback *dpc;
54+
55 s->scratch_size = SVGA_SCRATCH_SIZE;
56 s->scratch = g_malloc(s->scratch_size * 4);
57
58@@ -1098,6 +1100,10 @@
59 vga_common_init(&s->vga);
60 vga_init(&s->vga, address_space, io, true);
61 vmstate_register(NULL, 0, &vmstate_vga_common, &s->vga);
62+ dpc = g_malloc0(sizeof(DisplayPostCallback));
63+ dpc->postcall = vmsvga_reset;
64+ dpc->parm = s;
65+ register_displaypostcallback(s->vga.ds, dpc);
66
67 s->depth = ds_get_bits_per_pixel(s->vga.ds);
68 s->bypp = ds_get_bytes_per_pixel(s->vga.ds);
69Index: qemu-1.2.0/qemu-common.h
70===================================================================
71--- qemu-1.2.0.orig/qemu-common.h 2012-09-06 14:12:23.371832381 -0700
72+++ qemu-1.2.0/qemu-common.h 2012-09-06 14:12:23.643832391 -0700
73@@ -250,6 +250,7 @@
74 typedef struct DisplayChangeListener DisplayChangeListener;
75 typedef struct DisplaySurface DisplaySurface;
76 typedef struct DisplayAllocator DisplayAllocator;
77+typedef struct DisplayPostCallback DisplayPostCallback;
78 typedef struct PixelFormat PixelFormat;
79 typedef struct TextConsole TextConsole;
80 typedef TextConsole QEMUConsole;
81Index: qemu-1.2.0/vl.c
82===================================================================
83--- qemu-1.2.0.orig/vl.c 2012-09-06 14:12:23.371832381 -0700
84+++ qemu-1.2.0/vl.c 2012-09-06 14:17:32.635844142 -0700
85@@ -2352,6 +2352,7 @@
86 char boot_devices[33] = "cad"; /* default to HD->floppy->CD-ROM */
87 DisplayState *ds;
88 DisplayChangeListener *dcl;
89+ DisplayPostCallback *dpc;
90 int cyls, heads, secs, translation;
91 QemuOpts *hda_opts = NULL, *opts, *machine_opts;
92 QemuOptsList *olist;
93@@ -3699,6 +3700,13 @@
94
95 /* display setup */
96 dpy_resize(ds);
97+ dpc = ds->postcalls;
98+ while (dpc != NULL) {
99+ if (dpc->postcall != NULL)
100+ dpc->postcall(dpc->parm);
101+ dpc = dpc->next;
102+ }
103+
104 dcl = ds->listeners;
105 while (dcl != NULL) {
106 if (dcl->dpy_refresh != NULL) {