qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 06/10] cg3: fix up size parameter for memory_region_


From: Gerd Hoffmann
Subject: [Qemu-devel] [PATCH 06/10] cg3: fix up size parameter for memory_region_get_dirty()
Date: Tue, 4 Apr 2017 12:23:11 +0200

From: Mark Cave-Ayland <address@hidden>

The code was incorrectly calculating the end address rather than the size of
the required region.

Signed-off-by: Mark Cave-Ayland <address@hidden>
---
 hw/display/cg3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/display/cg3.c b/hw/display/cg3.c
index e05ca92..6e19da0 100644
--- a/hw/display/cg3.c
+++ b/hw/display/cg3.c
@@ -115,7 +115,7 @@ static void cg3_update_display(void *opaque)
         int update = s->full_update;
 
         page = y * width;
-        update |= memory_region_get_dirty(&s->vram_mem, page, page + width,
+        update |= memory_region_get_dirty(&s->vram_mem, page, width - 1,
                                           DIRTY_MEMORY_VGA);
         if (update) {
             if (y_start < 0) {
-- 
2.9.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]