summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2006-03-02 02:05:17 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2006-03-02 02:05:17 +0000
commitca00035eccb6e3495b27f8e64f2d016d8d2a9ce2 (patch)
treee10c76a756bd1f949745e269d0e5a0aa9d12147a
parentb2145aea36bb035bff048366c607b967d70fff49 (diff)
Fix the fix ... I didn't interpret PciInfo->size properly and forgot that
the function works in Kb not bytes... Ooops.
-rw-r--r--ChangeLog6
-rw-r--r--src/radeon_driver.c13
2 files changed, 13 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 3f118a0..2015433 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2006-03-02 Benjamin Herrenschmidt <benh@kernel.crashing.org>
+ * src/radeon_driver.c: (RADEONPreInitConfig):
+ Fix the fix ... I didn't interpret PciInfo->size properly and forgot
+ that the function works in Kb not bytes... Ooops.
+
+2006-03-02 Benjamin Herrenschmidt <benh@kernel.crashing.org>
+
* src/radeon_driver.c: (RADEONInitMemoryMap),
(RADEONPreInitConfig):
Extend the alignement workaround to post-rv280 chips as well (thanks
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 68cda91..4a078e8 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. */