aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.19.8/0940-drm-amdgpu-fix-NULL-fence-handling-in-amdgpu_cs_fenc.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/0940-drm-amdgpu-fix-NULL-fence-handling-in-amdgpu_cs_fenc.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.19.8/0940-drm-amdgpu-fix-NULL-fence-handling-in-amdgpu_cs_fenc.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/0940-drm-amdgpu-fix-NULL-fence-handling-in-amdgpu_cs_fenc.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/0940-drm-amdgpu-fix-NULL-fence-handling-in-amdgpu_cs_fenc.patch
new file mode 100644
index 00000000..662e32bf
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/0940-drm-amdgpu-fix-NULL-fence-handling-in-amdgpu_cs_fenc.patch
@@ -0,0 +1,36 @@
+From 9260fa6b907678e7e58cb6b14cde723bcb18a8cd Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
+Date: Mon, 3 Dec 2018 14:05:34 +0100
+Subject: [PATCH 0940/2940] drm/amdgpu: fix NULL fence handling in
+ amdgpu_cs_fence_to_handle_ioctl
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When the fence is already signaled it is perfectly normal to get a NULL
+fence here. But since we can't export that we need to use a stub fence.
+
+Signed-off-by: Christian König <christian.koenig@amd.com>
+Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+index 2bcd3d74de5d..b5258697a4f8 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+@@ -1432,6 +1432,9 @@ int amdgpu_cs_fence_to_handle_ioctl(struct drm_device *dev, void *data,
+ if (IS_ERR(fence))
+ return PTR_ERR(fence);
+
++ if (!fence)
++ fence = dma_fence_get_stub();
++
+ switch (info->in.what) {
+ case AMDGPU_FENCE_TO_HANDLE_GET_SYNCOBJ:
+ r = drm_syncobj_create(&syncobj, 0, fence);
+--
+2.17.1
+