drm/amdgpu/sdma: Fix incorrect calculations of the wptr of the doorbells
authorHaohui Mai <ricetons@gmail.com>
Mon, 25 Apr 2022 12:41:38 +0000 (20:41 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 26 Apr 2022 15:44:01 +0000 (11:44 -0400)
commit7dba6e838e741caadcf27ef717b6dcb561e77f89
tree666617540b9f3fae90b5d1ff2c924e04423f578f
parent9714d357e2ca763cc6a739f66ca67219beafd442
drm/amdgpu/sdma: Fix incorrect calculations of the wptr of the doorbells

This patch fixes the issue where the driver miscomputes the 64-bit
values of the wptr of the SDMA doorbell when initializing the
hardware. SDMA engines v4 and later on have full 64-bit registers for
wptr thus they should be set properly.

Older generation hardwares like CIK / SI have only 16 / 20 / 24bits
for the WPTR, where the calls of lower_32_bits() will be removed in a
following patch.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Haohui Mai <ricetons@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c