[Qemu-devel] [PATCH] vga: fix region checks in wraparound case

Gerd Hoffmann posted 1 patch 6 years, 5 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20171030102830.4469-1-kraxel@redhat.com
Test checkpatch passed
Test docker passed
Test ppc passed
Test s390x passed
hw/display/vga.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[Qemu-devel] [PATCH] vga: fix region checks in wraparound case
Posted by Gerd Hoffmann 6 years, 5 months ago
Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/display/vga.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/display/vga.c b/hw/display/vga.c
index 1d19f6b..a64a094 100644
--- a/hw/display/vga.c
+++ b/hw/display/vga.c
@@ -1666,9 +1666,9 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
             /* scanline wraps from end of video memory to the start */
             assert(force_shadow);
             update = memory_region_snapshot_get_dirty(&s->vram, snap,
-                                                      page0, 0);
+                                                      page0, s->vbe_size - page0);
             update |= memory_region_snapshot_get_dirty(&s->vram, snap,
-                                                       page1, 0);
+                                                       0, page1);
         } else {
             update = memory_region_snapshot_get_dirty(&s->vram, snap,
                                                       page0, page1 - page0);
-- 
2.9.3


Re: [Qemu-devel] [PATCH] vga: fix region checks in wraparound case
Posted by Dr. David Alan Gilbert 6 years, 5 months ago
* Gerd Hoffmann (kraxel@redhat.com) wrote:
> Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>

Makes more sense to me;


Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

> ---
>  hw/display/vga.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/display/vga.c b/hw/display/vga.c
> index 1d19f6b..a64a094 100644
> --- a/hw/display/vga.c
> +++ b/hw/display/vga.c
> @@ -1666,9 +1666,9 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
>              /* scanline wraps from end of video memory to the start */
>              assert(force_shadow);
>              update = memory_region_snapshot_get_dirty(&s->vram, snap,
> -                                                      page0, 0);
> +                                                      page0, s->vbe_size - page0);
>              update |= memory_region_snapshot_get_dirty(&s->vram, snap,
> -                                                       page1, 0);
> +                                                       0, page1);
>          } else {
>              update = memory_region_snapshot_get_dirty(&s->vram, snap,
>                                                        page0, page1 - page0);
> -- 
> 2.9.3
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK