svn commit: r213041 - stable/7/sys/dev/syscons

Jung-uk Kim jkim at FreeBSD.org
Wed Sep 22 22:17:40 UTC 2010


Author: jkim
Date: Wed Sep 22 22:17:39 2010
New Revision: 213041
URL: http://svn.freebsd.org/changeset/base/213041

Log:
  MFC:	r212806
  
  Rework r210248.  Although it fixed most of problems, it did not fix one
  particular edge case where X-axis resolution is not multiple of font width.
  Now we just advance enough scan lines, then deduct a partial scan line.
  It is more intuitive than the previous code.  Apply the same wisdom to EGA
  and VGA planar renderers for consistency.

Modified:
  stable/7/sys/dev/syscons/scvgarndr.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/syscons/scvgarndr.c
==============================================================================
--- stable/7/sys/dev/syscons/scvgarndr.c	Wed Sep 22 22:16:48 2010	(r213040)
+++ stable/7/sys/dev/syscons/scvgarndr.c	Wed Sep 22 22:17:39 2010	(r213041)
@@ -705,8 +705,7 @@ vga_egadraw(scr_stat *scp, int from, int
 		}
 		++d;
 		if ((i % scp->xsize) == scp->xsize - 1)
-			d += scp->xoff*2 
-				 + (scp->font_size - 1)*line_width;
+			d += scp->font_size * line_width - scp->xsize;
 	}
 	outw(GDCIDX, 0x0000);		/* set/reset */
 	outw(GDCIDX, 0x0001);		/* set/reset enable */
@@ -758,9 +757,8 @@ vga_vgadraw_direct(scr_stat *scp, int fr
 		d += 8 * pixel_size;
 
 		if ((i % scp->xsize) == scp->xsize - 1)
-			d += scp->xoff * scp->font_size * pixel_size +
-			    scp->font_size * line_width -
-			    scp->xpixel * pixel_size;
+			d += scp->font_size * line_width -
+			    scp->xsize * 8 * pixel_size;
 	}
 }
 
@@ -816,8 +814,7 @@ vga_vgadraw_planar(scr_stat *scp, int fr
 		}
 		++d;
 		if ((i % scp->xsize) == scp->xsize - 1)
-			d += scp->xoff*2 
-				 + (scp->font_size - 1)*line_width;
+			d += scp->font_size * line_width - scp->xsize;
 	}
 	outw(GDCIDX, 0x0005);		/* read mode 0, write mode 0 */
 	outw(GDCIDX, 0x0000);		/* set/reset */


More information about the svn-src-stable mailing list