Skip to contentSkip to conversation

drm/radeon/kms: fix R3XX/R4XX memory controller initialization

PATCH New Jerome Glisse 1 participant 1 message Feb 18, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/radeon/kms: fix R3XX/R4XX memory controller initialization

Version 2 of memory controller did break the initialization for R3XX/R4XX hardware. This patch fix it.

---
 drivers/gpu/drm/radeon/r300.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
drivers/gpu/drm/radeon/r300.c +6 -1
index 7f8dd10..765c4e5 100644
@@ -505,7 +505,8 @@ int r300_gpu_reset(struct radeon_device *rdev)
  */
 void r300_mc_init(struct radeon_device *rdev)
 {
-	uint32_t tmp;
+	u64 base;
+	u32 tmp;
 
 	/* DDR for all card after R300 & IGP */
 	rdev->mc.vram_is_ddr = true;
@@ -518,6 +519,10 @@ void r300_mc_init(struct radeon_device *rdev)
 	default:  rdev->mc.vram_width = 128; break;
 	}
 	r100_vram_init_sizes(rdev);
+	base = rdev->mc.aper_base;
+	if (rdev->flags & RADEON_IS_IGP)
+		base = (RREG32(RADEON_NB_TOM) & 0xffff) << 16;
+	radeon_vram_location(rdev, &rdev->mc, base);
 	if (!(rdev->flags & RADEON_IS_AGP))
 		radeon_gtt_location(rdev, &rdev->mc);
 }
Signature · 10 lines
1.6.6


------------------------------------------------------------------------------
Download Intel&reg; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs 
proactively, and fine-tune applications for parallel performance. 
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--