Aliases for DRI connectors?

Pekka Paalanen ppaalanen at gmail.com
Fri Apr 3 10:03:06 UTC 2020


On Fri, 3 Apr 2020 10:28:52 +0200
Guillermo Rodriguez <guillerodriguez.dev at gmail.com> wrote:

> Hi Pekka,
> 
> El vie., 3 abr. 2020 a las 10:14, Pekka Paalanen
> (<ppaalanen at gmail.com>) escribió:
> >
> > On Wed, 1 Apr 2020 14:38:37 -0500
> > Matt Hoosier <matt.hoosier at gmail.com> wrote:
> >  
> > > I'm searching for some sort of scheme that will let my DRI master query the
> > > set of available connectors and select the one carrying a prearranged
> > > designation. The problem I'm trying to solve is to allow deploying one
> > > standardized userspace component across a fleet of devices that have
> > > varying numbers of displays, with the use cases not always driven on the
> > > same connector topologically.
> > >
> > > I had a look around the properties available on my system's DRI connectors,
> > > and nothing immediate jumped out at me. Is there a standard connector
> > > property that (assuming I can find the right place in DeviceTree or similar
> > > to) that would be a good fit for this?  
> >
> > Hi,
> >
> > I've never heard of a thing that could accomplish that. DRM connector
> > names are not even actually communicated to userspace. What userspace
> > sees is connector type (enum) and some counter numbers (which are not
> > persistent, so not reliable if you have e.g. multiple DRM drivers
> > racing to initialize),  
> 
> I may be misreading you, but does this mean that the connector names
> used in the [output] section of the weston.ini configuration file are
> not reliable?

Yes, they are not generally reliable. They are reliable enough in most
cases, particularly if you have only one DRM device with connectors.
DRM drivers themselves often manage to not race internally, so they are
fairly consistent in what order they create their connectors per device.

Xorg has the exact same problem IIRC, as has probably any display
server on Linux. This means that to find a case where the reliability
actually breaks down you have to try quite hard or be very unlucky,
since it has gone unfixed for so long.

Likewise you cannot rely that /dev/dri/card0 is always the same device
if you have multiple. That issue is showing up a little more than the
connector naming issue. Hence /dev/dri/by-path/ aliases exist. Network
devices have hit the same naming problem a long time ago already, hence
we nowadays have "Predictable Network Interface Names".

> Then what is the proper way to configure one specific (physical)
> output in Weston?

There is no better way yet. I've had some ideas, but no time to look
into them.

MST connectors have a KMS property for the hardware path, but Weston
does not look at that, and the other connectors don't even have it.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20200403/e8cdcf77/attachment.sig>


More information about the dri-devel mailing list