summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-10-07 17:01:55 -0400
committerAlex Deucher <alexdeucher@gmail.com>2009-10-07 17:05:19 -0400
commit0db4b1708c2e5f3c14f48de186ee866ab8d9d5a9 (patch)
treeaf6e0a955c71f13edbd7383b7cda0c4ced109feb
parentecc192e2e5d72090bb35b142c6dc4639ec2542f0 (diff)
radeon: clamp the internal FB map to the aperture size
We don't use the invisible memory yet and on cards with large amounts of vram this can cause the top of GART calculation to overflow. Fixes bug fdo bug 24301: http://bugs.freedesktop.org/show_bug.cgi?id=24301
-rw-r--r--src/radeon_driver.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 800397c0..4e0dcf98 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -1362,6 +1362,15 @@ static void RADEONInitMemoryMap(ScrnInfoPtr pScrn)
if (aper_size > mem_size)
mem_size = aper_size;
+ /* don't map the whole FB in the internal address space.
+ * we don't currently use fb space larger than the aperture
+ * size and on cards with 1 GB of vram, this can overflow
+ * the internal top of gart calculation on some systems.
+ * See fdo bug 24301.
+ */
+ if (mem_size > aper_size)
+ mem_size = aper_size;
+
#ifdef XF86DRI
/* Apply memory map limitation if using an old DRI */
if (info->directRenderingEnabled && !info->dri->newMemoryMap) {