NetBSD Problem Report #46516

From www@NetBSD.org  Sat Jun  2 14:01:37 2012
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id 2D8C363BEE1
	for <gnats-bugs@gnats.NetBSD.org>; Sat,  2 Jun 2012 14:01:37 +0000 (UTC)
Message-Id: <20120602140136.7ABE663BA27@www.NetBSD.org>
Date: Sat,  2 Jun 2012 14:01:36 +0000 (UTC)
From: nathanialsloss@yahoo.com.au
Reply-To: nathanialsloss@yahoo.com.au
To: gnats-bugs@NetBSD.org
Subject: splashscreen picture corruption at 8 bit depth
X-Send-Pr-Version: www-1.0

>Number:         46516
>Category:       kern
>Synopsis:       splashscreen picture corruption at 8 bit depth
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jun 02 14:05:00 +0000 2012
>Closed-Date:    Sat Jun 02 14:24:17 +0000 2012
>Last-Modified:  Sat Jun 02 14:25:06 +0000 2012
>Originator:     Nat Sloss
>Release:        NetBSD Current 6.99.6
>Organization:
>Environment:
NetBSD beast 6.99.6 NetBSD 6.99.6 (LOCKDEBUG) #54: Sat Jun  2 17:32:26 EST 2012  build@beast:/usr/src/sys/arch/i386/compile/obj/LOCKDEBUG i386

>Description:
If you boot with a splash screen at 8 bit depth the picture doesn't display correctly.

splash.c should increment by stride and not picture width.

Note: I found no problem in an qemu emulation but rather on real hardware.
>How-To-Repeat:
Boot up with the following options:

vesa 800x600x8
splash splash.bmp
boot

>Fix:
I fixed it with this patch:
===================================================================
RCS file: /cvsroot/src/sys/dev/splash/splash.c,v
retrieving revision 1.11
diff -u -r1.11 splash.c
--- sys/dev/splash/splash.c     8 Feb 2011 23:28:24 -0000       1.11
+++ sys/dev/splash/splash.c     2 Jun 2012 14:00:09 -0000
@@ -271,7 +271,7 @@
                        fb[x] = SPLASH_INDEX(pix[0], pix[1], pix[2]) +
                                    SPLASH_CMAP_OFFSET;
                }
-               fb += si->si_width;
+               fb += si->si_stride;
        }

        /* If we've just written to the shadow fb, copy it to the display */


Note:  This patch is my own work which I submit under the NetBSD license.

Regards,

Nat.

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: martin@NetBSD.org
State-Changed-When: Sat, 02 Jun 2012 14:24:17 +0000
State-Changed-Why:
commited, thanks!


From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/46516 CVS commit: src/sys/dev/splash
Date: Sat, 2 Jun 2012 14:24:00 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Sat Jun  2 14:24:00 UTC 2012

 Modified Files:
 	src/sys/dev/splash: splash.c

 Log Message:
 Nat Sloss in PR kern/46516: advance fb pointer by stride, not logical
 width of the splash image.


 To generate a diff of this commit:
 cvs rdiff -u -r1.11 -r1.12 src/sys/dev/splash/splash.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.