How to handle DRM crtc_id, connector_id greater than 31
Miguel Angel Vico
mvicomoya at nvidia.com
Wed Dec 7 19:44:18 UTC 2016
On Wed, 7 Dec 2016 13:30:34 +0200
Pekka Paalanen <ppaalanen at gmail.com> wrote:
> * PGP Signed by an unknown key
>
> On Tue, 6 Dec 2016 16:21:30 -0800
> Miguel Angel Vico <mvicomoya at nvidia.com> wrote:
>
> > Hi Eric,
> >
> > The problem here is we are using crtc_id and connector_id as
> > indexes, while they aren't.
> >
> > Nothing keeps DRM drivers from advertising CRTC and connectors with
> > ids that aren't sequential and starting at 0 or 1.
>
> Hi,
>
> yes, we at Collabora have recently discovered this problem too.
>
> > The right fix is to use indexes instead of ids to update bitmasks.
> >
> > drm_output::pipe stores the CRTC index and can be used to update
> > CRTC bitmasks.
>
> Somehow I don't think that's a good plan.
>
> > For connectors, we need to add something similar.
>
> No, there are simpler solutions. We should keep track of the ids. The
> currently-in-use ids are already discoverable through the list of
> weston_outputs. We just needs arrays of ids for the other uses.
>
> The bit masks should just go.
That's even a better solution, but a bit more intrusive than what I was
proposing. Either way, it is a simple solution too.
Thanks.
>
>
> Thanks,
> pq
>
> > On Mon, 5 Dec 2016 21:49:40 +0000
> > "Ruei, Eric" <e-ruei1 at ti.com> wrote:
> >
> > > To whom it may concern:
> > >
> > > We have encountered a Weston hotplug issue with DRM backend where
> > > the hotplug of HDMI connector caused unexpected Weston exit
> > > recently. The root cause of the problem is that the DRM connector
> > > id of the HDMI display exceeds 31, but the corresponding active
> > > bitmap variable connector_allocator is only 32-bit. The same
> > > issue is also applicable to the DRM instance variable
> > > crtc_allocator and all the local variables of CRTC or connector
> > > bitmap. A tentative quick fix is to increase the size of bitmap
> > > variable from uint32_t to uint64_t, but it will break again when
> > > the DRM id exceeds 63.
> > >
> > > Attached please find our tentative patch against Weston 1.9 as
> > > your reference.
> > >
> > > Best regards,
> > >
> > > Eric
> > >
> > >
> >
> >
>
>
> * Unknown Key
> * 0x11AAAAA7
--
Miguel
More information about the wayland-devel
mailing list