summaryrefslogtreecommitdiffstats
path: root/sys/dev/syscons/scvidctl.c
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2005-05-30 06:45:40 +0000
committerdelphij <delphij@FreeBSD.org>2005-05-30 06:45:40 +0000
commit920510430d71b6a6df9636214856d8bdaf388005 (patch)
treee74ad16f72225380d331eaab904b55f2d1dba7ee /sys/dev/syscons/scvidctl.c
parentad86ac4ba488543f1b0c0667a071e2bb197b7f9a (diff)
downloadFreeBSD-src-920510430d71b6a6df9636214856d8bdaf388005.zip
FreeBSD-src-920510430d71b6a6df9636214856d8bdaf388005.tar.gz
Deny to switch into banked video mode when it is not available. Some
users has reported corrupted display with old video cards. Submitted by: Michal Mertl <mime traveller cz>
Diffstat (limited to 'sys/dev/syscons/scvidctl.c')
-rw-r--r--sys/dev/syscons/scvidctl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/syscons/scvidctl.c b/sys/dev/syscons/scvidctl.c
index 614cecb..785067d 100644
--- a/sys/dev/syscons/scvidctl.c
+++ b/sys/dev/syscons/scvidctl.c
@@ -389,7 +389,8 @@ sc_set_pixel_mode(scr_stat *scp, struct tty *tp, int xsize, int ysize,
if (info.vi_width * info.vi_height / 8 > info.vi_window_size)
return ENODEV;
} else if (info.vi_mem_model == V_INFO_MM_DIRECT) {
- if ((info.vi_depth != 15) && (info.vi_depth != 16) &&
+ if (!(info.vi_flags & V_INFO_LINEAR) &&
+ (info.vi_depth != 15) && (info.vi_depth != 16) &&
(info.vi_depth != 24) && (info.vi_depth != 32))
return ENODEV;
} else
OpenPOWER on IntegriCloud