summaryrefslogtreecommitdiffstats
path: root/hw/display/tcx.c
diff options
context:
space:
mode:
authorMark Cave-Ayland2013-06-02 18:23:00 +0200
committerBlue Swirl2013-06-02 18:45:40 +0200
commitf10acc8b38d65a66ffa0588a036489d7fa6a593e (patch)
tree9c00c470e6f5495d63e9fe70d8c2699ca64c5486 /hw/display/tcx.c
parenttarget-i386: Fix aflag logic for CODE64 and the 0x67 prefix (diff)
downloadqemu-f10acc8b38d65a66ffa0588a036489d7fa6a593e.tar.gz
qemu-f10acc8b38d65a66ffa0588a036489d7fa6a593e.tar.xz
qemu-f10acc8b38d65a66ffa0588a036489d7fa6a593e.zip
tcx: Fix 24-bit display mode
Commit d08151bf (conversion of tcx to the memory API) broke the 24-bit mode of the tcx display adapter by accidentally passing in the final address of the dirty region to memory_region_reset_dirty() instead of its size. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/display/tcx.c')
-rw-r--r--hw/display/tcx.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/hw/display/tcx.c b/hw/display/tcx.c
index fc27f45e4e..995641c745 100644
--- a/hw/display/tcx.c
+++ b/hw/display/tcx.c
@@ -193,15 +193,16 @@ static inline void reset_dirty(TCXState *ts, ram_addr_t page_min,
ram_addr_t cpage)
{
memory_region_reset_dirty(&ts->vram_mem,
- page_min, page_max + TARGET_PAGE_SIZE,
+ page_min,
+ (page_max - page_min) + TARGET_PAGE_SIZE,
DIRTY_MEMORY_VGA);
memory_region_reset_dirty(&ts->vram_mem,
page24 + page_min * 4,
- page24 + page_max * 4 + TARGET_PAGE_SIZE,
+ (page_max - page_min) * 4 + TARGET_PAGE_SIZE,
DIRTY_MEMORY_VGA);
memory_region_reset_dirty(&ts->vram_mem,
cpage + page_min * 4,
- cpage + page_max * 4 + TARGET_PAGE_SIZE,
+ (page_max - page_min) * 4 + TARGET_PAGE_SIZE,
DIRTY_MEMORY_VGA);
}
@@ -285,7 +286,8 @@ static void tcx_update_display(void *opaque)
/* reset modified pages */
if (page_max >= page_min) {
memory_region_reset_dirty(&ts->vram_mem,
- page_min, page_max + TARGET_PAGE_SIZE,
+ page_min,
+ (page_max - page_min) + TARGET_PAGE_SIZE,
DIRTY_MEMORY_VGA);
}
}