drm/radeon/kms: fix vram setup on rs600
authorAlex Deucher <alexdeucher@gmail.com>
Thu, 3 Dec 2009 21:18:19 +0000 (16:18 -0500)
committerDave Airlie <airlied@redhat.com>
Fri, 4 Dec 2009 00:32:26 +0000 (10:32 +1000)
also fix up rs690 mem width.

should fix fdo bug 25408

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/rs600.c
drivers/gpu/drm/radeon/rs690.c

index c97eb63a21d28ad8586d4fc56aab5ec66e30aef3..00bc71fe98d15ae8c11f3708e4be1de7977ac2a2 100644 (file)
@@ -320,6 +320,12 @@ void rs600_vram_info(struct radeon_device *rdev)
        /* FIXME: to do or is these values sane ? */
        rdev->mc.vram_is_ddr = true;
        rdev->mc.vram_width = 128;
+
+       rdev->mc.real_vram_size = RREG32(RADEON_CONFIG_MEMSIZE);
+       rdev->mc.mc_vram_size = rdev->mc.real_vram_size;
+
+       rdev->mc.aper_base = drm_get_resource_start(rdev->ddev, 0);
+       rdev->mc.aper_size = drm_get_resource_len(rdev->ddev, 0);
 }
 
 void rs600_bandwidth_update(struct radeon_device *rdev)
index e7a5f87c23fea39e617881399a791f3746df79b6..81b8efcac4e86ce4389683e637e2aa74ea8e2029 100644 (file)
@@ -131,19 +131,13 @@ void rs690_pm_info(struct radeon_device *rdev)
 
 void rs690_vram_info(struct radeon_device *rdev)
 {
-       uint32_t tmp;
        fixed20_12 a;
 
        rs400_gart_adjust_size(rdev);
        /* DDR for all card after R300 & IGP */
        rdev->mc.vram_is_ddr = true;
-       /* FIXME: is this correct for RS690/RS740 ? */
-       tmp = RREG32(RADEON_MEM_CNTL);
-       if (tmp & R300_MEM_NUM_CHANNELS_MASK) {
-               rdev->mc.vram_width = 128;
-       } else {
-               rdev->mc.vram_width = 64;
-       }
+       rdev->mc.vram_width = 128;
+
        rdev->mc.real_vram_size = RREG32(RADEON_CONFIG_MEMSIZE);
        rdev->mc.mc_vram_size = rdev->mc.real_vram_size;