diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2012-07-31 11:05:11 -0400 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2012-08-19 18:15:36 +0100 |
commit | 48d504e2659ad6029fac8b1f7f87c744c9abb888 (patch) | |
tree | 9b74fadd10d9f23870a61ec0f8b4137d40270ede | |
parent | e2caf135815a7f3e27ebe8a621a2c0dab2cf91ad (diff) |
drm/radeon: fix bank tiling parameters on cayman
commit 5b23c9045a8b61352986270b2d109edf5085e113 upstream.
Handle the 16 bank case.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
[bwh: Backported to 3.2: adjust context, indentation]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r-- | drivers/gpu/drm/radeon/ni.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c index 9e5081486fa..636255bf9e4 100644 --- a/drivers/gpu/drm/radeon/ni.c +++ b/drivers/gpu/drm/radeon/ni.c @@ -804,10 +804,18 @@ static void cayman_gpu_init(struct radeon_device *rdev) rdev->config.cayman.tile_config |= (3 << 0); break; } - if ((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT) - rdev->config.cayman.tile_config |= 1 << 4; - else + switch ((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT) { + case 0: /* four banks */ rdev->config.cayman.tile_config |= 0 << 4; + break; + case 1: /* eight banks */ + rdev->config.cayman.tile_config |= 1 << 4; + break; + case 2: /* sixteen banks */ + default: + rdev->config.cayman.tile_config |= 2 << 4; + break; + } rdev->config.cayman.tile_config |= ((gb_addr_config & PIPE_INTERLEAVE_SIZE_MASK) >> PIPE_INTERLEAVE_SIZE_SHIFT) << 8; rdev->config.cayman.tile_config |= |