Skip to content

Commit 1f9283a

Browse files
committed
gpu: nova-core: firmware: fwsec: use dma::Coherent
Replace the nova-core local `DmaObject` with a `Coherent` that can fulfill the same role. Reviewed-by: Gary Guo <gary@garyguo.net> Reviewed-by: Danilo Krummrich <dakr@kernel.org> Link: https://patch.msgid.link/20260327-b4-nova-dma-removal-v2-3-616e1d0b5cb3@nvidia.com Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
1 parent 308eb64 commit 1f9283a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/gpu/nova-core/firmware/fwsec/bootloader.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ use kernel::{
1212
self,
1313
Device, //
1414
},
15+
dma::Coherent,
1516
io::{
1617
register::WithBase, //
1718
Io,
@@ -29,7 +30,6 @@ use kernel::{
2930
};
3031

3132
use crate::{
32-
dma::DmaObject,
3333
driver::Bar0,
3434
falcon::{
3535
self,
@@ -129,7 +129,7 @@ unsafe impl AsBytes for BootloaderDmemDescV2 {}
129129
/// operation.
130130
pub(crate) struct FwsecFirmwareWithBl {
131131
/// DMA object the bootloader will copy the firmware from.
132-
_firmware_dma: DmaObject,
132+
_firmware_dma: Coherent<[u8]>,
133133
/// Code of the bootloader to be loaded into non-secure IMEM.
134134
ucode: KVec<u8>,
135135
/// Descriptor to be loaded into DMEM for the bootloader to read.
@@ -211,7 +211,7 @@ impl FwsecFirmwareWithBl {
211211

212212
(
213213
align_padding,
214-
DmaObject::from_data(dev, firmware_obj.as_slice())?,
214+
Coherent::from_slice(dev, firmware_obj.as_slice(), GFP_KERNEL)?,
215215
)
216216
};
217217

0 commit comments

Comments
 (0)