xref: /linux/Documentation/gpu/panfrost.rst (revision db5d28c0bfe566908719bec8e25443aabecbb802)
1f11b0417SAdrián Larumbe.. SPDX-License-Identifier: GPL-2.0+
2f11b0417SAdrián Larumbe
3f11b0417SAdrián Larumbe=========================
4f11b0417SAdrián Larumbe drm/Panfrost Mali Driver
5f11b0417SAdrián Larumbe=========================
6f11b0417SAdrián Larumbe
7f11b0417SAdrián Larumbe.. _panfrost-usage-stats:
8f11b0417SAdrián Larumbe
9f11b0417SAdrián LarumbePanfrost DRM client usage stats implementation
10f11b0417SAdrián Larumbe==============================================
11f11b0417SAdrián Larumbe
12f11b0417SAdrián LarumbeThe drm/Panfrost driver implements the DRM client usage stats specification as
13f11b0417SAdrián Larumbedocumented in :ref:`drm-client-usage-stats`.
14f11b0417SAdrián Larumbe
15f11b0417SAdrián LarumbeExample of the output showing the implemented key value pairs and entirety of
16f11b0417SAdrián Larumbethe currently possible format options:
17f11b0417SAdrián Larumbe
18f11b0417SAdrián Larumbe::
19f11b0417SAdrián Larumbe      pos:    0
20f11b0417SAdrián Larumbe      flags:  02400002
21f11b0417SAdrián Larumbe      mnt_id: 27
22f11b0417SAdrián Larumbe      ino:    531
23f11b0417SAdrián Larumbe      drm-driver:     panfrost
24f11b0417SAdrián Larumbe      drm-client-id:  14
25f11b0417SAdrián Larumbe      drm-engine-fragment:    1846584880 ns
26f11b0417SAdrián Larumbe      drm-cycles-fragment:    1424359409
27f11b0417SAdrián Larumbe      drm-maxfreq-fragment:   799999987 Hz
28f11b0417SAdrián Larumbe      drm-curfreq-fragment:   799999987 Hz
29f11b0417SAdrián Larumbe      drm-engine-vertex-tiler:        71932239 ns
30f11b0417SAdrián Larumbe      drm-cycles-vertex-tiler:        52617357
31f11b0417SAdrián Larumbe      drm-maxfreq-vertex-tiler:       799999987 Hz
32f11b0417SAdrián Larumbe      drm-curfreq-vertex-tiler:       799999987 Hz
33f11b0417SAdrián Larumbe      drm-total-memory:       290 MiB
34f11b0417SAdrián Larumbe      drm-shared-memory:      0 MiB
35f11b0417SAdrián Larumbe      drm-active-memory:      226 MiB
36f11b0417SAdrián Larumbe      drm-resident-memory:    36496 KiB
37f11b0417SAdrián Larumbe      drm-purgeable-memory:   128 KiB
38f11b0417SAdrián Larumbe
39f11b0417SAdrián LarumbePossible `drm-engine-` key names are: `fragment`, and  `vertex-tiler`.
40f11b0417SAdrián Larumbe`drm-curfreq-` values convey the current operating frequency for that engine.
41*b12f3ea7SAdrián Larumbe
42*b12f3ea7SAdrián LarumbeUsers must bear in mind that engine and cycle sampling are disabled by default,
43*b12f3ea7SAdrián Larumbebecause of power saving concerns. `fdinfo` users and benchmark applications which
44*b12f3ea7SAdrián Larumbequery the fdinfo file must make sure to toggle the job profiling status of the
45*b12f3ea7SAdrián Larumbedriver by writing into the appropriate sysfs node::
46*b12f3ea7SAdrián Larumbe
47*b12f3ea7SAdrián Larumbe    echo <N> > /sys/bus/platform/drivers/panfrost/[a-f0-9]*.gpu/profiling
48*b12f3ea7SAdrián Larumbe
49*b12f3ea7SAdrián LarumbeWhere `N` is either `0` or `1`, depending on the desired enablement status.
50