mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 10:04:04 +02:00
gpu: nova-core: falcon: remove FalconFirmware's dependency on FalconDmaLoadable
Not all firmware is necessarily loaded by DMA. Remove the requirement for `FalconFirmware` to implement `FalconDmaLoadable`, and adapt `Falcon`'s methods constraints accordingly. Reviewed-by: Eliot Courtney <ecourtney@nvidia.com> Acked-by: Danilo Krummrich <dakr@kernel.org> Link: https://patch.msgid.link/20260306-turing_prep-v11-4-8f0042c5d026@nvidia.com Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
This commit is contained in:
parent
8a623869b8
commit
99d451cb8e
|
|
@ -378,7 +378,7 @@ pub(crate) trait FalconDmaLoadable {
|
|||
/// Trait for a falcon firmware.
|
||||
///
|
||||
/// A falcon firmware can be loaded on a given engine.
|
||||
pub(crate) trait FalconFirmware: FalconDmaLoadable {
|
||||
pub(crate) trait FalconFirmware {
|
||||
/// Engine on which this firmware is to be loaded.
|
||||
type Target: FalconEngine;
|
||||
}
|
||||
|
|
@ -521,7 +521,7 @@ fn dma_wr(
|
|||
}
|
||||
|
||||
/// Perform a DMA load into `IMEM` and `DMEM` of `fw`, and prepare the falcon to run it.
|
||||
fn dma_load<F: FalconFirmware<Target = E>>(
|
||||
fn dma_load<F: FalconFirmware<Target = E> + FalconDmaLoadable>(
|
||||
&self,
|
||||
dev: &Device<device::Bound>,
|
||||
bar: &Bar0,
|
||||
|
|
@ -660,7 +660,7 @@ pub(crate) fn is_riscv_active(&self, bar: &Bar0) -> bool {
|
|||
}
|
||||
|
||||
// Load a firmware image into Falcon memory
|
||||
pub(crate) fn load<F: FalconFirmware<Target = E>>(
|
||||
pub(crate) fn load<F: FalconFirmware<Target = E> + FalconDmaLoadable>(
|
||||
&self,
|
||||
dev: &Device<device::Bound>,
|
||||
bar: &Bar0,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user