aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/nvidia/nv_setup.c
diff options
context:
space:
mode:
authorWink Saville <wink@saville.com>2006-11-10 15:27:52 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-11-13 10:40:42 -0500
commite40c67597eac7a0b0e676867517b01a5a57f7b4b (patch)
tree842f4cc8ad5739c9935e4ca1aca8ad0743de54da /drivers/video/nvidia/nv_setup.c
parent7947d2cc2c2e01125a393de83862d02b621999fe (diff)
[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@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/nvidia/nv_setup.c')
-rw-r--r--drivers/video/nvidia/nv_setup.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/video/nvidia/nv_setup.c b/drivers/video/nvidia/nv_setup.c
index a18a9aebf05f..61dc46fecf2b 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)
359 case 0x0186: 359 case 0x0186:
360 case 0x0187: 360 case 0x0187:
361 case 0x018D: 361 case 0x018D:
362 case 0x0228:
362 case 0x0286: 363 case 0x0286:
363 case 0x028C: 364 case 0x028C:
364 case 0x0316: 365 case 0x0316:
@@ -382,6 +383,10 @@ int NVCommonSetup(struct fb_info *info)
382 case 0x034C: 383 case 0x034C:
383 case 0x0160: 384 case 0x0160:
384 case 0x0166: 385 case 0x0166:
386 case 0x0169:
387 case 0x016B:
388 case 0x016C:
389 case 0x016D:
385 case 0x00C8: 390 case 0x00C8:
386 case 0x00CC: 391 case 0x00CC:
387 case 0x0144: 392 case 0x0144:
@@ -639,12 +644,23 @@ int NVCommonSetup(struct fb_info *info)
639 par->fpHeight = NV_RD32(par->PRAMDAC, 0x0800) + 1; 644 par->fpHeight = NV_RD32(par->PRAMDAC, 0x0800) + 1;
640 par->fpSyncs = NV_RD32(par->PRAMDAC, 0x0848) & 0x30000033; 645 par->fpSyncs = NV_RD32(par->PRAMDAC, 0x0848) & 0x30000033;
641 646
642 printk("Panel size is %i x %i\n", par->fpWidth, par->fpHeight); 647 printk("nvidiafb: Panel size is %i x %i\n", par->fpWidth, par->fpHeight);
643 } 648 }
644 649
645 if (monA) 650 if (monA)
646 info->monspecs = *monA; 651 info->monspecs = *monA;
647 652
653 if (!par->FlatPanel || !par->twoHeads)
654 par->FPDither = 0;
655
656 par->LVDS = 0;
657 if (par->FlatPanel && par->twoHeads) {
658 NV_WR32(par->PRAMDAC0, 0x08B0, 0x00010004);
659 if (par->PRAMDAC0[0x08b4] & 1)
660 par->LVDS = 1;
661 printk("nvidiafb: Panel is %s\n", par->LVDS ? "LVDS" : "TMDS");
662 }
663
648 kfree(edidA); 664 kfree(edidA);
649 kfree(edidB); 665 kfree(edidB);
650done: 666done: