Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

gpu: nova-core: firmware: riscv: 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-2-616e1d0b5cb3@nvidia.com
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>

+3 -3
+3 -3
drivers/gpu/nova-core/firmware/riscv.rs
··· 5 5 6 6 use kernel::{ 7 7 device, 8 + dma::Coherent, 8 9 firmware::Firmware, 9 10 prelude::*, 10 11 transmute::FromBytes, // 11 12 }; 12 13 13 14 use crate::{ 14 - dma::DmaObject, 15 15 firmware::BinFirmware, 16 16 num::FromSafeCast, // 17 17 }; ··· 66 66 /// Application version. 67 67 pub(crate) app_version: u32, 68 68 /// Device-mapped firmware image. 69 - pub(crate) ucode: DmaObject, 69 + pub(crate) ucode: Coherent<[u8]>, 70 70 } 71 71 72 72 impl RiscvFirmware { ··· 81 81 let len = usize::from_safe_cast(bin_fw.hdr.data_size); 82 82 let end = start.checked_add(len).ok_or(EINVAL)?; 83 83 84 - DmaObject::from_data(dev, fw.data().get(start..end).ok_or(EINVAL)?)? 84 + Coherent::from_slice(dev, fw.data().get(start..end).ok_or(EINVAL)?, GFP_KERNEL)? 85 85 }; 86 86 87 87 Ok(Self {