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 /xf86drmMode.c
parentc4171535389d72e9135c9615cecd07b346fd6d7e (diff)
downloadexternal-libgbm-d4331dda5b5969922c4f1e3ad6d53f23becb91ab.tar.gz
external-libgbm-d4331dda5b5969922c4f1e3ad6d53f23becb91ab.tar.xz
external-libgbm-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 'xf86drmMode.c')
-rw-r--r--xf86drmMode.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/xf86drmMode.c b/xf86drmMode.c
index eddad8c4..15957ffc 100644
--- a/xf86drmMode.c
+++ b/xf86drmMode.c
@@ -889,6 +889,7 @@ int drmHandleEvent(int fd, drmEventContextPtr evctx)
889 int len, i; 889 int len, i;
890 struct drm_event *e; 890 struct drm_event *e;
891 struct drm_event_vblank *vblank; 891 struct drm_event_vblank *vblank;
892 struct drm_event_crtc_sequence *seq;
892 void *user_data; 893 void *user_data;
893 894
894 /* The DRM read semantics guarantees that we always get only 895 /* The DRM read semantics guarantees that we always get only
@@ -933,6 +934,14 @@ int drmHandleEvent(int fd, drmEventContextPtr evctx)
933 vblank->tv_usec, 934 vblank->tv_usec,
934 user_data); 935 user_data);
935 break; 936 break;
937 case DRM_EVENT_CRTC_SEQUENCE:
938 seq = (struct drm_event_crtc_sequence *) e;
939 if (evctx->version >= 4 && evctx->sequence_handler)
940 evctx->sequence_handler(fd,
941 seq->sequence,
942 seq->time_ns,
943 seq->user_data);
944 break;
936 default: 945 default:
937 break; 946 break;
938 } 947 }