aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnder Conselvan de Oliveira2015-08-17 08:21:24 -0500
committerDaniel Stone2017-04-06 14:32:43 -0500
commit890d43a6a8d091211b82dd432af5e0a38472ffa6 (patch)
treed049937e69429992f6d9bb927c1b3d70f601fa68 /xf86drm.h
parente379c6a137bba5c40d9a126b71a667b4d7f5697a (diff)
downloadexternal-libdrm-890d43a6a8d091211b82dd432af5e0a38472ffa6.tar.gz
external-libdrm-890d43a6a8d091211b82dd432af5e0a38472ffa6.tar.xz
external-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);
728extern int drmSetMaster(int fd); 728extern int drmSetMaster(int fd);
729extern int drmDropMaster(int fd); 729extern int drmDropMaster(int fd);
730 730
731#define DRM_EVENT_CONTEXT_VERSION 2 731#define DRM_EVENT_CONTEXT_VERSION 3
732 732
733typedef struct _drmEventContext { 733typedef struct _drmEventContext {
734 734
@@ -748,6 +748,13 @@ typedef struct _drmEventContext {
748 unsigned int tv_usec, 748 unsigned int tv_usec,
749 void *user_data); 749 void *user_data);
750 750
751 void (*page_flip_handler2)(int fd,
752 unsigned int sequence,
753 unsigned int tv_sec,
754 unsigned int tv_usec,
755 unsigned int crtc_id,
756 void *user_data);
757
751} drmEventContext, *drmEventContextPtr; 758} drmEventContext, *drmEventContextPtr;
752 759
753extern int drmHandleEvent(int fd, drmEventContextPtr evctx); 760extern int drmHandleEvent(int fd, drmEventContextPtr evctx);