]> xenbits.xensource.com Git - qemu-xen-3.3-testing.git/commitdiff
Fix remaining missing changes to update to xen-unstable 17958.
authorIan Jackson <iwj@mariner.uk.xensource.com>
Mon, 7 Jul 2008 14:30:10 +0000 (15:30 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 7 Jul 2008 14:30:10 +0000 (15:30 +0100)
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
hw/vga_int.h
xenstore.c

index 4fda5015d51c516916fe63a7b78da46477edef53..7d1e86eaf10fc66c7164c4a29745d38ce9b5a1e7 100644 (file)
--- 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;
index 67309a66c9c0fd8bd90fc19f6c24a18e6c1117b2..06267746aa785aef0b4671e2ae0286e38784d877 100644 (file)
     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,                        \
index 0ba45a57d39a8aa7cd6df595876367f17d44362e..943d8195ab5b8ea1504951bd6090b60b4ebd0703 100644 (file)
@@ -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 */