summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm2/ecore_drm2_outputs.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_outputs.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c
index 8cebea513b..293a78eec2 100644
--- a/src/lib/ecore_drm2/ecore_drm2_outputs.c
+++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c
@@ -925,6 +925,20 @@ _output_destroy(Ecore_Drm2_Device *dev EINA_UNUSED, Ecore_Drm2_Output *output)
925 free(output); 925 free(output);
926} 926}
927 927
928/* this function is used to indicate if we are in a multi-gpu situation
929 * and need to calculate vblank sync with high crtc mask */
930static unsigned int
931_output_vblank_pipe(Ecore_Drm2_Output *output)
932{
933 if (output->pipe > 1)
934 return ((output->pipe << DRM_VBLANK_HIGH_CRTC_SHIFT) &
935 DRM_VBLANK_HIGH_CRTC_MASK);
936 else if (output->pipe > 0)
937 return DRM_VBLANK_SECONDARY;
938 else
939 return 0;
940}
941
928EAPI Eina_Bool 942EAPI Eina_Bool
929ecore_drm2_outputs_create(Ecore_Drm2_Device *device) 943ecore_drm2_outputs_create(Ecore_Drm2_Device *device)
930{ 944{
@@ -1619,6 +1633,7 @@ ecore_drm2_output_blanktime_get(Ecore_Drm2_Output *output, int sequence, long *s
1619 1633
1620 memset(&v, 0, sizeof(v)); 1634 memset(&v, 0, sizeof(v));
1621 v.request.type = DRM_VBLANK_RELATIVE; 1635 v.request.type = DRM_VBLANK_RELATIVE;
1636 v.request.type |= _output_vblank_pipe(output);
1622 v.request.sequence = sequence; 1637 v.request.sequence = sequence;
1623 ret = sym_drmWaitVBlank(output->fd, &v); 1638 ret = sym_drmWaitVBlank(output->fd, &v);
1624 success = (ret == 0) && (v.reply.tval_sec > 0 || v.reply.tval_usec > 0); 1639 success = (ret == 0) && (v.reply.tval_sec > 0 || v.reply.tval_usec > 0);