Skip to content

device selection && lsgpu

Arkadiusz Hiler igt-dev 1 version NAK

Status from this message: Nak.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 15 repliesNAK

Patches in v1

#Subject and filesSizeRepliesApplied
1/4lib/igt_list: Update, clean-up and document igt_listbenchmarks/gem_wsim.c docs/reference/igt-gpu-tools/igt-gpu-tools-docs.xml lib/Makefile.sources +9 more+164 -973 replies
2/4Introduce device selection APIdocs/reference/igt-gpu-tools/igt-gpu-tools-docs.xml lib/Makefile.sources lib/igt_device_scan.c +2 more+1270 -03 replies
3/4Introduce device selection lsgpu tooltools/Makefile.sources tools/lsgpu.c tools/meson.build+297 -03 replies
4/4Add device selection in IGTdocs/reference/igt-gpu-tools/igt_test_programs.xml lib/drmtest.c lib/drmtest.h +1 more+142 -83 replies

Reviews trailers per patch

3 of 4 patches have a Reviewed-by or Acked-by.

PatchPetri Latvala
1/4
2/4R-b
3/4R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [igt-dev] [PATCH i-g-t 0/4] device selection && lsgpu

Hey,

This series aims to make running IGT on hosts with multiple GPUs manageable without the need to unload modules / unbind devices.

Suggested reviewing order:
* lsgpu
* igt_core && drm_test changes
* implementation internals in igt_device_scan.c

Changes since Zbigniew's last revision:
* rewritten most of the parts that were using glib
* removed multiple filter support - this will be added back when the need arises
* we don't second guess the "chipset" of the device and just let the underlying open to fail if it has to
* extra looging around opening device when filter is set
* sysfs filter now has it's own prefix
* no "platform" filter - sysfs should suffice for now, it can be added by someone more knowledgeable if the need arises

TODO:
* API for opening multiple devices in a single test (e.g. for prime) - I don't want to design this upfront

Example usage:

  $ build/tools/lsgpu
  sys:/sys/devices/pci0000:00/0000:00:02.0/drm/card0
      subsystem       : drm
      drm card        : /dev/dri/card0
      parent          : sys:/sys/devices/pci0000:00/0000:00:02.0

sys:/sys/devices/pci0000:00/0000:00:02.0/drm/renderD128

      subsystem       : drm
      drm render      : /dev/dri/renderD128
      parent          : sys:/sys/devices/pci0000:00/0000:00:02.0

sys:/sys/devices/platform/vgem/drm/card1

      subsystem       : drm
      drm card        : /dev/dri/card1
      parent          : sys:/sys/devices/platform/vgem

sys:/sys/devices/platform/vgem/drm/renderD129

      subsystem       : drm
      drm render      : /dev/dri/renderD129
      parent          : sys:/sys/devices/platform/vgem

sys:/sys/devices/pci0000:00/0000:00:02.0

      subsystem       : pci
      drm card        : /dev/dri/card0
      drm render      : /dev/dri/renderD128
      vendor          : 8086
      device          : 5927

sys:/sys/devices/platform/vgem

      subsystem       : platform
      drm card        : /dev/dri/card1
      drm render      : /dev/dri/renderD129
  $ build/tools/lsgpu -d "sys:/sys/devices/pci0000:00/0000:00:02.0"
  Notice: Using --device filters
  === Device filter ===
  sys:/sys/devices/pci0000:00/0000:00:02.0

=== Testing device open ===
Device detail:

  subsystem   : pci
  drm card    : /dev/dri/card0
  drm render  : /dev/dri/renderD128

Device /dev/dri/card0 successfully opened
Device /dev/dri/renderD128 successfully opened
-------------------------------------------

  # build/tests/core_auth --run-subtest getclient-simple --device "pci:vendor=intel"
  IGT-Version: 1.24-g64068440 (x86_64) (Linux: 5.3.7-250.vanilla.knurd.1.fc30.x86_64 x86_64)
  Starting subtest: getclient-simple
  Looking for devices to open using filter: pci:vendor=intel
  Filter matched /dev/dri/card0 | /dev/dri/renderD128
  Looking for devices to open using filter: pci:vendor=intel
  Filter matched /dev/dri/card0 | /dev/dri/renderD128
  Subtest getclient-simple: SUCCESS (0.007s)
Cc Zbigniew Kempczyński <[email protected]>
Cc Petri Latvala <[email protected]>
Cc Rodrigo Siqueira <[email protected]>
Cc Leo Liu <[email protected]>

Arkadiusz Hiler (1):
lib/igt_list: Update, clean-up and document igt_list

Zbigniew Kempczyński (3):
Introduce device selection API
Introduce device selection lsgpu tool
Add device selection in IGT

 benchmarks/gem_wsim.c                         |    6 +-
 .../igt-gpu-tools/igt-gpu-tools-docs.xml      |    2 +
 .../igt-gpu-tools/igt_test_programs.xml       |    7 +
 lib/Makefile.sources                          |    4 +
 lib/drmtest.c                                 |   94 +-
 lib/drmtest.h                                 |    2 +
 lib/igt_chamelium.c                           |    2 +-
 lib/igt_core.c                                |   51 +-
 lib/igt_device_scan.c                         | 1199 +++++++++++++++++
 lib/igt_device_scan.h                         |   67 +
 lib/igt_dummyload.c                           |    4 +-
 lib/igt_kmod.c                                |    2 +-
 lib/igt_list.c                                |   66 +
 lib/igt_list.h                                |  165 ++-
 lib/meson.build                               |    2 +
 tests/i915/gem_exec_balancer.c                |    2 +-
 tests/vc4_purgeable_bo.c                      |    6 +-
 tools/Makefile.sources                        |    1 +
 tools/lsgpu.c                                 |  295 ++++
 tools/meson.build                             |    1 +
 20 files changed, 1873 insertions(+), 105 deletions(-)
 create mode 100644 lib/igt_device_scan.c
 create mode 100644 lib/igt_device_scan.h
 create mode 100644 lib/igt_list.c
 create mode 100644 tools/lsgpu.c
Signature · 6 lines
2.21.0

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev