[PATCH v7 2/5] pmdomain: bcm: bcm2835-power: Increase ASB control timeout

Maíra Canal mcanal at igalia.com
Tue Mar 17 07:44:25 PDT 2026


Hi Stefan,

On 15/03/26 20:07, Stefan Wahren wrote:
> Hi Maíra,
> 
> Am 12.03.26 um 22:34 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.
>>
>> Cc: stable at vger.kernel.org
> I think, a Fixes tag would be helpful here. Also this fix should be the 
> first patch of the series or separate.

I'll send it separately with the Fixes tag. Thanks!

>> Reviewed-by: Stefan Wahren <wahrenst at gmx.net>
>> Signed-off-by: Maíra Canal <mcanal at igalia.com>
>>
>> ---
>> To: Ulf Hansson <ulf.hansson at linaro.org>
>> To: Ray Jui <rjui at broadcom.com>
>> To: Scott Branden <sbranden at broadcom.com>
>> Cc: linux-pm at vger.kernel.org
> This looks unusual. Is this intended?

As b4 doesn't support it natively, I used this strategy to send only
this patch to the linux-pm mailing list and not the whole series.

Best regards,
- Maíra

> 
> Best regards
>> ---
>>   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 
>> 0450202bbee2513c9116a36abaa839b460550935..1815eb4ee69b9b672b5e314402f1cc9897c57dcb 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