[PATCH v6 3/6] pmdomain: bcm: bcm2835-power: Increase ASB control timeout
Stefan Wahren
wahrenst at gmx.net
Mon Mar 2 14:43:56 PST 2026
Hi Maíra,
Am 18.02.26 um 21:45 schrieb Maíra Canal:
> The bcm2835_asb_control() function uses a tight polling loop to wait
> for the ASB bridge to acknowledge a request. During intensive workloads,
> this handshake intermittently fails for V3D's master ASB on BCM2711,
> resulting in "Failed to disable ASB master for v3d" errors during
> runtime PM suspend. As a consequence, the failed power-off leaves V3D in
> a broken state, leading to bus faults or system hangs on later accesses.
>
> As the timeout is insufficient in some scenarios, increase the polling
> timeout from 1us to 5us, which is still negligible in the context of a
> power domain transition. Also, move the start timestamp to after the
> MMIO write, as the write latency is counted against the timeout,
> reducing the effective wait time for the hardware to respond.
so this bug has been discovered by this series and doesn't need to
backported?
I remember complete system freezes during suspend to idle causes by V3D
on Raspberry CM4 [1]. But I never had the time to investigate further.
Regardless, this patch is
Reviewed-by: Stefan Wahren <wahrenst at gmx.net>
Thanks
[1] -
https://github.com/lategoodbye/linux-dev/commit/6af3f79da5b5a41b37aefa6abe3d368c9ef09805
>
> Signed-off-by: Maíra Canal <mcanal at igalia.com>
> ---
> drivers/pmdomain/bcm/bcm2835-power.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/pmdomain/bcm/bcm2835-power.c b/drivers/pmdomain/bcm/bcm2835-power.c
> index 1d29addfe036348e82293693b4059e504bb25575..7b9eea10a24e26835deeca84c60ccb616b99a508 100644
> --- a/drivers/pmdomain/bcm/bcm2835-power.c
> +++ b/drivers/pmdomain/bcm/bcm2835-power.c
> @@ -166,8 +166,6 @@ static int bcm2835_asb_control(struct bcm2835_power *power, u32 reg, bool enable
> break;
> }
>
> - start = ktime_get_ns();
> -
> /* Enable the module's async AXI bridges. */
> if (enable) {
> val = readl(base + reg) & ~ASB_REQ_STOP;
> @@ -176,9 +174,10 @@ static int bcm2835_asb_control(struct bcm2835_power *power, u32 reg, bool enable
> }
> writel(PM_PASSWORD | val, base + reg);
>
> + start = ktime_get_ns();
> while (!!(readl(base + reg) & ASB_ACK) == enable) {
> cpu_relax();
> - if (ktime_get_ns() - start >= 1000)
> + if (ktime_get_ns() - start >= 5000)
> return -ETIMEDOUT;
> }
>
>
More information about the linux-arm-kernel
mailing list