[igt-dev] [RFC i-g-t 0/5] User friendly lsgpu/intel_gpu_top device listing

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Fri Nov 13 16:27:31 UTC 2020


From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

Please see individual path commit messages for details, but essentially I
implemented this:

$ sudo tools/lsgpu
card1                   8086:4905    drm:/dev/dri/card1
└─renderD129                         drm:/dev/dri/renderD129
card0                   8086:3E98    drm:/dev/dri/card0
└─renderD128                         drm:/dev/dri/renderD128

$ sudo tools/lsgpu --pci
card1                   8086:4905    pci:vendor=8086,device=4905,card=0
└─renderD129
card0                   8086:3E98    pci:vendor=8086,device=3E98,card=0
└─renderD128

$ sudo tools/lsgpu --sysfs
card1                   8086:4905    sys:/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:01.0/0000:03:00.0
└─renderD129                         sys:/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:01.0/0000:03:00.0/drm/renderD129
card0                   8086:3E98    sys:/sys/devices/pci0000:00/0000:00:02.0
└─renderD128                         sys:/sys/devices/pci0000:00/0000:00:02.0/drm/renderD128

I need to find a machine with two GPUs of the same device id to finish testing
this hence still RFC.

Tvrtko Ursulin (5):
  intel_gpu_top: User friendly device listing
  lsgpu: User friendly device listing
  lib/igt_device_scan: Remember PCI card index after scanning
  lsgpu: Add filter type print-out selection
  intel_gpu_top: Default GPU list to PCI mode

 lib/igt_device_scan.c | 205 +++++++++++++++++++++++++++++++++++++-----
 lib/igt_device_scan.h |  16 +++-
 tools/intel_gpu_top.c |   8 +-
 tools/lsgpu.c         |  38 ++++++--
 4 files changed, 233 insertions(+), 34 deletions(-)

-- 
2.25.1



More information about the igt-dev mailing list