mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 02:53:36 +02:00
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 <alexandre.f.demers@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
62e0b8f766
commit
60c53fe7bc
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user