xref: /linux/Documentation/gpu/panthor.rst (revision 4f9786035f9e519db41375818e1d0b5f20da2f10)
16a797bdfSAdrián Larumbe.. SPDX-License-Identifier: GPL-2.0+
26a797bdfSAdrián Larumbe
36a797bdfSAdrián Larumbe=========================
46a797bdfSAdrián Larumbe drm/Panthor CSF driver
56a797bdfSAdrián Larumbe=========================
66a797bdfSAdrián Larumbe
7904bc547SAdrián Larumbe.. _panthor-usage-stats:
86a797bdfSAdrián Larumbe
96a797bdfSAdrián LarumbePanthor DRM client usage stats implementation
106a797bdfSAdrián Larumbe==============================================
116a797bdfSAdrián Larumbe
126a797bdfSAdrián LarumbeThe drm/Panthor driver implements the DRM client usage stats specification as
136a797bdfSAdrián Larumbedocumented in :ref:`drm-client-usage-stats`.
146a797bdfSAdrián Larumbe
156a797bdfSAdrián LarumbeExample of the output showing the implemented key value pairs and entirety of
166a797bdfSAdrián Larumbethe currently possible format options:
176a797bdfSAdrián Larumbe
186a797bdfSAdrián Larumbe::
196a797bdfSAdrián Larumbe     pos:    0
206a797bdfSAdrián Larumbe     flags:  02400002
216a797bdfSAdrián Larumbe     mnt_id: 29
226a797bdfSAdrián Larumbe     ino:    491
236a797bdfSAdrián Larumbe     drm-driver:     panthor
246a797bdfSAdrián Larumbe     drm-client-id:  10
256a797bdfSAdrián Larumbe     drm-engine-panthor:     111110952750 ns
266a797bdfSAdrián Larumbe     drm-cycles-panthor:     94439687187
276a797bdfSAdrián Larumbe     drm-maxfreq-panthor:    1000000000 Hz
286a797bdfSAdrián Larumbe     drm-curfreq-panthor:    1000000000 Hz
29*f780ef56SAdrián Larumbe     panthor-resident-memory:        10396 KiB
30*f780ef56SAdrián Larumbe     panthor-active-memory:  10396 KiB
316a797bdfSAdrián Larumbe     drm-total-memory:       16480 KiB
326a797bdfSAdrián Larumbe     drm-shared-memory:      0
336a797bdfSAdrián Larumbe     drm-active-memory:      16200 KiB
346a797bdfSAdrián Larumbe     drm-resident-memory:    16480 KiB
356a797bdfSAdrián Larumbe     drm-purgeable-memory:   0
366a797bdfSAdrián Larumbe
376a797bdfSAdrián LarumbePossible `drm-engine-` key names are: `panthor`.
386a797bdfSAdrián Larumbe`drm-curfreq-` values convey the current operating frequency for that engine.
396a797bdfSAdrián Larumbe
406a797bdfSAdrián LarumbeUsers must bear in mind that engine and cycle sampling are disabled by default,
416a797bdfSAdrián Larumbebecause of power saving concerns. `fdinfo` users and benchmark applications which
426a797bdfSAdrián Larumbequery the fdinfo file must make sure to toggle the job profiling status of the
436a797bdfSAdrián Larumbedriver by writing into the appropriate sysfs node::
446a797bdfSAdrián Larumbe
456a797bdfSAdrián Larumbe    echo <N> > /sys/bus/platform/drivers/panthor/[a-f0-9]*.gpu/profiling
466a797bdfSAdrián Larumbe
476a797bdfSAdrián LarumbeWhere `N` is a bit mask where cycle and timestamp sampling are respectively
486a797bdfSAdrián Larumbeenabled by the first and second bits.
49*f780ef56SAdrián Larumbe
50*f780ef56SAdrián LarumbePossible `panthor-*-memory` keys are: `active` and `resident`.
51*f780ef56SAdrián LarumbeThese values convey the sizes of the internal driver-owned shmem BO's that
52*f780ef56SAdrián Larumbearen't exposed to user-space through a DRM handle, like queue ring buffers,
53*f780ef56SAdrián Larumbesync object arrays and heap chunks. Because they are all allocated and pinned
54*f780ef56SAdrián Larumbeat creation time, only `panthor-resident-memory` is necessary to tell us their
55*f780ef56SAdrián Larumbesize. `panthor-active-memory` shows the size of kernel BO's associated with
56*f780ef56SAdrián LarumbeVM's and groups currently being scheduled for execution by the GPU.
57