diff mbox

[v2,05/13] tcx: ensure tcx_set_dirty() also invalidates the 24-bit plane and cplane

Message ID 1492763327-12742-6-git-send-email-mark.cave-ayland@ilande.co.uk
State New
Headers show

Commit Message

Mark Cave-Ayland April 21, 2017, 8:28 a.m. UTC
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/display/tcx.c |    7 +++++++
 1 file changed, 7 insertions(+)
diff mbox

Patch

diff --git a/hw/display/tcx.c b/hw/display/tcx.c
index d24466f..6817bd2 100644
--- a/hw/display/tcx.c
+++ b/hw/display/tcx.c
@@ -96,6 +96,13 @@  typedef struct TCXState {
 static void tcx_set_dirty(TCXState *s, ram_addr_t addr, int len)
 {
     memory_region_set_dirty(&s->vram_mem, addr, len);
+
+    if (s->depth == 24) {
+        memory_region_set_dirty(&s->vram_mem, s->vram24_offset + addr * 4,
+                                len * 4);
+        memory_region_set_dirty(&s->vram_mem, s->cplane_offset + addr * 4,
+                                len * 4);
+    }
 }
 
 static inline int tcx24_check_dirty(TCXState *s, ram_addr_t page,