Revision a4a2f59c
b/hw/cirrus_vga.c | ||
---|---|---|
1078 | 1078 |
* |
1079 | 1079 |
***************************************/ |
1080 | 1080 |
|
1081 |
static void cirrus_get_offsets(VGAState *s1, |
|
1081 |
static void cirrus_get_offsets(VGACommonState *s1,
|
|
1082 | 1082 |
uint32_t *pline_offset, |
1083 | 1083 |
uint32_t *pstart_addr, |
1084 | 1084 |
uint32_t *pline_compare) |
... | ... | |
1126 | 1126 |
return ret; |
1127 | 1127 |
} |
1128 | 1128 |
|
1129 |
static int cirrus_get_bpp(VGAState *s1) |
|
1129 |
static int cirrus_get_bpp(VGACommonState *s1)
|
|
1130 | 1130 |
{ |
1131 | 1131 |
CirrusVGAState * s = container_of(s1, CirrusVGAState, vga); |
1132 | 1132 |
uint32_t ret = 8; |
... | ... | |
1164 | 1164 |
return ret; |
1165 | 1165 |
} |
1166 | 1166 |
|
1167 |
static void cirrus_get_resolution(VGAState *s, int *pwidth, int *pheight) |
|
1167 |
static void cirrus_get_resolution(VGACommonState *s, int *pwidth, int *pheight)
|
|
1168 | 1168 |
{ |
1169 | 1169 |
int width, height; |
1170 | 1170 |
|
... | ... | |
2234 | 2234 |
|
2235 | 2235 |
/* NOTE: we do not currently handle the cursor bitmap change, so we |
2236 | 2236 |
update the cursor only if it moves. */ |
2237 |
static void cirrus_cursor_invalidate(VGAState *s1) |
|
2237 |
static void cirrus_cursor_invalidate(VGACommonState *s1)
|
|
2238 | 2238 |
{ |
2239 | 2239 |
CirrusVGAState *s = container_of(s1, CirrusVGAState, vga); |
2240 | 2240 |
int size; |
... | ... | |
2263 | 2263 |
} |
2264 | 2264 |
} |
2265 | 2265 |
|
2266 |
static void cirrus_cursor_draw_line(VGAState *s1, uint8_t *d1, int scr_y) |
|
2266 |
static void cirrus_cursor_draw_line(VGACommonState *s1, uint8_t *d1, int scr_y)
|
|
2267 | 2267 |
{ |
2268 | 2268 |
CirrusVGAState *s = container_of(s1, CirrusVGAState, vga); |
2269 | 2269 |
int w, h, bpp, x1, x2, poffset; |
b/hw/vga.c | ||
---|---|---|
149 | 149 |
static uint16_t expand2[256]; |
150 | 150 |
static uint8_t expand4to8[16]; |
151 | 151 |
|
152 |
typedef VGACommonState VGAState; |
|
153 |
|
|
152 | 154 |
static void vga_screen_dump(void *opaque, const char *filename); |
153 | 155 |
static char *screen_dump_filename; |
154 | 156 |
static DisplayChangeListener *screen_dump_dcl; |
... | ... | |
2256 | 2258 |
} |
2257 | 2259 |
} |
2258 | 2260 |
|
2259 |
void vga_common_init(VGAState *s, int vga_ram_size) |
|
2261 |
void vga_common_init(VGACommonState *s, int vga_ram_size)
|
|
2260 | 2262 |
{ |
2261 | 2263 |
int i, j, v, b; |
2262 | 2264 |
|
b/hw/vga_int.h | ||
---|---|---|
180 | 180 |
union vga_retrace retrace_info; |
181 | 181 |
} VGACommonState; |
182 | 182 |
|
183 |
typedef VGACommonState VGAState; |
|
184 |
|
|
185 | 183 |
static inline int c6_to_8(int v) |
186 | 184 |
{ |
187 | 185 |
int b; |
... | ... | |
190 | 188 |
return (v << 2) | (b << 1) | b; |
191 | 189 |
} |
192 | 190 |
|
193 |
void vga_common_init(VGAState *s, int vga_ram_size); |
|
194 |
void vga_init(VGAState *s); |
|
191 |
void vga_common_init(VGACommonState *s, int vga_ram_size);
|
|
192 |
void vga_init(VGACommonState *s);
|
|
195 | 193 |
void vga_common_reset(VGACommonState *s); |
196 | 194 |
|
197 |
void vga_dirty_log_start(VGAState *s); |
|
195 |
void vga_dirty_log_start(VGACommonState *s);
|
|
198 | 196 |
|
199 | 197 |
uint32_t vga_mem_readb(void *opaque, target_phys_addr_t addr); |
200 | 198 |
void vga_mem_writeb(void *opaque, target_phys_addr_t addr, uint32_t val); |
201 |
void vga_invalidate_scanlines(VGAState *s, int y1, int y2); |
|
199 |
void vga_invalidate_scanlines(VGACommonState *s, int y1, int y2);
|
|
202 | 200 |
int ppm_save(const char *filename, struct DisplaySurface *ds); |
203 | 201 |
|
204 | 202 |
void vga_draw_cursor_line_8(uint8_t *d1, const uint8_t *src1, |
b/hw/vmware_vga.c | ||
---|---|---|
1129 | 1129 |
vmsvga_reset(s); |
1130 | 1130 |
|
1131 | 1131 |
#ifdef EMBED_STDVGA |
1132 |
vga_common_init((VGAState *) s, vga_ram_size);
|
|
1133 |
vga_init((VGAState *) s);
|
|
1132 |
vga_common_init(&s->vga, vga_ram_size);
|
|
1133 |
vga_init(&s->vga);
|
|
1134 | 1134 |
#else |
1135 | 1135 |
s->vram_size = vga_ram_size; |
1136 | 1136 |
s->vram_offset = qemu_ram_alloc(vga_ram_size); |
Also available in: Unified diff