[PATCH v6 00/16] Collection of fixes for Panfrost: Perfcnt, RPM, refactorings
From: Adrián Larumbe
Date: Wed Aug 26 2026 - 17:19:36 EST
This patch series began as an assortment of small fixes for some issues
uncovered by Claude. Over time, it has evolved to include many other
fixes for further problems revealed by Sashiko in successive revisions,
and also refactorings and improvements suggested by maintainer
discussions.
A subset of patches submitted in previous revisions was already merged
after they had been reviewed, to avoid this series growing to unmanageable
extents.
Signed-off-by: Adrián Larumbe <adrian.larumbe@xxxxxxxxxxxxx>
---
Changes in v6:
- Grafted trivial already-reviwed patches from previous revisions into
their own series so that they could be merged into drm-misc-next.
- Added commits with multiple refactorings, code rearrangements and simplifications.
- Addressed all issues brought up by reviwers and Sashiko in the previous revision.
- Link to v5: https://patch.msgid.link/20260811-claude-fixes-v5-0-3d692c9e98c2@xxxxxxxxxxxxx
Changes in v5:
- Addressed more issues uncovered by Sashiko.
- Discarded two patches to avoid dealing with too many pre-existing issues at once.
- Biggest change is the re-arrangement of the start sequence, made to look like Panthor.
- Link to v4: https://patch.msgid.link/20260729-claude-fixes-v4-0-01968f2ec77a@xxxxxxxxxxxxx
Changes in v4:
- Fixed errors and issues uncovered by Sashiko in the previous revision.
- Changed the way RPM checks whether the device is initialised when resuming.
- Simplified perfcnt treatment of potential resets.
- Link to v3: https://patch.msgid.link/20260724-claude-fixes-v3-0-542af61abd0f@xxxxxxxxxxxxx
Changes in v3:
- Applied some minor suggestions for the first couple of patches in the series.
- Moved shrinker initialisation into gem initialisation.
- Fixed RPM bugs by moving all clock and power initialisation into RPM resume.
- Added patch for reset sequence fixes and also a userspace knob to trigger it.
- Reworked perfcnt fix by having the reset sequence restore its initial state.
- Link to v2: https://patch.msgid.link/20260604-claude-fixes-v2-0-57c6bd4c1655@xxxxxxxxxxxxx
Changes in v2:
- Fixed race conditions introduced by the previous revision, in the RPM and
HWPerf commits specifically. These can be consulted at [1]
- Don't attempt to suspend the device unconditionally at the end of
probe(), and do it through autosuspend instead.
- Broke the RPM patch into one that fixes PM refcnt proper and another one
for MMU enablement at device init time.
- Moved perfcnt GPU disable helper into its own commmit. Same for
transplating shrinker initialisation and unplug.
- Added 'Fixes' and 'Reported-by' tags to all the relevant commits
- [1] https://sashiko.dev/#/patchset/20260526-claude-fixes-v1-0-16e92eaa4949%40collabora.com
- Link to v1: https://patch.msgid.link/20260526-claude-fixes-v1-0-16e92eaa4949@xxxxxxxxxxxxx
To: Boris Brezillon <boris.brezillon@xxxxxxxxxxxxx>
To: Rob Herring <robh@xxxxxxxxxx>
To: Steven Price <steven.price@xxxxxxx>
To: Adrián Larumbe <adrian.larumbe@xxxxxxxxxxxxx>
To: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>
To: Maxime Ripard <mripard@xxxxxxxxxx>
To: Thomas Zimmermann <tzimmermann@xxxxxxx>
To: David Airlie <airlied@xxxxxxxxx>
To: Simona Vetter <simona@xxxxxxxx>
To: Faith Ekstrand <faith.ekstrand@xxxxxxxxxxxxx>
To: "Marty E. Plummer" <hanetzer@xxxxxxxxxxxxx>
To: Tomeu Vizoso <tomeu@xxxxxxxxxxxxxxx>
To: Eric Anholt <eric@xxxxxxxxxx>
To: Alyssa Rosenzweig <alyssa.rosenzweig@xxxxxxxxxxxxx>
To: Robin Murphy <robin.murphy@xxxxxxx>
To: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>
Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
Cc: Neil Armstrong <neil.armstrong@xxxxxxxxxx>
---
Adrián Larumbe (16):
drm/panfrost: Move shrinker initialization and unplug one level down
drm/panfrost: Move all DRM device initialisation into device_init()
drm/panfrost: Move lock and modparam initialisations into their subsystems
drm/panfrost: Move debugfs initialisation to relevant subsystems
drm/panfrost: Skip NULL checks for clock enable/disabling
drm/panfrost: Consolidate device clock management and reset
drm/panfrost: Split subsystem init/reset from interrupt enablement
drm/panfrost: Fix PM refcnt and autosuspend issues at device probe/remove
drm/panfrost: Add warning messages to fatal error conditions
drm/panfrost: Add debugfs knob for manually triggering a GPU reset
drm/panfrost: Move perfcnt GPU disable sequence into a helper
drm/panfrost: Skip cache flush/invalidate when enabling perfcnt
drm/panfrost: Avoid cache flush after perfcnt sample in fully coherent systems
drm/panfrost: Introduce a reset lock
drm/panfrost: Fix races between perfcnt and reset sequence
drm/panfrost: Bump driver minor to reflect new DUMP IOCTL req field
drivers/gpu/drm/panfrost/panfrost_device.c | 274 +++++++++++++++--------
drivers/gpu/drm/panfrost/panfrost_device.h | 8 +-
drivers/gpu/drm/panfrost/panfrost_drv.c | 198 +---------------
drivers/gpu/drm/panfrost/panfrost_drv.h | 9 -
drivers/gpu/drm/panfrost/panfrost_gem.c | 63 ++++--
drivers/gpu/drm/panfrost/panfrost_gem.h | 10 +-
drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c | 9 +-
drivers/gpu/drm/panfrost/panfrost_gpu.c | 21 +-
drivers/gpu/drm/panfrost/panfrost_gpu.h | 2 +
drivers/gpu/drm/panfrost/panfrost_job.c | 108 ++++++++-
drivers/gpu/drm/panfrost/panfrost_job.h | 4 +
drivers/gpu/drm/panfrost/panfrost_mmu.c | 12 +-
drivers/gpu/drm/panfrost/panfrost_mmu.h | 2 +
drivers/gpu/drm/panfrost/panfrost_perfcnt.c | 226 ++++++++++++-------
drivers/gpu/drm/panfrost/panfrost_perfcnt.h | 1 +
include/uapi/drm/panfrost_drm.h | 3 +-
16 files changed, 534 insertions(+), 416 deletions(-)
---
base-commit: 8aee06aa4c72e9bdfda81ce720b51fe0fe0f307e
change-id: 20260523-claude-fixes-82b03a134a8c
Best regards,
--
Adrián Larumbe <adrian.larumbe@xxxxxxxxxxxxx>