Re: [PATCH v3] drm/imagination: re-check firmware idle state before runtime suspend
From: Gyeyoung Baek
Date: Sun Nov 29 2026 - 01:27:48 EST
Hi Baihui,
On Fri, Nov 27, 2026 at 12:41 PM Baihui Liang
<liangbaihui@xxxxxxxxxxxxxxxxxx> 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.
Two minor things:
- The Fixes tag seems to be missing (as sashiko suggested)
- 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.
With these addressed:
Tested-by: Gyeyoung Baek <gye976@xxxxxxxxx> # J722S
Reviewed-by: Gyeyoung Baek <gye976@xxxxxxxxx>
[1] https://lore.kernel.org/dri-devel/20261129-pvr-fw-idle-after-boot-v1-1-f56572cc8f4c@xxxxxxxxx/
--
Thanks,
Gyeyoung