drm/vc4: Reset the V3D block through the reset controller
Status from this message: Applied, thanks!
Get series with b4
b4 am [email protected] change-id 20260812-vc4-reset-control-cddf3eb8a9e9Versions newest first
- v2 Latest4 patches 2 repliesApplied
- v14 patches 12 repliesSuperseded
Patches in v2 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | drm/vc4: Drop the undocumented brcm,vc4-v3d compatibledrivers/ drivers/ | +0 | 0 replies | |
| 2/4 | dt-bindings: display: bcm2835-v3d: Add an optional reset lineDocumentation/ | +3 | 1 reply | |
| 3/4 | drm/vc4: Use the reset controller to recover from a GPU hangdrivers/ drivers/ drivers/ +1 more | +47 | 0 replies | |
| 4/4 | ARM: dts: bcm2835: Add the V3D reset linearch/ | +1 | 0 replies |
Reviews trailers per patch
All 4 patches have a Reviewed-by or Acked-by.
| Patch | Florian Fainelli | Krzysztof Kozlowski | Stefan Wahren |
|---|---|---|---|
| 1/4 | R-b | A-b | |
| 2/4 | A-b | R-b | |
| 3/4 | R-b | ||
| 4/4 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH v2 0/4] drm/vc4: Reset the V3D block through the reset controller
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.
This series was tested on the Raspberry Pi 3B and 3B+.
Best regards,
- Maíra
---
v1 -> v2: https://lore.kernel.org/r/[email protected]
- [1/4, 2/4, 3/4, 4/4] Add R-b and A-b tags from Krzysztof, Florian, and Stefan.
- [2/4] Rewrite commit message (Stefan, Krzysztof)
---
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: 5363e01e4ff03a204cab85292b89cf90c2d1b101
change-id: 20260812-vc4-reset-control-cddf3eb8a9e9