aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/fb/vesa.c
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>2017-04-20 13:46:55 +0000
committerBruce Evans <bde@FreeBSD.org>2017-04-20 13:46:55 +0000
commitecb56aaf6099f5336b8816cbc1ad21ae55c8a101 (patch)
tree806556af21606181ba52b6959f6a1629fc351b5b /sys/dev/fb/vesa.c
parent05d06ecac32d892eafc5e8e13652324d8f5ac46a (diff)
downloadsrc-ecb56aaf6099f5336b8816cbc1ad21ae55c8a101.tar.gz
src-ecb56aaf6099f5336b8816cbc1ad21ae55c8a101.zip
Attempt to determine the modes in which 8-bit wide characters are actually
9 wide. I only need this to improve the mouse cursor, but it has always been needed to select and/or adjust fonts. This is complicated because there are no standard parameter tables giving this bit of information directly, and the device register bit giving the information can't be trusted even if it is read from the hardware. Use a heuristic to guess if the device register can be trusted. (The device register is normally read from the BIOS mode table, but on my system where the device register is wrong, the mode table doesn't match the hardware and is not used; the device registers are used in this case.)
Notes
Notes: svn path=/head/; revision=317190
Diffstat (limited to 'sys/dev/fb/vesa.c')
-rw-r--r--sys/dev/fb/vesa.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/dev/fb/vesa.c b/sys/dev/fb/vesa.c
index 0698220de78b..d51e560c7f84 100644
--- a/sys/dev/fb/vesa.c
+++ b/sys/dev/fb/vesa.c
@@ -1359,6 +1359,7 @@ vesa_set_mode(video_adapter_t *adp, int mode)
vesa_adp->va_crtc_addr =
(vesa_adp->va_flags & V_ADP_COLOR) ? COLOR_CRTC : MONO_CRTC;
+ vesa_adp->va_flags &= ~V_ADP_CWIDTH9;
vesa_adp->va_line_width = info.vi_buffer_size / info.vi_height;
if ((info.vi_flags & V_INFO_GRAPHICS) != 0)
vesa_adp->va_line_width /= info.vi_planes;