History

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.

Dave Airlie committed 9 years ago

Commit e9083421 parent c9f072611 files · +552 −1Browse files

Showing the changes to include/uapi (1 of 11 files). Show all

Unified · Split

include/uapi/drm/drm.h+24−0
@@ -648,6 +648,7 @@ struct drm_gem_open { · 647 unmodified lines
648648 #define DRM_CAP_ADDFB2_MODIFIERS 0x10
649649 #define DRM_CAP_PAGE_FLIP_TARGET 0x11
650650 #define DRM_CAP_CRTC_IN_VBLANK_EVENT 0x12
651+#define DRM_CAP_SYNCOBJ 0x13
651652
652653 /** DRM_IOCTL_GET_CAP ioctl argument type */
653654 struct drm_get_cap {
@@ -697,6 +698,24 @@ struct drm_prime_handle { · 43 unmodified lines
697698 __s32 fd;
698699 };
699700
701+struct drm_syncobj_create {
702+ __u32 handle;
703+ __u32 flags;
704+};
705+
706+struct drm_syncobj_destroy {
707+ __u32 handle;
708+ __u32 pad;
709+};
710+
711+struct drm_syncobj_handle {
712+ __u32 handle;
713+ __u32 flags;
714+
715+ __s32 fd;
716+ __u32 pad;
717+};
718+
700719 #if defined(__cplusplus)
701720 }
702721 #endif
@@ -815,6 +834,11 @@ extern "C" { · 112 unmodified lines
815834 #define DRM_IOCTL_MODE_CREATEPROPBLOB DRM_IOWR(0xBD, struct drm_mode_create_blob)
816835 #define DRM_IOCTL_MODE_DESTROYPROPBLOB DRM_IOWR(0xBE, struct drm_mode_destroy_blob)
817836
837+#define DRM_IOCTL_SYNCOBJ_CREATE DRM_IOWR(0xBF, struct drm_syncobj_create)
838+#define DRM_IOCTL_SYNCOBJ_DESTROY DRM_IOWR(0xC0, struct drm_syncobj_destroy)
839+#define DRM_IOCTL_SYNCOBJ_HANDLE_TO_FD DRM_IOWR(0xC1, struct drm_syncobj_handle)
840+#define DRM_IOCTL_SYNCOBJ_FD_TO_HANDLE DRM_IOWR(0xC2, struct drm_syncobj_handle)
841+
818842 /**
819843 * Device specific ioctls should only be in their respective headers
820844 * The device specific ioctl range is from 0x40 to 0x9f.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t