aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.19.8/0174-drm-amdgpu-Don-t-use-kiq-in-gpu-reset.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/0174-drm-amdgpu-Don-t-use-kiq-in-gpu-reset.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.19.8/0174-drm-amdgpu-Don-t-use-kiq-in-gpu-reset.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/0174-drm-amdgpu-Don-t-use-kiq-in-gpu-reset.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/0174-drm-amdgpu-Don-t-use-kiq-in-gpu-reset.patch
new file mode 100644
index 00000000..f8a44c9c
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/0174-drm-amdgpu-Don-t-use-kiq-in-gpu-reset.patch
@@ -0,0 +1,53 @@
+From 3078ef34108ee3cdbb13dd55f66c0f5ba4c776c5 Mon Sep 17 00:00:00 2001
+From: Emily Deng <Emily.Deng@amd.com>
+Date: Wed, 22 Aug 2018 20:32:23 +0800
+Subject: [PATCH 0174/2940] drm/amdgpu: Don't use kiq in gpu reset
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When in gpu reset, don't use kiq, it will generate more TDR.
+
+Signed-off-by: Emily Deng <Emily.Deng@amd.com>
+Reviewed-by: Christian König <christian.koenig@amd.com>.
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 15 ++++-----------
+ 1 file changed, 4 insertions(+), 11 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+index b6b5ede0ca35..6763570c0321 100644
+--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
++++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+@@ -332,15 +332,8 @@ signed long amdgpu_kiq_reg_write_reg_wait(struct amdgpu_device *adev,
+
+ r = amdgpu_fence_wait_polling(ring, seq, MAX_KIQ_REG_WAIT);
+
+- /* don't wait anymore for gpu reset case because this way may
+- * block gpu_recover() routine forever, e.g. this virt_kiq_rreg
+- * is triggered in TTM and ttm_bo_lock_delayed_workqueue() will
+- * never return if we keep waiting in virt_kiq_rreg, which cause
+- * gpu_recover() hang there.
+- *
+- * also don't wait anymore for IRQ context
+- * */
+- if (r < 1 && (adev->in_gpu_reset || in_interrupt()))
++ /* don't wait anymore for IRQ context */
++ if (r < 1 && in_interrupt())
+ goto failed_kiq;
+
+ might_sleep();
+@@ -388,8 +381,8 @@ static void gmc_v9_0_flush_gpu_tlb(struct amdgpu_device *adev,
+ u32 tmp = gmc_v9_0_get_invalidate_req(vmid);
+
+ if (adev->gfx.kiq.ring.ready &&
+- (amdgpu_sriov_runtime(adev) ||
+- !amdgpu_sriov_vf(adev))) {
++ (amdgpu_sriov_runtime(adev) || !amdgpu_sriov_vf(adev)) &&
++ !adev->in_gpu_reset) {
+ r = amdgpu_kiq_reg_write_reg_wait(adev, hub->vm_inv_eng0_req + eng,
+ hub->vm_inv_eng0_ack + eng, tmp, 1 << vmid);
+ if (!r)
+--
+2.17.1
+