aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/0791-drm-amdgpu-Fix-multiple-export-failure-found-in-vulk.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/0791-drm-amdgpu-Fix-multiple-export-failure-found-in-vulk.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.14.71/0791-drm-amdgpu-Fix-multiple-export-failure-found-in-vulk.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/0791-drm-amdgpu-Fix-multiple-export-failure-found-in-vulk.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/0791-drm-amdgpu-Fix-multiple-export-failure-found-in-vulk.patch
new file mode 100644
index 00000000..1433e38c
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/0791-drm-amdgpu-Fix-multiple-export-failure-found-in-vulk.patch
@@ -0,0 +1,42 @@
+From 90e1ce27d9e3bc85cf21f2bef33a71632e1c61b1 Mon Sep 17 00:00:00 2001
+From: David Mao <david.mao@amd.com>
+Date: Tue, 14 Mar 2017 11:23:50 +0800
+Subject: [PATCH 0791/4131] drm/amdgpu - Fix multiple export failure found in
+ vulkan cts
+
+we need to set the core->file to null once the file got released.
+
+Change-Id: I842667f3d121c47a6dfd8ff06d29636781327810
+Signed-off-by: David Mao <david.mao@amd.com>
+Reviewed-by: Chunming Zhou <David1.Zhou@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_sem.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sem.c
+index 7df2552..8789a4e 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sem.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sem.c
+@@ -76,6 +76,11 @@ static int amdgpu_sem_release(struct inode *inode, struct file *file)
+ {
+ struct amdgpu_sem_core *core = file->private_data;
+
++ /* set the core->file to null if file got released */
++ mutex_lock(&core->lock);
++ core->file = NULL;
++ mutex_unlock(&core->lock);
++
+ kref_put(&core->kref, amdgpu_sem_core_free);
+ return 0;
+ }
+@@ -293,6 +298,7 @@ static int amdgpu_sem_export(struct amdgpu_fpriv *fpriv,
+
+ *fd = ret;
+ amdgpu_sem_put(sem);
++
+ return 0;
+
+ err_put_file:
+--
+2.7.4
+