From 3d10fb55368f9d5c4a4cba9ec27b737bb37d8aab Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 7 Jul 2008 15:30:10 +0100 Subject: [PATCH] Fix remaining missing changes to update to xen-unstable 17958. We had accidentally dropped some changes from 17737 to 17831. Fixed by in xen-unstable: hg update 17737 patch -p1 < vga-patch-from-xen-unstable-17737:c93a913c221f hg diff -r 17831 tools/ioemu >patch and then in qemu.git: patch -R -U -p3 <.../patch and fix up conflicts, which were: Makefile.target - stubdom changes, defer for now hw/vga.c - one easy fixup, one change already in our tree hw/xenfb.c - already done completely earlier, so discard changes --- hw/vga.c | 20 ++++++++++---------- hw/vga_int.h | 1 + xenstore.c | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/hw/vga.c b/hw/vga.c index 4fda5015d..7d1e86eaf 100644 --- a/hw/vga.c +++ b/hw/vga.c @@ -1068,8 +1068,6 @@ typedef unsigned int rgb_to_pixel_dup_func(unsigned int r, unsigned int g, unsig static rgb_to_pixel_dup_func *rgb_to_pixel_dup_table[NB_DEPTHS]; -static int old_depth = 0; - /* * Text mode update * Missing: @@ -1118,13 +1116,10 @@ static void vga_draw_text(VGAState *s, int full_update) s->last_scr_width = width * cw; s->last_scr_height = height * cheight; - if (s->ds->dpy_resize_shared && old_depth) { - dpy_resize_shared(s->ds, s->last_scr_width, s->last_scr_height, 0, s->last_scr_width * (s->ds->depth / 8), NULL); - old_depth = 0; - full_update = 1; - } else if (width != s->last_width || height != s->last_height || - cw != s->last_cw || cheight != s->last_ch) { + if (width != s->last_width || height != s->last_height || + cw != s->last_cw || cheight != s->last_ch || s->last_depth) { dpy_resize(s->ds, s->last_scr_width, s->last_scr_height); + s->last_depth = 0; full_update = 1; } s->last_width = width; @@ -1535,14 +1530,14 @@ static void vga_draw_graphic(VGAState *s, int full_update) if (s->line_offset != s->last_line_offset || disp_width != s->last_width || height != s->last_height || - old_depth != depth) { + s->last_depth != depth) { dpy_resize_shared(s->ds, disp_width, height, depth, s->line_offset, s->vram_ptr + (s->start_addr * 4)); s->last_scr_width = disp_width; s->last_scr_height = height; s->last_width = disp_width; s->last_height = height; s->last_line_offset = s->line_offset; - old_depth = depth; + s->last_depth = depth; full_update = 1; } else if (s->ds->shared_buf && (full_update || s->ds->data != s->vram_ptr + (s->start_addr * 4))) s->ds->dpy_setdata(s->ds, s->vram_ptr + (s->start_addr * 4)); @@ -2160,6 +2155,11 @@ void vga_common_init(VGAState *s, DisplayState *ds, uint8_t *vga_ram_base, /* and page-aligned for PVFB memory sharing */ s->vram_ptr = s->vram_alloc = qemu_memalign(TARGET_PAGE_SIZE, vga_ram_size); +#ifdef CONFIG_STUBDOM + if (!cirrus_vga_enabled) + xenfb_pv_display_start(s->vram_ptr); +#endif + s->vram_offset = vga_ram_offset; s->vram_size = vga_ram_size; s->ds = ds; diff --git a/hw/vga_int.h b/hw/vga_int.h index 67309a66c..06267746a 100644 --- a/hw/vga_int.h +++ b/hw/vga_int.h @@ -135,6 +135,7 @@ uint8_t last_cw, last_ch; \ uint32_t last_width, last_height; /* in chars or pixels */ \ uint32_t last_scr_width, last_scr_height; /* in pixels */ \ + uint32_t last_depth; /* in bits */ \ uint8_t cursor_start, cursor_end; \ uint32_t cursor_offset; \ unsigned int (*rgb_to_pixel)(unsigned int r, \ diff --git a/xenstore.c b/xenstore.c index 0ba45a57d..943d8195a 100644 --- a/xenstore.c +++ b/xenstore.c @@ -132,7 +132,7 @@ void xenstore_parse_domain_config(int hvm_domid) e = xs_directory(xsh, XBT_NULL, buf, &num); if (e == NULL) - goto out; + num = 0; for (i = 0; i < num; i++) { /* read the backend path */ -- 2.39.5