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 | 1000 | ***************************************/ |
1001 | 1001 | |
1002 | 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 | 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 | 1010 | line_offset = s->cr[0x13] |
1011 | 1011 | | ((s->cr[0x1b] & 0x10) << 4); |
... | ... | @@ -1018,6 +1018,11 @@ static void cirrus_get_offsets(VGAState *s1, |
1018 | 1018 | | ((s->cr[0x1b] & 0x0c) << 15) |
1019 | 1019 | | ((s->cr[0x1d] & 0x80) << 12); |
1020 | 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 | 1028 | static uint32_t cirrus_get_bpp16_depth(CirrusVGAState * s) | ... | ... |
hw/vga.c
... | ... | @@ -935,13 +935,15 @@ static int update_palette256(VGAState *s) |
935 | 935 | |
936 | 936 | static void vga_get_offsets(VGAState *s, |
937 | 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 | 942 | #ifdef CONFIG_BOCHS_VBE |
942 | 943 | if (s->vbe_regs[VBE_DISPI_INDEX_ENABLE] & VBE_DISPI_ENABLED) { |
943 | 944 | line_offset = s->vbe_line_offset; |
944 | 945 | start_addr = s->vbe_start_addr; |
946 | + line_compare = 65535; | |
945 | 947 | } else |
946 | 948 | #endif |
947 | 949 | { |
... | ... | @@ -951,9 +953,15 @@ static void vga_get_offsets(VGAState *s, |
951 | 953 | |
952 | 954 | /* starting address */ |
953 | 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 | 962 | *pline_offset = line_offset; |
956 | 963 | *pstart_addr = start_addr; |
964 | + *pline_compare = line_compare; | |
957 | 965 | } |
958 | 966 | |
959 | 967 | /* update start_addr and line_offset. Return TRUE if modified */ |
... | ... | @@ -964,11 +972,7 @@ static int update_basic_params(VGAState *s) |
964 | 972 | |
965 | 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 | 977 | if (line_offset != s->line_offset || |
974 | 978 | start_addr != s->start_addr || | ... | ... |
hw/vga_int.h
... | ... | @@ -108,7 +108,8 @@ |
108 | 108 | int (*get_bpp)(struct VGAState *s); \ |
109 | 109 | void (*get_offsets)(struct VGAState *s, \ |
110 | 110 | uint32_t *pline_offset, \ |
111 | - uint32_t *pstart_addr); \ | |
111 | + uint32_t *pstart_addr, \ | |
112 | + uint32_t *pline_compare); \ | |
112 | 113 | void (*get_resolution)(struct VGAState *s, \ |
113 | 114 | int *pwidth, \ |
114 | 115 | int *pheight); \ | ... | ... |