aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.19.8/0658-drm-amdgpu-fix-VM-leaf-walking.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/0658-drm-amdgpu-fix-VM-leaf-walking.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.19.8/0658-drm-amdgpu-fix-VM-leaf-walking.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/0658-drm-amdgpu-fix-VM-leaf-walking.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/0658-drm-amdgpu-fix-VM-leaf-walking.patch
new file mode 100644
index 00000000..903b650b
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/0658-drm-amdgpu-fix-VM-leaf-walking.patch
@@ -0,0 +1,37 @@
+From 61d3b4260d7f1d5cb065d8290b17cb7dd730bd17 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
+Date: Wed, 24 Oct 2018 16:25:23 +0200
+Subject: [PATCH 0658/2940] drm/amdgpu: fix VM leaf walking
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Make sure we don't try to go down further after the leave walk already
+ended. This fixes a crash with a new VM test.
+
+Signed-off-by: Christian König <christian.koenig@amd.com>
+Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
+Acked-by: Alex Deucher <alexander.deucher@amd.com>
+Tested-by: Rex Zhu Rex.Zhu@amd.com
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+index 66c976b5ef99..90df2ff779d3 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+@@ -542,7 +542,8 @@ static void amdgpu_vm_pt_next_leaf(struct amdgpu_device *adev,
+ struct amdgpu_vm_pt_cursor *cursor)
+ {
+ amdgpu_vm_pt_next(adev, cursor);
+- while (amdgpu_vm_pt_descendant(adev, cursor));
++ if (cursor->pfn != ~0ll)
++ while (amdgpu_vm_pt_descendant(adev, cursor));
+ }
+
+ /**
+--
+2.17.1
+