Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t v5 0/5] Close any open drm device after engine initialization in GPUTOP
@ 2026-01-22  8:45 Soham Purkait
  2026-01-22  8:45 ` [PATCH i-g-t v5 1/5] tools: Rename tools/gputop to tools/gputop.src Soham Purkait
                   ` (8 more replies)
  0 siblings, 9 replies; 18+ messages in thread
From: Soham Purkait @ 2026-01-22  8:45 UTC (permalink / raw)
  To: igt-dev, riana.tauro, badal.nilawar, kamil.konieczny
  Cc: anshuman.gupta, soham.purkait, umesh.nerlige.ramappa

       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.
But during KMS tests no other DRM client should run. So once the required
configs and engines are obtained, the card_fd should be closed as opened
card_fd in gputop makes appear itself as DRM client.
  
  GPUTOP engine busyness is also capable of running without superuser access
through setting CAP_PERFMON or an appropriate perf_event_paranoid setting,
Otherwise user could continue with only GPU client busyness if required.

Steps to enable engine busyness to run without root (using CAP_PERFMON):
$ cd /path/to/igt-gpu-tools/
$ sudo setcap cap_perfmon=+ep $(pwd)/build/tools/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
$ sudo rm /etc/ld.so.conf.d/lib-igt.conf
$ sudo ldconfig

Steps to enable engine busyness to run without root (using perf_event_paranoid):
# Save current value
$ orig_val=$(sysctl -n kernel.perf_event_paranoid)
# Set the value to allow running GPUTOP without root privileges
$ sudo sysctl -w kernel.perf_event_paranoid=-1
Steps to revert once done:
$ sudo sysctl -w kernel.perf_event_paranoid=$orig_val

