From: Alexandre Courbot <acourbot@nvidia.com>
To: Danilo Krummrich <dakr@kernel.org>,
Alice Ryhl <aliceryhl@google.com>,
David Airlie <airlied@gmail.com>,
Simona Vetter <simona@ffwll.ch>
Cc: John Hubbard <jhubbard@nvidia.com>,
Alistair Popple <apopple@nvidia.com>,
Joel Fernandes <joelagnelf@nvidia.com>,
Timur Tabi <ttabi@nvidia.com>, Edwin Peer <epeer@nvidia.com>,
Eliot Courtney <ecourtney@nvidia.com>,
nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org,
Alexandre Courbot <acourbot@nvidia.com>,
Lyude Paul <lyude@redhat.com>, Gary Guo <gary@garyguo.net>
Subject: [PATCH v3 4/8] gpu: nova-core: gsp: remove unneeded sequencer trait
Date: Tue, 17 Feb 2026 11:45:52 +0900 [thread overview]
Message-ID: <20260217-nova-misc-v3-4-b4e2d45eafbc@nvidia.com> (raw)
In-Reply-To: <20260217-nova-misc-v3-0-b4e2d45eafbc@nvidia.com>
The `GspSeqCmdRunner` trait is never used as we never call the `run`
methods from generic code. Remove it.
Reviewed-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
---
drivers/gpu/nova-core/gsp/sequencer.rs | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/drivers/gpu/nova-core/gsp/sequencer.rs b/drivers/gpu/nova-core/gsp/sequencer.rs
index e415a2aa3203..9278ffd5216d 100644
--- a/drivers/gpu/nova-core/gsp/sequencer.rs
+++ b/drivers/gpu/nova-core/gsp/sequencer.rs
@@ -144,12 +144,7 @@ pub(crate) struct GspSequencer<'a> {
dev: ARef<device::Device>,
}
-/// Trait for running sequencer commands.
-pub(crate) trait GspSeqCmdRunner {
- fn run(&self, sequencer: &GspSequencer<'_>) -> Result;
-}
-
-impl GspSeqCmdRunner for fw::RegWritePayload {
+impl fw::RegWritePayload {
fn run(&self, sequencer: &GspSequencer<'_>) -> Result {
let addr = usize::from_safe_cast(self.addr());
@@ -157,7 +152,7 @@ fn run(&self, sequencer: &GspSequencer<'_>) -> Result {
}
}
-impl GspSeqCmdRunner for fw::RegModifyPayload {
+impl fw::RegModifyPayload {
fn run(&self, sequencer: &GspSequencer<'_>) -> Result {
let addr = usize::from_safe_cast(self.addr());
@@ -169,7 +164,7 @@ fn run(&self, sequencer: &GspSequencer<'_>) -> Result {
}
}
-impl GspSeqCmdRunner for fw::RegPollPayload {
+impl fw::RegPollPayload {
fn run(&self, sequencer: &GspSequencer<'_>) -> Result {
let addr = usize::from_safe_cast(self.addr());
@@ -194,14 +189,14 @@ fn run(&self, sequencer: &GspSequencer<'_>) -> Result {
}
}
-impl GspSeqCmdRunner for fw::DelayUsPayload {
+impl fw::DelayUsPayload {
fn run(&self, _sequencer: &GspSequencer<'_>) -> Result {
fsleep(Delta::from_micros(i64::from(self.val())));
Ok(())
}
}
-impl GspSeqCmdRunner for fw::RegStorePayload {
+impl fw::RegStorePayload {
fn run(&self, sequencer: &GspSequencer<'_>) -> Result {
let addr = usize::from_safe_cast(self.addr());
@@ -209,7 +204,7 @@ fn run(&self, sequencer: &GspSequencer<'_>) -> Result {
}
}
-impl GspSeqCmdRunner for GspSeqCmd {
+impl GspSeqCmd {
fn run(&self, seq: &GspSequencer<'_>) -> Result {
match self {
GspSeqCmd::RegWrite(cmd) => cmd.run(seq),
--
2.53.0
next prev parent reply other threads:[~2026-02-17 2:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-17 2:45 [PATCH v3 0/8] gpu: nova-core: miscellaneous improvements Alexandre Courbot
2026-02-17 2:45 ` [PATCH v3 1/8] gpu: nova-core: gsp: warn if data remains after processing a message Alexandre Courbot
2026-02-17 2:45 ` [PATCH v3 2/8] gpu: nova-core: gsp: remove unnecessary Display impls Alexandre Courbot
2026-02-17 2:45 ` [PATCH v3 3/8] gpu: nova-core: gsp: simplify sequencer opcode parsing Alexandre Courbot
2026-02-17 2:45 ` Alexandre Courbot [this message]
2026-02-17 2:45 ` [PATCH v3 5/8] gpu: nova-core: gsp: derive `Debug` on more sequencer types Alexandre Courbot
2026-02-17 2:45 ` [PATCH v3 6/8] gpu: nova-core: gsp: derive Zeroable for GspStaticConfigInfo Alexandre Courbot
2026-02-17 2:45 ` [PATCH v3 7/8] gpu: nova-core: use core library's CStr instead of kernel one Alexandre Courbot
2026-02-17 11:25 ` Danilo Krummrich
2026-02-17 14:10 ` Alexandre Courbot
2026-02-17 2:45 ` [PATCH v3 8/8] gpu: nova-core: gsp: use available device reference Alexandre Courbot
2026-02-17 11:33 ` Danilo Krummrich
2026-02-17 11:33 ` [PATCH v3 0/8] gpu: nova-core: miscellaneous improvements Danilo Krummrich
2026-02-19 2:12 ` Alexandre Courbot
2026-02-25 1:01 ` Alexandre Courbot
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=20260217-nova-misc-v3-4-b4e2d45eafbc@nvidia.com \
--to=acourbot@nvidia.com \
--cc=airlied@gmail.com \
--cc=aliceryhl@google.com \
--cc=apopple@nvidia.com \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=ecourtney@nvidia.com \
--cc=epeer@nvidia.com \
--cc=gary@garyguo.net \
--cc=jhubbard@nvidia.com \
--cc=joelagnelf@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lyude@redhat.com \
--cc=nouveau@lists.freedesktop.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=simona@ffwll.ch \
--cc=ttabi@nvidia.com \
/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