[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 08/29] ui/console: remove dpy_gfx_update_dirty
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 08/29] ui/console: remove dpy_gfx_update_dirty |
Date: |
Mon, 27 Apr 2015 18:28:16 +0200 |
dpy_gfx_update_dirty expects DIRTY_MEMORY_VGA logging to be always on,
but that will not be the case soon. Because it computes the memory
region on the fly for every update (with memory_region_find), it cannot
enable/disable logging by itself.
We could always treat updates as invalidations if dirty logging is
not enabled, assuming that the board will enable logging on the
RAM region that includes the framebuffer.
However, the function is unused, so just drop it.
Signed-off-by: Paolo Bonzini <address@hidden>
---
include/ui/console.h | 4 ----
ui/console.c | 61 ----------------------------------------------------
2 files changed, 65 deletions(-)
diff --git a/include/ui/console.h b/include/ui/console.h
index 2f5b9f0..02c9fdf 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -231,10 +231,6 @@ void dpy_text_resize(QemuConsole *con, int w, int h);
void dpy_mouse_set(QemuConsole *con, int x, int y, int on);
void dpy_cursor_define(QemuConsole *con, QEMUCursor *cursor);
bool dpy_cursor_define_supported(QemuConsole *con);
-void dpy_gfx_update_dirty(QemuConsole *con,
- MemoryRegion *address_space,
- uint64_t base,
- bool invalidate);
bool dpy_gfx_check_format(QemuConsole *con,
pixman_format_code_t format);
diff --git a/ui/console.c b/ui/console.c
index b15ca87..3eb5e91 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1599,67 +1599,6 @@ bool dpy_cursor_define_supported(QemuConsole *con)
return false;
}
-/*
- * Call dpy_gfx_update for all dirity scanlines. Works for
- * DisplaySurfaces backed by guest memory (i.e. the ones created
- * using qemu_create_displaysurface_guestmem).
- */
-void dpy_gfx_update_dirty(QemuConsole *con,
- MemoryRegion *address_space,
- hwaddr base,
- bool invalidate)
-{
- DisplaySurface *ds = qemu_console_surface(con);
- int width = surface_stride(ds);
- int height = surface_height(ds);
- hwaddr size = width * height;
- MemoryRegionSection mem_section;
- MemoryRegion *mem;
- ram_addr_t addr;
- int first, last, i;
- bool dirty;
-
- mem_section = memory_region_find(address_space, base, size);
- mem = mem_section.mr;
- if (int128_get64(mem_section.size) != size ||
- !memory_region_is_ram(mem_section.mr)) {
- goto out;
- }
- assert(mem);
-
- memory_region_sync_dirty_bitmap(mem);
- addr = mem_section.offset_within_region;
-
- first = -1;
- last = -1;
- for (i = 0; i < height; i++, addr += width) {
- dirty = invalidate ||
- memory_region_get_dirty(mem, addr, width, DIRTY_MEMORY_VGA);
- if (dirty) {
- if (first == -1) {
- first = i;
- }
- last = i;
- }
- if (first != -1 && !dirty) {
- assert(last != -1 && last >= first);
- dpy_gfx_update(con, 0, first, surface_width(ds),
- last - first + 1);
- first = -1;
- }
- }
- if (first != -1) {
- assert(last != -1 && last >= first);
- dpy_gfx_update(con, 0, first, surface_width(ds),
- last - first + 1);
- }
-
- memory_region_reset_dirty(mem, mem_section.offset_within_region, size,
- DIRTY_MEMORY_VGA);
-out:
- memory_region_unref(mem);
-}
-
/***********************************************************/
/* register display */
--
1.8.3.1
- [Qemu-devel] [PATCH v2 00/29] Dirty bitmap atomic access and optimizations, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 02/29] g364fb: remove pointless call to memory_region_set_coalescing, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 04/29] display: add memory_region_sync_dirty_bitmap calls, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 03/29] display: enable DIRTY_MEMORY_VGA tracking explicitly, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 05/29] memory: differentiate memory_region_is_logging and memory_region_get_dirty_log_mask, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 06/29] memory: prepare for multiple bits in the dirty log mask, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 07/29] framebuffer: check memory_region_is_logging, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 08/29] ui/console: remove dpy_gfx_update_dirty,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 10/29] kvm: accept non-mapped memory in kvm_dirty_pages_log_change, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 09/29] memory: track DIRTY_MEMORY_CODE in mr->dirty_log_mask, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 11/29] memory: include DIRTY_MEMORY_MIGRATION in the dirty log mask, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 12/29] kvm: remove special handling of DIRTY_MEMORY_MIGRATION in the dirty log mask, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 13/29] ram_addr: tweaks to xen_modified_memory, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 15/29] exec: move functions to translate-all.h, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 14/29] exec: use memory_region_get_dirty_log_mask to optimize dirty tracking, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 16/29] translate-all: remove unnecessary argument to tb_invalidate_phys_range, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 17/29] cputlb: remove useless arguments to tlb_unprotect_code_phys, rename, Paolo Bonzini, 2015/04/27
- [Qemu-devel] [PATCH 18/29] translate-all: make less of tb_invalidate_phys_page_range depend on is_cpu_write_access, Paolo Bonzini, 2015/04/27