[PATCH 06/10] compositor-drm: Handle more than two output crtcs per card

Bill Spitzak spitzak at gmail.com
Mon Jun 29 13:20:39 PDT 2015


On Fri, Jun 26, 2015 at 11:34 AM, Derek Foreman <derekf at osg.samsung.com>
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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20150629/f6a4f14d/attachment.html>


More information about the wayland-devel mailing list