[igt-dev] [RFC] IGT device scanning and selection
Arkadiusz Hiler
arkadiusz.hiler at intel.com
Tue Jun 4 08:36:15 UTC 2019
On Tue, Jun 04, 2019 at 08:09:55AM +0000, Kempczynski, Zbigniew wrote:
> Hi all.
>
> IGT device management is a little bit old. More than one GPU on the machine
> are available on the market from years so there's time to propose new device
> management in IGT.
>
> Selection using bus-device or functional specifiers.
> ---
> 1. bus-device selection
> Current devices are mostly PCI-Express devices, but we should be able to
> open to specify device using any bus selection. For example:
> --device PCI:00:02.0
> would select PCI device on 00 bus, 02 device and function 0.
>
> --device USB:002:003
> would select device 003 on bus 002.
>
> Future buses can be specified by extending --device argument parsing.
>
> 2. Functional selection
> CI environments shouldn't rely on bus-device. Same devices (GPUs) may be
> inserted into different slots so functional selection is required.
>
> Let's imagine machine have 5 cards:
> 00:02:0 - VendorX, product: A
> 00:03:0 - VendorY, product: B
> 00:04:0 - VendorX, product: A
> 00:05:0 - VendorY, product: C
> 00:06:0 - VendorX, product: D
>
> We should be able to select same device regardless order on the bus.
> For example:
> --device VendorX:A
> --device VendorX:A:0
> will select first A card of VendorX
>
> --device VendorY:A:1
> will select second A card of VendorX
>
> If vendor would like to have its own parsing method for the product
> overriding parsing will be possible. For example:
> --device VendorX:GPU-Card:0
> VendorX must then register its own function to handle 'GPU-Card:0'
> string on his own.
>
> ===
>
> Device management
> ---
> New device management should allow user to see current devices.
> I propose IGT tool called 'lsgpu' which would discover devices in
> any registered bus topologies scanning methods.
Hey,
Seems like a well-written verbalization of some of the ideas that were
floating around since XDC. Thanks!
Couple of points that were not captured here:
1. We should have an option to set device via .igtrc and IGT_DEVICE env
variable too. ENV variable would take precedence over .igtrc, and
--device switch would take precedence over both of the other methods.
That would help a lot with both automatization and having some defaults
for local development.
2. What to do with drm_open_driver(DRIVER_INTEL) et al?
Simplest solution would be to just skip if we are --device-ing a card
that does not meet those "constraints", but we may want to rework those
a bit?
3. VKMS and VGEM?
I have also CCed people that may be interested in running IGT with
multiple GPUs and may something to say.
Cheers,
Arek
More information about the igt-dev
mailing list