drm/syncobj: add support for timeline point wait v8
points array is one-to-one match with syncobjs array. v2: add seperate ioctl for timeline point wait, otherwise break uapi. v3: userspace can specify two kinds waits:: a. Wait for time point to be completed. b. and wait for time point to become available v4: rebase v5: add comment for xxx_WAIT_AVAILABLE v6: rebase and rework on new container v7: drop _WAIT_COMPLETED, it is the default anyway v8: correctly handle garbage collected fences Signed-off-by: Chunming Zhou <david1.zhou@amd.com> Signed-off-by: Christian König <christian.koenig@amd.com> Cc: Tobias Hector <Tobias.Hector@amd.com> Cc: Jason Ekstrand <jason@jlekstrand.net> Cc: Dave Airlie <airlied@redhat.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Link: https://patchwork.freedesktop.org/patch/295782/?series=58813&rev=1
This commit is contained in:

committed by
Christian König

parent
44f8a1396e
commit
01d6c35783
@@ -737,6 +737,7 @@ struct drm_syncobj_handle {
|
||||
|
||||
#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL (1 << 0)
|
||||
#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT (1 << 1)
|
||||
#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE (1 << 2) /* wait for time point to become available */
|
||||
struct drm_syncobj_wait {
|
||||
__u64 handles;
|
||||
/* absolute timeout */
|
||||
@@ -747,6 +748,19 @@ struct drm_syncobj_wait {
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
struct drm_syncobj_timeline_wait {
|
||||
__u64 handles;
|
||||
/* wait on specific timeline point for every handles*/
|
||||
__u64 points;
|
||||
/* absolute timeout */
|
||||
__s64 timeout_nsec;
|
||||
__u32 count_handles;
|
||||
__u32 flags;
|
||||
__u32 first_signaled; /* only valid when not waiting all */
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
|
||||
struct drm_syncobj_array {
|
||||
__u64 handles;
|
||||
__u32 count_handles;
|
||||
@@ -909,6 +923,7 @@ extern "C" {
|
||||
#define DRM_IOCTL_MODE_GET_LEASE DRM_IOWR(0xC8, struct drm_mode_get_lease)
|
||||
#define DRM_IOCTL_MODE_REVOKE_LEASE DRM_IOWR(0xC9, struct drm_mode_revoke_lease)
|
||||
|
||||
#define DRM_IOCTL_SYNCOBJ_TIMELINE_WAIT DRM_IOWR(0xCA, struct drm_syncobj_timeline_wait)
|
||||
/**
|
||||
* Device specific ioctls should only be in their respective headers
|
||||
* The device specific ioctl range is from 0x40 to 0x9f.
|
||||
|
Reference in New Issue
Block a user