r2494 - in trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian: . patches patches/series

Joshua Kwan joshk@costa.debian.org
Wed, 16 Feb 2005 04:36:01 +0100


Author: joshk
Date: 2005-02-16 04:36:00 +0100 (Wed, 16 Feb 2005)
New Revision: 2494

Added:
   trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/patches/atyfb-sparc.dpatch
   trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/patches/series/2.6.10-6
Modified:
   trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/changelog
Log:
add atyfb-sparc.dpatch


Modified: trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/changelog
===================================================================
--- trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/changelog	2005-02-16 02:30:31 UTC (rev 2493)
+++ trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/changelog	2005-02-16 03:36:00 UTC (rev 2494)
@@ -6,8 +6,11 @@
   * Updated apply script so it can handle point versions
     (Simon Horman)
 
- -- Simon Horman <horms@debian.org>  Mon, 14 Feb 2005 15:47:44 +0900
+  * atyfb-sparc.dpatch: Fix post-2.6.10 atyfb breakage on SPARC32/64.
+    (Joshua Kwan)
 
+ -- Joshua Kwan <joshk@triplehelix.org>  Tue, 15 Feb 2005 19:34:33 -0800
+
 kernel-source-2.6.10 (2.6.10-5) unstable; urgency=low
 
   * Change $((exp) | exp) to $( (exp) | exp), so things work with dash

