diff options
author | Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | 2009-04-07 16:34:16 -0400 |
---|---|---|
committer | Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | 2009-04-07 16:34:16 -0400 |
commit | 38f4b8c0da01ae7cd9b93386842ce272d6fde9ab (patch) | |
tree | 3c8c52201aac038094bfea7efdd0984a8f62045e /arch/x86/boot/video-vga.c | |
parent | a811454027352c762e0d5bba1b1d8f7d26bf96ae (diff) | |
parent | 8e2c4f2844c0e8dcdfe312e5f2204854ca8532c6 (diff) |
Merge commit 'origin/master' into for-linus/xen/master
* commit 'origin/master': (4825 commits)
Fix build errors due to CONFIG_BRANCH_TRACER=y
parport: Use the PCI IRQ if offered
tty: jsm cleanups
Adjust path to gpio headers
KGDB_SERIAL_CONSOLE check for module
Change KCONFIG name
tty: Blackin CTS/RTS
Change hardware flow control from poll to interrupt driven
Add support for the MAX3100 SPI UART.
lanana: assign a device name and numbering for MAX3100
serqt: initial clean up pass for tty side
tty: Use the generic RS485 ioctl on CRIS
tty: Correct inline types for tty_driver_kref_get()
splice: fix deadlock in splicing to file
nilfs2: support nanosecond timestamp
nilfs2: introduce secondary super block
nilfs2: simplify handling of active state of segments
nilfs2: mark minor flag for checkpoint created by internal operation
nilfs2: clean up sketch file
nilfs2: super block operations fix endian bug
...
Conflicts:
arch/x86/include/asm/thread_info.h
arch/x86/lguest/boot.c
drivers/xen/manage.c
Diffstat (limited to 'arch/x86/boot/video-vga.c')
-rw-r--r-- | arch/x86/boot/video-vga.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/arch/x86/boot/video-vga.c b/arch/x86/boot/video-vga.c index 5d4742ed4aa2..95d86ce0421c 100644 --- a/arch/x86/boot/video-vga.c +++ b/arch/x86/boot/video-vga.c | |||
@@ -129,41 +129,45 @@ u16 vga_crtc(void) | |||
129 | return (inb(0x3cc) & 1) ? 0x3d4 : 0x3b4; | 129 | return (inb(0x3cc) & 1) ? 0x3d4 : 0x3b4; |
130 | } | 130 | } |
131 | 131 | ||
132 | static void vga_set_480_scanlines(int end) | 132 | static void vga_set_480_scanlines(int lines) |
133 | { | 133 | { |
134 | u16 crtc; | 134 | u16 crtc; /* CRTC base address */ |
135 | u8 csel; | 135 | u8 csel; /* CRTC miscellaneous output register */ |
136 | u8 ovfw; /* CRTC overflow register */ | ||
137 | int end = lines-1; | ||
136 | 138 | ||
137 | crtc = vga_crtc(); | 139 | crtc = vga_crtc(); |
138 | 140 | ||
141 | ovfw = 0x3c | ((end >> (8-1)) & 0x02) | ((end >> (9-6)) & 0x40); | ||
142 | |||
139 | out_idx(0x0c, crtc, 0x11); /* Vertical sync end, unlock CR0-7 */ | 143 | out_idx(0x0c, crtc, 0x11); /* Vertical sync end, unlock CR0-7 */ |
140 | out_idx(0x0b, crtc, 0x06); /* Vertical total */ | 144 | out_idx(0x0b, crtc, 0x06); /* Vertical total */ |
141 | out_idx(0x3e, crtc, 0x07); /* Vertical overflow */ | 145 | out_idx(ovfw, crtc, 0x07); /* Vertical overflow */ |
142 | out_idx(0xea, crtc, 0x10); /* Vertical sync start */ | 146 | out_idx(0xea, crtc, 0x10); /* Vertical sync start */ |
143 | out_idx(end, crtc, 0x12); /* Vertical display end */ | 147 | out_idx(end, crtc, 0x12); /* Vertical display end */ |
144 | out_idx(0xe7, crtc, 0x15); /* Vertical blank start */ | 148 | out_idx(0xe7, crtc, 0x15); /* Vertical blank start */ |
145 | out_idx(0x04, crtc, 0x16); /* Vertical blank end */ | 149 | out_idx(0x04, crtc, 0x16); /* Vertical blank end */ |
146 | csel = inb(0x3cc); | 150 | csel = inb(0x3cc); |
147 | csel &= 0x0d; | 151 | csel &= 0x0d; |
148 | csel |= 0xe2; | 152 | csel |= 0xe2; |
149 | outb(csel, 0x3cc); | 153 | outb(csel, 0x3c2); |
150 | } | 154 | } |
151 | 155 | ||
152 | static void vga_set_80x30(void) | 156 | static void vga_set_80x30(void) |
153 | { | 157 | { |
154 | vga_set_480_scanlines(0xdf); | 158 | vga_set_480_scanlines(30*16); |
155 | } | 159 | } |
156 | 160 | ||
157 | static void vga_set_80x34(void) | 161 | static void vga_set_80x34(void) |
158 | { | 162 | { |
159 | vga_set_14font(); | 163 | vga_set_14font(); |
160 | vga_set_480_scanlines(0xdb); | 164 | vga_set_480_scanlines(34*14); |
161 | } | 165 | } |
162 | 166 | ||
163 | static void vga_set_80x60(void) | 167 | static void vga_set_80x60(void) |
164 | { | 168 | { |
165 | vga_set_8font(); | 169 | vga_set_8font(); |
166 | vga_set_480_scanlines(0xdf); | 170 | vga_set_480_scanlines(60*8); |
167 | } | 171 | } |
168 | 172 | ||
169 | static int vga_set_mode(struct mode_info *mode) | 173 | static int vga_set_mode(struct mode_info *mode) |