summaryrefslogtreecommitdiff
path: root/xf86drm.h
diff options
context:
space:
mode:
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>2015-08-17 16:21:24 +0300
committerDaniel Stone <daniels@collabora.com>2017-04-06 20:32:43 +0100
commit890d43a6a8d091211b82dd432af5e0a38472ffa6 (patch)
treed049937e69429992f6d9bb927c1b3d70f601fa68 /xf86drm.h
parente379c6a137bba5c40d9a126b71a667b4d7f5697a (diff)
downloadlibdrm-890d43a6a8d091211b82dd432af5e0a38472ffa6.tar.gz
libdrm-890d43a6a8d091211b82dd432af5e0a38472ffa6.tar.bz2
libdrm-890d43a6a8d091211b82dd432af5e0a38472ffa6.zip
Add CRTC ID to vblank event
When using the atomic API, one request can span multiple CRTCs, however one event is generated per CRTC. As we cannot disambiguate the CRTC with user data (since we only have one piece of user data to pass in), newer kernels can include the CRTC ID in the page flip event. Add a new vfunc to dispatch vblank events carrying a CRTC ID to clients who negotiate a higher interface version. [daniels: Rebased, include new cap, call page_flip_handler if it is set but page_flip_handler2 isn't even on newer contexts, write a commit message.] v2: Split into separate commit. Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@intel.com>
Diffstat (limited to 'xf86drm.h')
-rw-r--r--xf86drm.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/xf86drm.h b/xf86drm.h
index 0d927018..d75ca8ce 100644
--- a/xf86drm.h
+++ b/xf86drm.h
@@ -728,7 +728,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 2
+#define DRM_EVENT_CONTEXT_VERSION 3
typedef struct _drmEventContext {
@@ -748,6 +748,13 @@ typedef struct _drmEventContext {
unsigned int tv_usec,
void *user_data);
+ void (*page_flip_handler2)(int fd,
+ unsigned int sequence,
+ unsigned int tv_sec,
+ unsigned int tv_usec,
+ unsigned int crtc_id,
+ void *user_data);
+
} drmEventContext, *drmEventContextPtr;
extern int drmHandleEvent(int fd, drmEventContextPtr evctx);