svn commit: r197468 - head/sys/dev/fb

Jung-uk Kim jkim at FreeBSD.org
Thu Sep 24 20:10:06 UTC 2009


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;


More information about the svn-src-all mailing list