summaryrefslogtreecommitdiff
path: root/src/radeon_driver.c
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:04:20 -0400
commit5f846360c46f5a989f5d0fde6d251cdbd61d4968 (patch)
tree01fb6b43fd69359e89d18bf8d1d07eb0fae96ec6 /src/radeon_driver.c
parent186bf719c394116341abff471fb4b4803650da9a (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
Diffstat (limited to 'src/radeon_driver.c')
-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 d039920b..d5704d3e 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -1403,6 +1403,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) {