diff mbox series

[4/5] sm501: Set updated region dirty after 2D operation

Message ID d565e8658b3614c57d32598e2e5622d4e40e8dd7.1529568501.git.balaton@eik.bme.hu
State New
Headers show
Series Misc sm501 improvements | expand

Commit Message

BALATON Zoltan June 21, 2018, 8:08 a.m. UTC
Set the changed memory region dirty after performed a 2D operation to
ensure that the screen is updated properly.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
---
 hw/display/sm501.c | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/hw/display/sm501.c b/hw/display/sm501.c
index a6232ed..e426d2f 100644
--- a/hw/display/sm501.c
+++ b/hw/display/sm501.c
@@ -774,6 +774,11 @@  static void sm501_2d_operation(SM501State *s)
         abort();
         break;
     }
+
+    memory_region_set_dirty(&s->local_mem_region,
+                            s->twoD_destination_base & 0x03FFFFFF,
+                            (dst_y + operation_height) * dst_width +
+                            dst_x + operation_width);
 }
 
 static uint64_t sm501_system_config_read(void *opaque, hwaddr addr,