From: sashiko-bot@kernel.org
To: "Ryan Brue" <ryanbrue.dev@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/imagination: Don't wait for a running META to idle on a hard reset
Date: Wed, 25 Nov 2026 23:35:09 +0000 [thread overview]
Message-ID: <sashiko-outbox-234407@kernel.org> (raw)
In-Reply-To: <20261125-rbrue-suez-pvr-reset-recovery-v1-2-2cea8b163e7e@gmail.com>
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] drm/imagination: pvr_fw_stop() called with hard_reset=false
on boot failure
- [Medium] drm/imagination: unnecessary META slave port read on hard
reset
--
commit 1ab35810cce4163d613799da01f5a15168d56036
Author: Ryan Brue <ryanbrue.dev@gmail.com>
drm/imagination: Don't wait for a running META to idle on a hard reset
This patch adds a hard_reset parameter to pvr_fw_stop() and the
must_wait_fw_idle() callback so META firmware stops skip waiting for the
Garten wrapper to report idle when the firmware was not asked to idle
first.
> diff --git a/drivers/gpu/drm/imagination/pvr_fw.c b/drivers/gpu/drm/imagination/pvr_fw.c
> index d620141b5df03..d75fa3e4c5759 100644
> --- a/drivers/gpu/drm/imagination/pvr_fw.c
> +++ b/drivers/gpu/drm/imagination/pvr_fw.c
> @@ -976,7 +976,7 @@ pvr_fw_init(struct pvr_device *pvr_dev)
> return 0;
>
> err_fw_stop:
> - pvr_fw_stop(pvr_dev);
> + pvr_fw_stop(pvr_dev, false);
>
> err_destroy_structures:
> pvr_fw_destroy_structures(pvr_dev);
[Severity: Medium]
Should pvr_fw_stop() be called with hard_reset set to true here and in
pvr_power_fw_enable() when pvr_wait_for_fw_boot() fails?
Neither error path requests the firmware to idle before calling
pvr_fw_stop(). If META is running or stuck during early boot, the Garten
wrapper stays busy, causing pvr_fw_stop() to time out on
ROGUE_CR_SIDEKICK_IDLE_GARTEN_EN and return before asserting
ROGUE_CR_SOFT_RESET. pvr_fw_init() ignores that return value and tears
down the firmware memory mappings and kernel_vm_ctx while META is still out
of soft reset.
[ ... ]
> diff --git a/drivers/gpu/drm/imagination/pvr_fw_meta.c b/drivers/gpu/drm/imagination/pvr_fw_meta.c
> index 41f5e9ddc7f0e..19baea23c4340 100644
> --- a/drivers/gpu/drm/imagination/pvr_fw_meta.c
> +++ b/drivers/gpu/drm/imagination/pvr_fw_meta.c
> @@ -562,7 +562,7 @@ pvr_meta_irq_clear(struct pvr_device *pvr_dev)
> }
>
> static int
> -pvr_meta_must_wait_fw_idle(struct pvr_device *pvr_dev, bool *wait)
> +pvr_meta_must_wait_fw_idle(struct pvr_device *pvr_dev, bool hard_reset, bool *wait)
> {
> u32 reg_value;
> int err;
> @@ -574,8 +574,10 @@ pvr_meta_must_wait_fw_idle(struct pvr_device *pvr_dev, bool *wait)
> /*
> * Wait for Sidekick/Jones to signal IDLE including the Garten
> * Wrapper if there is no debugger attached (TxVECINT_BHALT = 0x0).
> + * A META that was not asked to idle (hard reset) keeps the Garten
> + * Wrapper busy; the soft reset that follows stops it.
> */
> - *wait = !reg_value;
> + *wait = !reg_value && !hard_reset;
>
> return 0;
> }
[Severity: Medium]
Can pvr_meta_must_wait_fw_idle() skip the pvr_meta_cr_read32() call when
hard_reset is true?
When hard_reset is true, *wait is unconditionally false, so reg_value is
unused. Performing the slave-port read anyway polls
ROGUE_CR_META_SP_MSLVCTRL1 for READY_EN and GBLPORT_IDLE_EN; if a hung META
processor leaves the slave or global port stalled, pvr_meta_cr_read32()
times out and aborts the hard reset before ROGUE_CR_SOFT_RESET is asserted,
marking the device lost.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261125-rbrue-suez-pvr-reset-recovery-v1-0-2cea8b163e7e@gmail.com?part=2
prev parent reply other threads:[~2026-11-25 23:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 23:26 [PATCH 0/2] drm/imagination: Hard reset fixes for META firmware cores Ryan Brue
2026-11-25 23:26 ` [PATCH 1/2] drm/imagination: Report firmware page faults Ryan Brue
2026-11-25 23:26 ` [PATCH 2/2] drm/imagination: Don't wait for a running META to idle on a hard reset Ryan Brue
2026-11-25 23:35 ` sashiko-bot [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=sashiko-outbox-234407@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=ryanbrue.dev@gmail.com \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.