Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Tom St Denis and committed by
Alex Deucher
bc24fbe9 4098e6cd

+5 -1
+5 -1
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
··· 5442 5442 5443 5443 static uint32_t wave_read_ind(struct amdgpu_device *adev, uint32_t simd, uint32_t wave, uint32_t address) 5444 5444 { 5445 - WREG32(mmSQ_IND_INDEX, (wave & 0xF) | ((simd & 0x3) << 4) | (address << 16) | (1 << 13)); 5445 + WREG32(mmSQ_IND_INDEX, 5446 + (wave << SQ_IND_INDEX__WAVE_ID__SHIFT) | 5447 + (simd << SQ_IND_INDEX__SIMD_ID__SHIFT) | 5448 + (address << SQ_IND_INDEX__INDEX__SHIFT) | 5449 + (SQ_IND_INDEX__FORCE_READ_MASK)); 5446 5450 return RREG32(mmSQ_IND_DATA); 5447 5451 } 5448 5452