All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] drm/vc4: Reset the V3D block through the reset controller
@ 2026-08-16 14:05 Maíra Canal
  2026-08-16 14:05 ` [PATCH 1/4] drm/vc4: Drop the undocumented brcm,vc4-v3d compatible Maíra Canal
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Maíra Canal @ 2026-08-16 14:05 UTC (permalink / raw)
  To: Maxime Ripard, Dave Stevenson, Raspberry Pi Kernel Maintenance,
	Stefan Wahren, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Florian Fainelli, Ray Jui, Scott Branden,
	Broadcom internal kernel review list
  Cc: kernel-dev, dri-devel, devicetree, linux-rpi-kernel,
	linux-arm-kernel, Maíra Canal

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



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-08-16 14:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-16 14:05 [PATCH 0/4] drm/vc4: Reset the V3D block through the reset controller Maíra Canal
2026-08-16 14:05 ` [PATCH 1/4] drm/vc4: Drop the undocumented brcm,vc4-v3d compatible Maíra Canal
2026-08-16 14:13   ` sashiko-bot
2026-08-16 14:05 ` [PATCH 2/4] dt-bindings: display: bcm2835-v3d: Add an optional reset line Maíra Canal
2026-08-16 14:05 ` [PATCH 3/4] drm/vc4: Use the reset controller to recover from a GPU hang Maíra Canal
2026-08-16 14:22   ` sashiko-bot
2026-08-16 14:05 ` [PATCH 4/4] ARM: dts: bcm2835: Add the V3D reset line Maíra Canal
2026-08-16 14:15   ` sashiko-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.