summaryrefslogtreecommitdiffstats
path: root/drivers/video/nvidia/nv_setup.c
diff options
context:
space:
mode:
authorAntonino A. Daplas <adaplas@gmail.com>2007-07-17 13:05:30 +0200
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-17 19:23:11 +0200
commitac1ae162c9c400d63e62d9f2878be968b10ceaab (patch)
treee9af6679ec144a1155122a83af892623f88a94db /drivers/video/nvidia/nv_setup.c
parentradeonfb: Add support for Radeon Xpress 200M (RS485) (diff)
downloadlinux-ac1ae162c9c400d63e62d9f2878be968b10ceaab.tar.xz
linux-ac1ae162c9c400d63e62d9f2878be968b10ceaab.zip
nvidiafb: Add proper support for Geforce 7600 chipset
Add proper support for the Geforce 7600 (device id 0x039x). This also sync's nvidiafb with the latest Xorg nv driver. Signed-off-by: Antonino Daplas <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/nvidia/nv_setup.c')
-rw-r--r--drivers/video/nvidia/nv_setup.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/video/nvidia/nv_setup.c b/drivers/video/nvidia/nv_setup.c
index 707e2c8a13ed..82579d3a9970 100644
--- a/drivers/video/nvidia/nv_setup.c
+++ b/drivers/video/nvidia/nv_setup.c
@@ -166,11 +166,13 @@ u8 NVReadDacData(struct nvidia_par *par)
static int NVIsConnected(struct nvidia_par *par, int output)
{
volatile u32 __iomem *PRAMDAC = par->PRAMDAC0;
- u32 reg52C, reg608;
+ u32 reg52C, reg608, dac0_reg608 = 0;
int present;
- if (output)
- PRAMDAC += 0x800;
+ if (output) {
+ dac0_reg608 = NV_RD32(PRAMDAC, 0x0608);
+ PRAMDAC += 0x800;
+ }
reg52C = NV_RD32(PRAMDAC, 0x052C);
reg608 = NV_RD32(PRAMDAC, 0x0608);
@@ -194,8 +196,8 @@ static int NVIsConnected(struct nvidia_par *par, int output)
else
printk("nvidiafb: CRTC%i analog not found\n", output);
- NV_WR32(par->PRAMDAC0, 0x0608, NV_RD32(par->PRAMDAC0, 0x0608) &
- 0x0000EFFF);
+ if (output)
+ NV_WR32(par->PRAMDAC0, 0x0608, dac0_reg608);
NV_WR32(PRAMDAC, 0x052C, reg52C);
NV_WR32(PRAMDAC, 0x0608, reg608);