aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/nvidia/nvidia.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2006-01-09 23:51:27 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-10 11:01:24 -0500
commit0137ecfdc3453f58a9beee95152ff61e8bad97b1 (patch)
treee7dc8fe3047c7d0df1cf9d514ea2a25b6efc737e /drivers/video/nvidia/nvidia.c
parent2308acca656c3625c46b671b348fb04b6b006cad (diff)
[PATCH] nvidiafb: Fixes for new G5
Recent X "nv" driver was fixed for various issues with modern 6xxx and 7xxx cards. This patch ports those fixes to nvidiafb. This makes it work fine on the 6600 bundled with the newest G5 macs. I've verified it still works on the 5200FX of the iMacG5. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/nvidia/nvidia.c')
-rw-r--r--drivers/video/nvidia/nvidia.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c
index bee09c6e48f6..f6d2440e84aa 100644
--- a/drivers/video/nvidia/nvidia.c
+++ b/drivers/video/nvidia/nvidia.c
@@ -1485,6 +1485,8 @@ static u32 __devinit nvidia_get_arch(struct pci_dev *pd)
1485 case 0x0210: 1485 case 0x0210:
1486 case 0x0220: 1486 case 0x0220:
1487 case 0x0230: 1487 case 0x0230:
1488 case 0x0290:
1489 case 0x0390:
1488 arch = NV_ARCH_40; 1490 arch = NV_ARCH_40;
1489 break; 1491 break;
1490 case 0x0020: /* TNT, TNT2 */ 1492 case 0x0020: /* TNT, TNT2 */
@@ -1581,10 +1583,15 @@ static int __devinit nvidiafb_probe(struct pci_dev *pd,
1581 if (par->FbMapSize > 64 * 1024 * 1024) 1583 if (par->FbMapSize > 64 * 1024 * 1024)
1582 par->FbMapSize = 64 * 1024 * 1024; 1584 par->FbMapSize = 64 * 1024 * 1024;
1583 1585
1584 par->FbUsableSize = par->FbMapSize - (128 * 1024); 1586 if(par->Architecture >= NV_ARCH_40)
1587 par->FbUsableSize = par->FbMapSize - (560 * 1024);
1588 else
1589 par->FbUsableSize = par->FbMapSize - (128 * 1024);
1585 par->ScratchBufferSize = (par->Architecture < NV_ARCH_10) ? 8 * 1024 : 1590 par->ScratchBufferSize = (par->Architecture < NV_ARCH_10) ? 8 * 1024 :
1586 16 * 1024; 1591 16 * 1024;
1587 par->ScratchBufferStart = par->FbUsableSize - par->ScratchBufferSize; 1592 par->ScratchBufferStart = par->FbUsableSize - par->ScratchBufferSize;
1593 par->CursorStart = par->FbUsableSize + (32 * 1024);
1594
1588 info->screen_base = ioremap(nvidiafb_fix.smem_start, par->FbMapSize); 1595 info->screen_base = ioremap(nvidiafb_fix.smem_start, par->FbMapSize);
1589 info->screen_size = par->FbUsableSize; 1596 info->screen_size = par->FbUsableSize;
1590 nvidiafb_fix.smem_len = par->RamAmountKBytes * 1024; 1597 nvidiafb_fix.smem_len = par->RamAmountKBytes * 1024;