Skip to content

Commit 371db8b

Browse files
committed
gpu: nova-core: firmware: gsp: use dma::Coherent for signatures
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-6-616e1d0b5cb3@nvidia.com Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
1 parent c1c79e3 commit 371db8b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • drivers/gpu/nova-core/firmware

drivers/gpu/nova-core/firmware/gsp.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
use kernel::{
44
device,
55
dma::{
6+
Coherent,
67
DataDirection,
78
DmaAddress, //
89
},
@@ -140,7 +141,7 @@ pub(crate) struct GspFirmware {
140141
/// Size in bytes of the firmware contained in [`Self::fw`].
141142
pub(crate) size: usize,
142143
/// Device-mapped GSP signatures matching the GPU's [`Chipset`].
143-
pub(crate) signatures: DmaObject,
144+
pub(crate) signatures: Coherent<[u8]>,
144145
/// GSP bootloader, verifies the GSP firmware before loading and running it.
145146
pub(crate) bootloader: RiscvFirmware,
146147
}
@@ -226,7 +227,7 @@ impl GspFirmware {
226227

227228
elf::elf64_section(firmware.data(), sigs_section)
228229
.ok_or(EINVAL)
229-
.and_then(|data| DmaObject::from_data(dev, data))?
230+
.and_then(|data| Coherent::from_slice(dev, data, GFP_KERNEL))?
230231
},
231232
bootloader: {
232233
let bl = super::request_firmware(dev, chipset, "bootloader", ver)?;

0 commit comments

Comments
 (0)