[kernel] r7794 - in dists/trunk/linux-2.6/debian: . patches/bugfix patches/series

maximilian attems maks-guest at alioth.debian.org
Mon Nov 13 23:43:53 UTC 2006


Author: maks-guest
Date: Tue Nov 14 00:43:53 2006
New Revision: 7794

Added:
   dists/trunk/linux-2.6/debian/patches/bugfix/video-nvidiafb-divide-zero.patch
Modified:
   dists/trunk/linux-2.6/debian/changelog
   dists/trunk/linux-2.6/debian/patches/series/6
Log:
add nvidiafb backport for a divide by zero


Modified: dists/trunk/linux-2.6/debian/changelog
==============================================================================
--- dists/trunk/linux-2.6/debian/changelog	(original)
+++ dists/trunk/linux-2.6/debian/changelog	Tue Nov 14 00:43:53 2006
@@ -11,6 +11,7 @@
    - mm: fixup do_wp_page()
    - mm: msync() cleanup (closes: #394392)
   * Add another bcm43xx patch queued for 2.6.18.3.
+  * Backport upstream nvidiafb patch (maybe fixes 398258).
 
   [ Steve Langasek ]
   * [alpha] new titan-video patch, for compatibility with TITAN and similar
@@ -32,7 +33,7 @@
   [ Thiemo Seufer ]
   * Enable raid456 for mips/mipsel qemu kernel.
 
- -- maximilian attems <maks at sternwelten.at>  Tue, 14 Nov 2006 00:27:20 +0100
+ -- maximilian attems <maks at sternwelten.at>  Tue, 14 Nov 2006 00:39:41 +0100
 
 linux-2.6 (2.6.18-5) unstable; urgency=low
 

Added: dists/trunk/linux-2.6/debian/patches/bugfix/video-nvidiafb-divide-zero.patch
==============================================================================
--- (empty file)
+++ dists/trunk/linux-2.6/debian/patches/bugfix/video-nvidiafb-divide-zero.patch	Tue Nov 14 00:43:53 2006
@@ -0,0 +1,156 @@
+From git-commits-head-owner at vger.kernel.org Mon Nov 13 18:27:28 2006
+Date: Mon, 13 Nov 2006 16:59:04 GMT
+Message-Id: <200611131659.kADGx4Ol025786 at hera.kernel.org>
+From: Linux Kernel Mailing List <linux-kernel at vger.kernel.org>
+To: git-commits-head at vger.kernel.org
+Subject: [PATCH] Patch for nvidia divide by zero error for 7600 pci-express card
+
+commit e40c67597eac7a0b0e676867517b01a5a57f7b4b
+tree 842f4cc8ad5739c9935e4ca1aca8ad0743de54da
+parent 7947d2cc2c2e01125a393de83862d02b621999fe
+author Wink Saville <wink at saville.com> 1163190472 -0800
+committer Linus Torvalds <torvalds at g5.osdl.org> 1163432442 -0800
+
+[PATCH] Patch for nvidia divide by zero error for 7600 pci-express card
+
+The following patch resolves the divide by zero error I encountered on my
+system:
+
+	http://marc.10east.com/?l=linux-fbdev-devel&m=116058257024413&w=2
+
+I accomplished this by merging what I thought was appropriate from:
+
+	http://webcvs.freedesktop.org/xorg/driver/xf86-video-nv/src/
+
+Signed-off-by: Andrew Morton <akpm at osdl.org>
+Signed-off-by: Linus Torvalds <torvalds at osdl.org>
+
+ drivers/video/nvidia/nv_hw.c    |   12 +++++++++---
+ drivers/video/nvidia/nv_setup.c |   18 +++++++++++++++++-
+ drivers/video/nvidia/nv_type.h  |    1 +
+ drivers/video/nvidia/nvidia.c   |   24 ++++++++++++------------
+ 4 files changed, 39 insertions(+), 16 deletions(-)
+
+diff --git a/drivers/video/nvidia/nv_hw.c b/drivers/video/nvidia/nv_hw.c
+index 9ed640d..ea42611 100644
+--- a/drivers/video/nvidia/nv_hw.c
++++ b/drivers/video/nvidia/nv_hw.c
+@@ -145,12 +145,18 @@ static void nvGetClocks(struct nvidia_pa
+ 
+ 	if (par->Architecture >= NV_ARCH_40) {
+ 		pll = NV_RD32(par->PMC, 0x4020);
+-		P = (pll >> 16) & 0x03;
++		P = (pll >> 16) & 0x07;
+ 		pll = NV_RD32(par->PMC, 0x4024);
+ 		M = pll & 0xFF;
+ 		N = (pll >> 8) & 0xFF;
+-		MB = (pll >> 16) & 0xFF;
+-		NB = (pll >> 24) & 0xFF;
++		if (((par->Chipset & 0xfff0) == 0x0290) ||
++				((par->Chipset & 0xfff0) == 0x0390)) {
++			MB = 1;
++			NB = 1;
++		} else {
++			MB = (pll >> 16) & 0xFF;
++			NB = (pll >> 24) & 0xFF;
++		}
+ 		*MClk = ((N * NB * par->CrystalFreqKHz) / (M * MB)) >> P;
+ 
+ 		pll = NV_RD32(par->PMC, 0x4000);
+diff --git a/drivers/video/nvidia/nv_setup.c b/drivers/video/nvidia/nv_setup.c
+index a18a9ae..61dc46f 100644
+--- a/drivers/video/nvidia/nv_setup.c
++++ b/drivers/video/nvidia/nv_setup.c
+@@ -359,6 +359,7 @@ int NVCommonSetup(struct fb_info *info)
+ 	case 0x0186:
+ 	case 0x0187:
+ 	case 0x018D:
++	case 0x0228:
+ 	case 0x0286:
+ 	case 0x028C:
+ 	case 0x0316:
+@@ -382,6 +383,10 @@ int NVCommonSetup(struct fb_info *info)
+ 	case 0x034C:
+ 	case 0x0160:
+ 	case 0x0166:
++	case 0x0169:
++	case 0x016B:
++	case 0x016C:
++	case 0x016D:
+ 	case 0x00C8:
+ 	case 0x00CC:
+ 	case 0x0144:
+@@ -639,12 +644,23 @@ int NVCommonSetup(struct fb_info *info)
+ 		par->fpHeight = NV_RD32(par->PRAMDAC, 0x0800) + 1;
+ 		par->fpSyncs = NV_RD32(par->PRAMDAC, 0x0848) & 0x30000033;
+ 
+-		printk("Panel size is %i x %i\n", par->fpWidth, par->fpHeight);
++		printk("nvidiafb: Panel size is %i x %i\n", par->fpWidth, par->fpHeight);
+ 	}
+ 
+ 	if (monA)
+ 		info->monspecs = *monA;
+ 
++	if (!par->FlatPanel || !par->twoHeads)
++		par->FPDither = 0;
++
++	par->LVDS = 0;
++	if (par->FlatPanel && par->twoHeads) {
++		NV_WR32(par->PRAMDAC0, 0x08B0, 0x00010004);
++		if (par->PRAMDAC0[0x08b4] & 1)
++			par->LVDS = 1;
++		printk("nvidiafb: Panel is %s\n", par->LVDS ? "LVDS" : "TMDS");
++	}
++
+ 	kfree(edidA);
+ 	kfree(edidB);
+ done:
+diff --git a/drivers/video/nvidia/nv_type.h b/drivers/video/nvidia/nv_type.h
+index acdc266..86e65de 100644
+--- a/drivers/video/nvidia/nv_type.h
++++ b/drivers/video/nvidia/nv_type.h
+@@ -129,6 +129,7 @@ struct nvidia_par {
+ 	int fpHeight;
+ 	int PanelTweak;
+ 	int paneltweak;
++	int LVDS;
+ 	int pm_state;
+ 	u32 crtcSync_read;
+ 	u32 fpSyncs;
+diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c
+index eb24107..538e947 100644
+--- a/drivers/video/nvidia/nvidia.c
++++ b/drivers/video/nvidia/nvidia.c
+@@ -1160,20 +1160,20 @@ static u32 __devinit nvidia_get_arch(str
+ 	case 0x0340:		/* GeForceFX 5700 */
+ 		arch = NV_ARCH_30;
+ 		break;
+-	case 0x0040:
+-	case 0x00C0:
+-	case 0x0120:
++	case 0x0040:		/* GeForce 6800 */
++	case 0x00C0:		/* GeForce 6800 */
++	case 0x0120:		/* GeForce 6800 */
+ 	case 0x0130:
+-	case 0x0140:
+-	case 0x0160:
+-	case 0x01D0:
+-	case 0x0090:
+-	case 0x0210:
+-	case 0x0220:
++	case 0x0140:		/* GeForce 6600 */
++	case 0x0160:		/* GeForce 6200 */
++	case 0x01D0:		/* GeForce 7200, 7300, 7400 */
++	case 0x0090:		/* GeForce 7800 */
++	case 0x0210:		/* GeForce 6800 */
++	case 0x0220:		/* GeForce 6200 */
+ 	case 0x0230:
+-	case 0x0240:
+-	case 0x0290:
+-	case 0x0390:
++	case 0x0240:		/* GeForce 6100 */
++	case 0x0290:		/* GeForce 7900 */
++	case 0x0390:		/* GeForce 7600 */
+ 		arch = NV_ARCH_40;
+ 		break;
+ 	case 0x0020:		/* TNT, TNT2 */

Modified: dists/trunk/linux-2.6/debian/patches/series/6
==============================================================================
--- dists/trunk/linux-2.6/debian/patches/series/6	(original)
+++ dists/trunk/linux-2.6/debian/patches/series/6	Tue Nov 14 00:43:53 2006
@@ -14,3 +14,4 @@
 + features/all/sctp-backports-6.patch
 + features/all/sctp-backports-7.patch
 + bugfix/bcm43xx-drain-tx-status-before-starting-irqs.patch
++ bugfix/video-nvidiafb-divide-zero.patch



More information about the Kernel-svn-changes mailing list