diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2012-05-31 18:53:36 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-06-01 15:36:31 +0100 |
commit | 29d654067a98c1cb8874c774e5fd799a038af8a6 (patch) | |
tree | caf59daf243217689b78d4086c74ace5bb2a23c2 /drivers/gpu/drm/radeon/ni.c | |
parent | 08ef8e41a6f420c3c0998b50d478e0b2c267a226 (diff) | |
download | op-kernel-dev-29d654067a98c1cb8874c774e5fd799a038af8a6.zip op-kernel-dev-29d654067a98c1cb8874c774e5fd799a038af8a6.tar.gz |
drm/radeon: fix bank information in tiling config
While there are cards with more than 8 mem banks, the max
number of banks from a tiling perspective is 8, so cap
the tiling config at 8 banks.
Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=43448
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/ni.c')
-rw-r--r-- | drivers/gpu/drm/radeon/ni.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c index ce4e7cc..15f950c 100644 --- a/drivers/gpu/drm/radeon/ni.c +++ b/drivers/gpu/drm/radeon/ni.c @@ -866,9 +866,12 @@ static void cayman_gpu_init(struct radeon_device *rdev) /* num banks is 8 on all fusion asics. 0 = 4, 1 = 8, 2 = 16 */ if (rdev->flags & RADEON_IS_IGP) rdev->config.cayman.tile_config |= 1 << 4; - else - rdev->config.cayman.tile_config |= - ((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT) << 4; + else { + if ((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT) + rdev->config.cayman.tile_config |= 1 << 4; + else + rdev->config.cayman.tile_config |= 0 << 4; + } rdev->config.cayman.tile_config |= ((gb_addr_config & PIPE_INTERLEAVE_SIZE_MASK) >> PIPE_INTERLEAVE_SIZE_SHIFT) << 8; rdev->config.cayman.tile_config |= |