提交 2b9bdfa7 编写于 作者: T Tom St Denis 提交者: Alex Deucher

drm/amd/amdgpu: Simplify gfx_v9_0_wait_for_idle()

Signed-off-by: NTom St Denis <tom.stdenis@amd.com>
Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 78888cff
...@@ -2937,15 +2937,10 @@ static bool gfx_v9_0_is_idle(void *handle) ...@@ -2937,15 +2937,10 @@ static bool gfx_v9_0_is_idle(void *handle)
static int gfx_v9_0_wait_for_idle(void *handle) static int gfx_v9_0_wait_for_idle(void *handle)
{ {
unsigned i; unsigned i;
u32 tmp;
struct amdgpu_device *adev = (struct amdgpu_device *)handle; struct amdgpu_device *adev = (struct amdgpu_device *)handle;
for (i = 0; i < adev->usec_timeout; i++) { for (i = 0; i < adev->usec_timeout; i++) {
/* read MC_STATUS */ if (gfx_v9_0_is_idle(handle))
tmp = RREG32_SOC15(GC, 0, mmGRBM_STATUS) &
GRBM_STATUS__GUI_ACTIVE_MASK;
if (!REG_GET_FIELD(tmp, GRBM_STATUS, GUI_ACTIVE))
return 0; return 0;
udelay(1); udelay(1);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册