aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.19.8/1766-drm-amdgpu-shadow-in-shadow_list-without-tbo.mem.sta.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/1766-drm-amdgpu-shadow-in-shadow_list-without-tbo.mem.sta.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.19.8/1766-drm-amdgpu-shadow-in-shadow_list-without-tbo.mem.sta.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/1766-drm-amdgpu-shadow-in-shadow_list-without-tbo.mem.sta.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/1766-drm-amdgpu-shadow-in-shadow_list-without-tbo.mem.sta.patch
new file mode 100644
index 00000000..4c8b7e33
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/1766-drm-amdgpu-shadow-in-shadow_list-without-tbo.mem.sta.patch
@@ -0,0 +1,37 @@
+From 4a4ed9b05dd97dd2b6aef890d7eec3a356d5e93c Mon Sep 17 00:00:00 2001
+From: wentalou <Wentao.Lou@amd.com>
+Date: Fri, 12 Apr 2019 15:01:14 +0800
+Subject: [PATCH 1766/2940] drm/amdgpu: shadow in shadow_list without
+ tbo.mem.start cause page fault in sriov TDR
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+shadow was added into shadow_list by amdgpu_bo_create_shadow.
+meanwhile, shadow->tbo.mem was not fully configured.
+tbo.mem would be fully configured by amdgpu_vm_sdma_map_table until calling amdgpu_vm_clear_bo.
+If sriov TDR occurred between amdgpu_bo_create_shadow and amdgpu_vm_sdma_map_table,
+amdgpu_device_recover_vram would deal with shadow without tbo.mem.start.
+
+Change-Id: I1a6a69587d6c689d0a357dd495ee44833d0f0790
+Signed-off-by: Wentao Lou <Wentao.Lou@amd.com>
+Reviewed-by: Christian König <christian.koenig@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+index 698663b1ef2e..452f1f64c2a6 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+@@ -3233,6 +3233,7 @@ static int amdgpu_device_recover_vram(struct amdgpu_device *adev)
+
+ /* No need to recover an evicted BO */
+ if (shadow->tbo.mem.mem_type != TTM_PL_TT ||
++ shadow->tbo.mem.start == AMDGPU_BO_INVALID_OFFSET ||
+ shadow->parent->tbo.mem.mem_type != TTM_PL_VRAM)
+ continue;
+
+--
+2.17.1
+