summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu/qemu-0.15.1/qemu-vmware-vga-depth.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu-0.15.1/qemu-vmware-vga-depth.patch')
-rw-r--r--meta/recipes-devtools/qemu/qemu-0.15.1/qemu-vmware-vga-depth.patch118
1 files changed, 0 insertions, 118 deletions
diff --git a/meta/recipes-devtools/qemu/qemu-0.15.1/qemu-vmware-vga-depth.patch b/meta/recipes-devtools/qemu/qemu-0.15.1/qemu-vmware-vga-depth.patch
deleted file mode 100644
index c4c5424e16..0000000000
--- a/meta/recipes-devtools/qemu/qemu-0.15.1/qemu-vmware-vga-depth.patch
+++ /dev/null
@@ -1,118 +0,0 @@
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-0.14.0/console.h
8===================================================================
9--- qemu-0.14.0.orig/console.h
10+++ qemu-0.14.0/console.h
11@@ -171,6 +171,12 @@ struct DisplayAllocator {
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 @@ struct DisplayState {
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@@ -229,6 +236,12 @@ static inline void register_displaychang
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-0.14.0/hw/vmware_vga.c
46===================================================================
47--- qemu-0.14.0.orig/hw/vmware_vga.c
48+++ qemu-0.14.0/hw/vmware_vga.c
49@@ -1001,8 +1001,9 @@ static void vmsvga_update_display(void *
50 }
51 }
52
53-static void vmsvga_reset(struct vmsvga_state_s *s)
54+static void vmsvga_reset(void *parm)
55 {
56+ struct vmsvga_state_s *s = (struct vmsvga_state_s *)parm;
57 s->index = 0;
58 s->enable = 0;
59 s->config = 0;
60@@ -1207,6 +1208,8 @@ static const VMStateDescription vmstate_
61
62 static void vmsvga_init(struct vmsvga_state_s *s, int vga_ram_size)
63 {
64+ DisplayPostCallback *dpc;
65+
66 s->scratch_size = SVGA_SCRATCH_SIZE;
67 s->scratch = qemu_malloc(s->scratch_size * 4);
68
69@@ -1224,7 +1227,10 @@ static void vmsvga_init(struct vmsvga_st
70 vga_init(&s->vga);
71 vmstate_register(NULL, 0, &vmstate_vga_common, &s->vga);
72
73- vmsvga_reset(s);
74+ dpc = qemu_mallocz(sizeof(DisplayPostCallback));
75+ dpc->postcall = vmsvga_reset;
76+ dpc->parm = s;
77+ register_displaypostcallback(s->vga.ds, dpc);
78 }
79
80 static void pci_vmsvga_map_ioport(PCIDevice *pci_dev, int region_num,
81Index: qemu-0.14.0/qemu-common.h
82===================================================================
83--- qemu-0.14.0.orig/qemu-common.h
84+++ qemu-0.14.0/qemu-common.h
85@@ -241,6 +241,7 @@ typedef struct DisplayState DisplayState
86 typedef struct DisplayChangeListener DisplayChangeListener;
87 typedef struct DisplaySurface DisplaySurface;
88 typedef struct DisplayAllocator DisplayAllocator;
89+typedef struct DisplayPostCallback DisplayPostCallback;
90 typedef struct PixelFormat PixelFormat;
91 typedef struct TextConsole TextConsole;
92 typedef TextConsole QEMUConsole;
93Index: qemu-0.14.0/vl.c
94===================================================================
95--- qemu-0.14.0.orig/vl.c
96+++ qemu-0.14.0/vl.c
97@@ -1920,6 +1920,7 @@ int main(int argc, char **argv, char **e
98 char boot_devices[33] = "cad"; /* default to HD->floppy->CD-ROM */
99 DisplayState *ds;
100 DisplayChangeListener *dcl;
101+ DisplayPostCallback *dpc;
102 int cyls, heads, secs, translation;
103 QemuOpts *hda_opts = NULL, *opts;
104 QemuOptsList *olist;
105@@ -3101,6 +3102,13 @@ int main(int argc, char **argv, char **e
106
107 /* display setup */
108 dpy_resize(ds);
109+ dpc = ds->postcalls;
110+ while (dpc != NULL) {
111+ if (dpc->postcall != NULL)
112+ dpc->postcall(dpc->parm);
113+ dpc = dpc->next;
114+ }
115+
116 dcl = ds->listeners;
117 while (dcl != NULL) {
118 if (dcl->dpy_refresh != NULL) {