diff options
| author | Alexandre Demers <[email protected]> | 2025-03-22 18:37:43 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2025-04-07 19:18:32 +0000 |
| commit | 60c53fe7bc13fb1ecf1d886c073a973371cb3c4a (patch) | |
| tree | 865d191dd4421e23f9cdd8c7cd1366b43f3e4364 /drivers/gpu/drm/amd/amdgpu/cik_sdma.c | |
| parent | drm/amdgpu: use gmc_v7_0_is_idle() since it is available under GMC7 (diff) | |
| download | kernel-60c53fe7bc13fb1ecf1d886c073a973371cb3c4a.tar.gz kernel-60c53fe7bc13fb1ecf1d886c073a973371cb3c4a.zip | |
drm/amdgpu: use cik_sdma_is_idle() in CIK SDMA
cik_sdma_is_idle() does exactly what we need, so use it.
V2: fix parameter (Alex)
Signed-off-by: Alexandre Demers <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/cik_sdma.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c index 508cea965983..81a1f7fb6d78 100644 --- a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c +++ b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c @@ -1040,14 +1040,10 @@ static bool cik_sdma_is_idle(struct amdgpu_ip_block *ip_block) static int cik_sdma_wait_for_idle(struct amdgpu_ip_block *ip_block) { unsigned i; - u32 tmp; struct amdgpu_device *adev = ip_block->adev; for (i = 0; i < adev->usec_timeout; i++) { - tmp = RREG32(mmSRBM_STATUS2) & (SRBM_STATUS2__SDMA_BUSY_MASK | - SRBM_STATUS2__SDMA1_BUSY_MASK); - - if (!tmp) + if (cik_sdma_is_idle(ip_block)) return 0; udelay(1); } |
