diff options
author | Wink Saville <wink@saville.com> | 2006-11-10 21:27:52 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-11-13 16:40:42 +0100 |
commit | e40c67597eac7a0b0e676867517b01a5a57f7b4b (patch) | |
tree | 842f4cc8ad5739c9935e4ca1aca8ad0743de54da /drivers/video/nvidia/nv_setup.c | |
parent | [PATCH] IPMI: Fix more && typos (diff) | |
download | linux-e40c67597eac7a0b0e676867517b01a5a57f7b4b.tar.xz linux-e40c67597eac7a0b0e676867517b01a5a57f7b4b.zip |
[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.c | 18 |
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) 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: |