diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2012-07-31 19:01:10 +0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2012-08-13 18:50:51 +0400 |
commit | c8d15edc17d836686d1f071e564800e1a2724fa6 (patch) | |
tree | c8524ecef79d585aab26861b9b9edd12136d474e /drivers | |
parent | dca571a6a4edda1f61ba7ecb47431a22245490a3 (diff) | |
download | linux-c8d15edc17d836686d1f071e564800e1a2724fa6.tar.xz |
drm/radeon: fix bank tiling parameters on evergreen
Handle the 16 bank case.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/radeon/evergreen.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index e585a3b947eb..f4ef24f11419 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c @@ -1986,10 +1986,18 @@ static void evergreen_gpu_init(struct radeon_device *rdev) if (rdev->flags & RADEON_IS_IGP) rdev->config.evergreen.tile_config |= 1 << 4; else { - if ((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT) - rdev->config.evergreen.tile_config |= 1 << 4; - else + switch ((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT) { + case 0: /* four banks */ rdev->config.evergreen.tile_config |= 0 << 4; + break; + case 1: /* eight banks */ + rdev->config.evergreen.tile_config |= 1 << 4; + break; + case 2: /* sixteen banks */ + default: + rdev->config.evergreen.tile_config |= 2 << 4; + break; + } } rdev->config.evergreen.tile_config |= 0 << 8; rdev->config.evergreen.tile_config |= |