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

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu/sdma5.2: limit wptr workaround to sdma 5.2.1

The workaround seems to cause stability issues on other
SDMA 5.2.x IPs.

Fixes: a03ebf116303 ("drm/amdgpu/sdma5.2: Update wptr registers as well as doorbell")
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3556
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

+10 -8
+10 -8
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
··· 225 225 DRM_DEBUG("calling WDOORBELL64(0x%08x, 0x%016llx)\n", 226 226 ring->doorbell_index, ring->wptr << 2); 227 227 WDOORBELL64(ring->doorbell_index, ring->wptr << 2); 228 - /* SDMA seems to miss doorbells sometimes when powergating kicks in. 229 - * Updating the wptr directly will wake it. This is only safe because 230 - * we disallow gfxoff in begin_use() and then allow it again in end_use(). 231 - */ 232 - WREG32(sdma_v5_2_get_reg_offset(adev, ring->me, mmSDMA0_GFX_RB_WPTR), 233 - lower_32_bits(ring->wptr << 2)); 234 - WREG32(sdma_v5_2_get_reg_offset(adev, ring->me, mmSDMA0_GFX_RB_WPTR_HI), 235 - upper_32_bits(ring->wptr << 2)); 228 + if (amdgpu_ip_version(adev, SDMA0_HWIP, 0) == IP_VERSION(5, 2, 1)) { 229 + /* SDMA seems to miss doorbells sometimes when powergating kicks in. 230 + * Updating the wptr directly will wake it. This is only safe because 231 + * we disallow gfxoff in begin_use() and then allow it again in end_use(). 232 + */ 233 + WREG32(sdma_v5_2_get_reg_offset(adev, ring->me, mmSDMA0_GFX_RB_WPTR), 234 + lower_32_bits(ring->wptr << 2)); 235 + WREG32(sdma_v5_2_get_reg_offset(adev, ring->me, mmSDMA0_GFX_RB_WPTR_HI), 236 + upper_32_bits(ring->wptr << 2)); 237 + } 236 238 } else { 237 239 DRM_DEBUG("Not using doorbell -- " 238 240 "mmSDMA%i_GFX_RB_WPTR == 0x%08x "