Skip to content

Close any open drm device after engine initialization

Soham Purkait igt-dev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2tools/gputop/xe_gputop: Close card_fd after engine population in xe_populate_engines()tools/gputop/xe_gputop.c+2 -00 replies
2/2tools/gputop/gputop: Enable support for multiple GPUs and instancestools/gputop/gputop.c tools/gputop/meson.build tools/meson.build+227 -451 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH i-g-t 0/2] Close any open drm device after engine initialization

During the engine initialization for a specific device, igt helper
functions need card_fd to access each engine and respective configs which is required in obtaining the busyness of the same through PMU. Once the required configs and engines are obtained, the card_fd is closed as opened card_fd in gputop makes appear itself as DRM client.

GPUTOP is also capable of running without superuser access through setting
CAP_PERFMON, although in that case GPU client busyness is not available as without being superuser, other processes' fd could not be inspected.

Steps to enable GPUTOP to run without root:

$ cd /path/to/igt-gpu-tools/
$ sudo setcap cap_perfmon=+ep $(pwd)/build/tools/gputop/gputop
$ sudo sh -c "echo $(pwd)/build/lib > /etc/ld.so.conf.d/lib-igt.conf"
$ sudo ldconfig
Steps to revert once done:
$ sudo setcap cap_perfmon=-ep $(pwd)/build/tools/gputop/gputop
$ sudo rm /etc/ld.so.conf.d/lib-igt.conf
$ sudo ldconfig

Soham Purkait (2):
tools/gputop/xe_gputop: Close card_fd after engine population in
xe_populate_engines()
tools/gputop/gputop: Enable support for multiple GPUs and instances

 tools/{ => gputop}/gputop.c | 260 ++++++++++++++++++++++++++++++------
 tools/gputop/meson.build    |   6 +
 tools/gputop/xe_gputop.c    |   2 +
 tools/meson.build           |   6 +-
 4 files changed, 229 insertions(+), 45 deletions(-)
 rename tools/{ => gputop}/gputop.c (61%)
 create mode 100644 tools/gputop/meson.build
Signature · 1 line
2.34.1