summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Courbot <acourbot@nvidia.com>2026-03-26 18:22:12 +0300
committerAlexandre Courbot <acourbot@nvidia.com>2026-03-28 16:20:08 +0300
commit371db8bcb925bfb0ac68db2f66aeaa0350ac1d06 (patch)
treeba1bcc483bfd72cffb7870c91b5eb3376839f5de
parentc1c79e3bebc6f8b634fcf11d08d72a0df1cb85a0 (diff)
downloadlinux-371db8bcb925bfb0ac68db2f66aeaa0350ac1d06.tar.xz
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>
-rw-r--r--drivers/gpu/nova-core/firmware/gsp.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/nova-core/firmware/gsp.rs b/drivers/gpu/nova-core/firmware/gsp.rs
index 9488a626352f..1e0d545a74fe 100644
--- a/drivers/gpu/nova-core/firmware/gsp.rs
+++ b/drivers/gpu/nova-core/firmware/gsp.rs
@@ -3,6 +3,7 @@
use kernel::{
device,
dma::{
+ Coherent,
DataDirection,
DmaAddress, //
},
@@ -140,7 +141,7 @@ pub(crate) struct GspFirmware {
/// Size in bytes of the firmware contained in [`Self::fw`].
pub(crate) size: usize,
/// Device-mapped GSP signatures matching the GPU's [`Chipset`].
- pub(crate) signatures: DmaObject,
+ pub(crate) signatures: Coherent<[u8]>,
/// GSP bootloader, verifies the GSP firmware before loading and running it.
pub(crate) bootloader: RiscvFirmware,
}
@@ -226,7 +227,7 @@ impl GspFirmware {
elf::elf64_section(firmware.data(), sigs_section)
.ok_or(EINVAL)
- .and_then(|data| DmaObject::from_data(dev, data))?
+ .and_then(|data| Coherent::from_slice(dev, data, GFP_KERNEL))?
},
bootloader: {
let bl = super::request_firmware(dev, chipset, "bootloader", ver)?;