pps: Panfrost documentation
authorAntonio Caggiano <antonio.caggiano@collabora.com>
Thu, 6 May 2021 11:20:01 +0000 (13:20 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 13 Jul 2021 11:03:55 +0000 (11:03 +0000)
Add documentation for the Panfrost Perfetto datasource.

Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10215>

docs/perfetto.rst

index 947a492..588f739 100644 (file)
@@ -31,14 +31,8 @@ The exact supported features vary per driver:
    * - Driver
      - PPS Counters
      - Render Stages
-   * - Freedreno
-     - ``gpu.counters.msm``
-     - ``gpu.renderstages.msm``
-   * - Turnip
-     - ``gpu.counters.msm``
-     -
-   * - Intel
-     - ``gpu.counters.i915``
+   * - Panfrost
+     - gpu.counters.panfrost
      -
 
 Run
@@ -80,37 +74,30 @@ To capture a trace with perfetto you need to take the following steps:
 Driver Specifics
 ~~~~~~~~~~~~~~~~
 
-Below is driver specific information/instructions for the PPS
-provider.
-
-Freedreno / Turnip
-^^^^^^^^^^^^^^^^^^
+Below is driver specific information/instructions for the PPS producer.
 
-The Freedreno PPS driver needs root access to read system-wide
-performance counters, so you can simply run it with sudo:
-
-.. code-block:: console
+Panfrost
+^^^^^^^^
 
-   sudo ./build/src/tool/pps/pps-producer
+The Panfrost PPS driver uses unstable ioctls that behave correctly on
+kernel version `5.4.23+ <https://lwn.net/Articles/813601/>`__ and
+`5.5.7+ <https://lwn.net/Articles/813600/>`__.
 
-Intel
-^^^^^
+To run the producer, follow these two simple steps:
 
-The Intel PPS driver needs root access to read system-wide
-`RenderBasic <https://software.intel.com/content/www/us/en/develop/documentation/vtune-help/top/reference/gpu-metrics-reference.html>`__
-performance counters, so you can simply run it with sudo:
+1. Enable Panfrost unstable ioctls via kernel parameter:
 
-.. code-block:: console
+   .. code-block:: console
 
-   sudo ./build/src/tool/pps/pps-producer
+      modprobe panfrost unstable_ioctls=1
 
-Another option to enable access wide data without root permissions would be running the following:
+   Alternatively you could add ``panfrost.unstable_ioctls=1`` to your kernel command line, or ``echo 1 > /sys/module/panfrost/parameters/unstable_ioctls``.
 
-.. code-block:: console
+2. Run the producer:
 
-   sudo sysctl dev.i915.perf_stream_paranoid=0
+   .. code-block:: console
 
-Alternatively using the ``CAP_PERFMON`` permission on the binary should work too.
+      ./build/pps-producer
 
 Troubleshooting
 ---------------