diff options
author | pding <Pixel.Ding@amd.com> | 2017-10-23 04:31:04 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-12-04 16:33:13 -0500 |
commit | 1366b2d01654d2028cba64109ad1bffb8afbef73 (patch) | |
tree | 1142b57bec657142999003dc2f4fc40df7359bb5 /drivers/gpu/drm/amd | |
parent | 9953b72f9c9cb7733334753788faab33ccc4dc0a (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')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 8 |
2 files changed, 16 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) | |||
3851 | break; | 3851 | break; |
3852 | udelay(1); | 3852 | udelay(1); |
3853 | } | 3853 | } |
3854 | if (k == adev->usec_timeout) { | ||
3855 | gfx_v8_0_select_se_sh(adev, 0xffffffff, | ||
3856 | 0xffffffff, 0xffffffff); | ||
3857 | mutex_unlock(&adev->grbm_idx_mutex); | ||
3858 | DRM_INFO("Timeout wait for RLC serdes %u,%u\n", | ||
3859 | i, j); | ||
3860 | return; | ||
3861 | } | ||
3854 | } | 3862 | } |
3855 | } | 3863 | } |
3856 | gfx_v8_0_select_se_sh(adev, 0xffffffff, 0xffffffff, 0xffffffff); | 3864 | gfx_v8_0_select_se_sh(adev, 0xffffffff, 0xffffffff, 0xffffffff); |
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c index a5811e80e21b..46a0d3ef773f 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | |||
@@ -1645,6 +1645,14 @@ static void gfx_v9_0_wait_for_rlc_serdes(struct amdgpu_device *adev) | |||
1645 | break; | 1645 | break; |
1646 | udelay(1); | 1646 | udelay(1); |
1647 | } | 1647 | } |
1648 | if (k == adev->usec_timeout) { | ||
1649 | gfx_v9_0_select_se_sh(adev, 0xffffffff, | ||
1650 | 0xffffffff, 0xffffffff); | ||
1651 | mutex_unlock(&adev->grbm_idx_mutex); | ||
1652 | DRM_INFO("Timeout wait for RLC serdes %u,%u\n", | ||
1653 | i, j); | ||
1654 | return; | ||
1655 | } | ||
1648 | } | 1656 | } |
1649 | } | 1657 | } |
1650 | gfx_v9_0_select_se_sh(adev, 0xffffffff, 0xffffffff, 0xffffffff); | 1658 | gfx_v9_0_select_se_sh(adev, 0xffffffff, 0xffffffff, 0xffffffff); |