mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-11 03:24:58 -06:00
tcx: alter tcx24_check_dirty() to accept address and length parameters
This can now be used by both the 8-bit and 24-bit display code, so rename to tcx_check_dirty(). Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
4b865c2809
commit
427ee02bc9
1 changed files with 14 additions and 11 deletions
|
@ -105,17 +105,21 @@ static void tcx_set_dirty(TCXState *s, ram_addr_t addr, int len)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int tcx24_check_dirty(TCXState *s, ram_addr_t page,
|
static int tcx_check_dirty(TCXState *s, ram_addr_t addr, int len)
|
||||||
ram_addr_t page24, ram_addr_t cpage)
|
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = memory_region_get_dirty(&s->vram_mem, page, TARGET_PAGE_SIZE,
|
ret = memory_region_get_dirty(&s->vram_mem, addr, len, DIRTY_MEMORY_VGA);
|
||||||
DIRTY_MEMORY_VGA);
|
|
||||||
ret |= memory_region_get_dirty(&s->vram_mem, page24, TARGET_PAGE_SIZE * 4,
|
if (s->depth == 24) {
|
||||||
DIRTY_MEMORY_VGA);
|
ret |= memory_region_get_dirty(&s->vram_mem,
|
||||||
ret |= memory_region_get_dirty(&s->vram_mem, cpage, TARGET_PAGE_SIZE * 4,
|
s->vram24_offset + addr * 4, len * 4,
|
||||||
DIRTY_MEMORY_VGA);
|
DIRTY_MEMORY_VGA);
|
||||||
|
ret |= memory_region_get_dirty(&s->vram_mem,
|
||||||
|
s->cplane_offset + addr * 4, len * 4,
|
||||||
|
DIRTY_MEMORY_VGA);
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -366,8 +370,7 @@ static void tcx_update_display(void *opaque)
|
||||||
|
|
||||||
memory_region_sync_dirty_bitmap(&ts->vram_mem);
|
memory_region_sync_dirty_bitmap(&ts->vram_mem);
|
||||||
for (y = 0; y < ts->height; page += TARGET_PAGE_SIZE) {
|
for (y = 0; y < ts->height; page += TARGET_PAGE_SIZE) {
|
||||||
if (memory_region_get_dirty(&ts->vram_mem, page, TARGET_PAGE_SIZE,
|
if (tcx_check_dirty(ts, page, TARGET_PAGE_SIZE)) {
|
||||||
DIRTY_MEMORY_VGA)) {
|
|
||||||
if (y_start < 0)
|
if (y_start < 0)
|
||||||
y_start = y;
|
y_start = y;
|
||||||
if (page < page_min)
|
if (page < page_min)
|
||||||
|
@ -461,7 +464,7 @@ static void tcx24_update_display(void *opaque)
|
||||||
memory_region_sync_dirty_bitmap(&ts->vram_mem);
|
memory_region_sync_dirty_bitmap(&ts->vram_mem);
|
||||||
for (y = 0; y < ts->height; page += TARGET_PAGE_SIZE,
|
for (y = 0; y < ts->height; page += TARGET_PAGE_SIZE,
|
||||||
page24 += TARGET_PAGE_SIZE, cpage += TARGET_PAGE_SIZE) {
|
page24 += TARGET_PAGE_SIZE, cpage += TARGET_PAGE_SIZE) {
|
||||||
if (tcx24_check_dirty(ts, page, page24, cpage)) {
|
if (tcx_check_dirty(ts, page, TARGET_PAGE_SIZE)) {
|
||||||
if (y_start < 0)
|
if (y_start < 0)
|
||||||
y_start = y;
|
y_start = y;
|
||||||
if (page < page_min)
|
if (page < page_min)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue