diff options
author | Tom St Denis <tom.stdenis@amd.com> | 2016-11-07 18:33:47 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-11-11 18:21:06 +0300 |
commit | bc24fbe9df6623500ad1fab92e71265d4cb7fa2a (patch) | |
tree | e75884b56bf764f435d2d75f23d5e3d5647766d3 /drivers/gpu | |
parent | 4098e6cd610625a0c786f71bab291cf7003d32cc (diff) | |
download | linux-bc24fbe9df6623500ad1fab92e71265d4cb7fa2a.tar.xz |
drm/amd/amdgpu: Clean up wave gfx8 helper
De-numberify indirect register access for gfx v8.
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c index 23f1bc94ad3e..1ac88b1fb1a1 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c @@ -5442,7 +5442,11 @@ static void gfx_v8_0_ring_emit_gds_switch(struct amdgpu_ring *ring, static uint32_t wave_read_ind(struct amdgpu_device *adev, uint32_t simd, uint32_t wave, uint32_t address) { - WREG32(mmSQ_IND_INDEX, (wave & 0xF) | ((simd & 0x3) << 4) | (address << 16) | (1 << 13)); + WREG32(mmSQ_IND_INDEX, + (wave << SQ_IND_INDEX__WAVE_ID__SHIFT) | + (simd << SQ_IND_INDEX__SIMD_ID__SHIFT) | + (address << SQ_IND_INDEX__INDEX__SHIFT) | + (SQ_IND_INDEX__FORCE_READ_MASK)); return RREG32(mmSQ_IND_DATA); } |