mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Alexandre Courbot" <acourbot@nvidia.com>
To: "Eliot Courtney" <ecourtney@nvidia.com>
Cc: "Danilo Krummrich" <dakr@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"John Hubbard" <jhubbard@nvidia.com>,
	"Alistair Popple" <apopple@nvidia.com>,
	"Timur Tabi" <ttabi@nvidia.com>, <nova-gpu@lists.linux.dev>,
	<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 3/6] gpu: nova-core: remove some dependencies on FalconDmaLoadTarget
Date: Mon, 30 Nov 2026 14:10:45 +0900	[thread overview]
Message-ID: <DN8AC95F9GL4.ZO000FYJDN3E@nvidia.com> (raw)
In-Reply-To: <20261129-boot-rework2-v2-3-622f3560e18a@nvidia.com>

On Sun Nov 29, 2026 at 11:55 AM JST, Eliot Courtney wrote:
> In order to remove `FalconDmaLoadTarget`, remove usages of it in
> `FwsecFirmwareWithBl` and `BootloaderDmemDescV2`. `FalconDmaLoadTarget`
> ends up non-orthogonal with `FalconImage`, `FalconImemSegment`,
> `FalconDmemSegment` which are added in a following change. These three
> new types take over the job of denoting where code/data uploaded to a
> falcon is stored and where it is sent to. This is part of making the
> locations of where the falcon data/code is represented separate from how
> it is sent to the falcon. `FalconDmaLoadTarget` conflates those two
> things.
>
> Signed-off-by: Eliot Courtney <ecourtney@nvidia.com>
> ---
>  drivers/gpu/nova-core/firmware/fwsec/bootloader.rs | 49 +++++++---------------
>  drivers/gpu/nova-core/firmware/gen_bootloader.rs   | 42 ++++++++++---------
>  2 files changed, 38 insertions(+), 53 deletions(-)
>
> diff --git a/drivers/gpu/nova-core/firmware/fwsec/bootloader.rs b/drivers/gpu/nova-core/firmware/fwsec/bootloader.rs
> index 461e5e6f7899..1efcf7a8624d 100644
> --- a/drivers/gpu/nova-core/firmware/fwsec/bootloader.rs
> +++ b/drivers/gpu/nova-core/firmware/fwsec/bootloader.rs
> @@ -19,7 +19,6 @@
>      falcon::{
>          gsp::Gsp,
>          Falcon,
> -        FalconDmaLoadable,
>          FalconFbifTarget, //
>      },
>      firmware::{
> @@ -28,6 +27,7 @@
>              BootloaderDmemDescV2,
>              GenericBootloader, //
>          },
> +        FalconUCodeDesc, //
>      },
>      gpu::Chipset,
>      num::FromSafeCast, //
> @@ -52,61 +52,44 @@ pub(crate) fn new(
>          dev: &'a Device<device::Bound>,
>          chipset: Chipset,
>      ) -> Result<Self> {
> +        let desc = match &firmware.desc {
> +            FalconUCodeDesc::V2(desc) => desc,
> +            FalconUCodeDesc::V3(_) => return Err(EINVAL),
> +        };

I'd just add a short comment to clarify:

    // Bootloader-loaded FWSEC is only used with V2.

And actually, this signals we can simplify the code even more by
matching against the header version in the TU102 HAL, and calling `new`
only when we matched against `V2` (passing the V2 descriptor to it
directly), as there seems to be a strict equivalence between "V2
descriptor" and "needs bootloader".

This would then let us remove the `needs_fwsec_bootloader` property of
the Tu102 HAL.

I'd do that as a follow-up though (i.e. not in this series), this patch
is correctly scoped and does a lot of simplifications already.

  reply	other threads:[~2026-11-30  5:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-29  2:55 [PATCH v2 0/6] gpu: nova-core: merge `load` and `boot` for falcons Eliot Courtney
2026-11-29  2:55 ` [PATCH v2 1/6] gpu: nova-core: falcon: program BROM and BOOTVEC in `boot` Eliot Courtney
2026-11-29  2:55 ` [PATCH v2 2/6] gpu: nova-core: use correct offset for imem in `BooterFirmware` Eliot Courtney
2026-11-29  2:55 ` [PATCH v2 3/6] gpu: nova-core: remove some dependencies on FalconDmaLoadTarget Eliot Courtney
2026-11-30  5:10   ` Alexandre Courbot [this message]
2026-11-30  8:05     ` Eliot Courtney
2026-11-29  2:55 ` [PATCH v2 4/6] gpu: nova-core: falcon: separate staging data for DMA from its location Eliot Courtney
2026-11-29  2:55 ` [PATCH v2 5/6] gpu: nova-core: falcon: add `FalconImage` for `FalconFirmware` trait Eliot Courtney
2026-11-29  2:55 ` [PATCH v2 6/6] gpu: nova-core: falcon: load the firmware image in Falcon::boot Eliot Courtney
2026-11-30  5:11 ` [PATCH v2 0/6] gpu: nova-core: merge `load` and `boot` for falcons Alexandre Courbot

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=DN8AC95F9GL4.ZO000FYJDN3E@nvidia.com \
    --to=acourbot@nvidia.com \
    --cc=airlied@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=apopple@nvidia.com \
    --cc=dakr@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ecourtney@nvidia.com \
    --cc=jhubbard@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nova-gpu@lists.linux.dev \
    --cc=simona@ffwll.ch \
    --cc=ttabi@nvidia.com \
    /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

all inboxes | Powered by JetHome®