-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drm/panthor: add sysfs knob for enabling job profiling
This commit introduces a DRM device sysfs attribute that lets UM control the job accounting status in the device. The knob variable had been brought in as part of a previous commit, but now we're able to fix it manually. As sysfs files are part of a driver's uAPI, describe its legitimate input values and output format in a documentation file. Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com> Reviewed-by: Steven Price <steven.price@arm.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240923230912.2207320-6-adrian.larumbe@collabora.com
- Loading branch information
Adrián Larumbe
authored and
Boris Brezillon
committed
Oct 2, 2024
1 parent
064bb57
commit 6a797bd
Showing
3 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
What: /sys/bus/platform/drivers/panthor/.../profiling | ||
Date: September 2024 | ||
KernelVersion: 6.11.0 | ||
Contact: Adrian Larumbe <adrian.larumbe@collabora.com> | ||
Description: | ||
Bitmask to enable drm fdinfo's job profiling measurements. | ||
Valid values are: | ||
0: Don't enable fdinfo job profiling sources. | ||
1: Enable GPU cycle measurements for running jobs. | ||
2: Enable GPU timestamp sampling for running jobs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
.. SPDX-License-Identifier: GPL-2.0+ | ||
========================= | ||
drm/Panthor CSF driver | ||
========================= | ||
|
||
.. _panfrost-usage-stats: | ||
|
||
Panthor DRM client usage stats implementation | ||
============================================== | ||
|
||
The drm/Panthor driver implements the DRM client usage stats specification as | ||
documented in :ref:`drm-client-usage-stats`. | ||
|
||
Example of the output showing the implemented key value pairs and entirety of | ||
the currently possible format options: | ||
|
||
:: | ||
pos: 0 | ||
flags: 02400002 | ||
mnt_id: 29 | ||
ino: 491 | ||
drm-driver: panthor | ||
drm-client-id: 10 | ||
drm-engine-panthor: 111110952750 ns | ||
drm-cycles-panthor: 94439687187 | ||
drm-maxfreq-panthor: 1000000000 Hz | ||
drm-curfreq-panthor: 1000000000 Hz | ||
drm-total-memory: 16480 KiB | ||
drm-shared-memory: 0 | ||
drm-active-memory: 16200 KiB | ||
drm-resident-memory: 16480 KiB | ||
drm-purgeable-memory: 0 | ||
|
||
Possible `drm-engine-` key names are: `panthor`. | ||
`drm-curfreq-` values convey the current operating frequency for that engine. | ||
|
||
Users must bear in mind that engine and cycle sampling are disabled by default, | ||
because of power saving concerns. `fdinfo` users and benchmark applications which | ||
query the fdinfo file must make sure to toggle the job profiling status of the | ||
driver by writing into the appropriate sysfs node:: | ||
|
||
echo <N> > /sys/bus/platform/drivers/panthor/[a-f0-9]*.gpu/profiling | ||
|
||
Where `N` is a bit mask where cycle and timestamp sampling are respectively | ||
enabled by the first and second bits. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters