mirror of https://gitee.com/openkylin/qemu.git
ram dirty flag handling fixes
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1247 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
5416376efe
commit
662f3c86ec
14
hw/tcx.c
14
hw/tcx.c
|
@ -104,11 +104,7 @@ void tcx_update_display(void *opaque)
|
||||||
|
|
||||||
if (ts->ds->depth == 0)
|
if (ts->ds->depth == 0)
|
||||||
return;
|
return;
|
||||||
#ifdef LD_BYPASS_OK
|
|
||||||
page = ts->vram_offset + YOFF*MAXX;
|
page = ts->vram_offset + YOFF*MAXX;
|
||||||
#else
|
|
||||||
page = ts->addr + YOFF*MAXX;
|
|
||||||
#endif
|
|
||||||
y_start = -1;
|
y_start = -1;
|
||||||
page_min = 0x7fffffff;
|
page_min = 0x7fffffff;
|
||||||
page_max = -1;
|
page_max = -1;
|
||||||
|
@ -131,7 +127,7 @@ void tcx_update_display(void *opaque)
|
||||||
case 0:
|
case 0:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(y = 0; y < YSZ; y += 4, page += TARGET_PAGE_SIZE) {
|
for(y = 0; y < YSZ; y += 4, page += TARGET_PAGE_SIZE) {
|
||||||
if (cpu_physical_memory_is_dirty(page)) {
|
if (cpu_physical_memory_is_dirty(page)) {
|
||||||
if (y_start < 0)
|
if (y_start < 0)
|
||||||
|
@ -180,11 +176,7 @@ void tcx_invalidate_display(void *opaque)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < MAXX*MAXY; i += TARGET_PAGE_SIZE) {
|
for (i = 0; i < MAXX*MAXY; i += TARGET_PAGE_SIZE) {
|
||||||
#ifdef LD_BYPASS_OK
|
|
||||||
cpu_physical_memory_set_dirty(s->vram_offset + i);
|
cpu_physical_memory_set_dirty(s->vram_offset + i);
|
||||||
#else
|
|
||||||
cpu_physical_memory_set_dirty(s->addr + i);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -224,9 +216,7 @@ static void tcx_reset(void *opaque)
|
||||||
memset(s->b, 0, 256);
|
memset(s->b, 0, 256);
|
||||||
s->r[255] = s->g[255] = s->b[255] = 255;
|
s->r[255] = s->g[255] = s->b[255] = 255;
|
||||||
memset(s->vram, 0, MAXX*MAXY);
|
memset(s->vram, 0, MAXX*MAXY);
|
||||||
#ifdef LD_BYPASS_OK
|
cpu_physical_memory_reset_dirty(s->vram_offset, s->vram_offset + MAXX*MAXY);
|
||||||
cpu_physical_memory_reset_dirty(s->vram_offset, s->vram_offset + MAXX*MAXY - 1);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void *tcx_init(DisplayState *ds, uint32_t addr, uint8_t *vram_base,
|
void *tcx_init(DisplayState *ds, uint32_t addr, uint8_t *vram_base,
|
||||||
|
|
Loading…
Reference in New Issue