[PATCH 3/4] drm/vc4: Use the reset controller to recover from a GPU hang
Florian Fainelli
florian.fainelli at broadcom.com
Thu Sep 3 12:40:12 PDT 2026
On 8/16/26 07:05, Maíra Canal wrote:
> vc4_reset() recovers a hung GPU by dropping the runtime PM usage count to
> zero so that the power domain goes down, and then taking it again. Such an
> unconventional approach only works if the driver knows exactly how many
> references it holds, which is why vc4 wrapped every pm_runtime_get_sync()
> call in a private refcount and mutex.
>
> Commit 670c672608a1 ("soc: bcm: bcm2835-pm: Add support for power domains
> under a new binding.") exposed a V3D reset line for exactly this reason,
> so that the block can be reset without power-cycling its domain, but the
> vc4 driver never picked it up. Use it now, which removes the need for the
> private refcount and leaves vc4_v3d_pm_get/put() as plain runtime PM
> wrappers.
>
> The reset line is optional, to accommodate older device trees. Device
> trees that do not describe one still get the driver-side recovery in
> vc4_irq_reset(), but the hardware is left untouched. Two in-tree platforms
> use the VC4 V3D block: BCM2835 gains the resets property in the next
> commit, and Cygnus is no worse off than it was, as its V3D node has no
> power domain and the power-cycle only ever gated its clock.
>
> Signed-off-by: Maíra Canal <mcanal at igalia.com>
Reviewed-by: Florian Fainelli <florian.fainelli at broadcom.com>
--
Florian
More information about the linux-arm-kernel
mailing list