From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sender6-op-o11.zoho.com (sender6-op-o11.zoho.com [165.173.180.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3BC5C24DCF6 for ; Fri, 28 Aug 2026 20:58:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=165.173.180.11 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787950695; cv=pass; b=EYxpykE1o5323lzFfFX+EF7/wVQewTlsySA4V4FClbcJPDTuAPPJmje7IazRKS+IkmwvYTBJNxMnxDX+DVQlGCOdbR5W5uiPOeB5hYFEFd42ZorqI4Tcx5n7a6+lsj7FxJSl9NdE/S6fBkq5JnXRmYnGROGNzmnFE6fjmJY33sI= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787950695; c=relaxed/simple; bh=yJga2t3AIElWD3nCpLIrVN4YFugp7AYxXlmzcydCMzc=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=n/3DCJSpvV2hR1a9EArMxKQ15s3Btk5t0V8h3cGS7L4RbaIy5wPMlcXmv3VW2reELUy0seCu46zANGiCMomr7yjHjUlRi6R48LZsnn88/TQwgxygiLKjS5/sRITdDguG4vXCRea/HYlSOQnXVujXe2+0EIkiqLibM/42hOsd7qc= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (1024-bit key) header.d=collabora.com header.i=adrian.larumbe@collabora.com header.b=fKiKUdjw; arc=pass smtp.client-ip=165.173.180.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=collabora.com header.i=adrian.larumbe@collabora.com header.b="fKiKUdjw" ARC-Seal: i=1; a=rsa-sha256; t=1787950646; cv=none; d=zohomail.com; s=zohoarc; b=ch/alWSppndJUvTjZTDwbasMuYb8zo738xQ5xsW6q6ZjyrBddLu7m81sEnBucWKoR8lXgxgxqJhmBKRq0SfZl1ON4q4kn0c2lZVNeLJZ5uT73VehbXoIiF5OdMraEZ5+U5djGQfdh/xzWHIaSKUNWIQn7STfTipRczDYjbUXrpM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1787950646; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=VrJsrLIm7maKTEeIIqnV/eQUZRGmYELFGrgHzMNhVU4=; b=ZL/bkzLhHfSAUsFdJuD0TtOB3WryQtNLdILoUpfNlWwmRwm7Jpim8Ydxle5LR3uALZnLYW7jEMSHYreRRG2s5OxczzFcgU91c1aS45A/W1i/mEOUMOD4X/kLfw3r/8q9DavpCiGPyoaigCN6od5ErY6RMz9Dl2SOjxgGii+Szzs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=adrian.larumbe@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1787950646; s=zohomail; d=collabora.com; i=adrian.larumbe@collabora.com; h=From:From:Subject:Subject:Date:Date:Message-Id:Message-Id:MIME-Version:Content-Type:Content-Transfer-Encoding:To:To:Cc:Cc:Reply-To; bh=VrJsrLIm7maKTEeIIqnV/eQUZRGmYELFGrgHzMNhVU4=; b=fKiKUdjwGmZqEZMFSbmTsV3Quli+LBeVysE0cQi+u5l36SIIkwtFC8eQpYOjFagr kmkEGw8FroB3fsr9ShicSmi8CPlHojnOgS/1+VCRHWyqowT1f6kDuqdE5F9su4U/nym TRLZwkYyqFj/o9fGLP4NffJCTlUiGB3QM0ggoPKU= Received: by mx.zohomail.com with SMTPS id 1787950643707888.8572252814798; Fri, 28 Aug 2026 13:57:23 -0700 (PDT) From: =?utf-8?q?Adri=C3=A1n_Larumbe?= Subject: [PATCH v7 00/17] Collection of fixes for Panfrost: Perfcnt, RPM, refactorings Date: Fri, 28 Aug 2026 21:56:40 +0100 Message-Id: <20260828-claude-fixes-v7-0-72a13b2c125d@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-B4-Tracking: v=1; b=H4sIAAAAAAAC/23Q3U7DMAwF4FeZck1Q4vw1u+I9pl24rsuCyoqar QJNfXfSIdRRenlkn8+SbyLzkDiL/e4mBh5TTv25hPC0E3TC8yvL1JQsQIFXDoykDq8NyzZ9cpY V1MqgNhYrEqXyMfB9UBqH40/O1/qN6TIb88Yp5Us/fN3vjXre+6X9X3rUUkntOQIj2mjjC/Vdh 3U/4DP172LmR1gAr+wKgAK4QL5uLGnv3BZgFiDAGjAzYAFbr7FuVLsF2EcgrgBbAKWjr1pgCgG 3ALcAldYrwBXAND4CRY4VwRbgH4B/T/QFCMWN2FoVOayBaZq+AQ7THD8DAgAA X-Change-ID: 20260523-claude-fixes-82b03a134a8c To: Boris Brezillon , Rob Herring , Steven Price , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Faith Ekstrand , "Marty E. Plummer" , Tomeu Vizoso , Eric Anholt , Alyssa Rosenzweig , Robin Murphy , Philipp Zabel Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Collabora Kernel Team , =?utf-8?q?Adri=C3=A1n_Larumbe?= , Neil Armstrong X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=6518; i=adrian.larumbe@collabora.com; h=from:subject:message-id; bh=yJga2t3AIElWD3nCpLIrVN4YFugp7AYxXlmzcydCMzc=; b=owEB7QES/pANAwAKAQ4mfkzuU0M9AcsmYgBqkfYsuQWvgoZ4fCg0khT/j3vfk2Wev1O/5oLJM 33DQ8Oy6M2JAbMEAAEKAB0WIQQyQDDowAUXXfk3B6QOJn5M7lNDPQUCapH2LAAKCRAOJn5M7lND PfovDACF2Oc62njNakHCoYEj0Mgr3/ktYtTguePFxxm5BjJizQFFXt8edcGmwHTFplBr98u6lnY 8E78jng5KF7qghjN5QgR1TtVZmZ1U9G6xYfSUFjMNPTGtHs4EQJ8KLq3rIDV5Zsnd4dBPo0qtF3 4cHGAGcN9OdXUvQEkWVojCaSz0fi3eId2rJkLwVInbc0DC04o/fWjPVJtdIx2wlq4E0K37ha3qh qxRTxYcOPyif5nFKnlSA6hZIOul0PIYPjFew/GK18+QBQ0w+QxakMKBqwXBabs/6DQPTU1CwFqj r+XxcMrhYSTxPb/UijwgwsKlp23311BJdLhO3CADMjFzeYXKKp5wwg2HPSdkX/z+AuDbfWPjQB6 in7Ly6N8hL/9rnTF7B6BiewKJqq+NEHDK8ediqhiC7FbluPLGQRy4CwW7i7yNOoiQV89KKY0Dvc pGrcCuvVti8aUEzQ7WTir5QFBFI/85DZgSOJPD0VgYCAvfoQyMZD7ybEFmXK0odjH7yf4= X-Developer-Key: i=adrian.larumbe@collabora.com; a=openpgp; fpr=324030E8C005175DF93707A40E267E4CEE53433D 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 --- Changes in v7: - Again fixed some minor issues reported by Sashiko. - Made sure the new debugfs reset knob works even when runtime PM isn't enabled. - Added new patch that handles job termination at driver teardown time. - Link to v6: https://patch.msgid.link/20260826-claude-fixes-v6-0-78119af409e7@collabora.com 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@collabora.com 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@collabora.com 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@collabora.com 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@collabora.com 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@collabora.com To: Boris Brezillon To: Rob Herring To: Steven Price To: Adrián Larumbe To: Maarten Lankhorst To: Maxime Ripard To: Thomas Zimmermann To: David Airlie To: Simona Vetter To: Faith Ekstrand To: "Marty E. Plummer" To: Tomeu Vizoso To: Eric Anholt To: Alyssa Rosenzweig To: Robin Murphy To: Philipp Zabel Cc: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org Cc: Neil Armstrong --- Adrián Larumbe (17): 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: Stop all jobs before commencing device teardown 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 | 272 +++++++++++++++-------- 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 | 179 ++++++++++++--- drivers/gpu/drm/panfrost/panfrost_job.h | 5 + drivers/gpu/drm/panfrost/panfrost_mmu.c | 12 +- drivers/gpu/drm/panfrost/panfrost_mmu.h | 2 + drivers/gpu/drm/panfrost/panfrost_perfcnt.c | 238 +++++++++++++------- drivers/gpu/drm/panfrost/panfrost_perfcnt.h | 1 + include/uapi/drm/panfrost_drm.h | 3 +- 16 files changed, 589 insertions(+), 443 deletions(-) --- base-commit: 8aee06aa4c72e9bdfda81ce720b51fe0fe0f307e change-id: 20260523-claude-fixes-82b03a134a8c Best regards, -- Adrián Larumbe