On 21/06/15 02:25 PM, Mario Kleiner wrote: > Allow proper handling of output->pipe > 1 to support > triple-head graphics cards etc. by using the "high-crtc" > support introduced in Linux 2.6.39 and libdrm 2.4.25 > around May 2011. > > Signed-off-by: Mario Kleiner <[email protected]>
Looks good to me. Reviewed-By: Derek Foreman <[email protected]> > --- > src/compositor-drm.c | 14 ++++++++++++-- > 1 file changed, 12 insertions(+), 2 deletions(-) > > diff --git a/src/compositor-drm.c b/src/compositor-drm.c > index ad70807..aa6d010 100644 > --- a/src/compositor-drm.c > +++ b/src/compositor-drm.c > @@ -597,6 +597,17 @@ drm_output_set_gamma(struct weston_output *output_base, > weston_log("set gamma failed: %m\n"); > } > > +static unsigned int drm_waitvblank_pipe(struct drm_output *output) > +{ > + if (output->pipe > 1) > + return (output->pipe << DRM_VBLANK_HIGH_CRTC_SHIFT) & > + DRM_VBLANK_HIGH_CRTC_MASK; > + else if (output->pipe > 0) > + return DRM_VBLANK_SECONDARY; > + else > + return 0; > +} > + > static int > drm_output_repaint(struct weston_output *output_base, > pixman_region32_t *damage) > @@ -668,8 +679,7 @@ drm_output_repaint(struct weston_output *output_base, > weston_log("setplane failed: %d: %s\n", > ret, strerror(errno)); > > - if (output->pipe > 0) > - vbl.request.type |= DRM_VBLANK_SECONDARY; > + vbl.request.type |= drm_waitvblank_pipe(output); > > /* > * Queue a vblank signal so we know when the surface > _______________________________________________ wayland-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/wayland-devel
