summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/rs690.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-12-03 16:28:02 -0500
committerDave Airlie <airlied@redhat.com>2009-12-04 10:32:35 +1000
commit0088dbdb809e8799cb8f26da5ac64b15201fa99d (patch)
tree3d38533b297da8d47f663ffd79d7dd1cc3da31a5 /drivers/gpu/drm/radeon/rs690.c
parent722f29434e72188b2d20f9b41f4b5952073ed568 (diff)
drm/radeon/kms: rs6xx/rs740: clamp vram to aperture size
Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/rs690.c')
-rw-r--r--drivers/gpu/drm/radeon/rs690.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/rs690.c b/drivers/gpu/drm/radeon/rs690.c
index 81b8efcac4e..30913c3b5ba 100644
--- a/drivers/gpu/drm/radeon/rs690.c
+++ b/drivers/gpu/drm/radeon/rs690.c
@@ -134,7 +134,7 @@ void rs690_vram_info(struct radeon_device *rdev)
fixed20_12 a;
rs400_gart_adjust_size(rdev);
- /* DDR for all card after R300 & IGP */
+
rdev->mc.vram_is_ddr = true;
rdev->mc.vram_width = 128;
@@ -143,6 +143,13 @@ void rs690_vram_info(struct radeon_device *rdev)
rdev->mc.aper_base = drm_get_resource_start(rdev->ddev, 0);
rdev->mc.aper_size = drm_get_resource_len(rdev->ddev, 0);
+
+ if (rdev->mc.mc_vram_size > rdev->mc.aper_size)
+ rdev->mc.mc_vram_size = rdev->mc.aper_size;
+
+ if (rdev->mc.real_vram_size > rdev->mc.aper_size)
+ rdev->mc.real_vram_size = rdev->mc.aper_size;
+
rs690_pm_info(rdev);
/* FIXME: we should enforce default clock in case GPU is not in
* default setup