From: Danilo Krummrich Date: Mon, 25 May 2026 22:58:32 +0000 (+0200) Subject: gpu: nova-core: gsp: replace ARef with &'a Device in sequencer X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=859805f070bb4e8a7f42f389db6e745850e7e07e;p=thirdparty%2Fkernel%2Fstable.git gpu: nova-core: gsp: replace ARef with &'a Device in sequencer GspSequencer, GspSeqIter, and GspSequencerParams are already lifetime-parameterized; the ARef is unnecessary -- a plain &'a Device reference suffices. Reviewed-by: Eliot Courtney Reviewed-by: Alexandre Courbot Tested-by: Alexandre Courbot Link: https://patch.msgid.link/20260525225838.276108-5-dakr@kernel.org Signed-off-by: Danilo Krummrich --- 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 @@ impl super::Gsp { 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 @@ use kernel::{ 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, + 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, + dev: &'a device::Device, } impl<'a> Iterator for GspSeqIter<'a> { @@ -309,7 +308,7 @@ impl<'a> Iterator for GspSeqIter<'a> { 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 @@ impl<'a> GspSequencer<'a> { 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, /// Device for logging. - pub(crate) dev: ARef, + pub(crate) dev: &'a device::Device, /// BAR0 for register access. pub(crate) bar: &'a Bar0, }