Added: trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/patches/atyfb-sparc.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/patches/atyfb-sparc.dpatch	2005-02-16 02:30:31 UTC (rev 2493)
+++ trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/patches/atyfb-sparc.dpatch	2005-02-16 03:36:00 UTC (rev 2494)
@@ -0,0 +1,133 @@
+# origin: linux-sparc (davem)
+# cset: n/a
+# inclusion: pushed for 2.6.11
+# description: fix atyfb on sparc post-2.6.10
+# revision date: 2005-02-15
+
+Path: main.gmane.org!not-for-mail
+From: "David S. Miller" <davem@davemloft.net>
+Newsgroups: gmane.linux.ports.sparc,gmane.linux.debian.ports.sparc,gmane.linux.fbdev.devel
+Subject: Re: [atyfb] No display on Sparc Ultra 10 with kernel 2.6.10-rc2 or
+ later
+Date: Tue, 15 Feb 2005 08:49:58 -0800
+Lines: 73
+Approved: news@gmane.org
+Message-ID: <20050215084958.1f68b39b.davem@davemloft.net>
+References: <200502140251.00645.aragorn@tiscali.nl>
+	<200502150741.01702.adaplas@hotpop.com>
+	<200502150722.24770.aragorn@tiscali.nl>
+	<200502152010.22880.adaplas@hotpop.com>
+NNTP-Posting-Host: main.gmane.org
+Mime-Version: 1.0
+Content-Type: text/plain; charset=US-ASCII
+Content-Transfer-Encoding: 7bit
+X-Trace: sea.gmane.org 1108486298 17138 80.91.229.2 (15 Feb 2005 16:51:38 GMT)
+X-Complaints-To: usenet@sea.gmane.org
+NNTP-Posting-Date: Tue, 15 Feb 2005 16:51:38 +0000 (UTC)
+Cc: adaplas@hotpop.com, aragorn@tiscali.nl,
+	debian-sparc@lists.debian.org, sparclinux@vger.kernel.org,
+	linux-fbdev-devel@lists.sourceforge.net
+Original-X-From: sparclinux-owner@vger.kernel.org Tue Feb 15 17:51:38 2005
+Original-Received: from vger.kernel.org ([12.107.209.244])
+	by ciao.gmane.org with esmtp (Exim 4.43)
+	id 1D15vC-0002p1-PX
+	for lnx-sparclinux@gmane.org; Tue, 15 Feb 2005 17:51:35 +0100
+Original-Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+	id S261793AbVBOQxh (ORCPT <rfc822;lnx-sparclinux@m.gmane.org>);
+	Tue, 15 Feb 2005 11:53:37 -0500
+Original-Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261794AbVBOQxh
+	(ORCPT <rfc822;sparclinux-outgoing>);
+	Tue, 15 Feb 2005 11:53:37 -0500
+Original-Received: from adsl-63-197-226-105.dsl.snfc21.pacbell.net ([63.197.226.105]:44461
+	"EHLO cheetah.davemloft.net") by vger.kernel.org with ESMTP
+	id S261793AbVBOQwh (ORCPT <rfc822;sparclinux@vger.kernel.org>);
+	Tue, 15 Feb 2005 11:52:37 -0500
+Original-Received: from localhost
+	([127.0.0.1] helo=cheetah.davemloft.net ident=davem)
+	by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian))
+	id 1D15te-00061r-00; Tue, 15 Feb 2005 08:49:58 -0800
+Original-To: adaplas@pol.net
+In-Reply-To: <200502152010.22880.adaplas@hotpop.com>
+X-Mailer: Sylpheed version 1.0.1 (GTK+ 1.2.10; sparc-unknown-linux-gnu)
+X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP
+Original-Sender: sparclinux-owner@vger.kernel.org
+Precedence: bulk
+X-Mailing-List: sparclinux@vger.kernel.org
+X-MailScanner-From: sparclinux-owner@vger.kernel.org
+X-MailScanner-To: lnx-sparclinux@gmane.org
+Xref: main.gmane.org gmane.linux.ports.sparc:4623 gmane.linux.debian.ports.sparc:8113 gmane.linux.fbdev.devel:6014
+X-Report-Spam: http://spam.gmane.org/gmane.linux.ports.sparc:4623
+
+On Tue, 15 Feb 2005 20:10:21 +0800
+"Antonino A. Daplas" <adaplas@hotpop.com> wrote:
+
+> Okay.  It seems that in the working kernel, the default mode, 1152x900, was
+> taken from the prom (since there is no 1152x900 in the mode database) if you
+> did not specify any boot mode option.
+> 
+> In the non-working version, without the boot mode option, the default_var
+> was used (which is only 640x480) or taken from the mode database if you
+> specified a boot mode.
+
+I think the bug is in the changes made to the fb_find_mode() calls
+in the !CONFIG_PPC case.  That looked suspicious to me the first time
+I scanned the atyfb driver diffs in 2.6.11
+
+First of all, a file global declared as "static char *mode" is asking for
+all sorts of trouble.  It's very easy to use such a simple name as
+a function local variable, thus making the global one invisible.
+
+I reviewed the driver and there are no cases of local variables named
+"mode" right now, but this is still asking for trouble in the future.
+It should be thus renamed.
+
+Now let's get back to the fb_find_mode() call in aty_init().  The old
+code for the non-CONFIG_PPC case did this:
+
+#ifdef __sparc__
+	if (mode_option) {
+		if (!fb_find_mode(...))
+			var = default_var;
+	} else
+		var = default_var;
+#else
+	if (!fb_find_mode(...))
+		var = default_var;
+#endif
+
+The new code calls fb_find_mode() always, this is wrong for Sparc's
+desired behavior:
+
+	if (!fb_find_mode(...))
+		var = default_var;
+
+On sparc, when "mode" is NULL, we should always use default_var as
+setup by PROM probed values.
+
+Here is the fix:
+
+===== drivers/video/aty/atyfb_base.c 1.82 vs edited =====
+--- 1.82/drivers/video/aty/atyfb_base.c	2005-01-04 18:48:32 -08:00
++++ edited/drivers/video/aty/atyfb_base.c	2005-02-15 08:19:00 -08:00
+@@ -2511,7 +2511,15 @@
+ 		}
+ 	} else
+ #endif /* !CONFIG_PPC */
+-	if (!fb_find_mode(&var, info, mode, NULL, 0, &defmode, 8))
++	if (
++#if defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64)
++	   /* On Sparc, unless the user gave a specific mode
++	    * specification, use the PROM probed values in
++	    * default_var.
++	    */
++	    !mode ||
++#endif
++	    !fb_find_mode(&var, info, mode, NULL, 0, &defmode, 8))
+ 		var = default_var;
+ 
+ 	if (noaccel)
+-
+To unsubscribe from this list: send the line "unsubscribe sparclinux" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at  http://vger.kernel.org/majordomo-info.html
+

Added: trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/patches/series/2.6.10-6
===================================================================
--- trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/patches/series/2.6.10-6	2005-02-16 02:30:31 UTC (rev 2493)
+++ trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/patches/series/2.6.10-6	2005-02-16 03:36:00 UTC (rev 2494)
@@ -0,0 +1 @@
++ atyfb-sparc.dpatch