summaryrefslogtreecommitdiffstats
path: root/include/drm/drm_file.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2017-04-04 05:26:24 +0200
committerDave Airlie <airlied@redhat.com>2017-06-14 04:10:22 +0200
commite9083420bbacce27e43d418064d0d2dfb4b37aaa (patch)
treea539c575bae132fa2cc992ee53da4c04909e7fe1 /include/drm/drm_file.h
parentMerge tag 'exynos-drm-next-for-v4.13' of git://git.kernel.org/pub/scm/linux/k... (diff)
downloadlinux-e9083420bbacce27e43d418064d0d2dfb4b37aaa.tar.xz
linux-e9083420bbacce27e43d418064d0d2dfb4b37aaa.zip
drm: introduce sync objects (v4)
Sync objects are new toplevel drm object, that contain a pointer to a fence. This fence can be updated via command submission ioctls via drivers. There is also a generic wait obj API modelled on the vulkan wait API (with code modelled on some amdgpu code). These objects can be converted to an opaque fd that can be passes between processes. v2: rename reference/unreference to put/get (Chris) fix leaked reference (David Zhou) drop mutex in favour of cmpxchg (Chris) v3: cleanups from danvet, rebase on drm_fops rename check fd_flags is 0 in ioctls. v4: export find/free, change replace fence to take a syncobj. In order to support lookup first, replace later semantics which seem in the end to be cleaner. Reviewed-by: Sean Paul <seanpaul@chromium.org> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/drm/drm_file.h')
-rw-r--r--include/drm/drm_file.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/drm/drm_file.h b/include/drm/drm_file.h
index d66f7ee07fb5..0e0c868451a5 100644
--- a/include/drm/drm_file.h
+++ b/include/drm/drm_file.h
@@ -232,6 +232,11 @@ struct drm_file {
/** @table_lock: Protects @object_idr. */
spinlock_t table_lock;
+ /** @syncobj_idr: Mapping of sync object handles to object pointers. */
+ struct idr syncobj_idr;
+ /** @syncobj_table_lock: Protects @syncobj_idr. */
+ spinlock_t syncobj_table_lock;
+
/** @filp: Pointer to the core file structure. */
struct file *filp;