aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2805-drm-amdgpu-Fix-amdgpu_sync_add_later-to-preserve-exp.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2805-drm-amdgpu-Fix-amdgpu_sync_add_later-to-preserve-exp.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2805-drm-amdgpu-Fix-amdgpu_sync_add_later-to-preserve-exp.patch56
1 files changed, 56 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2805-drm-amdgpu-Fix-amdgpu_sync_add_later-to-preserve-exp.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2805-drm-amdgpu-Fix-amdgpu_sync_add_later-to-preserve-exp.patch
new file mode 100644
index 00000000..cf14739e
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2805-drm-amdgpu-Fix-amdgpu_sync_add_later-to-preserve-exp.patch
@@ -0,0 +1,56 @@
+From 19407fef3bf146e229173ba731ac56af5542cad6 Mon Sep 17 00:00:00 2001
+From: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
+Date: Tue, 5 Dec 2017 08:03:13 -0500
+Subject: [PATCH 2805/4131] drm/amdgpu: Fix amdgpu_sync_add_later to preserve
+ explicit flag.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
+Reviewed-by: Christian König <christian.koenig@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
+index 2a30c3f..6313edc 100755
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
+@@ -130,7 +130,7 @@ static void amdgpu_sync_keep_later(struct dma_fence **keep,
+ * Tries to add the fence to an existing hash entry. Returns true when an entry
+ * was found, false otherwise.
+ */
+-static bool amdgpu_sync_add_later(struct amdgpu_sync *sync, struct dma_fence *f)
++static bool amdgpu_sync_add_later(struct amdgpu_sync *sync, struct dma_fence *f, bool explicit)
+ {
+ struct amdgpu_sync_entry *e;
+
+@@ -139,6 +139,10 @@ static bool amdgpu_sync_add_later(struct amdgpu_sync *sync, struct dma_fence *f)
+ continue;
+
+ amdgpu_sync_keep_later(&e->fence, f);
++
++ /* Preserve eplicit flag to not loose pipe line sync */
++ e->explicit |= explicit;
++
+ return true;
+ }
+ return false;
+@@ -158,12 +162,11 @@ int amdgpu_sync_fence(struct amdgpu_device *adev, struct amdgpu_sync *sync,
+
+ if (!f)
+ return 0;
+-
+ if (amdgpu_sync_same_dev(adev, f) &&
+ amdgpu_sync_get_owner(f) == AMDGPU_FENCE_OWNER_VM)
+ amdgpu_sync_keep_later(&sync->last_vm_update, f);
+
+- if (amdgpu_sync_add_later(sync, f))
++ if (amdgpu_sync_add_later(sync, f, explicit))
+ return 0;
+
+ e = kmem_cache_alloc(amdgpu_sync_slab, GFP_KERNEL);
+--
+2.7.4
+