Commit 83acc96b235753f089fadd7f755a9856a31165f2
1 parent
6e1b3e4d
fixed VGA resolutions with height > 1024
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2121 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
3 changed files
with
22 additions
and
12 deletions
hw/cirrus_vga.c
| @@ -1000,12 +1000,12 @@ static void cirrus_write_bitblt(CirrusVGAState * s, unsigned reg_value) | @@ -1000,12 +1000,12 @@ static void cirrus_write_bitblt(CirrusVGAState * s, unsigned reg_value) | ||
| 1000 | ***************************************/ | 1000 | ***************************************/ |
| 1001 | 1001 | ||
| 1002 | static void cirrus_get_offsets(VGAState *s1, | 1002 | static void cirrus_get_offsets(VGAState *s1, |
| 1003 | - uint32_t *pline_offset, | ||
| 1004 | - uint32_t *pstart_addr) | 1003 | + uint32_t *pline_offset, |
| 1004 | + uint32_t *pstart_addr, | ||
| 1005 | + uint32_t *pline_compare) | ||
| 1005 | { | 1006 | { |
| 1006 | CirrusVGAState * s = (CirrusVGAState *)s1; | 1007 | CirrusVGAState * s = (CirrusVGAState *)s1; |
| 1007 | - uint32_t start_addr; | ||
| 1008 | - uint32_t line_offset; | 1008 | + uint32_t start_addr, line_offset, line_compare; |
| 1009 | 1009 | ||
| 1010 | line_offset = s->cr[0x13] | 1010 | line_offset = s->cr[0x13] |
| 1011 | | ((s->cr[0x1b] & 0x10) << 4); | 1011 | | ((s->cr[0x1b] & 0x10) << 4); |
| @@ -1018,6 +1018,11 @@ static void cirrus_get_offsets(VGAState *s1, | @@ -1018,6 +1018,11 @@ static void cirrus_get_offsets(VGAState *s1, | ||
| 1018 | | ((s->cr[0x1b] & 0x0c) << 15) | 1018 | | ((s->cr[0x1b] & 0x0c) << 15) |
| 1019 | | ((s->cr[0x1d] & 0x80) << 12); | 1019 | | ((s->cr[0x1d] & 0x80) << 12); |
| 1020 | *pstart_addr = start_addr; | 1020 | *pstart_addr = start_addr; |
| 1021 | + | ||
| 1022 | + line_compare = s->cr[0x18] | | ||
| 1023 | + ((s->cr[0x07] & 0x10) << 4) | | ||
| 1024 | + ((s->cr[0x09] & 0x40) << 3); | ||
| 1025 | + *pline_compare = line_compare; | ||
| 1021 | } | 1026 | } |
| 1022 | 1027 | ||
| 1023 | static uint32_t cirrus_get_bpp16_depth(CirrusVGAState * s) | 1028 | static uint32_t cirrus_get_bpp16_depth(CirrusVGAState * s) |
hw/vga.c
| @@ -935,13 +935,15 @@ static int update_palette256(VGAState *s) | @@ -935,13 +935,15 @@ static int update_palette256(VGAState *s) | ||
| 935 | 935 | ||
| 936 | static void vga_get_offsets(VGAState *s, | 936 | static void vga_get_offsets(VGAState *s, |
| 937 | uint32_t *pline_offset, | 937 | uint32_t *pline_offset, |
| 938 | - uint32_t *pstart_addr) | 938 | + uint32_t *pstart_addr, |
| 939 | + uint32_t *pline_compare) | ||
| 939 | { | 940 | { |
| 940 | - uint32_t start_addr, line_offset; | 941 | + uint32_t start_addr, line_offset, line_compare; |
| 941 | #ifdef CONFIG_BOCHS_VBE | 942 | #ifdef CONFIG_BOCHS_VBE |
| 942 | if (s->vbe_regs[VBE_DISPI_INDEX_ENABLE] & VBE_DISPI_ENABLED) { | 943 | if (s->vbe_regs[VBE_DISPI_INDEX_ENABLE] & VBE_DISPI_ENABLED) { |
| 943 | line_offset = s->vbe_line_offset; | 944 | line_offset = s->vbe_line_offset; |
| 944 | start_addr = s->vbe_start_addr; | 945 | start_addr = s->vbe_start_addr; |
| 946 | + line_compare = 65535; | ||
| 945 | } else | 947 | } else |
| 946 | #endif | 948 | #endif |
| 947 | { | 949 | { |
| @@ -951,9 +953,15 @@ static void vga_get_offsets(VGAState *s, | @@ -951,9 +953,15 @@ static void vga_get_offsets(VGAState *s, | ||
| 951 | 953 | ||
| 952 | /* starting address */ | 954 | /* starting address */ |
| 953 | start_addr = s->cr[0x0d] | (s->cr[0x0c] << 8); | 955 | start_addr = s->cr[0x0d] | (s->cr[0x0c] << 8); |
| 956 | + | ||
| 957 | + /* line compare */ | ||
| 958 | + line_compare = s->cr[0x18] | | ||
| 959 | + ((s->cr[0x07] & 0x10) << 4) | | ||
| 960 | + ((s->cr[0x09] & 0x40) << 3); | ||
| 954 | } | 961 | } |
| 955 | *pline_offset = line_offset; | 962 | *pline_offset = line_offset; |
| 956 | *pstart_addr = start_addr; | 963 | *pstart_addr = start_addr; |
| 964 | + *pline_compare = line_compare; | ||
| 957 | } | 965 | } |
| 958 | 966 | ||
| 959 | /* update start_addr and line_offset. Return TRUE if modified */ | 967 | /* update start_addr and line_offset. Return TRUE if modified */ |
| @@ -964,11 +972,7 @@ static int update_basic_params(VGAState *s) | @@ -964,11 +972,7 @@ static int update_basic_params(VGAState *s) | ||
| 964 | 972 | ||
| 965 | full_update = 0; | 973 | full_update = 0; |
| 966 | 974 | ||
| 967 | - s->get_offsets(s, &line_offset, &start_addr); | ||
| 968 | - /* line compare */ | ||
| 969 | - line_compare = s->cr[0x18] | | ||
| 970 | - ((s->cr[0x07] & 0x10) << 4) | | ||
| 971 | - ((s->cr[0x09] & 0x40) << 3); | 975 | + s->get_offsets(s, &line_offset, &start_addr, &line_compare); |
| 972 | 976 | ||
| 973 | if (line_offset != s->line_offset || | 977 | if (line_offset != s->line_offset || |
| 974 | start_addr != s->start_addr || | 978 | start_addr != s->start_addr || |
hw/vga_int.h
| @@ -108,7 +108,8 @@ | @@ -108,7 +108,8 @@ | ||
| 108 | int (*get_bpp)(struct VGAState *s); \ | 108 | int (*get_bpp)(struct VGAState *s); \ |
| 109 | void (*get_offsets)(struct VGAState *s, \ | 109 | void (*get_offsets)(struct VGAState *s, \ |
| 110 | uint32_t *pline_offset, \ | 110 | uint32_t *pline_offset, \ |
| 111 | - uint32_t *pstart_addr); \ | 111 | + uint32_t *pstart_addr, \ |
| 112 | + uint32_t *pline_compare); \ | ||
| 112 | void (*get_resolution)(struct VGAState *s, \ | 113 | void (*get_resolution)(struct VGAState *s, \ |
| 113 | int *pwidth, \ | 114 | int *pwidth, \ |
| 114 | int *pheight); \ | 115 | int *pheight); \ |