diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2011-09-04 20:51:28 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2011-09-10 14:46:12 +0000 |
commit | 1213406bf8d924a0747ec59d98751a8204558050 (patch) | |
tree | 39babe743492c05b1dc5eab163e18e2f4347d49f /hw | |
parent | 282c355b174755ae53e2feeaf624c418ea009dc6 (diff) |
g364fb: compile in hwlib
Compile g364fb in hwlib. Two compilations less for the full build.
Acked-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/g364fb.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/hw/g364fb.c b/hw/g364fb.c index 5e7bcfa278..b43341f8d7 100644 --- a/hw/g364fb.c +++ b/hw/g364fb.c @@ -58,6 +58,8 @@ typedef struct G364State { #define CTLA_FORCE_BLANK 0x00000400 #define CTLA_NO_CURSOR 0x00800000 +#define G364_PAGE_SIZE 4096 + static inline int check_dirty(G364State *s, ram_addr_t page) { return memory_region_get_dirty(&s->mem_vram, page, DIRTY_MEMORY_VGA); @@ -68,7 +70,7 @@ static inline void reset_dirty(G364State *s, { memory_region_reset_dirty(&s->mem_vram, page_min, - page_max + TARGET_PAGE_SIZE - page_min - 1, + page_max + G364_PAGE_SIZE - page_min - 1, DIRTY_MEMORY_VGA); } @@ -136,7 +138,7 @@ static void g364fb_draw_graphic8(G364State *s) page_max = page; if (x < xmin) xmin = x; - for (i = 0; i < TARGET_PAGE_SIZE; i++) { + for (i = 0; i < G364_PAGE_SIZE; i++) { uint8_t index; unsigned int color; if (unlikely((y >= ycursor && y < ycursor + 64) && @@ -200,15 +202,15 @@ static void g364fb_draw_graphic8(G364State *s) ymin = s->height; ymax = 0; } - x += TARGET_PAGE_SIZE; + x += G364_PAGE_SIZE; dy = x / s->width; x = x % s->width; y += dy; - vram += TARGET_PAGE_SIZE; + vram += G364_PAGE_SIZE; data_display += dy * ds_get_linesize(s->ds); dd = data_display + x * w; } - page += TARGET_PAGE_SIZE; + page += G364_PAGE_SIZE; } done: @@ -267,7 +269,7 @@ static inline void g364fb_invalidate_display(void *opaque) int i; s->blanked = 0; - for (i = 0; i < s->vram_size; i += TARGET_PAGE_SIZE) { + for (i = 0; i < s->vram_size; i += G364_PAGE_SIZE) { memory_region_set_dirty(&s->mem_vram, i); } } @@ -387,7 +389,7 @@ static void g364_invalidate_cursor_position(G364State *s) start = ymin * ds_get_linesize(s->ds); end = (ymax + 1) * ds_get_linesize(s->ds); - for (i = start; i < end; i += TARGET_PAGE_SIZE) { + for (i = start; i < end; i += G364_PAGE_SIZE) { memory_region_set_dirty(&s->mem_vram, i); } } |