On Fri Jun 26, 2026 at 11:24 AM JST, Tim Kovalenko wrote:
> Store the bound device and `BAR0` mapping in `Falcon` instead of passing
> them through every `Falcon` operation. This simplifies the `Falcon` API and
> removes repeated `dev`/`bar` plumbing from reset, load, boot, mailbox, DMA,
> and GSP/FSP-specific Falcon helpers.
>
> `FalconHal` now receives a reference to a `Falcon` and uses its methods and
> members instead of passing them individually.
>
> Suggested-by: Alexandre Courbot <[email protected]>
> Link: 
> https://rust-for-linux.zulipchat.com/#narrow/channel/509436-Nova/topic/Storing.20driver-bound.20references.20into.20sub-devices/near/599137882
> Signed-off-by: Tim Kovalenko <[email protected]>
> ---
> Changes in v2:
> - Removed the ad-hoc `set_fbif_transcfg_phys_sysmem` method in falcon, it can 
> be re-implemented
>   in a better way in the future.
> - Made `FalconHal` receive `Falcon` instead of `bar` and/or `falcon`
>   separately. This allows for simpler usage of the said hal.
> - Link to v1: 
> https://lore.kernel.org/r/[email protected]
> ---
>  drivers/gpu/nova-core/falcon.rs                    | 195 
> +++++++++------------
>  drivers/gpu/nova-core/falcon/fsp.rs                |  44 ++---
>  drivers/gpu/nova-core/falcon/gsp.rs                |  21 +--
>  drivers/gpu/nova-core/falcon/hal.rs                |  14 +-
>  drivers/gpu/nova-core/falcon/hal/ga102.rs          |  29 +--
>  drivers/gpu/nova-core/falcon/hal/tu102.rs          |  24 +--
>  drivers/gpu/nova-core/firmware/booter.rs           |  25 +--
>  drivers/gpu/nova-core/firmware/fwsec.rs            |  19 +-
>  drivers/gpu/nova-core/firmware/fwsec/bootloader.rs |  15 +-
>  drivers/gpu/nova-core/fsp.rs                       |  23 ++-
>  drivers/gpu/nova-core/gpu.rs                       |   9 +-
>  drivers/gpu/nova-core/gsp.rs                       |   4 +-
>  drivers/gpu/nova-core/gsp/boot.rs                  |  22 +--
>  drivers/gpu/nova-core/gsp/hal.rs                   |   4 +-
>  drivers/gpu/nova-core/gsp/hal/gh100.rs             |  32 ++--
>  drivers/gpu/nova-core/gsp/hal/tu102.rs             |  68 +++----
>  drivers/gpu/nova-core/gsp/sequencer.rs             |  31 ++--
>  17 files changed, 263 insertions(+), 316 deletions(-)

Thanks, this looks exactly like what we discussed and the removal of 50
LoCs is always a pleasant sight.

Since this touches a lot of files, I would like to apply it before
something else conflicts with it (it applies cleanly as of today).
Danilo, any objection?

Reply via email to