Commit 1f9283af authored by Alexandre Courbot's avatar Alexandre Courbot
Browse files

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: 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-3-616e1d0b5cb3@nvidia.com


Signed-off-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
parent 308eb645
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@
        self,
        Device, //
    },
    dma::Coherent,
    io::{
        register::WithBase, //
        Io,
@@ -29,7 +30,6 @@
};

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

            (
                align_padding,
                DmaObject::from_data(dev, firmware_obj.as_slice())?,
                Coherent::from_slice(dev, firmware_obj.as_slice(), GFP_KERNEL)?,
            )
        };