From owner-svn-src-head@FreeBSD.ORG Sun Aug 24 14:39:33 2014 Return-Path: Delivered-To: svn-src-head@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 ESMTPS id CEF16351; Sun, 24 Aug 2014 14:39:33 +0000 (UTC) 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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A0E0B3335; Sun, 24 Aug 2014 14:39:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7OEdXoV042707; Sun, 24 Aug 2014 14:39:33 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7OEdXZ2042706; Sun, 24 Aug 2014 14:39:33 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201408241439.s7OEdXZ2042706@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Sun, 24 Aug 2014 14:39:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270485 - head/sys/dev/vt/hw/vga X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Aug 2014 14:39:33 -0000 Author: dumbbell Date: Sun Aug 24 14:39:33 2014 New Revision: 270485 URL: http://svnweb.freebsd.org/changeset/base/270485 Log: vt_vga: Fix the display of the splash screen MFC after: 1 week Modified: head/sys/dev/vt/hw/vga/vt_vga.c Modified: head/sys/dev/vt/hw/vga/vt_vga.c ============================================================================== --- head/sys/dev/vt/hw/vga/vt_vga.c Sun Aug 24 14:25:44 2014 (r270484) +++ head/sys/dev/vt/hw/vga/vt_vga.c Sun Aug 24 14:39:33 2014 (r270485) @@ -431,6 +431,9 @@ vga_copy_bitmap_portion(uint8_t *pattern pattern_2colors[dst_y + i] &= ~mask; pattern_2colors[dst_y + i] |= pattern; + if (pattern_ncolors == NULL) + continue; + /* * Set the same bits in the n-colors array. This one * supports transparency, when a given bit is cleared in @@ -836,7 +839,7 @@ vga_bitblt_bitmap(struct vt_device *vd, unsigned int x, unsigned int y, term_color_t fg, term_color_t bg) { unsigned int x1, y1, x2, y2, i, j, src_x, dst_x, x_count; - uint8_t pattern_2colors, pattern_ncolors; + uint8_t pattern_2colors; /* Align coordinates with the 8-pxels grid. */ x1 = x / VT_VGA_PIXELS_BLOCK * VT_VGA_PIXELS_BLOCK; @@ -848,18 +851,16 @@ vga_bitblt_bitmap(struct vt_device *vd, x2 = min(x2, vd->vd_width - 1); y2 = min(y2, vd->vd_height - 1); - pattern_ncolors = 0; - for (j = y1; j < y2; ++j) { src_x = 0; dst_x = x - x1; x_count = VT_VGA_PIXELS_BLOCK - dst_x; - for (i = x1; i < x2; i += VT_VGA_MEMSIZE) { + for (i = x1; i < x2; i += VT_VGA_PIXELS_BLOCK) { pattern_2colors = 0; vga_copy_bitmap_portion( - &pattern_2colors, &pattern_ncolors, + &pattern_2colors, NULL, pattern, mask, width, src_x, dst_x, x_count, j - y1, 0, 1, fg, bg, 0); @@ -870,7 +871,7 @@ vga_bitblt_bitmap(struct vt_device *vd, src_x += x_count; dst_x = (dst_x + x_count) % VT_VGA_PIXELS_BLOCK; - x_count = min(x + width - i, VT_VGA_PIXELS_BLOCK); + x_count = min(width - src_x, VT_VGA_PIXELS_BLOCK); } } }