Skip to content

Commit a888315

Browse files
committed
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 <gary@garyguo.net> Reviewed-by: Danilo Krummrich <dakr@kernel.org> Link: https://patch.msgid.link/20260327-b4-nova-dma-removal-v2-4-616e1d0b5cb3@nvidia.com Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
1 parent 1f9283a commit a888315

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/gpu/nova-core/falcon.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ use kernel::{
1010
Device, //
1111
},
1212
dma::{
13+
Coherent,
1314
DmaAddress,
1415
DmaMask, //
1516
},
@@ -28,7 +29,6 @@ use kernel::{
2829

2930
use crate::{
3031
bounded_enum,
31-
dma::DmaObject,
3232
driver::Bar0,
3333
falcon::hal::LoadMethod,
3434
gpu::Chipset,
@@ -504,7 +504,7 @@ impl<E: FalconEngine + 'static> Falcon<E> {
504504
fn dma_wr(
505505
&self,
506506
bar: &Bar0,
507-
dma_obj: &DmaObject,
507+
dma_obj: &Coherent<[u8]>,
508508
target_mem: FalconMem,
509509
load_offsets: FalconDmaLoadTarget,
510510
) -> Result {
@@ -614,7 +614,7 @@ impl<E: FalconEngine + 'static> Falcon<E> {
614614
fw: &F,
615615
) -> Result {
616616
// Create DMA object with firmware content as the source of the DMA engine.
617-
let dma_obj = DmaObject::from_data(dev, fw.as_slice())?;
617+
let dma_obj = Coherent::from_slice(dev, fw.as_slice(), GFP_KERNEL)?;
618618

619619
self.dma_reset(bar);
620620
bar.update(regs::NV_PFALCON_FBIF_TRANSCFG::of::<E>().at(0), |v| {

0 commit comments

Comments
 (0)