Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Sep 2009 20:10:00 +0000 (UTC)
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r197468 - head/sys/dev/fb
Message-ID:  <200909242010.n8OKA0nl006437@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jkim
Date: Thu Sep 24 20:10:00 2009
New Revision: 197468
URL: http://svn.freebsd.org/changeset/base/197468

Log:
  Some broken VESA BIOSes, e.g., IBM T23, return wrong value from
  vesa_bios_get_line_length() in graphics mode.  Always calculate the value
  from known video info instead.
  
  Submitted by:	paradox (ddkprog yahoo com)

Modified:
  head/sys/dev/fb/vesa.c

Modified: head/sys/dev/fb/vesa.c
==============================================================================
--- head/sys/dev/fb/vesa.c	Thu Sep 24 19:42:56 2009	(r197467)
+++ head/sys/dev/fb/vesa.c	Thu Sep 24 20:10:00 2009	(r197468)
@@ -1132,10 +1132,8 @@ vesa_set_mode(video_adapter_t *adp, int 
 		vesa_adp->va_window_gran = info.vi_window_gran;
 	}
 	vesa_adp->va_window_orig = 0;
-	len = vesa_bios_get_line_length();
-	if (len > 0) {
-		vesa_adp->va_line_width = len;
-	} else if (info.vi_flags & V_INFO_GRAPHICS) {
+
+	if (info.vi_flags & V_INFO_GRAPHICS) {
 		switch (info.vi_depth/info.vi_planes) {
 		case 1:
 			vesa_adp->va_line_width = info.vi_width/8;
@@ -1161,6 +1159,9 @@ vesa_set_mode(video_adapter_t *adp, int 
 		}
 	} else {
 		vesa_adp->va_line_width = info.vi_width;
+		len = vesa_bios_get_line_length();
+		if (len > 0)
+			vesa_adp->va_line_width = len;
 	}
 	vesa_adp->va_disp_start.x = 0;
 	vesa_adp->va_disp_start.y = 0;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909242010.n8OKA0nl006437>