aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3494-drm-amdgpu-sync-the-VM-PD-PT-before-clearing-it.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3494-drm-amdgpu-sync-the-VM-PD-PT-before-clearing-it.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3494-drm-amdgpu-sync-the-VM-PD-PT-before-clearing-it.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3494-drm-amdgpu-sync-the-VM-PD-PT-before-clearing-it.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3494-drm-amdgpu-sync-the-VM-PD-PT-before-clearing-it.patch
new file mode 100644
index 00000000..89e04edc
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3494-drm-amdgpu-sync-the-VM-PD-PT-before-clearing-it.patch
@@ -0,0 +1,36 @@
+From e6d90ba86b33d2e0b4d1904ff45fa34c59e17c32 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
+Date: Sun, 4 Feb 2018 19:36:52 +0100
+Subject: [PATCH 3494/4131] drm/amdgpu: sync the VM PD/PT before clearing it
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Otherwise we might overwrite stuff which is still in use.
+
+Signed-off-by: Christian König <christian.koenig@amd.com>
+Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+index eb5ccca..6c3036b 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+@@ -329,6 +329,11 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
+ amdgpu_ring_pad_ib(ring, &job->ibs[0]);
+
+ WARN_ON(job->ibs[0].length_dw > 64);
++ r = amdgpu_sync_resv(adev, &job->sync, bo->tbo.resv,
++ AMDGPU_FENCE_OWNER_UNDEFINED, false);
++ if (r)
++ goto error_free;
++
+ r = amdgpu_job_submit(job, ring, &vm->entity,
+ AMDGPU_FENCE_OWNER_UNDEFINED, &fence);
+ if (r)
+--
+2.7.4
+