mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Troy Mitchell" <troy.mitchell@linux.spacemit.com>
To: "Gyeyoung Baek" <gye976@gmail.com>,
	"Baihui Liang" <liangbaihui@linux.spacemit.com>
Cc: "Alessio Belle" <alessio.belle@imgtec.com>,
	"Luigi Santivetti" <luigi.santivetti@imgtec.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>, "Yixun Lan" <dlan@kernel.org>,
	"Troy Mitchell" <troy.mitchell@linux.spacemit.com>,
	"Paul Walmsley" <pjw@kernel.org>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Albert Ou" <aou@eecs.berkeley.edu>,
	"Alexandre Ghiti" <alex@ghiti.fr>,
	<imagination@lists.freedesktop.org>,
	<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
	<linux-riscv@lists.infradead.org>, <spacemit@lists.linux.dev>
Subject: Re: [PATCH v3] drm/imagination: re-check firmware idle state before runtime suspend
Date: Sun, 29 Nov 2026 13:40:33 +0000	[thread overview]
Message-ID: <DN7QK1JOUKNZ.3CL5H25O5N27L@linux.spacemit.com> (raw)
In-Reply-To: <CAKbEzntvh2jEzM01zta6G2jsZfqGn6ztjECb7ghe0-TPzyz6Fw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2259 bytes --]

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.

>
> 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/

-- 
Troy Mitchell

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 273 bytes --]

      reply	other threads:[~2026-11-29 13:42 UTC|newest]

Thread overview: 3+ 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 [this message]

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=DN7QK1JOUKNZ.3CL5H25O5N27L@linux.spacemit.com \
    --to=troy.mitchell@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=liangbaihui@linux.spacemit.com \
    --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=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®