Commit dca571a6 authored by Christian König's avatar Christian König Committed by Alex Deucher

drm/radeon: fix bank tiling parameters on SI

The sixteen bank case wasn't handled here, leading to GPU
crashes because of userspace miscalculation.
Signed-off-by: default avatarChristian König <deathsimple@vodafone.de>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 6c0ae2ab
...@@ -1639,11 +1639,19 @@ static void si_gpu_init(struct radeon_device *rdev) ...@@ -1639,11 +1639,19 @@ static void si_gpu_init(struct radeon_device *rdev)
/* XXX what about 12? */ /* XXX what about 12? */
rdev->config.si.tile_config |= (3 << 0); rdev->config.si.tile_config |= (3 << 0);
break; break;
} }
if ((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT) switch ((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT) {
rdev->config.si.tile_config |= 1 << 4; case 0: /* four banks */
else
rdev->config.si.tile_config |= 0 << 4; rdev->config.si.tile_config |= 0 << 4;
break;
case 1: /* eight banks */
rdev->config.si.tile_config |= 1 << 4;
break;
case 2: /* sixteen banks */
default:
rdev->config.si.tile_config |= 2 << 4;
break;
}
rdev->config.si.tile_config |= rdev->config.si.tile_config |=
((gb_addr_config & PIPE_INTERLEAVE_SIZE_MASK) >> PIPE_INTERLEAVE_SIZE_SHIFT) << 8; ((gb_addr_config & PIPE_INTERLEAVE_SIZE_MASK) >> PIPE_INTERLEAVE_SIZE_SHIFT) << 8;
rdev->config.si.tile_config |= rdev->config.si.tile_config |=
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment