From: "Baihui Liang" <liangbaihui@linux.spacemit.com>
To: "Troy Mitchell" <troy.mitchell@linux.spacemit.com>,
"gye976" <gye976@gmail.com>
Cc: "alessio.belle" <alessio.belle@imgtec.com>,
"luigi.santivetti" <luigi.santivetti@imgtec.com>,
"maarten.lankhorst" <maarten.lankhorst@linux.intel.com>,
"mripard" <mripard@kernel.org>,
"tzimmermann" <tzimmermann@suse.de>,
"airlied" <airlied@gmail.com>, "simona" <simona@ffwll.ch>,
"dlan" <dlan@kernel.org>, "pjw" <pjw@kernel.org>,
"palmer" <palmer@dabbelt.com>, "aou" <aou@eecs.berkeley.edu>,
"alex" <alex@ghiti.fr>,
"imagination" <imagination@lists.freedesktop.org>,
"dri-devel" <dri-devel@lists.freedesktop.org>,
"linux-kernel" <linux-kernel@vger.kernel.org>,
"linux-riscv" <linux-riscv@lists.infradead.org>,
"spacemit" <spacemit@lists.linux.dev>
Subject: Re: [PATCH v3] drm/imagination: re-check firmware idle state before runtime suspend
Date: Tue, 01 Dec 2026 09:46:12 +0800 [thread overview]
Message-ID: <DN90M6YJMUWY.3K38LQ5LDBIPZ@linux.spacemit.com> (raw)
In-Reply-To: <DN7QK1JOUKNZ.3CL5H25O5N27L@linux.spacemit.com>
Hi Gyeyong and Troy,
On Sun Nov 29, 2026 at 9:40 PM CST, Troy Mitchell wrote:
> Hi Gyeyoung and Baihui,
>
> On Sun Nov 29, 2026 at 6:27 AM GMT, Gyeyoung Baek wrote:
> > Hi Baihui,
> >
> > On Fri, Nov 27, 2026 at 12:41 PM Baihui Liang
> > <liangbaihui@linux.spacemit.com> wrote:
> >>
> >> pvr_power_device_idle() rejects runtime suspend while the firmware
> >> hasn't reached ROGUE_FWIF_POW_IDLE. The PM core doesn't reschedule
> >> idle notification after rejection, so no further pm_runtime_put()
> >> arrives on an idle GPU and the device stays powered indefinitely.
> >>
> >> Move the idle check into pvr_power_device_suspend() and return -EBUSY
> >> after pm_runtime_mark_last_busy() so the PM core reschedules the
> >> autosuspend timer and retries until the firmware is idle.
> >>
> >> Factor the power-off sequence into a helper and call it from the
> >> removal path with runtime PM disabled, bypassing the idle check.
> >> Power off before destroying the job and free-list ID arrays, since
> >> the IRQ handler can still process firmware commands during shutdown
> >> and look up free-list IDs.
> >>
> >
> > This looks like the right fix to me. However, testing it on J722S
> > exposed a separate, pre-existing issue:
> > - The firmware doesn't seem to report ROGUE_FWIF_POW_IDLE after boot
> > until it has processed a command.
> > - Without this patch the GPU just stays active after probe; with it,
> > runtime suspend is retried indefinitely.
> >
> > I've sent a fix for that separately [1]. I think that one should be
> > applied before this patch. With both, it works fine on J722S.
>
> Thanks for testing on J722S. I don't think this patch depends on [1],
> though. The post-boot idle report is a separate, pre-existing issue.
> So I'd leave the order to the maintainers, and Baihui doesn't need
> to mention the dependency.
Agreed with Troy and thanks for testing on J722S and catching that
separate issue. I'll keep this patch standalone and leave the merge
order to the maintainers.
> >
> > Two minor things:
> > - The Fixes tag seems to be missing (as sashiko suggested)
>
> Agreed.
>
> > - The reproduction steps from v1 (repeated vulkaninfo on K3) are no
> > longer in the commit message. It would be good to add them back, so
> > it's clear when the issue occurs.
>
> Yes, below the --- line.
>
> With these addressed:
>
> Reviewed-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
>
> > [1] https://lore.kernel.org/dri-devel/20261129-pvr-fw-idle-after-boot-v1-1-f56572cc8f4c@gmail.com/
Thanks both for the testing and review!
I'll add the Fixes tag and put the K3 reproduction steps back below
the '---' line in v4.
Since the maintainer also requested some code changes on this patch,
I'll drop the Tested-by and Reviewed-by tags for v4 and CC you both
once it's ready.
Best regards,
Baihui
next prev parent reply other threads:[~2026-12-01 1:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 3:39 Baihui Liang
2026-11-29 6:27 ` Gyeyoung Baek
2026-11-29 13:40 ` Troy Mitchell
2026-12-01 1:46 ` Baihui Liang [this message]
2026-11-30 8:20 ` Brajesh Gupta
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=DN90M6YJMUWY.3K38LQ5LDBIPZ@linux.spacemit.com \
--to=liangbaihui@linux.spacemit.com \
--cc=airlied@gmail.com \
--cc=alessio.belle@imgtec.com \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=dlan@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gye976@gmail.com \
--cc=imagination@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=luigi.santivetti@imgtec.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=simona@ffwll.ch \
--cc=spacemit@lists.linux.dev \
--cc=troy.mitchell@linux.spacemit.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
all inboxes | Powered by JetHome®