summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm2/ecore_drm2_outputs.c
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-07-28 09:40:40 -0500
committerDerek Foreman <derekf@osg.samsung.com>2017-07-28 10:41:11 -0500
commit8e500c683549e8d3afe78657c4582560a5c75eba (patch)
tree50980e4ca653cd4b9b868eaaa2928cf33baa0721 /src/lib/ecore_drm2/ecore_drm2_outputs.c
parent2efa25511f04dc2cb278471aa041e0e24ffa13f0 (diff)
ecore_drm2: Allow picking a sequence number for blanktime_get
This lets us do a blocking wait for a vsync. Something we should try to do as infrequently as possible, but in some cases we need it one time at startup to catch graphics driver bugs.
Diffstat (limited to 'src/lib/ecore_drm2/ecore_drm2_outputs.c')
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_outputs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c
index d2b3acb54b..fba4be0c8d 100644
--- a/src/lib/ecore_drm2/ecore_drm2_outputs.c
+++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c
@@ -1584,7 +1584,7 @@ ecore_drm2_output_subpixel_get(const Ecore_Drm2_Output *output)
1584} 1584}
1585 1585
1586EAPI Eina_Bool 1586EAPI Eina_Bool
1587ecore_drm2_output_blanktime_get(Ecore_Drm2_Output *output, long *sec, long *usec) 1587ecore_drm2_output_blanktime_get(Ecore_Drm2_Output *output, int sequence, long *sec, long *usec)
1588{ 1588{
1589 drmVBlank v; 1589 drmVBlank v;
1590 int ret; 1590 int ret;
@@ -1595,6 +1595,7 @@ ecore_drm2_output_blanktime_get(Ecore_Drm2_Output *output, long *sec, long *usec
1595 1595
1596 memset(&v, 0, sizeof(v)); 1596 memset(&v, 0, sizeof(v));
1597 v.request.type = DRM_VBLANK_RELATIVE; 1597 v.request.type = DRM_VBLANK_RELATIVE;
1598 v.request.sequence = sequence;
1598 ret = sym_drmWaitVBlank(output->fd, &v); 1599 ret = sym_drmWaitVBlank(output->fd, &v);
1599 if (ret) return EINA_FALSE; 1600 if (ret) return EINA_FALSE;
1600 if (v.reply.tval_sec < 0) return EINA_FALSE; 1601 if (v.reply.tval_sec < 0) return EINA_FALSE;