aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2069-drm-amdgpu-avoid-soft-lockup-when-waiting-for-RLC-se.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2069-drm-amdgpu-avoid-soft-lockup-when-waiting-for-RLC-se.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2069-drm-amdgpu-avoid-soft-lockup-when-waiting-for-RLC-se.patch60
1 files changed, 60 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2069-drm-amdgpu-avoid-soft-lockup-when-waiting-for-RLC-se.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2069-drm-amdgpu-avoid-soft-lockup-when-waiting-for-RLC-se.patch
new file mode 100644
index 00000000..ba1720a1
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2069-drm-amdgpu-avoid-soft-lockup-when-waiting-for-RLC-se.patch
@@ -0,0 +1,60 @@
+From db4cdcc2e6e39e48b76e62a035cac58144d6e751 Mon Sep 17 00:00:00 2001
+From: pding <Pixel.Ding@amd.com>
+Date: Mon, 23 Oct 2017 16:31:04 +0800
+Subject: [PATCH 2069/4131] 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>
+---
+ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 8 ++++++++
+ drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 8 ++++++++
+ 2 files changed, 16 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+index f474e17..ea9e054 100644
+--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
++++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+@@ -3845,6 +3845,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);
+diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+index 8568614..072c338 100644
+--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
++++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+@@ -1628,6 +1628,14 @@ static void gfx_v9_0_wait_for_rlc_serdes(struct amdgpu_device *adev)
+ break;
+ udelay(1);
+ }
++ if (k == adev->usec_timeout) {
++ gfx_v9_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_v9_0_select_se_sh(adev, 0xffffffff, 0xffffffff, 0xffffffff);
+--
+2.7.4
+