NVIDIA GPU driver infrastructure
 help / color / mirror / Atom feed
From: "Alexandre Courbot" <acourbot@nvidia.com>
To: "Tim Kovalenko" <tim.kovalenko@proton.me>,
	"Danilo Krummrich" <dakr@kernel.org>
Cc: "Danilo Krummrich" <dakr@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Paul Walmsley" <pjw@kernel.org>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Albert Ou" <aou@eecs.berkeley.edu>,
	"Alexandre Ghiti" <alex@ghiti.fr>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Boqun Feng" <boqun@kernel.org>, "Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <lossin@kernel.org>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Trevor Gross" <tmgross@umich.edu>,
	nova-gpu@lists.linux.dev, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
	rust-for-linux@vger.kernel.org
Subject: Re: [PATCH v2] gpu: nova-core: falcon: store bar and dev in falcon
Date: Mon, 29 Jun 2026 20:51:13 +0900	[thread overview]
Message-ID: <DJLIEZJL9ZS6.J2642U4G4CT4@nvidia.com> (raw)
In-Reply-To: <20260625-drm-bar-refactor-v2-1-9db6b890d92e@proton.me>

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 <acourbot@nvidia.com>
> 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 <tim.kovalenko@proton.me>
> ---
> 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/20260624-drm-bar-refactor-v1-1-7062899163c5@proton.me
> ---
>  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	other threads:[~2026-06-29 11:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-26  2:24 [PATCH v2] gpu: nova-core: falcon: store bar and dev in falcon Tim Kovalenko
2026-06-29 11:51 ` Alexandre Courbot [this message]
2026-06-29 11:53   ` Danilo Krummrich
2026-06-29 13:00     ` Alexandre Courbot
  -- strict thread matches above, loose matches on Subject: below --
2026-06-26  2:19 Tim Kovalenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DJLIEZJL9ZS6.J2642U4G4CT4@nvidia.com \
    --to=acourbot@nvidia.com \
    --cc=a.hindborg@kernel.org \
    --cc=airlied@gmail.com \
    --cc=alex@ghiti.fr \
    --cc=aliceryhl@google.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=dakr@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gary@garyguo.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=lossin@kernel.org \
    --cc=nova-gpu@lists.linux.dev \
    --cc=ojeda@kernel.org \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tim.kovalenko@proton.me \
    --cc=tmgross@umich.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox