From owner-svn-src-all@FreeBSD.ORG Fri Sep 17 23:09:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3CCF1065672; Fri, 17 Sep 2010 23:09:31 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 930158FC17; Fri, 17 Sep 2010 23:09:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8HN9V4a044747; Fri, 17 Sep 2010 23:09:31 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8HN9VLC044745; Fri, 17 Sep 2010 23:09:31 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201009172309.o8HN9VLC044745@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 17 Sep 2010 23:09:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212806 - head/sys/dev/syscons X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2010 23:09:31 -0000 Author: jkim Date: Fri Sep 17 23:09:31 2010 New Revision: 212806 URL: http://svn.freebsd.org/changeset/base/212806 Log: 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. Reported by: David DEMELIER (demelier dot david at gmail dot com) Modified: head/sys/dev/syscons/scvgarndr.c Modified: head/sys/dev/syscons/scvgarndr.c ============================================================================== --- head/sys/dev/syscons/scvgarndr.c Fri Sep 17 22:59:15 2010 (r212805) +++ head/sys/dev/syscons/scvgarndr.c Fri Sep 17 23:09:31 2010 (r212806) @@ -716,8 +716,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 */ @@ -769,9 +768,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; } } @@ -827,8 +825,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 */