diff options
author | Zhai Edwin <edwin.zhai@intel.com> | 2011-05-10 14:02:35 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-05-11 16:48:21 +0100 |
commit | a2e232e2313ee267076bb8de32a1a604dbebc33b (patch) | |
tree | 0bd71628aa88c9975d1fe031609558e26ca9164b /meta/recipes-devtools/qemu/qemu-git/qemu-vmware-vga-depth.patch | |
parent | 7f7de31e9caa1594f2175f90f8faa96a88627329 (diff) | |
download | poky-a2e232e2313ee267076bb8de32a1a604dbebc33b.tar.gz |
qemu: Upgrade qemu git to the latest 0.14 branch
Also add missing patch to build qemu-git
[YOCTO #1013] got fixed
(From OE-Core rev: 9b80846152931bed018f33baaaf1ba253e756867)
Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu-git/qemu-vmware-vga-depth.patch')
-rw-r--r-- | meta/recipes-devtools/qemu/qemu-git/qemu-vmware-vga-depth.patch | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu-git/qemu-vmware-vga-depth.patch b/meta/recipes-devtools/qemu/qemu-git/qemu-vmware-vga-depth.patch new file mode 100644 index 0000000000..42ec98fee5 --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu-git/qemu-vmware-vga-depth.patch | |||
@@ -0,0 +1,115 @@ | |||
1 | # fix VMware VGA driver depth calculation error, which may cause segmentation fault | ||
2 | # | ||
3 | # ktian1, 06/29/2010 | ||
4 | Index: qemu-0.14.0/console.h | ||
5 | =================================================================== | ||
6 | --- qemu-0.14.0.orig/console.h | ||
7 | +++ qemu-0.14.0/console.h | ||
8 | @@ -171,6 +171,12 @@ struct DisplayAllocator { | ||
9 | void (*free_displaysurface)(DisplaySurface *surface); | ||
10 | }; | ||
11 | |||
12 | +struct DisplayPostCallback { | ||
13 | + void (*postcall) (void *); | ||
14 | + void *parm; | ||
15 | + struct DisplayPostCallback *next; | ||
16 | +}; | ||
17 | + | ||
18 | struct DisplayState { | ||
19 | struct DisplaySurface *surface; | ||
20 | void *opaque; | ||
21 | @@ -178,6 +184,7 @@ struct DisplayState { | ||
22 | |||
23 | struct DisplayAllocator* allocator; | ||
24 | struct DisplayChangeListener* listeners; | ||
25 | + struct DisplayPostCallback* postcalls; | ||
26 | |||
27 | void (*mouse_set)(int x, int y, int on); | ||
28 | void (*cursor_define)(QEMUCursor *cursor); | ||
29 | @@ -229,6 +236,12 @@ static inline void register_displaychang | ||
30 | ds->listeners = dcl; | ||
31 | } | ||
32 | |||
33 | +static inline void register_displaypostcallback(DisplayState *ds, DisplayPostCallback *dpc) | ||
34 | +{ | ||
35 | + dpc->next = ds->postcalls; | ||
36 | + ds->postcalls = dpc; | ||
37 | +} | ||
38 | + | ||
39 | static inline void dpy_update(DisplayState *s, int x, int y, int w, int h) | ||
40 | { | ||
41 | struct DisplayChangeListener *dcl = s->listeners; | ||
42 | Index: qemu-0.14.0/hw/vmware_vga.c | ||
43 | =================================================================== | ||
44 | --- qemu-0.14.0.orig/hw/vmware_vga.c | ||
45 | +++ qemu-0.14.0/hw/vmware_vga.c | ||
46 | @@ -1001,8 +1001,9 @@ static void vmsvga_update_display(void * | ||
47 | } | ||
48 | } | ||
49 | |||
50 | -static void vmsvga_reset(struct vmsvga_state_s *s) | ||
51 | +static void vmsvga_reset(void *parm) | ||
52 | { | ||
53 | + struct vmsvga_state_s *s = (struct vmsvga_state_s *)parm; | ||
54 | s->index = 0; | ||
55 | s->enable = 0; | ||
56 | s->config = 0; | ||
57 | @@ -1207,6 +1208,8 @@ static const VMStateDescription vmstate_ | ||
58 | |||
59 | static void vmsvga_init(struct vmsvga_state_s *s, int vga_ram_size) | ||
60 | { | ||
61 | + DisplayPostCallback *dpc; | ||
62 | + | ||
63 | s->scratch_size = SVGA_SCRATCH_SIZE; | ||
64 | s->scratch = qemu_malloc(s->scratch_size * 4); | ||
65 | |||
66 | @@ -1224,7 +1227,10 @@ static void vmsvga_init(struct vmsvga_st | ||
67 | vga_init(&s->vga); | ||
68 | vmstate_register(NULL, 0, &vmstate_vga_common, &s->vga); | ||
69 | |||
70 | - vmsvga_reset(s); | ||
71 | + dpc = qemu_mallocz(sizeof(DisplayPostCallback)); | ||
72 | + dpc->postcall = vmsvga_reset; | ||
73 | + dpc->parm = s; | ||
74 | + register_displaypostcallback(s->vga.ds, dpc); | ||
75 | } | ||
76 | |||
77 | static void pci_vmsvga_map_ioport(PCIDevice *pci_dev, int region_num, | ||
78 | Index: qemu-0.14.0/qemu-common.h | ||
79 | =================================================================== | ||
80 | --- qemu-0.14.0.orig/qemu-common.h | ||
81 | +++ qemu-0.14.0/qemu-common.h | ||
82 | @@ -241,6 +241,7 @@ typedef struct DisplayState DisplayState | ||
83 | typedef struct DisplayChangeListener DisplayChangeListener; | ||
84 | typedef struct DisplaySurface DisplaySurface; | ||
85 | typedef struct DisplayAllocator DisplayAllocator; | ||
86 | +typedef struct DisplayPostCallback DisplayPostCallback; | ||
87 | typedef struct PixelFormat PixelFormat; | ||
88 | typedef struct TextConsole TextConsole; | ||
89 | typedef TextConsole QEMUConsole; | ||
90 | Index: qemu-0.14.0/vl.c | ||
91 | =================================================================== | ||
92 | --- qemu-0.14.0.orig/vl.c | ||
93 | +++ qemu-0.14.0/vl.c | ||
94 | @@ -1920,6 +1920,7 @@ int main(int argc, char **argv, char **e | ||
95 | char boot_devices[33] = "cad"; /* default to HD->floppy->CD-ROM */ | ||
96 | DisplayState *ds; | ||
97 | DisplayChangeListener *dcl; | ||
98 | + DisplayPostCallback *dpc; | ||
99 | int cyls, heads, secs, translation; | ||
100 | QemuOpts *hda_opts = NULL, *opts; | ||
101 | QemuOptsList *olist; | ||
102 | @@ -3101,6 +3102,13 @@ int main(int argc, char **argv, char **e | ||
103 | |||
104 | /* display setup */ | ||
105 | dpy_resize(ds); | ||
106 | + dpc = ds->postcalls; | ||
107 | + while (dpc != NULL) { | ||
108 | + if (dpc->postcall != NULL) | ||
109 | + dpc->postcall(dpc->parm); | ||
110 | + dpc = dpc->next; | ||
111 | + } | ||
112 | + | ||
113 | dcl = ds->listeners; | ||
114 | while (dcl != NULL) { | ||
115 | if (dcl->dpy_refresh != NULL) { | ||