panthor.rst 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. .. SPDX-License-Identifier: GPL-2.0+
  2. =========================
  3. drm/Panthor CSF driver
  4. =========================
  5. .. _panthor-usage-stats:
  6. Panthor DRM client usage stats implementation
  7. ==============================================
  8. The drm/Panthor driver implements the DRM client usage stats specification as
  9. documented in :ref:`drm-client-usage-stats`.
  10. Example of the output showing the implemented key value pairs and entirety of
  11. the currently possible format options:
  12. ::
  13. pos: 0
  14. flags: 02400002
  15. mnt_id: 29
  16. ino: 491
  17. drm-driver: panthor
  18. drm-client-id: 10
  19. drm-engine-panthor: 111110952750 ns
  20. drm-cycles-panthor: 94439687187
  21. drm-maxfreq-panthor: 1000000000 Hz
  22. drm-curfreq-panthor: 1000000000 Hz
  23. panthor-resident-memory: 10396 KiB
  24. panthor-active-memory: 10396 KiB
  25. drm-total-memory: 16480 KiB
  26. drm-shared-memory: 0
  27. drm-active-memory: 16200 KiB
  28. drm-resident-memory: 16480 KiB
  29. drm-purgeable-memory: 0
  30. Possible `drm-engine-` key names are: `panthor`.
  31. `drm-curfreq-` values convey the current operating frequency for that engine.
  32. Users must bear in mind that engine and cycle sampling are disabled by default,
  33. because of power saving concerns. `fdinfo` users and benchmark applications which
  34. query the fdinfo file must make sure to toggle the job profiling status of the
  35. driver by writing into the appropriate sysfs node::
  36. echo <N> > /sys/bus/platform/drivers/panthor/[a-f0-9]*.gpu/profiling
  37. Where `N` is a bit mask where cycle and timestamp sampling are respectively
  38. enabled by the first and second bits.
  39. Possible `panthor-*-memory` keys are: `active` and `resident`.
  40. These values convey the sizes of the internal driver-owned shmem BO's that
  41. aren't exposed to user-space through a DRM handle, like queue ring buffers,
  42. sync object arrays and heap chunks. Because they are all allocated and pinned
  43. at creation time, only `panthor-resident-memory` is necessary to tell us their
  44. size. `panthor-active-memory` shows the size of kernel BO's associated with
  45. VM's and groups currently being scheduled for execution by the GPU.