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 gfx7 helper

De-numberify indirect register access for gfx v7.

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
4098e6cd 526bae37

+5 -1
+5 -1
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
··· 4359 4359 4360 4360 static uint32_t wave_read_ind(struct amdgpu_device *adev, uint32_t simd, uint32_t wave, uint32_t address) 4361 4361 { 4362 - WREG32(mmSQ_IND_INDEX, (wave & 0xF) | ((simd & 0x3) << 4) | (address << 16) | (1 << 13)); 4362 + WREG32(mmSQ_IND_INDEX, 4363 + (wave << SQ_IND_INDEX__WAVE_ID__SHIFT) | 4364 + (simd << SQ_IND_INDEX__SIMD_ID__SHIFT) | 4365 + (address << SQ_IND_INDEX__INDEX__SHIFT) | 4366 + (SQ_IND_INDEX__FORCE_READ_MASK)); 4363 4367 return RREG32(mmSQ_IND_DATA); 4364 4368 } 4365 4369