aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith Packard2017-07-01 02:43:15 -0500
committerDave Airlie2017-12-17 18:04:02 -0600
commitd4331dda5b5969922c4f1e3ad6d53f23becb91ab (patch)
treef6ee7cae925d839993c7e23acc2d185fe2a9073c /xf86drm.h
parentc4171535389d72e9135c9615cecd07b346fd6d7e (diff)
downloadexternal-libdrm-d4331dda5b5969922c4f1e3ad6d53f23becb91ab.tar.gz
external-libdrm-d4331dda5b5969922c4f1e3ad6d53f23becb91ab.tar.xz
external-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.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/xf86drm.h b/xf86drm.h
index 0dbf4941..7773d71a 100644
--- a/xf86drm.h
+++ b/xf86drm.h
@@ -636,6 +636,12 @@ extern int drmCtlUninstHandler(int fd);
636extern int drmSetClientCap(int fd, uint64_t capability, 636extern int drmSetClientCap(int fd, uint64_t capability,
637 uint64_t value); 637 uint64_t value);
638 638
639extern int drmCrtcGetSequence(int fd, uint32_t crtcId,
640 uint64_t *sequence, uint64_t *ns);
641extern int drmCrtcQueueSequence(int fd, uint32_t crtcId,
642 uint32_t flags, uint64_t sequence,
643 uint64_t *sequence_queued,
644 uint64_t user_data);
639/* General user-level programmer's API: authenticated client and/or X */ 645/* General user-level programmer's API: authenticated client and/or X */
640extern int drmMap(int fd, 646extern int drmMap(int fd,
641 drm_handle_t handle, 647 drm_handle_t handle,
@@ -728,7 +734,7 @@ extern void drmMsg(const char *format, ...) DRM_PRINTFLIKE(1, 2);
728extern int drmSetMaster(int fd); 734extern int drmSetMaster(int fd);
729extern int drmDropMaster(int fd); 735extern int drmDropMaster(int fd);
730 736
731#define DRM_EVENT_CONTEXT_VERSION 3 737#define DRM_EVENT_CONTEXT_VERSION 4
732 738
733typedef struct _drmEventContext { 739typedef struct _drmEventContext {
734 740
@@ -755,6 +761,10 @@ typedef struct _drmEventContext {
755 unsigned int crtc_id, 761 unsigned int crtc_id,
756 void *user_data); 762 void *user_data);
757 763
764 void (*sequence_handler)(int fd,
765 uint64_t sequence,
766 uint64_t ns,
767 uint64_t user_data);
758} drmEventContext, *drmEventContextPtr; 768} drmEventContext, *drmEventContextPtr;
759 769
760extern int drmHandleEvent(int fd, drmEventContextPtr evctx); 770extern int drmHandleEvent(int fd, drmEventContextPtr evctx);