[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251210-panthor-tracepoints-v2-0-ace2e29bad0f@collabora.com>
Date: Wed, 10 Dec 2025 15:30:36 +0100
From: Nicolas Frattaroli <nicolas.frattaroli@...labora.com>
To: Boris Brezillon <boris.brezillon@...labora.com>,
Steven Price <steven.price@....com>, Liviu Dudau <liviu.dudau@....com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
Chia-I Wu <olvaffe@...il.com>, Karunika Choo <karunika.choo@....com>
Cc: kernel@...labora.com, linux-kernel@...r.kernel.org,
dri-devel@...ts.freedesktop.org,
Nicolas Frattaroli <nicolas.frattaroli@...labora.com>
Subject: [PATCH v2 0/4] Add a few tracepoints to panthor
This series adds two tracepoints to panthor.
The first tracepoint allows for inspecting the power status of the
hardware subdivisions, e.g. how many shader cores are powered on. This
is done by reading four hardware registers when a certain IRQ fires.
The second tracepoint instruments panthor's job IRQ handler. This is
more useful than the generic interrupt tracing functionality, as the
tracepoint has the events bit mask included, which indicates which
command stream group interfaces triggered the interrupt.
To test the tracepoints, the following can be used:
:~# echo 1 > /sys/kernel/tracing/events/panthor/gpu_power_status/enable
:~# echo 1 > /sys/kernel/tracing/events/panthor/gpu_job_irq/enable
:~# echo 1 > /sys/kernel/tracing/tracing_on
:~# cat /sys/kernel/tracing/trace_pipe
Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@...labora.com>
---
Changes in v2:
- Only enable the GPU_IRQ_POWER_CHANGED_* IRQ mask bits when the
tracepoint is enabled. Necessitates the new irq helper patch.
- Only enable the GPU_IRQ_POWER_CHANGED_* IRQ mask bits if the hardware
architecture is <= v13, as v14 changes things.
- Use _READY instead of _PWRACTIVE registers, and rename the tracepoint
accordingly.
- Also read the status of the ray tracing unit's power. This is a global
flag for all shader cores, it seems. Necessitates the new register
definition patch.
- Move the POWER_CHANGED_* check to earlier in the interrupt handler.
- Also listen to POWER_CHANGED, not just POWER_CHANGED_ALL, as this
provides useful information with the _READY registers.
- Print the device name in both tracepoints, to disambiguate things on
systems with multiple Mali GPUs.
- Document the gpu_power_status tracepoint, so the meaning of the fields
is made clear.
- Link to v1: https://lore.kernel.org/r/20251203-panthor-tracepoints-v1-0-871c8917e084@collabora.com
---
Nicolas Frattaroli (4):
drm/panthor: Add panthor_*_irq_mask_set helper
drm/panthor: Add SHADER_PWRFEATURES register definition
drm/panthor: Add tracepoint for hardware utilisation changes
drm/panthor: Add gpu_job_irq tracepoint
drivers/gpu/drm/panthor/panthor_device.h | 7 +++
drivers/gpu/drm/panthor/panthor_fw.c | 13 +++++
drivers/gpu/drm/panthor/panthor_gpu.c | 96 +++++++++++++++++++++++++++++++-
drivers/gpu/drm/panthor/panthor_regs.h | 2 +
drivers/gpu/drm/panthor/panthor_trace.h | 90 ++++++++++++++++++++++++++++++
5 files changed, 206 insertions(+), 2 deletions(-)
---
base-commit: 8362fcabaa24e5d632c7d0fa35f74103e74e8850
change-id: 20251203-panthor-tracepoints-488af09d46e7
Best regards,
--
Nicolas Frattaroli <nicolas.frattaroli@...labora.com>
Powered by blists - more mailing lists