[PATCH 0/4] drm/vc4: Reset the V3D block through the reset controller

Maíra Canal mcanal at igalia.com
Thu Sep 3 06:39:05 PDT 2026


Hi,

Florian, Stefan and other Broadcom engineers, any thoughts about this
series?

Best regards,
- Maíra

On 16/08/26 11:05, Maíra Canal wrote:
> vc4_reset() recovers a hung GPU by dropping the runtime PM usage count to
> zero so that the V3D power domain goes down, and then taking it again.
> Forcing the count to zero only works if the driver knows exactly how many
> references it holds, which is why vc4 unconventionaly wraps every
> pm_runtime_get_sync() call in a private refcount and mutex, making the
> code cumbersome.
> 
> The BCM2835 PM block has exposed a reset line for the V3D block since
> commit 670c672608a1 ("soc: bcm: bcm2835-pm: Add support for power domains
> under a new binding."), added for exactly this reason, but vc4 never
> picked it up. This series switches vc4 over to it and drops the private
> refcount, leaving vc4_v3d_pm_get/put() as plain runtime PM wrappers.
> 
> The reset line is optional, so device trees that do not describe one keep
> working: they get the driver-side recovery in vc4_irq_reset() while the
> hardware is left untouched. Of the two in-tree platforms,
> 
>    1. BCM2835 gains the property in PATCH 4.
>    2. Cygnus has no V3D power domain to begin with, so the power-cycle
>       only ever gated its clock there.
> 
> PATCH 1 is an independent cleanup. "brcm,vc4-v3d" was never documented
> and was never used by any in-tree device tree, so it is a candidate for
> removal on its own. It can be dropped from the series if it turns out
> to be contentious.
> 
> This series was tested on the Raspberry Pi 3B and 3B+.
> 
> Best regards,
> - Maíra
> 
> ---
> Maíra Canal (4):
>        drm/vc4: Drop the undocumented brcm,vc4-v3d compatible
>        dt-bindings: display: bcm2835-v3d: Add an optional reset line
>        drm/vc4: Use the reset controller to recover from a GPU hang
>        ARM: dts: bcm2835: Add the V3D reset line
> 
>   .../bindings/display/brcm,bcm2835-v3d.yaml         |  3 ++
>   arch/arm/boot/dts/broadcom/bcm2835-common.dtsi     |  1 +
>   drivers/gpu/drm/vc4/vc4_drv.c                      |  1 -
>   drivers/gpu/drm/vc4/vc4_drv.h                      | 13 ++++---
>   drivers/gpu/drm/vc4/vc4_gem.c                      | 40 +++++++++++++---------
>   drivers/gpu/drm/vc4/vc4_irq.c                      |  7 ++--
>   drivers/gpu/drm/vc4/vc4_v3d.c                      | 37 +++++++-------------
>   7 files changed, 51 insertions(+), 51 deletions(-)
> ---
> base-commit: 09b47186a4164f3aaa3591313f80794443117342
> change-id: 20260812-vc4-reset-control-cddf3eb8a9e9
> 




More information about the linux-arm-kernel mailing list