From: "Adrián Larumbe" <adrian.larumbe@collabora.com>
To: tursulin@ursulin.net, robdclark@chromium.org,
kamil.konieczny@linux.intel.com, lucas.demarchi@intel.com,
igt-dev@lists.freedesktop.org
Cc: healych@amazon.com, adrian.larumbe@collabora.com
Subject: [PATCH v4 0/2] Add gputop support for sysfs profiling knob
Date: Thu, 23 May 2024 12:45:42 +0100 [thread overview]
Message-ID: <20240523114549.447126-1-adrian.larumbe@collabora.com> (raw)
Some GPUs like Panfrost need a sysfs file to be toggled before the HW can
initiate the job accounting necessary to feed fdinfo with engine and cycle
data. This sysfs knob has to be disabled when the profiler is done, to save
power.
Changelog:
v4:
- Improve error handling *igt_devices_profiled
- Changed name of some symbols to better reflect their semantics
- Changed header with copyright notice
- Added documentation for public functions in igt_profiling.c
v3:
- Created separate lib_igt_profiling to avoid dynamic linking
of gputop with igt_lib, which also meant isolating the functions
therein from the rest of igt_lib.
- Make gputop check the sysfs knob state at the end of every period
in case other instances of itself or other profilers might have
changed it, so that the knob can be returned to its original state.
v2:
- Added header file guards around igt_profiling.h
- Modified licensing information to comply with SPDX format
- Sorted included header files in alphabetic order
- Added volatile qualifier to gputop stop variable
Adrián Larumbe (2):
lib: Add DRM driver sysfs profiling knob toggling functions
tools/gputop: toggle sysfs profiling knob if available for device
lib/igt_profiling.c | 190 ++++++++++++++++++++++++++++++++++++++++++++
lib/igt_profiling.h | 22 +++++
lib/meson.build | 8 ++
tools/gputop.c | 33 +++++++-
tools/meson.build | 2 +-
5 files changed, 253 insertions(+), 2 deletions(-)
create mode 100644 lib/igt_profiling.c
create mode 100644 lib/igt_profiling.h
base-commit: e43892a30d594f8bcbcbd42ccffe298313479215
--
2.45.1
next reply other threads:[~2024-05-23 11:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-23 11:45 Adrián Larumbe [this message]
2024-05-23 11:45 ` [PATCH v4 1/2] lib: Add DRM driver sysfs profiling knob toggling functions Adrián Larumbe
2024-06-03 7:50 ` Zbigniew Kempczyński
2024-06-24 11:32 ` Adrián Larumbe
2024-05-23 11:45 ` [PATCH v4 2/2] tools/gputop: toggle sysfs profiling knob if available for device Adrián Larumbe
2024-05-23 12:23 ` ✓ Fi.CI.BAT: success for Add gputop support for sysfs profiling knob Patchwork
2024-05-23 12:41 ` ✓ CI.xeBAT: " Patchwork
2024-05-23 13:45 ` ✗ CI.xeFULL: failure " Patchwork
2024-05-24 6:13 ` ✓ Fi.CI.IGT: success " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240523114549.447126-1-adrian.larumbe@collabora.com \
--to=adrian.larumbe@collabora.com \
--cc=healych@amazon.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@linux.intel.com \
--cc=lucas.demarchi@intel.com \
--cc=robdclark@chromium.org \
--cc=tursulin@ursulin.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox