From ada4f07bbb85b3d30ac512dd6c3fcaa3e7df5136 Mon Sep 17 00:00:00 2001 From: Bryce Harrington <bryce@osg.samsung.com> Date: Tue, 30 Jun 2015 13:25:46 -0700 Subject: [PATCH] compositor-drm: Add comment for newly added drm_waitvblank_pipe() --- src/compositor-drm.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/compositor-drm.c b/src/compositor-drm.c index aa6d010bd..f24fa0b48 100644 --- a/src/compositor-drm.c +++ b/src/compositor-drm.c @@ -597,6 +597,19 @@ drm_output_set_gamma(struct weston_output *output_base, weston_log("set gamma failed: %m\n"); } +/* Determine the type of vblank synchronization to use for the output. + * + * The pipe parameter indicates which CRTC is in use. Knowing this, we + * can determine which vblank sequence type to use for it. Traditional + * cards had only two CRTCs, with CRTC 0 using no special flags, and + * CRTC 1 using DRM_VBLANK_SECONDARY. The first bit of the pipe + * parameter indicates this. + * + * Bits 1-5 of the pipe parameter are 5 bit wide pipe number between + * 0-31. If this is non-zero it indicates we're dealing with a + * multi-gpu situation and we need to calculate the vblank sync + * using DRM_BLANK_HIGH_CRTC_MASK. + */ static unsigned int drm_waitvblank_pipe(struct drm_output *output) { if (output->pipe > 1) -- GitLab