summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
diff options
context:
space:
mode:
authorpding <Pixel.Ding@amd.com>2017-10-23 16:31:04 +0800
committerAlex Deucher <alexander.deucher@amd.com>2017-12-04 16:33:13 -0500
commit1366b2d01654d2028cba64109ad1bffb8afbef73 (patch)
tree1142b57bec657142999003dc2f4fc40df7359bb5 /drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
parent9953b72f9c9cb7733334753788faab33ccc4dc0a (diff)
drm/amdgpu: avoid soft lockup when waiting for RLC serdes (v2)
Normally all waiting get timeout if there's one. Release the lock and return immediately when timeout happens. v2: - set the se_sh to broadcase before return Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: pding <Pixel.Ding@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
index 9f93e05bf97e..46ee74393454 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
@@ -3851,6 +3851,14 @@ static void gfx_v8_0_wait_for_rlc_serdes(struct amdgpu_device *adev)
break;
udelay(1);
}
+ if (k == adev->usec_timeout) {
+ gfx_v8_0_select_se_sh(adev, 0xffffffff,
+ 0xffffffff, 0xffffffff);
+ mutex_unlock(&adev->grbm_idx_mutex);
+ DRM_INFO("Timeout wait for RLC serdes %u,%u\n",
+ i, j);
+ return;
+ }
}
}
gfx_v8_0_select_se_sh(adev, 0xffffffff, 0xffffffff, 0xffffffff);