diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2006-03-02 02:05:17 +0000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2006-03-02 02:05:17 +0000 |
commit | ca00035eccb6e3495b27f8e64f2d016d8d2a9ce2 (patch) | |
tree | e10c76a756bd1f949745e269d0e5a0aa9d12147a /src/radeon_driver.c | |
parent | b2145aea36bb035bff048366c607b967d70fff49 (diff) |
Fix the fix ... I didn't interpret PciInfo->size properly and forgot that
the function works in Kb not bytes... Ooops.
Diffstat (limited to 'src/radeon_driver.c')
-rw-r--r-- | src/radeon_driver.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/radeon_driver.c b/src/radeon_driver.c index 68cda919..4a078e8c 100644 --- a/src/radeon_driver.c +++ b/src/radeon_driver.c @@ -1,5 +1,5 @@ /* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c,v 1.117 2004/02/19 22:38:12 tsi Exp $ */ -/* $XdotOrg: driver/xf86-video-ati/src/radeon_driver.c,v 1.89 2006/02/28 23:34:03 benh Exp $ */ +/* $XdotOrg: driver/xf86-video-ati/src/radeon_driver.c,v 1.90 2006/03/01 21:35:14 benh Exp $ */ /* * Copyright 2000 ATI Technologies Inc., Markham, Ontario, and * VA Linux Systems Inc., Fremont, California. @@ -2776,15 +2776,16 @@ static Bool RADEONPreInitConfig(ScrnInfoPtr pScrn) accessible = RADEONGetAccessibleVRAM(pScrn); /* Crop it to the size of the PCI BAR */ - bar_size = info->PciInfo->size[0]; + bar_size = (1ul << info->PciInfo->size[0]) / 1024; if (bar_size == 0) - bar_size = 0x08000000; + bar_size = 0x20000; if (accessible > bar_size) accessible = bar_size; xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Detected total video RAM: %dl, max accessible: %dK\n", - pScrn->videoRam, accessible); + "Detected total video RAM=%dK, accessible=%dK " + "(PCI BAR=%dK)\n", + pScrn->videoRam, accessible, bar_size); if (pScrn->videoRam > accessible) pScrn->videoRam = accessible; } @@ -2821,7 +2822,7 @@ static Bool RADEONPreInitConfig(ScrnInfoPtr pScrn) } xf86DrvMsg(pScrn->scrnIndex, from, - "VideoRAM: %d kByte (%d bit %s SDRAM)\n", pScrn->videoRam, info->RamWidth, info->IsDDR?"DDR":"SDR"); + "Mapped VideoRAM: %d kByte (%d bit %s SDRAM)\n", pScrn->videoRam, info->RamWidth, info->IsDDR?"DDR":"SDR"); /* FIXME: For now, split FB into two equal sections. This should * be able to be adjusted by user with a config option. */ |