mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 18:13:41 +02:00
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>
This commit is contained in:
parent
1f9283afd3
commit
a88831502c
|
|
@ -10,6 +10,7 @@
|
||||||
Device, //
|
Device, //
|
||||||
},
|
},
|
||||||
dma::{
|
dma::{
|
||||||
|
Coherent,
|
||||||
DmaAddress,
|
DmaAddress,
|
||||||
DmaMask, //
|
DmaMask, //
|
||||||
},
|
},
|
||||||
|
|
@ -28,7 +29,6 @@
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
bounded_enum,
|
bounded_enum,
|
||||||
dma::DmaObject,
|
|
||||||
driver::Bar0,
|
driver::Bar0,
|
||||||
falcon::hal::LoadMethod,
|
falcon::hal::LoadMethod,
|
||||||
gpu::Chipset,
|
gpu::Chipset,
|
||||||
|
|
@ -504,7 +504,7 @@ pub(crate) fn pio_load<F: FalconFirmware<Target = E> + FalconPioLoadable>(
|
||||||
fn dma_wr(
|
fn dma_wr(
|
||||||
&self,
|
&self,
|
||||||
bar: &Bar0,
|
bar: &Bar0,
|
||||||
dma_obj: &DmaObject,
|
dma_obj: &Coherent<[u8]>,
|
||||||
target_mem: FalconMem,
|
target_mem: FalconMem,
|
||||||
load_offsets: FalconDmaLoadTarget,
|
load_offsets: FalconDmaLoadTarget,
|
||||||
) -> Result {
|
) -> Result {
|
||||||
|
|
@ -614,7 +614,7 @@ fn dma_load<F: FalconFirmware<Target = E> + FalconDmaLoadable>(
|
||||||
fw: &F,
|
fw: &F,
|
||||||
) -> Result {
|
) -> Result {
|
||||||
// Create DMA object with firmware content as the source of the DMA engine.
|
// 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);
|
self.dma_reset(bar);
|
||||||
bar.update(regs::NV_PFALCON_FBIF_TRANSCFG::of::<E>().at(0), |v| {
|
bar.update(regs::NV_PFALCON_FBIF_TRANSCFG::of::<E>().at(0), |v| {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user