[igt-dev] [PATCH i-g-t v5 1/2] Introduce device selection API

Kempczynski, Zbigniew zbigniew.kempczynski at intel.com
Wed Aug 28 08:23:38 UTC 2019


On Wed, 2019-08-28 at 08:10 +0200, Katarzyna Dec wrote:
> On Fri, Aug 23, 2019 at 09:03:50AM +0200, Zbigniew KempczyƄski wrote:
> > + * # lsgpu
> > + *
> > + * The devices can be scanned and displayed using 'lsgpu' tool. Tool also
> > + * displays properties and sysattrs (-p switch, means print detail) which
> > + * can be used during filter implementation.
> > + *
> > + * Tool can also be used to try out filters.
> > + * To select device use '-d' or '--device' argument like:
> > + *
> > + * |[<!-- language="plain" -->
> > + * ./lsgpu -d 'pci:vendor=Intel'
> > + * === Device filter list ===
> > + * [ 0]: pci:vendor=Intel
> > +
> > + * === Testing device open ===
> > + * subsystem   : pci
> > + * chipset     : 1
> > + * drm card    : /dev/dri/card0
> > + * drm render  : /dev/dri/renderD128
> > + * Device /dev/dri/card0 successfully opened
> > + * Device /dev/dri/renderD128 successfully opened
> > + * ]|
> > + *
> > + * Additionally lsgpu tries to open the card and render nodes to verify
> > + * permissions. It also uses IGT variable search order:
> > + * - use --device first (it overrides IGT_DEVICE and .igtrc
> > Common::Device
> > + *   settings)
> > + * - use IGT_DEVICE enviroment variable if no --device are passed
> > + * - use .igtrc Common::Device if no --device nor IGT_DEVICE are passed
> > + */
> 
> I looked thought code in all patch and it generally looks good.
> I have a question about lsgpu usage.
> '-p' prints all devices, but there is not information in help about that
> '-d' used without '-p' filters and prints details about particular device
> Mixing '-p' and '-d' has no affect - we still see all devices, not filtered
> ones. Is it by desing?

Argument -p displays details for devices filtered with -d. If you use:

$ lsgpu -d platform:/sys/devices/platform/vgem -p

will display detail only for vgem device.

> 
> Kasia :)

Zbigniew


More information about the igt-dev mailing list