From: Adrián Larumbe <adrian.larumbe@collabora.com>
To: Boris Brezillon <boris.brezillon@collabora.com>,
Rob Herring <robh@kernel.org>,
Steven Price <steven.price@arm.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Collabora Kernel Team <kernel@collabora.com>,
Adrián Larumbe <adrian.larumbe@collabora.com>
Subject: [PATCH 4/4] drm/panfrost: Fix RPM so device suspends when no jobs are in flight
Date: Tue, 26 May 2026 00:03:38 +0100 [thread overview]
Message-ID: <20260526-claude-fixes-v1-4-16e92eaa4949@collabora.com> (raw)
In-Reply-To: <20260526-claude-fixes-v1-0-16e92eaa4949@collabora.com>
Right now, because of an apparent bug in the management of runtime PM,
the device remains powered on at all times. This was causing three
different issues:
- Because MMU interrupts are only enabled when the device resets, the very
first job targeting the tiler heap would always time out, as a device reset
is only performed during a runtime resume operation.
- Devfreq OPP transition notifications would be printed all the time, even
when the device is meant to be idle, which polute the kernel ring buffer.
- PM refcnt would eventually underflow.
Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
---
drivers/gpu/drm/panfrost/panfrost_drv.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c
index cb8e5015847f..68b831add0bb 100644
--- a/drivers/gpu/drm/panfrost/panfrost_drv.c
+++ b/drivers/gpu/drm/panfrost/panfrost_drv.c
@@ -986,9 +986,8 @@ static int panfrost_probe(struct platform_device *pdev)
goto err_out0;
}
- pm_runtime_set_active(pfdev->base.dev);
- pm_runtime_mark_last_busy(pfdev->base.dev);
pm_runtime_enable(pfdev->base.dev);
+ pm_runtime_resume_and_get(pfdev->base.dev);
pm_runtime_set_autosuspend_delay(pfdev->base.dev, 50); /* ~3 frames */
pm_runtime_use_autosuspend(pfdev->base.dev);
@@ -1004,6 +1003,8 @@ static int panfrost_probe(struct platform_device *pdev)
if (err)
goto err_out2;
+ pm_runtime_put_sync_suspend(pfdev->base.dev);
+
return 0;
err_out2:
@@ -1024,8 +1025,9 @@ static void panfrost_remove(struct platform_device *pdev)
panfrost_gem_shrinker_cleanup(&pfdev->base);
pm_runtime_get_sync(pfdev->base.dev);
- pm_runtime_disable(pfdev->base.dev);
panfrost_device_fini(pfdev);
+ pm_runtime_put_sync(pfdev->base.dev);
+ pm_runtime_disable(pfdev->base.dev);
pm_runtime_set_suspended(pfdev->base.dev);
}
--
2.53.0
next prev parent reply other threads:[~2026-05-25 23:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-25 23:03 [PATCH 0/4] RPM, percnt and other minor fixes for Panfrost Adrián Larumbe
2026-05-25 23:03 ` [PATCH 1/4] drm/panfrost: Check another bo field for cache option query Adrián Larumbe
2026-05-27 5:22 ` Claude review: " Claude Code Review Bot
2026-05-25 23:03 ` [PATCH 2/4] drm/panfrost: Make reset sequence deal with an active HWPerf session Adrián Larumbe
2026-05-27 5:22 ` Claude review: " Claude Code Review Bot
2026-05-25 23:03 ` [PATCH 3/4] drm/panfrost: Prevent division by 0 Adrián Larumbe
2026-05-27 5:22 ` Claude review: " Claude Code Review Bot
2026-05-25 23:03 ` Adrián Larumbe [this message]
2026-05-27 5:22 ` Claude review: drm/panfrost: Fix RPM so device suspends when no jobs are in flight Claude Code Review Bot
2026-05-27 5:22 ` Claude review: RPM, percnt and other minor fixes for Panfrost Claude Code Review Bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260526-claude-fixes-v1-4-16e92eaa4949@collabora.com \
--to=adrian.larumbe@collabora.com \
--cc=airlied@gmail.com \
--cc=boris.brezillon@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=robh@kernel.org \
--cc=simona@ffwll.ch \
--cc=steven.price@arm.com \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox