fixed VGA resolutions with height > 1024
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2121 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
6e1b3e4da4
commit
83acc96b23
@ -1000,12 +1000,12 @@ static void cirrus_write_bitblt(CirrusVGAState * s, unsigned reg_value)
|
|||||||
***************************************/
|
***************************************/
|
||||||
|
|
||||||
static void cirrus_get_offsets(VGAState *s1,
|
static void cirrus_get_offsets(VGAState *s1,
|
||||||
uint32_t *pline_offset,
|
uint32_t *pline_offset,
|
||||||
uint32_t *pstart_addr)
|
uint32_t *pstart_addr,
|
||||||
|
uint32_t *pline_compare)
|
||||||
{
|
{
|
||||||
CirrusVGAState * s = (CirrusVGAState *)s1;
|
CirrusVGAState * s = (CirrusVGAState *)s1;
|
||||||
uint32_t start_addr;
|
uint32_t start_addr, line_offset, line_compare;
|
||||||
uint32_t line_offset;
|
|
||||||
|
|
||||||
line_offset = s->cr[0x13]
|
line_offset = s->cr[0x13]
|
||||||
| ((s->cr[0x1b] & 0x10) << 4);
|
| ((s->cr[0x1b] & 0x10) << 4);
|
||||||
@ -1018,6 +1018,11 @@ static void cirrus_get_offsets(VGAState *s1,
|
|||||||
| ((s->cr[0x1b] & 0x0c) << 15)
|
| ((s->cr[0x1b] & 0x0c) << 15)
|
||||||
| ((s->cr[0x1d] & 0x80) << 12);
|
| ((s->cr[0x1d] & 0x80) << 12);
|
||||||
*pstart_addr = start_addr;
|
*pstart_addr = start_addr;
|
||||||
|
|
||||||
|
line_compare = s->cr[0x18] |
|
||||||
|
((s->cr[0x07] & 0x10) << 4) |
|
||||||
|
((s->cr[0x09] & 0x40) << 3);
|
||||||
|
*pline_compare = line_compare;
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t cirrus_get_bpp16_depth(CirrusVGAState * s)
|
static uint32_t cirrus_get_bpp16_depth(CirrusVGAState * s)
|
||||||
|
18
hw/vga.c
18
hw/vga.c
@ -935,13 +935,15 @@ static int update_palette256(VGAState *s)
|
|||||||
|
|
||||||
static void vga_get_offsets(VGAState *s,
|
static void vga_get_offsets(VGAState *s,
|
||||||
uint32_t *pline_offset,
|
uint32_t *pline_offset,
|
||||||
uint32_t *pstart_addr)
|
uint32_t *pstart_addr,
|
||||||
|
uint32_t *pline_compare)
|
||||||
{
|
{
|
||||||
uint32_t start_addr, line_offset;
|
uint32_t start_addr, line_offset, line_compare;
|
||||||
#ifdef CONFIG_BOCHS_VBE
|
#ifdef CONFIG_BOCHS_VBE
|
||||||
if (s->vbe_regs[VBE_DISPI_INDEX_ENABLE] & VBE_DISPI_ENABLED) {
|
if (s->vbe_regs[VBE_DISPI_INDEX_ENABLE] & VBE_DISPI_ENABLED) {
|
||||||
line_offset = s->vbe_line_offset;
|
line_offset = s->vbe_line_offset;
|
||||||
start_addr = s->vbe_start_addr;
|
start_addr = s->vbe_start_addr;
|
||||||
|
line_compare = 65535;
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
@ -951,9 +953,15 @@ static void vga_get_offsets(VGAState *s,
|
|||||||
|
|
||||||
/* starting address */
|
/* starting address */
|
||||||
start_addr = s->cr[0x0d] | (s->cr[0x0c] << 8);
|
start_addr = s->cr[0x0d] | (s->cr[0x0c] << 8);
|
||||||
|
|
||||||
|
/* line compare */
|
||||||
|
line_compare = s->cr[0x18] |
|
||||||
|
((s->cr[0x07] & 0x10) << 4) |
|
||||||
|
((s->cr[0x09] & 0x40) << 3);
|
||||||
}
|
}
|
||||||
*pline_offset = line_offset;
|
*pline_offset = line_offset;
|
||||||
*pstart_addr = start_addr;
|
*pstart_addr = start_addr;
|
||||||
|
*pline_compare = line_compare;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* update start_addr and line_offset. Return TRUE if modified */
|
/* update start_addr and line_offset. Return TRUE if modified */
|
||||||
@ -964,11 +972,7 @@ static int update_basic_params(VGAState *s)
|
|||||||
|
|
||||||
full_update = 0;
|
full_update = 0;
|
||||||
|
|
||||||
s->get_offsets(s, &line_offset, &start_addr);
|
s->get_offsets(s, &line_offset, &start_addr, &line_compare);
|
||||||
/* line compare */
|
|
||||||
line_compare = s->cr[0x18] |
|
|
||||||
((s->cr[0x07] & 0x10) << 4) |
|
|
||||||
((s->cr[0x09] & 0x40) << 3);
|
|
||||||
|
|
||||||
if (line_offset != s->line_offset ||
|
if (line_offset != s->line_offset ||
|
||||||
start_addr != s->start_addr ||
|
start_addr != s->start_addr ||
|
||||||
|
@ -108,7 +108,8 @@
|
|||||||
int (*get_bpp)(struct VGAState *s); \
|
int (*get_bpp)(struct VGAState *s); \
|
||||||
void (*get_offsets)(struct VGAState *s, \
|
void (*get_offsets)(struct VGAState *s, \
|
||||||
uint32_t *pline_offset, \
|
uint32_t *pline_offset, \
|
||||||
uint32_t *pstart_addr); \
|
uint32_t *pstart_addr, \
|
||||||
|
uint32_t *pline_compare); \
|
||||||
void (*get_resolution)(struct VGAState *s, \
|
void (*get_resolution)(struct VGAState *s, \
|
||||||
int *pwidth, \
|
int *pwidth, \
|
||||||
int *pheight); \
|
int *pheight); \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user