mirror of https://github.com/xemu-project/xemu.git
exynos: make display updates thread safe
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20170421091632.30900-7-kraxel@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
167e9c7982
commit
553bcce5ac
|
@ -1263,6 +1263,7 @@ static void exynos4210_fimd_update(void *opaque)
|
||||||
Exynos4210fimdState *s = (Exynos4210fimdState *)opaque;
|
Exynos4210fimdState *s = (Exynos4210fimdState *)opaque;
|
||||||
DisplaySurface *surface;
|
DisplaySurface *surface;
|
||||||
Exynos4210fimdWindow *w;
|
Exynos4210fimdWindow *w;
|
||||||
|
DirtyBitmapSnapshot *snap;
|
||||||
int i, line;
|
int i, line;
|
||||||
hwaddr fb_line_addr, inc_size;
|
hwaddr fb_line_addr, inc_size;
|
||||||
int scrn_height;
|
int scrn_height;
|
||||||
|
@ -1291,10 +1292,12 @@ static void exynos4210_fimd_update(void *opaque)
|
||||||
memory_region_sync_dirty_bitmap(w->mem_section.mr);
|
memory_region_sync_dirty_bitmap(w->mem_section.mr);
|
||||||
host_fb_addr = w->host_fb_addr;
|
host_fb_addr = w->host_fb_addr;
|
||||||
fb_line_addr = w->mem_section.offset_within_region;
|
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++) {
|
for (line = 0; line < scrn_height; line++) {
|
||||||
is_dirty = memory_region_get_dirty(w->mem_section.mr,
|
is_dirty = memory_region_snapshot_get_dirty(w->mem_section.mr,
|
||||||
fb_line_addr, scrn_width, DIRTY_MEMORY_VGA);
|
snap, fb_line_addr, scrn_width);
|
||||||
|
|
||||||
if (s->invalidate || is_dirty) {
|
if (s->invalidate || is_dirty) {
|
||||||
if (first_line == -1) {
|
if (first_line == -1) {
|
||||||
|
@ -1309,9 +1312,7 @@ static void exynos4210_fimd_update(void *opaque)
|
||||||
fb_line_addr += inc_size;
|
fb_line_addr += inc_size;
|
||||||
is_dirty = false;
|
is_dirty = false;
|
||||||
}
|
}
|
||||||
memory_region_reset_dirty(w->mem_section.mr,
|
g_free(snap);
|
||||||
w->mem_section.offset_within_region,
|
|
||||||
w->fb_len, DIRTY_MEMORY_VGA);
|
|
||||||
blend = true;
|
blend = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue