mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v9 0/2] drm/tyr: GPU reset infrastructure
@ 2026-11-22  5:40 Onur Özkan
  2026-11-22  5:40 ` [PATCH v9 1/2] drm/tyr: add " Onur Özkan
  2026-11-22  5:40 ` [PATCH v9 2/2] drm/tyr: put iomem behind the hardware gate Onur Özkan
  0 siblings, 2 replies; 3+ messages in thread
From: Onur Özkan @ 2026-11-22  5:40 UTC (permalink / raw)
  To: linux-kernel, rust-for-linux, dri-devel
  Cc: dakr, aliceryhl, daniel.almeida, airlied, simona, ojeda, boqun,
	gary, bjorn3_gh, lossin, a.hindborg, tmgross, boris.brezillon,
	Onur Özkan

Add support for scheduling GPU resets on a dedicated workqueue. Track
the reset state to avoid queueing another reset while one is already
pending or in progress.

Use an SRCU based gate with mutex-protected reader admission to block
hardware accesses while reset work runs and wait for current users
before resetting.

Stop new reset requests during teardown and drain any queued or running
reset work before releasing the device resources.

This is the initial reset infrastructure only. It is not wired to a reset
source yet as those will follow in separate work.

Based on drm-rust-next commit 0694e2390c5b ("rust: drm: remove DRM
device private data").

Changes since v8:
- Use workqueue v4 [1].
- Drop "drm/tyr: clear stale IRQ state before soft reset" (applied on
  drm-rust-next already).
- Minor fixes (Alice's notes on v8).

V8: https://lore.kernel.org/all/20261113-tyr-reset-impl-v8-0-2ee298ac9808@onurozkan.dev/

Link: https://lore.kernel.org/all/20261119-rust-workqueue-v4-0-707c68994940@google.com/ [1]
Link: https://gitlab.freedesktop.org/panfrost/linux/-/issues/28
Signed-off-by: Onur Özkan <work@onurozkan.dev>
---
Onur Özkan (2):
      drm/tyr: add GPU reset infrastructure
      drm/tyr: put iomem behind the hardware gate

 drivers/gpu/drm/tyr/driver.rs            |  67 ++++-----
 drivers/gpu/drm/tyr/fw.rs                |  16 +-
 drivers/gpu/drm/tyr/mmu.rs               |   6 +-
 drivers/gpu/drm/tyr/mmu/address_space.rs |  87 ++++++-----
 drivers/gpu/drm/tyr/reset.rs             | 243 +++++++++++++++++++++++++++++++
 drivers/gpu/drm/tyr/reset/hw_gate.rs     | 106 ++++++++++++++
 drivers/gpu/drm/tyr/tyr.rs               |   1 +
 7 files changed, 440 insertions(+), 86 deletions(-)
---
base-commit: 0694e2390c5be63aae9d713a173df18d82d3b94b
change-id: 20260813-tyr-reset-impl-93e951f996b4
prerequisite-change-id: 20261118-ordered-wq-cancel-63b02e0feac4:v1
prerequisite-patch-id: 7a1020bc70ad38e61214d85202e04b1db3c95443
prerequisite-patch-id: dbf1c8ccc147075be256faf6a547d9723c347a93
prerequisite-change-id: 20261012-rust-workqueue-658cd0fbe770:v4
prerequisite-patch-id: 2423b22dfde216dce30af3deb7eb7177505f5b96
prerequisite-patch-id: f5e24f7b3717f2ab0445b5395c7f12b554861d78
prerequisite-patch-id: 0bf6ae4abcef7090d0e48921d6ec627a59dc6a7a
prerequisite-patch-id: cba4cd096a4df20f4597e9ea639881213c18a41b
prerequisite-patch-id: 97b26feddfa5b675204c9e8e75f3ad2958ec268a

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

end of thread, other threads:[~2026-11-22  5:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-22  5:40 [PATCH v9 0/2] drm/tyr: GPU reset infrastructure Onur Özkan
2026-11-22  5:40 ` [PATCH v9 1/2] drm/tyr: add " Onur Özkan
2026-11-22  5:40 ` [PATCH v9 2/2] drm/tyr: put iomem behind the hardware gate Onur Özkan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®