From owner-svn-src-user@FreeBSD.ORG Fri Oct 11 13:07:32 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A93A5C3E; Fri, 11 Oct 2013 13:07:32 +0000 (UTC) (envelope-from ray@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7D9FF23FD; Fri, 11 Oct 2013 13:07:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9BD7WDQ062047; Fri, 11 Oct 2013 13:07:32 GMT (envelope-from ray@svn.freebsd.org) Received: (from ray@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9BD7Vo3062044; Fri, 11 Oct 2013 13:07:31 GMT (envelope-from ray@svn.freebsd.org) Message-Id: <201310111307.r9BD7Vo3062044@svn.freebsd.org> From: Aleksandr Rybalko Date: Fri, 11 Oct 2013 13:07:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r256314 - in user/ed/newcons/sys/dev: drm2 vt/hw/ofwfb vt/hw/xboxfb X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Oct 2013 13:07:32 -0000 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; } }