From: Danilo Krummrich <dakr@kernel.org>
To: dakr@kernel.org, acourbot@nvidia.com, aliceryhl@google.com,
jhubbard@nvidia.com, ecourtney@nvidia.com, ttabi@nvidia.com,
joelagnelf@nvidia.com, gary@garyguo.net
Cc: nova-gpu@lists.linux.dev, dri-devel@lists.freedesktop.org,
rust-for-linux@vger.kernel.org
Subject: [PATCH 4/5] gpu: nova-core: gsp: replace ARef<Device> with &'a Device in sequencer
Date: Tue, 26 May 2026 00:58:32 +0200 [thread overview]
Message-ID: <20260525225838.276108-5-dakr@kernel.org> (raw)
In-Reply-To: <20260525225838.276108-1-dakr@kernel.org>
GspSequencer, GspSeqIter, and GspSequencerParams are already
lifetime-parameterized; the ARef<Device> is unnecessary -- a plain
&'a Device reference suffices.
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
---
drivers/gpu/nova-core/gsp/boot.rs | 2 +-
drivers/gpu/nova-core/gsp/sequencer.rs | 11 +++++------
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/nova-core/gsp/boot.rs b/drivers/gpu/nova-core/gsp/boot.rs
index df105ef4b371..3e8f9611d2b3 100644
--- a/drivers/gpu/nova-core/gsp/boot.rs
+++ b/drivers/gpu/nova-core/gsp/boot.rs
@@ -234,7 +234,7 @@ pub(crate) fn boot(
libos_dma_handle: libos_handle,
gsp_falcon,
sec2_falcon,
- dev: pdev.as_ref().into(),
+ dev,
bar,
};
GspSequencer::run(&self.cmdq, seq_params)?;
diff --git a/drivers/gpu/nova-core/gsp/sequencer.rs b/drivers/gpu/nova-core/gsp/sequencer.rs
index 474e4c8021db..b3015483ed17 100644
--- a/drivers/gpu/nova-core/gsp/sequencer.rs
+++ b/drivers/gpu/nova-core/gsp/sequencer.rs
@@ -11,7 +11,6 @@
Io, //
},
prelude::*,
- sync::aref::ARef,
time::{
delay::fsleep,
Delta, //
@@ -142,7 +141,7 @@ pub(crate) struct GspSequencer<'a> {
/// Bootloader application version.
bootloader_app_version: u32,
/// Device for logging.
- dev: ARef<device::Device>,
+ dev: &'a device::Device,
}
impl fw::RegWritePayload {
@@ -281,7 +280,7 @@ pub(crate) struct GspSeqIter<'a> {
/// Number of commands processed so far.
cmds_processed: u32,
/// Device for logging.
- dev: ARef<device::Device>,
+ dev: &'a device::Device,
}
impl<'a> Iterator for GspSeqIter<'a> {
@@ -309,7 +308,7 @@ fn next(&mut self) -> Option<Self::Item> {
self.cmd_data.len() - offset
};
buffer[..copy_len].copy_from_slice(&self.cmd_data[offset..offset + copy_len]);
- let cmd_result = GspSeqCmd::new(&buffer, &self.dev);
+ let cmd_result = GspSeqCmd::new(&buffer, self.dev);
cmd_result.map_or_else(
|_err| {
@@ -334,7 +333,7 @@ fn iter(&self) -> GspSeqIter<'_> {
current_offset: 0,
total_cmds: self.seq_info.cmd_index,
cmds_processed: 0,
- dev: self.dev.clone(),
+ dev: self.dev,
}
}
}
@@ -350,7 +349,7 @@ pub(crate) struct GspSequencerParams<'a> {
/// SEC2 falcon for core operations.
pub(crate) sec2_falcon: &'a Falcon<Sec2>,
/// Device for logging.
- pub(crate) dev: ARef<device::Device>,
+ pub(crate) dev: &'a device::Device,
/// BAR0 for register access.
pub(crate) bar: &'a Bar0,
}
--
2.54.0
next prev parent reply other threads:[~2026-05-25 22:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-25 22:58 [PATCH 0/5] gpu: nova: adopt driver lifetime infrastructure Danilo Krummrich
2026-05-25 22:58 ` [PATCH 1/5] gpu: nova-core: use lifetime for Bar Danilo Krummrich
2026-05-26 2:06 ` Eliot Courtney
2026-05-25 22:58 ` [PATCH 2/5] gpu: nova-core: unregister sysmem flush page from Drop Danilo Krummrich
2026-05-26 1:43 ` Eliot Courtney
2026-05-25 22:58 ` [PATCH 3/5] gpu: nova-core: replace ARef<Device> with &'bound Device in SysmemFlush Danilo Krummrich
2026-05-26 1:44 ` Eliot Courtney
2026-05-25 22:58 ` Danilo Krummrich [this message]
2026-05-26 1:44 ` [PATCH 4/5] gpu: nova-core: gsp: replace ARef<Device> with &'a Device in sequencer Eliot Courtney
2026-05-25 22:58 ` [PATCH 5/5] gpu: nova: separate driver type from driver data Danilo Krummrich
2026-05-26 1:46 ` Eliot Courtney
2026-05-26 7:11 ` [PATCH 0/5] gpu: nova: adopt driver lifetime infrastructure 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=20260525225838.276108-5-dakr@kernel.org \
--to=dakr@kernel.org \
--cc=acourbot@nvidia.com \
--cc=aliceryhl@google.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=ecourtney@nvidia.com \
--cc=gary@garyguo.net \
--cc=jhubbard@nvidia.com \
--cc=joelagnelf@nvidia.com \
--cc=nova-gpu@lists.linux.dev \
--cc=rust-for-linux@vger.kernel.org \
--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