From: "Onur Özkan" <work@onurozkan.dev>
To: Daniel Almeida <daniel.almeida@collabora.com>
Cc: linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org,
dri-devel@lists.freedesktop.org, dakr@kernel.org,
aliceryhl@google.com, airlied@gmail.com, simona@ffwll.ch,
ojeda@kernel.org, boqun@kernel.org, gary@garyguo.net,
bjorn3_gh@protonmail.com, lossin@kernel.org,
a.hindborg@kernel.org, tmgross@umich.edu
Subject: Re: [PATCH v7 0/3] drm/tyr: GPU reset infrastructure
Date: Wed, 11 Nov 2026 13:07:41 +0300 [thread overview]
Message-ID: <20261111100745.3929894-1-work@onurozkan.dev> (raw)
In-Reply-To: <70AFEE33-C637-4D49-88F1-9DF3A9BBF097@collabora.com>
On Wed, 23 Sep 2026 10:56:48 -0300
Daniel Almeida <daniel.almeida@collabora.com> wrote:
>
>
> > On 12 Sep 2026, at 07:39, Onur Özkan <work@onurozkan.dev> wrote:
> >
> > 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 'commit 53441a9cae3c ("drm/tyr: program CSF global interface")'
> > from tyr-for-upstream with the following patch series on the ML:
> > - rust: add SRCU abstraction [1]
> > - rust: workqueue: add cancel_sync support [2]
> >
> > TODOs:
> > - On reset failure, we don't do anything for now. We should unplug
> > the GPU.
> > - In schedule(), similar to panthor_device_schedule_reset(), we should
> > have a PM check but similar to the note above, we don't have the
> > infrastructure for that yet.
> >
> > Changes since v6:
> > - Acquire the hardware gate once per address-space operation and pass
> > the guarded iomem reference to helpers to avoid deadlocks.
> > - Clone the gate Arc before acquiring a guard so mutating address-space
> > helpers can retain their &mut self receivers as suggested by Daniel.
> >
> > Link: https://lore.kernel.org/all/20260613065348.96750-1-work@onurozkan.dev [1]
> > Link: https://lore.kernel.org/all/20260807165252.3849875-1-dakr@kernel.org [2]
> > Link: https://lore.kernel.org/all/20260708114358.957305-1-work@onurozkan.dev
> > Link: https://gitlab.freedesktop.org/panfrost/linux/-/issues/28
> > Signed-off-by: Onur Özkan <work@onurozkan.dev>
> > ---
> > Onur Özkan (3):
> > drm/tyr: clear stale IRQ state before soft reset
> > drm/tyr: add GPU reset infrastructure
> > drm/tyr: put iomem behind the hardware gate
> >
> > drivers/gpu/drm/tyr/driver.rs | 65 ++++-----
> > drivers/gpu/drm/tyr/fw.rs | 16 +-
> > drivers/gpu/drm/tyr/mmu.rs | 9 +-
> > drivers/gpu/drm/tyr/mmu/address_space.rs | 90 +++++++-----
> > drivers/gpu/drm/tyr/reset.rs | 242 +++++++++++++++++++++++++++++++
> > drivers/gpu/drm/tyr/reset/hw_gate.rs | 106 ++++++++++++++
> > drivers/gpu/drm/tyr/tyr.rs | 1 +
> > 7 files changed, 436 insertions(+), 93 deletions(-)
> > ---
> > base-commit: 53441a9cae3c4be552fa8aefa6e61b0f1bceb8a5
> > change-id: 20260813-tyr-reset-impl-93e951f996b4
> > prerequisite-message-id: <20260807165252.3849875-1-dakr@kernel.org>
> > prerequisite-patch-id: 4275f7d6e3cf96d61221d47f2398ebfb896db0c7
> > prerequisite-patch-id: f5e24f7b3717f2ab0445b5395c7f12b554861d78
> > prerequisite-patch-id: 0bf6ae4abcef7090d0e48921d6ec627a59dc6a7a
> > prerequisite-patch-id: 8dc24064e858240a6bb5411a261a987a7eae3fad
> > prerequisite-patch-id: eefbd4a72ed6da0083e20811882738cc3b05604f
> > prerequisite-patch-id: 7502236d334b13c547a8b47f0be9bf7171b5ca6b
> > prerequisite-message-id: <20260613065348.96750-1-work@onurozkan.dev>
> > prerequisite-patch-id: 9e1efee190d212ba1b01cd0acb5a4357e0b4da42
> > prerequisite-patch-id: 26aba035f4d1e212fa6ea7078095febefff5c5ba
> > prerequisite-patch-id: ffa25d5aadec4c04589af2bdd59a9c022f0fc9b0
> > prerequisite-patch-id: c2e05a4ac9d665d331952b291a622df6be673e41
> > prerequisite-patch-id: c14a4bd8a68b045356d61f7fa94690bd037ad08b
> >
> > --
> >
>
>
> Alice, if you are ok with this series, feel free to merge. At least from my side it looks ok.
>
> — Daniel
>
Any updates on this? I am preparing v2 of the GPU unplug series [1] which
depends on this series. The reset patches need rebasing against current
drm-rust-next.
Would you prefer me to send a rebased v8 and base unplug v2 on it or are
you planning to pick up v7 and handle the rebase?
Thanks,
Onur
[1]: https://lore.kernel.org/all/20260823-tyr-gpu-unplug-b4-v1-0-e99c07d4c785@onurozkan.dev
next prev parent reply other threads:[~2026-11-11 10:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-12 10:38 [PATCH v7 0/3] drm/tyr: GPU reset infrastructure Onur Özkan
2026-09-12 10:39 ` Onur Özkan
2026-09-12 10:39 ` [PATCH v7 1/3] drm/tyr: clear stale IRQ state before soft reset Onur Özkan
2026-09-12 10:39 ` [PATCH v7 2/3] drm/tyr: add GPU reset infrastructure Onur Özkan
2026-09-12 10:39 ` [PATCH v7 3/3] drm/tyr: put iomem behind the hardware gate Onur Özkan
2026-09-23 13:55 ` Daniel Almeida
2026-09-23 13:56 ` [PATCH v7 0/3] drm/tyr: GPU reset infrastructure Daniel Almeida
2026-11-11 10:07 ` Onur Özkan [this message]
2026-11-11 15:33 ` Daniel Almeida
2026-11-12 14:42 ` Onur Özkan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261111100745.3929894-1-work@onurozkan.dev \
--to=work@onurozkan.dev \
--cc=a.hindborg@kernel.org \
--cc=airlied@gmail.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=simona@ffwll.ch \
--cc=tmgross@umich.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.