diff options
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/1194-drm-amdgpu-fix-waiting-for-BO-moves-with-CPU-based-P.patch')
-rw-r--r-- | common/recipes-kernel/linux/linux-yocto-4.19.8/1194-drm-amdgpu-fix-waiting-for-BO-moves-with-CPU-based-P.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/1194-drm-amdgpu-fix-waiting-for-BO-moves-with-CPU-based-P.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/1194-drm-amdgpu-fix-waiting-for-BO-moves-with-CPU-based-P.patch new file mode 100644 index 00000000..c3c8c686 --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/1194-drm-amdgpu-fix-waiting-for-BO-moves-with-CPU-based-P.patch @@ -0,0 +1,44 @@ +From f6634cdae2a21f950fc605fb60f96e3fbb2a7190 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com> +Date: Wed, 30 Jan 2019 14:12:51 +0100 +Subject: [PATCH 1194/2940] drm/amdgpu: fix waiting for BO moves with CPU based + PD/PT updates +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Otherwise we open up the possibility to use uninitialized memory. + +Signed-off-by: Christian König <christian.koenig@amd.com> +Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> +--- + drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +index 2a4cbfa0d077..5346c2ef4eb9 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +@@ -1752,13 +1752,18 @@ static int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev, + if (pages_addr) + params.src = ~0; + +- /* Wait for PT BOs to be free. PTs share the same resv. object ++ /* Wait for PT BOs to be idle. PTs share the same resv. object + * as the root PD BO + */ + r = amdgpu_vm_wait_pd(adev, vm, owner); + if (unlikely(r)) + return r; + ++ /* Wait for any BO move to be completed */ ++ r = dma_fence_wait(exclusive, true); ++ if (unlikely(r)) ++ return r; ++ + params.func = amdgpu_vm_cpu_set_ptes; + params.pages_addr = pages_addr; + return amdgpu_vm_update_ptes(¶ms, start, last + 1, +-- +2.17.1 + |