[PATCH v9 0/2] drm/tyr: GPU reset infrastructure

Onur Özkan posted 2 patches 2 days, 6 hours ago
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(-)
[PATCH v9 0/2] drm/tyr: GPU reset infrastructure
Posted by Onur Özkan 2 days, 6 hours ago
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
Re: [PATCH v9 0/2] drm/tyr: GPU reset infrastructure
Posted by Daniel Almeida 1 day, 21 hours ago
Hi Onur,

We can probably fix the sashiko findings once the Clk typestate patchset
lands. In any case, what we have so far is good for the time being.

— Daniel
Re: [PATCH v9 0/2] drm/tyr: GPU reset infrastructure
Posted by Alice Ryhl 2 days, 2 hours ago
On Sun, Nov 22, 2026 at 08:40:31AM +0300, Onur Özkan wrote:
> 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).

Thanks for the updates! Both patches look good to me now; I've left my
Reviewed-by on them and we can apply this series to drm-rust-next once
the OwnedQueue/ScopedWork workqueue dependency lands.

Alice