aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-4.19/950-0558-drm-expand-drm_syncobj_find_fence-to-support-timelin.patch
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2019-09-04 19:01:23 +0200
committerÁlvaro Fernández Rojas <noltari@gmail.com>2019-09-04 19:02:48 +0200
commit662394fb30fdbcc89ec387918714aebee6868a9f (patch)
treec308c5f1a650abf9d9ccbb2a1747469a0d8570c0 /target/linux/brcm2708/patches-4.19/950-0558-drm-expand-drm_syncobj_find_fence-to-support-timelin.patch
parent99a5e285887c4a10aaf06d8e01fae0707995da00 (diff)
downloadupstream-662394fb30fdbcc89ec387918714aebee6868a9f.tar.gz
upstream-662394fb30fdbcc89ec387918714aebee6868a9f.tar.bz2
upstream-662394fb30fdbcc89ec387918714aebee6868a9f.zip
brcm2708: update to latest patches from RPi foundation
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/brcm2708/patches-4.19/950-0558-drm-expand-drm_syncobj_find_fence-to-support-timelin.patch')
-rw-r--r--target/linux/brcm2708/patches-4.19/950-0558-drm-expand-drm_syncobj_find_fence-to-support-timelin.patch104
1 files changed, 104 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-4.19/950-0558-drm-expand-drm_syncobj_find_fence-to-support-timelin.patch b/target/linux/brcm2708/patches-4.19/950-0558-drm-expand-drm_syncobj_find_fence-to-support-timelin.patch
new file mode 100644
index 0000000000..4c63c2ee69
--- /dev/null
+++ b/target/linux/brcm2708/patches-4.19/950-0558-drm-expand-drm_syncobj_find_fence-to-support-timelin.patch
@@ -0,0 +1,104 @@
+From 8c0ff2bf4875136ae1810adf9bfce0d9e42fc9e9 Mon Sep 17 00:00:00 2001
+From: Chunming Zhou <david1.zhou@amd.com>
+Date: Thu, 30 Aug 2018 14:48:29 +0800
+Subject: [PATCH 558/782] drm: expand drm_syncobj_find_fence to support
+ timeline point v2
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+we can fetch timeline point fence after expanded.
+v2: The parameter fence is the result of the function and should come last.
+
+Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
+Reviewed-by: Christian König <christian.koenig@amd.com>
+Signed-off-by: Christian König <christian.koenig@amd.com>
+Link: https://patchwork.freedesktop.org/patch/246541/
+(cherry picked from commit 0a6730ea27b68c7ac4171c29a816c29d26a9637a)
+Signed-off-by: Eric Anholt <eric@anholt.net>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +-
+ drivers/gpu/drm/drm_syncobj.c | 5 +++--
+ drivers/gpu/drm/v3d/v3d_gem.c | 4 ++--
+ drivers/gpu/drm/vc4/vc4_gem.c | 2 +-
+ include/drm/drm_syncobj.h | 2 +-
+ 5 files changed, 8 insertions(+), 7 deletions(-)
+
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+@@ -1105,7 +1105,7 @@ static int amdgpu_syncobj_lookup_and_add
+ {
+ int r;
+ struct dma_fence *fence;
+- r = drm_syncobj_find_fence(p->filp, handle, &fence);
++ r = drm_syncobj_find_fence(p->filp, handle, 0, &fence);
+ if (r)
+ return r;
+
+--- a/drivers/gpu/drm/drm_syncobj.c
++++ b/drivers/gpu/drm/drm_syncobj.c
+@@ -235,6 +235,7 @@ static int drm_syncobj_assign_null_handl
+ * drm_syncobj_find_fence - lookup and reference the fence in a sync object
+ * @file_private: drm file private pointer
+ * @handle: sync object handle to lookup.
++ * @point: timeline point
+ * @fence: out parameter for the fence
+ *
+ * This is just a convenience function that combines drm_syncobj_find() and
+@@ -245,7 +246,7 @@ static int drm_syncobj_assign_null_handl
+ * dma_fence_put().
+ */
+ int drm_syncobj_find_fence(struct drm_file *file_private,
+- u32 handle,
++ u32 handle, u64 point,
+ struct dma_fence **fence)
+ {
+ struct drm_syncobj *syncobj = drm_syncobj_find(file_private, handle);
+@@ -516,7 +517,7 @@ static int drm_syncobj_export_sync_file(
+ if (fd < 0)
+ return fd;
+
+- ret = drm_syncobj_find_fence(file_private, handle, &fence);
++ ret = drm_syncobj_find_fence(file_private, handle, 0, &fence);
+ if (ret)
+ goto err_put_fd;
+
+--- a/drivers/gpu/drm/v3d/v3d_gem.c
++++ b/drivers/gpu/drm/v3d/v3d_gem.c
+@@ -521,12 +521,12 @@ v3d_submit_cl_ioctl(struct drm_device *d
+ kref_init(&exec->refcount);
+
+ ret = drm_syncobj_find_fence(file_priv, args->in_sync_bcl,
+- &exec->bin.in_fence);
++ 0, &exec->bin.in_fence);
+ if (ret == -EINVAL)
+ goto fail;
+
+ ret = drm_syncobj_find_fence(file_priv, args->in_sync_rcl,
+- &exec->render.in_fence);
++ 0, &exec->render.in_fence);
+ if (ret == -EINVAL)
+ goto fail;
+
+--- a/drivers/gpu/drm/vc4/vc4_gem.c
++++ b/drivers/gpu/drm/vc4/vc4_gem.c
+@@ -1173,7 +1173,7 @@ vc4_submit_cl_ioctl(struct drm_device *d
+
+ if (args->in_sync) {
+ ret = drm_syncobj_find_fence(file_priv, args->in_sync,
+- &in_fence);
++ 0, &in_fence);
+ if (ret)
+ goto fail;
+
+--- a/include/drm/drm_syncobj.h
++++ b/include/drm/drm_syncobj.h
+@@ -139,7 +139,7 @@ void drm_syncobj_remove_callback(struct
+ void drm_syncobj_replace_fence(struct drm_syncobj *syncobj,
+ struct dma_fence *fence);
+ int drm_syncobj_find_fence(struct drm_file *file_private,
+- u32 handle,
++ u32 handle, u64 point,
+ struct dma_fence **fence);
+ void drm_syncobj_free(struct kref *kref);
+ int drm_syncobj_create(struct drm_syncobj **out_syncobj, uint32_t flags,