From ac499c3c0ea92f83ebd8127bb8cb5de625de6c94 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Fri, 23 Oct 2009 10:48:55 -0400 Subject: radeon: clamp the internal FB map to the aperture size v2 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 v2: only clamp cards with more than 512 MB. This seems to cause problems on some older cards due to the way the drm and ddx set up the internal memory map. --- src/radeon_driver.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/radeon_driver.c b/src/radeon_driver.c index d039920..7cb4c03 100644 --- a/src/radeon_driver.c +++ b/src/radeon_driver.c @@ -1403,6 +1403,18 @@ 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 more than 512 MB of vram, this can overflow + * the internal top of gart calculation on some systems. + * Limit it to cards with more than 512 MB as this causes problems + * on some other cards due to the way the ddx and drm set up the + * internal memory map. + * See fdo bug 24301. + */ + if (mem_size > 0x20000000) + mem_size = aper_size; + #ifdef XF86DRI /* Apply memory map limitation if using an old DRI */ if (info->directRenderingEnabled && !info->dri->newMemoryMap) { -- cgit v1.2.3