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 10:36:31 -0400 |
commit | 29d654067a98c1cb8874c774e5fd799a038af8a6 (patch) | |
tree | caf59daf243217689b78d4086c74ace5bb2a23c2 /drivers/gpu/drm/radeon/evergreen.c | |
parent | 08ef8e41a6f420c3c0998b50d478e0b2c267a226 (diff) |
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/evergreen.c')
-rw-r--r-- | drivers/gpu/drm/radeon/evergreen.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index 58991af90502..5d9c2c64a8e2 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c | |||
@@ -2136,9 +2136,12 @@ static void evergreen_gpu_init(struct radeon_device *rdev) | |||
2136 | /* num banks is 8 on all fusion asics. 0 = 4, 1 = 8, 2 = 16 */ | 2136 | /* num banks is 8 on all fusion asics. 0 = 4, 1 = 8, 2 = 16 */ |
2137 | if (rdev->flags & RADEON_IS_IGP) | 2137 | if (rdev->flags & RADEON_IS_IGP) |
2138 | rdev->config.evergreen.tile_config |= 1 << 4; | 2138 | rdev->config.evergreen.tile_config |= 1 << 4; |
2139 | else | 2139 | else { |
2140 | rdev->config.evergreen.tile_config |= | 2140 | if ((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT) |
2141 | ((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT) << 4; | 2141 | rdev->config.evergreen.tile_config |= 1 << 4; |
2142 | else | ||
2143 | rdev->config.evergreen.tile_config |= 0 << 4; | ||
2144 | } | ||
2142 | rdev->config.evergreen.tile_config |= | 2145 | rdev->config.evergreen.tile_config |= |
2143 | ((mc_arb_ramcfg & BURSTLENGTH_MASK) >> BURSTLENGTH_SHIFT) << 8; | 2146 | ((mc_arb_ramcfg & BURSTLENGTH_MASK) >> BURSTLENGTH_SHIFT) << 8; |
2144 | rdev->config.evergreen.tile_config |= | 2147 | rdev->config.evergreen.tile_config |= |