On Fri, Jun 26, 2015 at 11:34 AM, Derek Foreman <[email protected]>
wrote:

>
> > +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;
>

This does not seem right as the individual bits in the pipe number cannot
really change things in any useful way. From the header file I see this:

+    /* bits 1-6 are reserved for high crtcs */
+    DRM_VBLANK_HIGH_CRTC_MASK = 0x0000003e,
+#define DRM_VBLANK_HIGH_CRTC_SHIFT 1

My best guess is that the intended code was something like:

  (1 << output->pipe - 2 + DRM_VBLANK_HIGH_CRTC_SHIFT) &
DRM_VBLANK_HIGH_CRTC_MASK

Or is output->pipe always a power of 2?
_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to