From: "Onur Özkan" <work@onurozkan.dev>
To: linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org,
dri-devel@lists.freedesktop.org
Cc: dakr@kernel.org, aliceryhl@google.com,
daniel.almeida@collabora.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,
"Onur Özkan" <work@onurozkan.dev>
Subject: [PATCH v3 2/3] drm/tyr: clear stale IRQ state before soft reset
Date: Wed, 8 Jul 2026 14:43:17 +0300 [thread overview]
Message-ID: <20260708114358.957305-3-work@onurozkan.dev> (raw)
In-Reply-To: <20260708114358.957305-1-work@onurozkan.dev>
Previous reset may leave the reset completed IRQ set which can make the
poll return too early.
Clear the IRQ first so the driver waits for the current reset to
complete.
Signed-off-by: Onur Özkan <work@onurozkan.dev>
---
drivers/gpu/drm/tyr/driver.rs | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/tyr/driver.rs b/drivers/gpu/drm/tyr/driver.rs
index c5063b2be94d..90d6cd988cd2 100644
--- a/drivers/gpu/drm/tyr/driver.rs
+++ b/drivers/gpu/drm/tyr/driver.rs
@@ -86,6 +86,9 @@ pub(crate) struct TyrDrmRegistrationData<'bound> {
}
fn issue_soft_reset(dev: &Device, iomem: &IoMem<'_>) -> Result {
+ // Clear any stale reset IRQ state before issuing a new soft reset.
+ iomem.write_reg(GPU_IRQ_CLEAR::zeroed().with_reset_completed(true));
+
iomem.write_reg(GPU_COMMAND::reset(ResetMode::SoftReset));
poll::read_poll_timeout(
--
2.51.2
next prev parent reply other threads:[~2026-07-08 11:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-08 11:43 [PATCH v3 0/3] implement GPU reset API Onur Özkan
2026-07-08 11:43 ` [PATCH v3 1/3] rust: workqueue: impl Send and Sync for OwnedQueue Onur Özkan
2026-07-08 11:43 ` Onur Özkan [this message]
2026-07-08 11:43 ` [PATCH v3 3/3] drm/tyr: add GPU reset infrastructure Onur Özkan
2026-07-08 11:47 ` [PATCH v3 0/3] implement GPU reset API 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=20260708114358.957305-3-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox