]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drm/radeon/kms: fix vram setup on rs600/rs690/rs740
authorAlex Deucher <alexdeucher@gmail.com>
Mon, 7 Dec 2009 00:45:17 +0000 (19:45 -0500)
committerDave Airlie <airlied@redhat.com>
Mon, 7 Dec 2009 22:58:33 +0000 (08:58 +1000)
Don't remap vram to 0 on IGP chips.

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

index 8d12b8a1ff13ef8841f73ca9bd09c8555daf3bbb..eda6d757b5c45f8a8ee3c9d51d037a1a1399b0f0 100644 (file)
@@ -352,7 +352,7 @@ static int rs400_mc_init(struct radeon_device *rdev)
        u32 tmp;
 
        /* Setup GPU memory space */
-       tmp = G_00015C_MC_FB_START(RREG32(R_00015C_NB_TOM));
+       tmp = RREG32(R_00015C_NB_TOM);
        rdev->mc.vram_location = G_00015C_MC_FB_START(tmp) << 16;
        rdev->mc.gtt_location = 0xFFFFFFFFUL;
        r = radeon_mc_setup(rdev);
index 3be456b781915d9d939534b4c09011c94ba77ec0..84b26376027d4d16669e996a3e01f0a2dba36902 100644 (file)
@@ -48,11 +48,12 @@ 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;
+       u32 tmp;
 
-       mc_fb_loc = RREG32_MC(R_000004_MC_FB_LOCATION);
-       rdev->mc.vram_location = G_000004_MC_FB_START(mc_fb_loc) << 16;
+       /* Setup GPU memory space */
+       tmp = RREG32_MC(R_000004_MC_FB_LOCATION);
+       rdev->mc.vram_location = G_000004_MC_FB_START(tmp) << 16;
        rdev->mc.gtt_location = 0xffffffffUL;
        r = radeon_mc_setup(rdev);
        if (r)
index 30913c3b5ba1fdafd5d820ccc7471ba4424cde6c..eb486ee7ea00fc252476b7367b5127345484e113 100644 (file)
@@ -162,6 +162,21 @@ void rs690_vram_info(struct radeon_device *rdev)
        rdev->pm.core_bandwidth.full = rfixed_div(rdev->pm.sclk, a);
 }
 
+static int rs690_mc_init(struct radeon_device *rdev)
+{
+       int r;
+       u32 tmp;
+
+       /* Setup GPU memory space */
+       tmp = RREG32_MC(R_000100_MCCFG_FB_LOCATION);
+       rdev->mc.vram_location = G_000100_MC_FB_START(tmp) << 16;
+       rdev->mc.gtt_location = 0xFFFFFFFFUL;
+       r = radeon_mc_setup(rdev);
+       if (r)
+               return r;
+       return 0;
+}
+
 void rs690_line_buffer_adjust(struct radeon_device *rdev,
                              struct drm_display_mode *mode1,
                              struct drm_display_mode *mode2)
@@ -710,7 +725,7 @@ int rs690_init(struct radeon_device *rdev)
        /* Get vram informations */
        rs690_vram_info(rdev);
        /* Initialize memory controller (also test AGP) */
-       r = r420_mc_init(rdev);
+       r = rs690_mc_init(rdev);
        if (r)
                return r;
        rv515_debugfs(rdev);