[+cc Ulf Hansson, linux-pm]
Stefan, Florian, could you take a look at this patch when you get a
chance? It would be great to have this patch reviewed as it can go
independently through the linux-pm tree.
I'm sorry, I previously forgot to re-run --auto-to-cc, so the linux-pm
mailing list was missing from the recipients.
Best regards,
- Maíra
On 2/18/26 17:45, Maíra Canal wrote:
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.
Signed-off-by: Maíra Canal <[email protected]>
---
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;
}