Revision 3b46e624 hw/cirrus_vga.c

b/hw/cirrus_vga.c
275 275
} PCICirrusVGAState;
276 276

  
277 277
static uint8_t rop_to_index[256];
278
   
278

  
279 279
/***************************************
280 280
 *
281 281
 *  prototypes.
......
788 788
{
789 789
    int copy_count;
790 790
    uint8_t *end_ptr;
791
   
791

  
792 792
    if (s->cirrus_srccounter > 0) {
793 793
        if (s->cirrus_blt_mode & CIRRUS_BLTMODE_PATTERNCOPY) {
794 794
            cirrus_bitblt_common_patterncopy(s, s->cirrus_bltbuf);
......
1148 1148
static void cirrus_get_resolution(VGAState *s, int *pwidth, int *pheight)
1149 1149
{
1150 1150
    int width, height;
1151
   
1151

  
1152 1152
    width = (s->cr[0x01] + 1) * 8;
1153 1153
    height = s->cr[0x12] |
1154 1154
        ((s->cr[0x07] & 0x02) << 7) |
......
2223 2223
        s->last_hw_cursor_y != s->hw_cursor_y) {
2224 2224

  
2225 2225
        invalidate_cursor1(s);
2226
       
2226

  
2227 2227
        s->last_hw_cursor_size = size;
2228 2228
        s->last_hw_cursor_x = s->hw_cursor_x;
2229 2229
        s->last_hw_cursor_y = s->hw_cursor_y;
......
2240 2240
    unsigned int color0, color1;
2241 2241
    const uint8_t *palette, *src;
2242 2242
    uint32_t content;
2243
   
2243

  
2244 2244
    if (!(s->sr[0x12] & CIRRUS_CURSOR_SHOW))
2245 2245
        return;
2246 2246
    /* fast test to see if the cursor intersects with the scan line */
......
2252 2252
    if (scr_y < s->hw_cursor_y ||
2253 2253
        scr_y >= (s->hw_cursor_y + h))
2254 2254
        return;
2255
   
2255

  
2256 2256
    src = s->vram_ptr + s->real_vram_size - 16 * 1024;
2257 2257
    if (s->sr[0x12] & CIRRUS_CURSOR_LARGE) {
2258 2258
        src += (s->sr[0x13] & 0x3c) * 256;
......
2379 2379
    unsigned mode;
2380 2380

  
2381 2381
    addr &= s->cirrus_addr_mask;
2382
       
2382

  
2383 2383
    if (((s->sr[0x17] & 0x44) == 0x44) &&
2384 2384
        ((addr & s->linear_mmio_mask) ==  s->linear_mmio_mask)) {
2385 2385
	/* memory-mapped I/O */
......
2600 2600
	} else if (s->gr[0x0B] & 0x02) {
2601 2601
            goto generic_io;
2602 2602
        }
2603
       
2603

  
2604 2604
	mode = s->gr[0x05] & 0x7;
2605 2605
	if (mode < 4 || mode > 5 || ((s->gr[0x0B] & 0x4) == 0)) {
2606 2606
            s->cirrus_linear_write[0] = cirrus_linear_mem_writeb;
......
3190 3190
    CirrusVGAState *s;
3191 3191

  
3192 3192
    s = qemu_mallocz(sizeof(CirrusVGAState));
3193
   
3193

  
3194 3194
    vga_common_init((VGAState *)s,
3195 3195
                    ds, vga_ram_base, vga_ram_offset, vga_ram_size);
3196 3196
    cirrus_init_common(s, CIRRUS_ID_CLGD5430, 0);
......
3231 3231
    uint8_t *pci_conf;
3232 3232
    CirrusVGAState *s;
3233 3233
    int device_id;
3234
   
3234

  
3235 3235
    device_id = CIRRUS_ID_CLGD5446;
3236 3236

  
3237 3237
    /* setup PCI configuration registers */

Also available in: Unified diff