svn commit: r256314 - in user/ed/newcons/sys/dev: drm2 vt/hw/ofwfb vt/hw/xboxfb

Aleksandr Rybalko ray at FreeBSD.org
Fri Oct 11 13:07:32 UTC 2013


Author: ray
Date: Fri Oct 11 13:07:31 2013
New Revision: 256314
URL: http://svnweb.freebsd.org/changeset/base/256314

Log:
  Fix off-by-one-huge-fb-line copy-pasted to every driver.
  TODO: defaulting to single implementation for all FB devices.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  user/ed/newcons/sys/dev/drm2/drm_fb_helper.c
  user/ed/newcons/sys/dev/vt/hw/ofwfb/ofwfb.c
  user/ed/newcons/sys/dev/vt/hw/xboxfb/xboxfb.c

Modified: user/ed/newcons/sys/dev/drm2/drm_fb_helper.c
==============================================================================
--- user/ed/newcons/sys/dev/drm2/drm_fb_helper.c	Fri Oct 11 12:08:40 2013	(r256313)
+++ user/ed/newcons/sys/dev/drm2/drm_fb_helper.c	Fri Oct 11 13:07:31 2013	(r256314)
@@ -127,7 +127,6 @@ vt_kms_bitblt(struct vt_device *vd, cons
 
 	line = (sc->sc_stride * top) + left * sc->sc_depth/8;
 	for (; height > 0; height--) {
-		line += sc->sc_stride;
 		for (c = 0; c < width; c++) {
 			if (c % 8 == 0)
 				b = *src++;
@@ -149,6 +148,7 @@ vt_kms_bitblt(struct vt_device *vd, cons
 				break;
 			}
 		}
+		line += sc->sc_stride;
 	}
 }
 

Modified: user/ed/newcons/sys/dev/vt/hw/ofwfb/ofwfb.c
==============================================================================
--- user/ed/newcons/sys/dev/vt/hw/ofwfb/ofwfb.c	Fri Oct 11 12:08:40 2013	(r256313)
+++ user/ed/newcons/sys/dev/vt/hw/ofwfb/ofwfb.c	Fri Oct 11 13:07:31 2013	(r256314)
@@ -131,7 +131,6 @@ ofwfb_bitblt(struct vt_device *vd, const
 
 	line = (sc->sc_stride * top) + left * sc->sc_depth/8;
 	for (; height > 0; height--) {
-		line += sc->sc_stride;
 		for (c = 0; c < width; c++) {
 			if (c % 8 == 0)
 				b = *src++;
@@ -151,6 +150,7 @@ ofwfb_bitblt(struct vt_device *vd, const
 				break;
 			}
 		}
+		line += sc->sc_stride;
 	}
 }
 

Modified: user/ed/newcons/sys/dev/vt/hw/xboxfb/xboxfb.c
==============================================================================
--- user/ed/newcons/sys/dev/vt/hw/xboxfb/xboxfb.c	Fri Oct 11 12:08:40 2013	(r256313)
+++ user/ed/newcons/sys/dev/vt/hw/xboxfb/xboxfb.c	Fri Oct 11 13:07:31 2013	(r256314)
@@ -121,7 +121,6 @@ xbox_bitblt(struct vt_device *vd, const 
 
 	line = (VT_XBOX_WIDTH * top + left) * 4;
 	for (; height > 0; height--) {
-		line += VT_XBOX_WIDTH * 4;
 		for (c = 0; c < width; c++) {
 			if (c % 8 == 0)
 				b = *src++;
@@ -129,6 +128,7 @@ xbox_bitblt(struct vt_device *vd, const 
 				b <<= 1;
 			MEM_WRITE4(sc, line + c * 4, b & 0x80 ? fgc : bgc);
 		}
+		line += VT_XBOX_WIDTH * 4;
 	}
 }
 


More information about the svn-src-user mailing list