diff options
| author | Alexandre Courbot <acourbot@nvidia.com> | 2026-03-27 00:22:08 +0900 |
|---|---|---|
| committer | Alexandre Courbot <acourbot@nvidia.com> | 2026-03-28 22:20:07 +0900 |
| commit | 308eb645b57a91fe78d3065b8924f5c92b69a4a0 (patch) | |
| tree | 7a27f1217cc0af9537a6f9d3e83cf30c6510a29d /drivers/gpu/nova-core | |
| parent | 816718c611cab2164d718b91ad8204afcd0af81f (diff) | |
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>
Diffstat (limited to 'drivers/gpu/nova-core')
| -rw-r--r-- | drivers/gpu/nova-core/firmware/riscv.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/nova-core/firmware/riscv.rs b/drivers/gpu/nova-core/firmware/riscv.rs index 14aad2f0ee8a..2afa7f36404e 100644 --- a/drivers/gpu/nova-core/firmware/riscv.rs +++ b/drivers/gpu/nova-core/firmware/riscv.rs @@ -5,13 +5,13 @@ use kernel::{ device, + dma::Coherent, firmware::Firmware, prelude::*, transmute::FromBytes, // }; use crate::{ - dma::DmaObject, firmware::BinFirmware, num::FromSafeCast, // }; @@ -66,7 +66,7 @@ pub(crate) struct RiscvFirmware { /// Application version. pub(crate) app_version: u32, /// Device-mapped firmware image. - pub(crate) ucode: DmaObject, + pub(crate) ucode: Coherent<[u8]>, } impl RiscvFirmware { @@ -81,7 +81,7 @@ impl RiscvFirmware { let len = usize::from_safe_cast(bin_fw.hdr.data_size); let end = start.checked_add(len).ok_or(EINVAL)?; - DmaObject::from_data(dev, fw.data().get(start..end).ok_or(EINVAL)?)? + Coherent::from_slice(dev, fw.data().get(start..end).ok_or(EINVAL)?, GFP_KERNEL)? }; Ok(Self { |
