[Intel-gfx] [RFC][PATCH 0/2] drm: PATH prop for all connectors?

Pekka Paalanen ppaalanen at gmail.com
Thu Jun 27 07:35:47 UTC 2019


On Thu, 13 Jun 2019 22:42:08 +0200
Daniel Vetter <daniel at ffwll.ch> wrote:

> On Thu, Jun 13, 2019 at 09:43:33PM +0300, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> > 
> > Here's a possible apporoach for providing userspace with
> > some stable connector identifiers. Combine with the bus
> > name of the GPU and you should have some kind of real
> > physical path description. Unfortunately the ship has
> > sailed for MST connectors because userspace is already
> > parsing the property and expects to find certain things
> > there. So if we want stable names for those we'd probably
> > have introduce another PATH prop (PHYS_PATH?).
> > 
> > I suppose one alternative would to make the connector 
> > type_id stable. Currently that is being populated by drm 
> > core and it's just a global counter. Not sure how badly
> > things would turn out if we'd allow each driver to set
> > that. It could result in conflicting xrandr connector
> > names between different GPUs which I suppose would
> > confuse existing userspace?  
> 
> I think the only reason this global id stuff exists is because with
> original xrandr, that stuff was global. And then it got copypasted
> forever.
> 
> Would need to do a bunch of reviewing, but I'd expect we'll get away with
> just making all these allocators per-device.

Hi,

I'm not sure I'm that optimistic... I assume most userspace uses type_id
for naming already and might rely on uniqueness. Weston uses type_id,
but does not rely on uniqueness yet, since it only handles one device
so far.

The bigger problem to me however is changing the meaning of type_id,
causing old kernels do one thing and new kernels do another thing. When
userspace uses type_id for connector naming, it may use that name in
configuration files. Weston does, but again is not affected because it
doesn't support using multiple devices yet. If someone has two gfx
cards in his machine, making type_id per-device changes the numbering,
meaning the user's configuration does not apply anymore or applies
wrong. I suppose it doesn't matter if the naming was already
unreliable, since it is reliable if the drivers/devices happened to
probe in the same order every boot.

Are connector names in xrandr still using type_id in their names? That
would be a sure blocker, I think.


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/intel-gfx/attachments/20190627/d121bea4/attachment.sig>


More information about the Intel-gfx mailing list