mirror of
https://github.com/torvalds/linux
synced 2024-09-06 18:01:05 +00:00
![Adrián Larumbe](/assets/img/avatar_default.png)
Debugfs isn't always available in production builds that try to squeeze every single byte out of the kernel image, but we still need a way to toggle the timestamp and cycle counter registers so that jobs can be profiled for fdinfo's drm engine and cycle calculations. Drop the debugfs knob and replace it with a sysfs file that accomplishes the same functionality, and document its ABI in a separate file. Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Steven Price <steven.price@arm.com> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240306015819.822128-2-adrian.larumbe@collabora.com
50 lines
1.7 KiB
ReStructuredText
50 lines
1.7 KiB
ReStructuredText
.. SPDX-License-Identifier: GPL-2.0+
|
|
|
|
=========================
|
|
drm/Panfrost Mali Driver
|
|
=========================
|
|
|
|
.. _panfrost-usage-stats:
|
|
|
|
Panfrost DRM client usage stats implementation
|
|
==============================================
|
|
|
|
The drm/Panfrost 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: 27
|
|
ino: 531
|
|
drm-driver: panfrost
|
|
drm-client-id: 14
|
|
drm-engine-fragment: 1846584880 ns
|
|
drm-cycles-fragment: 1424359409
|
|
drm-maxfreq-fragment: 799999987 Hz
|
|
drm-curfreq-fragment: 799999987 Hz
|
|
drm-engine-vertex-tiler: 71932239 ns
|
|
drm-cycles-vertex-tiler: 52617357
|
|
drm-maxfreq-vertex-tiler: 799999987 Hz
|
|
drm-curfreq-vertex-tiler: 799999987 Hz
|
|
drm-total-memory: 290 MiB
|
|
drm-shared-memory: 0 MiB
|
|
drm-active-memory: 226 MiB
|
|
drm-resident-memory: 36496 KiB
|
|
drm-purgeable-memory: 128 KiB
|
|
|
|
Possible `drm-engine-` key names are: `fragment`, and `vertex-tiler`.
|
|
`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/panfrost/[a-f0-9]*.gpu/profiling
|
|
|
|
Where `N` is either `0` or `1`, depending on the desired enablement status.
|