Soham Purkait (5):
  tools: Rename tools/gputop to tools/gputop.src
  tools/gputop.src/utils: Add clamp macro to remove dependency on
    lib/xe/*
  tools/gputop.src/xe_gputop: Close card_fd after engine population in
    xe_populate_engines()
  tools/gputop.src/gputop: Enable support for multiple GPUs and
    instances
  tools/gputop.src/gputop: Add command line option for device filter

 tools/{ => gputop.src}/gputop.c          | 286 +++++++++++++++++++----
 tools/gputop.src/meson.build             |   1 +
 tools/{gputop => gputop.src}/utils.c     |   0
 tools/{gputop => gputop.src}/utils.h     |  11 +-
 tools/{gputop => gputop.src}/xe_gputop.c |  64 ++++-
 tools/{gputop => gputop.src}/xe_gputop.h |   3 +-
 tools/meson.build                        |  12 +-
 7 files changed, 316 insertions(+), 61 deletions(-)
 rename tools/{ => gputop.src}/gputop.c (58%)
 create mode 100644 tools/gputop.src/meson.build
 rename tools/{gputop => gputop.src}/utils.c (100%)
 rename tools/{gputop => gputop.src}/utils.h (89%)
 rename tools/{gputop => gputop.src}/xe_gputop.c (86%)
 rename tools/{gputop => gputop.src}/xe_gputop.h (95%)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 18+ messages in thread
* [PATCH i-g-t v5 0/5] Close any open drm device after engine initialization in GPUTOP
@ 2026-01-22  6:36 Soham Purkait
  2026-01-22  6:36 ` [PATCH i-g-t v5 1/5] tools: Rename tools/gputop to tools/gputop.src Soham Purkait
  0 siblings, 1 reply; 18+ messages in thread
From: Soham Purkait @ 2026-01-22  6:36 UTC (permalink / raw)
  To: igt-dev, riana.tauro, badal.nilawar, kamil.konieczny
  Cc: anshuman.gupta, soham.purkait, umesh.nerlige.ramappa

       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.
But during KMS tests no other DRM client should run. So once the required
configs and engines are obtained, the card_fd should be closed as opened
card_fd in gputop makes appear itself as DRM client.
  
  GPUTOP engine busyness is also capable of running without superuser access
through setting CAP_PERFMON or an appropriate perf_event_paranoid setting,
Otherwise user could continue with only GPU client busyness if required.

Steps to enable engine busyness to run without root (using CAP_PERFMON):
$ cd /path/to/igt-gpu-tools/
$ sudo setcap cap_perfmon=+ep $(pwd)/build/tools/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
$ sudo rm /etc/ld.so.conf.d/lib-igt.conf
$ sudo ldconfig

Steps to enable engine busyness to run without root (using perf_event_paranoid):
# Save current value
$ orig_val=$(sysctl -n kernel.perf_event_paranoid)
# Set the value to allow running GPUTOP without root privileges
$ sudo sysctl -w kernel.perf_event_paranoid=-1
Steps to revert once done:
$ sudo sysctl -w kernel.perf_event_paranoid=$orig_val

Soham Purkait (5):
  tools: Rename tools/gputop to tools/gputop.src
  tools/gputop.src/utils: Add clamp macro to remove dependency on
    lib/xe/*
  tools/gputop.src/xe_gputop: Close card_fd after engine population in
    xe_populate_engines()
  tools/gputop.src/gputop: Enable support for multiple GPUs and
    instances
  tools/gputop.src/gputop: Add command line option for device filter

 tools/{ => gputop.src}/gputop.c          | 286 +++++++++++++++++++----
 tools/gputop.src/meson.build             |   1 +
 tools/{gputop => gputop.src}/utils.c     |   0
 tools/{gputop => gputop.src}/utils.h     |  11 +-
 tools/{gputop => gputop.src}/xe_gputop.c |  64 ++++-
 tools/{gputop => gputop.src}/xe_gputop.h |   3 +-
 tools/meson.build                        |  12 +-
 7 files changed, 316 insertions(+), 61 deletions(-)
 rename tools/{ => gputop.src}/gputop.c (58%)
 create mode 100644 tools/gputop.src/meson.build
 rename tools/{gputop => gputop.src}/utils.c (100%)
 rename tools/{gputop => gputop.src}/utils.h (89%)
 rename tools/{gputop => gputop.src}/xe_gputop.c (86%)
 rename tools/{gputop => gputop.src}/xe_gputop.h (95%)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2026-01-30  8:16 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-22  8:45 [PATCH i-g-t v5 0/5] Close any open drm device after engine initialization in GPUTOP Soham Purkait
2026-01-22  8:45 ` [PATCH i-g-t v5 1/5] tools: Rename tools/gputop to tools/gputop.src Soham Purkait
2026-01-23 13:45   ` Kamil Konieczny
2026-01-23 13:52     ` Dixit, Ashutosh
2026-01-23 15:18       ` Kamil Konieczny
2026-01-23 19:25         ` Dixit, Ashutosh
2026-01-30  8:16           ` Purkait, Soham
2026-01-22  8:45 ` [PATCH i-g-t v5 2/5] tools/gputop.src/utils: Add clamp macro to remove dependency on lib/xe/* Soham Purkait
2026-01-23 14:08   ` Kamil Konieczny
2026-01-22  8:45 ` [PATCH i-g-t v5 3/5] tools/gputop.src/xe_gputop: Close card_fd after engine population in xe_populate_engines() Soham Purkait
2026-01-23 14:39   ` Kamil Konieczny
2026-01-22  8:45 ` [PATCH i-g-t v5 4/5] tools/gputop.src/gputop: Enable support for multiple GPUs and instances Soham Purkait
2026-01-22  8:45 ` [PATCH i-g-t v5 5/5] tools/gputop.src/gputop: Add command line option for device filter Soham Purkait
2026-01-22  9:30 ` ✓ Xe.CI.BAT: success for Close any open drm device after engine initialization in GPUTOP (rev7) Patchwork
2026-01-22  9:54 ` ✓ i915.CI.BAT: " Patchwork
2026-01-22 19:18 ` ✗ i915.CI.Full: failure " Patchwork
2026-01-22 19:45 ` ✗ Xe.CI.Full: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2026-01-22  6:36 [PATCH i-g-t v5 0/5] Close any open drm device after engine initialization in GPUTOP Soham Purkait
2026-01-22  6:36 ` [PATCH i-g-t v5 1/5] tools: Rename tools/gputop to tools/gputop.src Soham Purkait

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox