gud: set PATH connector property

Simon Ser contact at emersion.fr
Tue Feb 28 12:44:24 UTC 2023


On Tuesday, February 28th, 2023 at 13:31, Peter Stuge <peter at stuge.se> wrote:

> > Would it be possible to set the PATH connector property based on the
> > USB port used by gud?
> 
> Sadly not really easily.
> 
> The physical topology underneath each host controller is stable but
> bus numbers (usb1, usb2 etc.) are not.

Oh, that's news to me. So if I unplug and replug a USB device, the bus
number and bus device number might change? Or does this happen after a
power-cycle? Or is this hardware-specific?

The guarantee we need for PATH is that the exact same hardware
configuration will always retain the same PATH.

> For onboard host controllers it could be possible to anchor to a
> PCI or platform bus device.

But the PCI bus device isn't enough I think? If I have a onboard host
controller with 2 physical USB ports, the PCI bus device isn't enough
to tell these 2 physical ports apart?

> But busses on expansion cards can't be recognized so easily without
> using maybe serial numbers - which may be cloned across multiple
> devices - we can't know.
> 
> > This would give user-space a persistent identifier for the connector:
> > if the user plugs in a USB display on a given port, the PATH would be
> > the same even if the machine rebooted or the displays were plugged in
> > in a different order.
> 
> How about using e.g. the serial number of the gud USB device instead
> of host topology, or maybe some other information from the panel
> behind it?

The PATH property is really about the port path, not the sink. IOW, if
I have two USB displays, one USB port, and switch between the two
displays on this one port, the PATH property isn't supposed to change.


More information about the dri-devel mailing list