aboutsummaryrefslogtreecommitdiff
path: root/hw/display/omap_lcdc.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2015-07-13 12:00:29 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2015-07-24 13:57:45 +0200
commitc1076c3e13a86140cc2ba29866512df8460cc7c2 (patch)
tree9aa1b98c2a7467e890539e2bb8cab4e2e989a725 /hw/display/omap_lcdc.c
parentdeb809edb85334c8e90530e1071b98f4da25ebaa (diff)
downloadqemu-c1076c3e13a86140cc2ba29866512df8460cc7c2.zip
qemu-c1076c3e13a86140cc2ba29866512df8460cc7c2.tar.gz
qemu-c1076c3e13a86140cc2ba29866512df8460cc7c2.tar.bz2
framebuffer: set DIRTY_MEMORY_VGA on RAM that is used for the framebuffer
The MemoryRegionSection contains enough information to access the RAM region underlying the framebuffer, and can be cached inside the display device. By doing this, the new framebuffer_update_memory_section function can enable dirty memory logging on the relevant RAM region. The function must be called whenever the stride or base of the framebuffer changes; a simple way to cover these cases is to call it on every full frame invalidation, which is a rare case. framebuffer_update_display now works entirely on a MemoryRegionSection, without going through cpu_physical_memory_map/unmap. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/display/omap_lcdc.c')
-rw-r--r--hw/display/omap_lcdc.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/hw/display/omap_lcdc.c b/hw/display/omap_lcdc.c
index fda81ba..a7c6cd7 100644
--- a/hw/display/omap_lcdc.c
+++ b/hw/display/omap_lcdc.c
@@ -25,6 +25,7 @@
struct omap_lcd_panel_s {
MemoryRegion *sysmem;
MemoryRegion iomem;
+ MemoryRegionSection fbsection;
qemu_irq irq;
QemuConsole *con;
@@ -215,12 +216,19 @@ static void omap_update_display(void *opaque)
step = width * bpp >> 3;
linesize = surface_stride(surface);
- framebuffer_update_display(surface, omap_lcd->sysmem,
- frame_base, width, height,
+ if (omap_lcd->invalidate) {
+ framebuffer_update_memory_section(&omap_lcd->fbsection,
+ omap_lcd->sysmem, frame_base,
+ height, step);
+ }
+
+ framebuffer_update_display(surface, &omap_lcd->fbsection,
+ width, height,
step, linesize, 0,
omap_lcd->invalidate,
draw_line, omap_lcd->palette,
&first, &last);
+
if (first >= 0) {
dpy_gfx_update(omap_lcd->con, 0, first, width, last - first + 1);
}