summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-12-07 13:29:51 +1000
committerDave Airlie <airlied@redhat.com>2009-12-07 13:29:51 +1000
commit64bffd03756249e11b8651ccf33ac3a50a93ed4c (patch)
tree70201e8aaab4131bf94ed6d17e20a9c857c87b37 /drivers/gpu
parent4f15d24adb39803ba7b9363d0bb5dd714a6706f6 (diff)
downloadlinux-3.10-64bffd03756249e11b8651ccf33ac3a50a93ed4c.tar.gz
linux-3.10-64bffd03756249e11b8651ccf33ac3a50a93ed4c.tar.bz2
linux-3.10-64bffd03756249e11b8651ccf33ac3a50a93ed4c.zip
drm/radeon/kms: fix RS600 MC setup.
Again we try to put VRAM at 0, and it didn't work on this chipset, reports of corrupt RAM appeared on irc and bugzilla. Fix the vram location according to what the BIOS setup, I'm not 100% sure we don't need the same thing on rs690/rs780/rs880, we probably should do it there just in case as its what the DDX does. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/radeon/rs600.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/rs600.c b/drivers/gpu/drm/radeon/rs600.c
index 11a1da0fc76..3be456b7819 100644
--- a/drivers/gpu/drm/radeon/rs600.c
+++ b/drivers/gpu/drm/radeon/rs600.c
@@ -45,6 +45,20 @@
void rs600_gpu_init(struct radeon_device *rdev);
int rs600_mc_wait_for_idle(struct radeon_device *rdev);
+int rs600_mc_init(struct radeon_device *rdev)
+{
+ /* read back the MC value from the hw */
+ uint32_t mc_fb_loc;
+ int r;
+
+ mc_fb_loc = RREG32_MC(R_000004_MC_FB_LOCATION);
+ rdev->mc.vram_location = G_000004_MC_FB_START(mc_fb_loc) << 16;
+ rdev->mc.gtt_location = 0xffffffffUL;
+ r = radeon_mc_setup(rdev);
+ if (r)
+ return r;
+ return 0;
+}
/*
* GART.
*/
@@ -505,7 +519,7 @@ int rs600_init(struct radeon_device *rdev)
/* Get vram informations */
rs600_vram_info(rdev);
/* Initialize memory controller (also test AGP) */
- r = r420_mc_init(rdev);
+ r = rs600_mc_init(rdev);
if (r)
return r;
rs600_debugfs(rdev);