diff options
author | Keith Packard <keithp@keithp.com> | 2017-07-01 00:43:15 -0700 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2017-12-18 10:04:02 +1000 |
commit | d4331dda5b5969922c4f1e3ad6d53f23becb91ab (patch) | |
tree | f6ee7cae925d839993c7e23acc2d185fe2a9073c /xf86drm.h | |
parent | c4171535389d72e9135c9615cecd07b346fd6d7e (diff) | |
download | libdrm-d4331dda5b5969922c4f1e3ad6d53f23becb91ab.tar.gz libdrm-d4331dda5b5969922c4f1e3ad6d53f23becb91ab.tar.bz2 libdrm-d4331dda5b5969922c4f1e3ad6d53f23becb91ab.zip |
drm: Add CrtcGetSequence and CrtcQueueSequence IOCTLs [v2]
These provide a crtc-id based interface to get the current sequence
(frame) number and to queue an event to be delivered at a specific sequence.
v2: Remove FIRST_PIXEL_OUT flag. This has been removed from the
proposed kernel API
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'xf86drm.h')
-rw-r--r-- | xf86drm.h | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -636,6 +636,12 @@ extern int drmCtlUninstHandler(int fd); extern int drmSetClientCap(int fd, uint64_t capability, uint64_t value); +extern int drmCrtcGetSequence(int fd, uint32_t crtcId, + uint64_t *sequence, uint64_t *ns); +extern int drmCrtcQueueSequence(int fd, uint32_t crtcId, + uint32_t flags, uint64_t sequence, + uint64_t *sequence_queued, + uint64_t user_data); /* General user-level programmer's API: authenticated client and/or X */ extern int drmMap(int fd, drm_handle_t handle, @@ -728,7 +734,7 @@ extern void drmMsg(const char *format, ...) DRM_PRINTFLIKE(1, 2); extern int drmSetMaster(int fd); extern int drmDropMaster(int fd); -#define DRM_EVENT_CONTEXT_VERSION 3 +#define DRM_EVENT_CONTEXT_VERSION 4 typedef struct _drmEventContext { @@ -755,6 +761,10 @@ typedef struct _drmEventContext { unsigned int crtc_id, void *user_data); + void (*sequence_handler)(int fd, + uint64_t sequence, + uint64_t ns, + uint64_t user_data); } drmEventContext, *drmEventContextPtr; extern int drmHandleEvent(int fd, drmEventContextPtr evctx); |