From: Johan Hovold <johan@kernel.org>
To: Norman Herms <dockseed@proton.me>
Cc: "lgs201920130244@gmail.com" <lgs201920130244@gmail.com>,
"l.stach@pengutronix.de" <l.stach@pengutronix.de>,
"linux+etnaviv@armlinux.org.uk" <linux+etnaviv@armlinux.org.uk>,
"christian.gmeiner@gmail.com" <christian.gmeiner@gmail.com>,
"airlied@gmail.com" <airlied@gmail.com>,
"simona@ffwll.ch" <simona@ffwll.ch>,
"etnaviv@lists.freedesktop.org" <etnaviv@lists.freedesktop.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/etnaviv: fix runtime PM cleanup during teardown
Date: Tue, 24 Nov 2026 08:29:10 +0100 [thread overview]
Message-ID: <awU8xkTrwuJyKJbA@hovoldconsulting.com> (raw)
In-Reply-To: <bKXiGbjWVw6RVBUFNVHEum6OPpzcYgrpzQTNKG2mnqCes5jzQJiN7BGGbNyJBjsS6UVFLV7wz3dFm7R8vaJoplZn1FI8WjOgk7Vg3WSuwBI=@proton.me>
On Mon, Nov 23, 2026 at 05:10:39PM +0000, Norman Herms wrote:
> In reply to
> https://lore.kernel.org/all/aoQZ3zhnyRuiHJlF@hovoldconsulting.com/
> For the remove hunk this is more than a cleanup: without it the GPU
> clocks stay enabled after unbind.
>
> __device_release_driver() resumes the device and calls
> pm_runtime_put_sync() before ->remove(). With the 200 ms autosuspend
> set up in etnaviv_gpu_platform_probe(), that put only arms the timer,
> and pm_runtime_disable() in etnaviv_gpu_platform_remove() cancels it,
> so etnaviv_gpu_rpm_suspend() never runs.
>
> To reproduce, read clk_enable_count of the "reg", "bus" and "core"
> clocks in debugfs after each "rmmod etnaviv; modprobe etnaviv" round.
> On an Allwinner A733 (NPU on etnaviv with local patches) they went
> 1, 2, 3 over three rounds; with this patch they stayed at 0. I have
> not looked at the probe hunk.
I don't doubt that there may be bugs in this driver but the patch in
question is still wrong as any reference held by user space is not an
issue.
The driver should make sure the hardware is in a defined state at remove
by explicitly resuming the device before disabling the clocks (many
drivers get it wrong).
Johan
next prev parent reply other threads:[~2026-11-24 7:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 17:10 Norman Herms
2026-11-24 7:29 ` Johan Hovold [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-08-08 12:14 Guangshuo Li
2026-08-18 8:37 ` Johan Hovold
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=awU8xkTrwuJyKJbA@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=airlied@gmail.com \
--cc=christian.gmeiner@gmail.com \
--cc=dockseed@proton.me \
--cc=dri-devel@lists.freedesktop.org \
--cc=etnaviv@lists.freedesktop.org \
--cc=l.stach@pengutronix.de \
--cc=lgs201920130244@gmail.com \
--cc=linux+etnaviv@armlinux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=simona@ffwll.ch \
/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
all inboxes | Powered by JetHome®