[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 09/13] exynos: make display updates thread safe
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PULL 09/13] exynos: make display updates thread safe |
Date: |
Mon, 24 Apr 2017 14:17:04 +0200 |
Signed-off-by: Gerd Hoffmann <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>
---
hw/display/exynos4210_fimd.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/hw/display/exynos4210_fimd.c b/hw/display/exynos4210_fimd.c
index e5be713406..fd0b2bec65 100644
--- a/hw/display/exynos4210_fimd.c
+++ b/hw/display/exynos4210_fimd.c
@@ -1263,6 +1263,7 @@ static void exynos4210_fimd_update(void *opaque)
Exynos4210fimdState *s = (Exynos4210fimdState *)opaque;
DisplaySurface *surface;
Exynos4210fimdWindow *w;
+ DirtyBitmapSnapshot *snap;
int i, line;
hwaddr fb_line_addr, inc_size;
int scrn_height;
@@ -1291,10 +1292,12 @@ static void exynos4210_fimd_update(void *opaque)
memory_region_sync_dirty_bitmap(w->mem_section.mr);
host_fb_addr = w->host_fb_addr;
fb_line_addr = w->mem_section.offset_within_region;
+ snap = memory_region_snapshot_and_clear_dirty(w->mem_section.mr,
+ fb_line_addr, inc_size * scrn_height, DIRTY_MEMORY_VGA);
for (line = 0; line < scrn_height; line++) {
- is_dirty = memory_region_get_dirty(w->mem_section.mr,
- fb_line_addr, scrn_width, DIRTY_MEMORY_VGA);
+ is_dirty = memory_region_snapshot_get_dirty(w->mem_section.mr,
+ snap, fb_line_addr, scrn_width);
if (s->invalidate || is_dirty) {
if (first_line == -1) {
@@ -1309,9 +1312,7 @@ static void exynos4210_fimd_update(void *opaque)
fb_line_addr += inc_size;
is_dirty = false;
}
- memory_region_reset_dirty(w->mem_section.mr,
- w->mem_section.offset_within_region,
- w->fb_len, DIRTY_MEMORY_VGA);
+ g_free(snap);
blend = true;
}
}
--
2.9.3
- [Qemu-devel] [PULL 03/13] virtio-gpu: replace PIXMAN_* by PIXMAN_BE_*, (continued)
- [Qemu-devel] [PULL 03/13] virtio-gpu: replace PIXMAN_* by PIXMAN_BE_*, Gerd Hoffmann, 2017/04/24
- [Qemu-devel] [PULL 12/13] qxl: add xres and yres properties, Gerd Hoffmann, 2017/04/24
- [Qemu-devel] [PULL 06/13] vga: add vga_scanline_invalidated helper, Gerd Hoffmann, 2017/04/24
- [Qemu-devel] [PULL 13/13] virtio-gpu: add xres and yres properties, Gerd Hoffmann, 2017/04/24
- [Qemu-devel] [PULL 10/13] g364fb: make display updates thread safe, Gerd Hoffmann, 2017/04/24
- [Qemu-devel] [PULL 08/13] framebuffer: make display updates thread safe, Gerd Hoffmann, 2017/04/24
- [Qemu-devel] [PULL 04/13] bitmap: add bitmap_copy_and_clear_atomic, Gerd Hoffmann, 2017/04/24
- [Qemu-devel] [PULL 02/13] console: add same displaychangelistener registration pre-condition, Gerd Hoffmann, 2017/04/24
- [Qemu-devel] [PULL 05/13] memory: add support getting and using a dirty bitmap copy., Gerd Hoffmann, 2017/04/24
- [Qemu-devel] [PULL 07/13] vga: make display updates thread safe., Gerd Hoffmann, 2017/04/24
- [Qemu-devel] [PULL 09/13] exynos: make display updates thread safe,
Gerd Hoffmann <=
- Re: [Qemu-devel] [PULL 00/13] vga patch queue, Peter Maydell, 2017/04/24