]> git.proxmox.com Git - qemu.git/commitdiff
vga: do not resize the screen on hw_invalidate
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Mon, 3 Aug 2009 15:14:39 +0000 (16:14 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 28 Aug 2009 02:23:37 +0000 (21:23 -0500)
Hi all,
currently vga always resizes the screen when vga_hw_invalidate is called
while this is not required and all the other graphic emulators don't.
This patch fixes it, making vga invalidate behaviour consistent with the
other emulated devices.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-Id:

hw/vga.c
hw/vga_int.h

index 91a6852f2577a36dbc031058567afd468992653e..00ecc1b7088c911872bef6145ca6c53547aca380 100644 (file)
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -1837,7 +1837,8 @@ static void vga_update_display(void *opaque)
     if (ds_get_bits_per_pixel(s->ds) == 0) {
         /* nothing to do */
     } else {
-        full_update = 0;
+        full_update = s->full_update;
+        s->full_update = 0;
         if (!(s->ar_index & 0x20)) {
             graphic_mode = GMODE_BLANK;
         } else {
@@ -1867,8 +1868,7 @@ static void vga_invalidate_display(void *opaque)
 {
     VGAState *s = (VGAState *)opaque;
 
-    s->last_width = -1;
-    s->last_height = -1;
+    s->full_update = 1;
 }
 
 void vga_reset(void *opaque)
index 631b1b0fc35bcd3a718ec447c8542eb0718c39fb..8fdf51dc6199442c4c02c8a3a3a3b1ca119ff216 100644 (file)
@@ -158,6 +158,7 @@ typedef struct VGACommonState {
     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 full_update;
     uint8_t cursor_start, cursor_end;
     uint32_t cursor_offset;
     unsigned int (*rgb_to_pixel)(unsigned int r,