Commit 371db8bc authored by Alexandre Courbot's avatar Alexandre Courbot
Browse files

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: default avatarGary Guo <gary@garyguo.net>
Reviewed-by: default avatarDanilo Krummrich <dakr@kernel.org>
Link: https://patch.msgid.link/20260327-b4-nova-dma-removal-v2-6-616e1d0b5cb3@nvidia.com


Signed-off-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
parent c1c79e3b
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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 @@ pub(crate) fn new<'a>(

                    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)?;