From: Alexandre Courbot Date: Thu, 26 Mar 2026 15:22:10 +0000 (+0900) Subject: gpu: nova-core: falcon: use dma::Coherent X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a88831502c8f0530e1390a5f704fbc5e73f19b8c;p=thirdparty%2Flinux.git gpu: nova-core: falcon: use dma::Coherent Replace the nova-core local `DmaObject` with a `Coherent` that can fulfill the same role. Reviewed-by: Gary Guo Reviewed-by: Danilo Krummrich Link: https://patch.msgid.link/20260327-b4-nova-dma-removal-v2-4-616e1d0b5cb3@nvidia.com Signed-off-by: Alexandre Courbot --- diff --git a/drivers/gpu/nova-core/falcon.rs b/drivers/gpu/nova-core/falcon.rs index c49ec6ded909..e0315fda576b 100644 --- a/drivers/gpu/nova-core/falcon.rs +++ b/drivers/gpu/nova-core/falcon.rs @@ -10,6 +10,7 @@ use kernel::{ Device, // }, dma::{ + Coherent, DmaAddress, DmaMask, // }, @@ -28,7 +29,6 @@ use kernel::{ use crate::{ bounded_enum, - dma::DmaObject, driver::Bar0, falcon::hal::LoadMethod, gpu::Chipset, @@ -504,7 +504,7 @@ impl Falcon { fn dma_wr( &self, bar: &Bar0, - dma_obj: &DmaObject, + dma_obj: &Coherent<[u8]>, target_mem: FalconMem, load_offsets: FalconDmaLoadTarget, ) -> Result { @@ -614,7 +614,7 @@ impl Falcon { fw: &F, ) -> Result { // Create DMA object with firmware content as the source of the DMA engine. - let dma_obj = DmaObject::from_data(dev, fw.as_slice())?; + let dma_obj = Coherent::from_slice(dev, fw.as_slice(), GFP_KERNEL)?; self.dma_reset(bar); bar.update(regs::NV_PFALCON_FBIF_TRANSCFG::of::().at(0), |v| {