vga: do not resize the screen on hw_invalidate
PATCH 1/1 vga: do not resize the screen on hw_invalidate
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.
--- hw/vga.c | 6 +++--- hw/vga_int.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-)
hw/vga.c +3 -3
@@ -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)
hw/vga_int.h +1 -0
@@ -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,
Signature · 1 line
1.5.4.3
Quoted 7 lines · Stefano Stabellini
Hi all,
currently vga always resizes the screen whenvga_hw_invalidateis 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 <[email protected]>
This rather old patch breaks switching to and from full screen mode using SDL and alt-ctrl-f key.
Please revert or fix it. The patch is also part of stable-0.11, so I expect the same problem there (but did not test it).
Found by git bisect, tested on several linux installations.
Quoted 42 lines
---
hw/vga.c| 6 +++---hw/vga_int.h| 1 +2 files changed, 4 insertions(+), 3 deletions(-)hw/vga.c +3
-3@@ -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)hw/vga_int.h +0
-0@@ -158,6 +158,7 @@ typedef struct VGACommonState {
uint32_tlast_width,last_height; /* in chars or pixels */uint32_tlast_scr_width,last_scr_height; /* in pixels */uint32_tlast_depth; /* in bits */
+uint8_tfull_update;uint8_tcursor_start,cursor_end;uint32_tcursor_offset;
unsigned int (*rgb_to_pixel)(unsigned int r,
[Qemu-devel] [BUG] Changing SDL full screen mode no longer works
Quoted 9 lines · Stefan Weil
Quoted 7 lines · Stefano Stabellini
Hi all,
currently vga always resizes the screen whenvga_hw_invalidateis 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 <[email protected]>
Quoted 8 lines
This rather old patch breaks switching to and from full screen mode using SDL and alt-ctrl-f key.
Please revert or fix it. The patch is also part of stable-0.11, so I expect the same problem there (but did not test it).
Found by git bisect, tested on several linux installations.
Debian qemu 0.11.0-5 is suffering from this bug, too.
So 0bd8246bfec1dfb2eb959f52db535572c0260f4c should be reverted or fixed not only for master but also for stable-0.11.
Regards,
Stefan
Re: [Qemu-devel] [BUG] Changing SDL full screen mode no longer works
Quoted 15 lines · Stefan Weil
Quoted 14 lines · Stefan Weil
Quoted 7 lines · Stefano Stabellini
Hi all,
currently vga always resizes the screen whenvga_hw_invalidateis 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 <[email protected]>This rather old patch breaks switching to and from full screen mode using SDL and alt-ctrl-f key.
Please revert or fix it. The patch is also part of stable-0.11, so I expect the same problem there (but did not test it).
Quoted 9 lines
Quoted 2 lines
Found by git bisect, tested on several linux installations.
Debian qemu 0.11.0-5 is suffering from this bug, too.
So
0bd8246bfec1dfb2eb959f52db535572c0260f4cshould be reverted or fixed not only for master but also for stable-0.11.
Before reverting that into stable-0.11, we should take time to understand the problem and have a correct fix (which might be a revert).
Signature · 2 lines
Aurelien Jarno GPG: 1024D/F1BCDB73 [email protected] http://www.aurel32.net