[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 44/48] g364fb: switch to using DirtyBitmapSnapshot
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 44/48] g364fb: switch to using DirtyBitmapSnapshot |
Date: |
Tue, 13 Feb 2018 13:00:48 +0100 |
This removes the last user of memory_region_test_and_clear_dirty
outside memory.c.
Tested-by: Hervé Poussineau <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
hw/display/g364fb.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/hw/display/g364fb.c b/hw/display/g364fb.c
index 86557d1..86452de 100644
--- a/hw/display/g364fb.c
+++ b/hw/display/g364fb.c
@@ -62,15 +62,15 @@ typedef struct G364State {
#define G364_PAGE_SIZE 4096
-static inline int check_dirty(G364State *s, ram_addr_t page)
+static inline int check_dirty(G364State *s, DirtyBitmapSnapshot *snap,
ram_addr_t page)
{
- return memory_region_test_and_clear_dirty(&s->mem_vram, page,
G364_PAGE_SIZE,
- DIRTY_MEMORY_VGA);
+ return memory_region_snapshot_get_dirty(&s->mem_vram, snap, page,
G364_PAGE_SIZE);
}
static void g364fb_draw_graphic8(G364State *s)
{
DisplaySurface *surface = qemu_console_surface(s->con);
+ DirtyBitmapSnapshot *snap;
int i, w;
uint8_t *vram;
uint8_t *data_display, *dd;
@@ -122,8 +122,10 @@ static void g364fb_draw_graphic8(G364State *s)
vram = s->vram + s->top_of_screen;
/* XXX: out of range in vram? */
data_display = dd = surface_data(surface);
+ snap = memory_region_snapshot_and_clear_dirty(&s->mem_vram, 0,
s->vram_size,
+ DIRTY_MEMORY_VGA);
while (y < s->height) {
- if (check_dirty(s, page)) {
+ if (check_dirty(s, snap, page)) {
if (y < ymin)
ymin = ymax = y;
if (x < xmin)
--
1.8.3.1
- [Qemu-devel] [PULL 29/48] hw/arm/xilinx_zynq: fix the capabilities register to match the datasheet, (continued)
- [Qemu-devel] [PULL 29/48] hw/arm/xilinx_zynq: fix the capabilities register to match the datasheet, Paolo Bonzini, 2018/02/13
- [Qemu-devel] [PULL 31/48] sdhci: rename the hostctl1 register, Paolo Bonzini, 2018/02/13
- [Qemu-devel] [PULL 40/48] hw/arm/xilinx_zynqmp: enable the UHS-I mode, Paolo Bonzini, 2018/02/13
- [Qemu-devel] [PULL 37/48] hw/arm/bcm2835_peripherals: change maximum block size to 1kB, Paolo Bonzini, 2018/02/13
- [Qemu-devel] [PULL 38/48] hw/arm/fsl-imx6: implement SDHCI Spec. v3, Paolo Bonzini, 2018/02/13
- [Qemu-devel] [PULL 39/48] hw/arm/xilinx_zynqmp: fix the capabilities/spec version to match the datasheet, Paolo Bonzini, 2018/02/13
- [Qemu-devel] [PULL 42/48] sdhci: add a check_capab_v3() qtest, Paolo Bonzini, 2018/02/13
- [Qemu-devel] [PULL 48/48] travis: use libgcc-4.8-dev (libgcc-6-dev is not available on Ubuntu 14.04), Paolo Bonzini, 2018/02/13
- [Qemu-devel] [PULL 43/48] sdhci: add Spec v4.2 register definitions, Paolo Bonzini, 2018/02/13
- [Qemu-devel] [PULL 47/48] memory: unify loops to sync dirty log bitmap, Paolo Bonzini, 2018/02/13
- [Qemu-devel] [PULL 44/48] g364fb: switch to using DirtyBitmapSnapshot,
Paolo Bonzini <=
- [Qemu-devel] [PULL 41/48] sdhci: check Spec v3 capabilities qtest, Paolo Bonzini, 2018/02/13
- [Qemu-devel] [PULL 46/48] memory: hide memory_region_sync_dirty_bitmap behind DirtyBitmapSnapshot, Paolo Bonzini, 2018/02/13
- [Qemu-devel] [PULL 45/48] memory: remove memory_region_test_and_clear_dirty, Paolo Bonzini, 2018/02/13
- Re: [Qemu-devel] [PULL 00/48] Misc patches for 2018-02-13, Peter Maydell, 2018/02/13