mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Alexandre Courbot" <acourbot@nvidia.com>
To: "Antonin Malzieu Ridolfi via B4 Relay"
	<devnull+dev.nanonej.com@kernel.org>
Cc: <dev@nanonej.com>, "Danilo Krummrich" <dakr@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>, <linux-kernel@vger.kernel.org>,
	<nova-gpu@lists.linux.dev>, <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 4/4] gpu: nova-core: Extract PFALCON register
Date: Fri, 28 Aug 2026 10:12:04 +0900	[thread overview]
Message-ID: <DL06EAP0GF04.2X3P68IPD0Y7X@nvidia.com> (raw)
In-Reply-To: <20260826-b4-extract-pfsp-registers-to-falcon-mod-v1-4-38351df09084@nanonej.com>

On Wed Aug 26, 2026 at 8:44 AM JST, Antonin Malzieu Ridolfi via B4 Relay wrote:
<...>
> +    // Configure DMA index for the bootloader to fetch the FWSEC firmware from system memory.
> +    pub(crate) fn set_fbif_transcfg_regs_at(&self, ctx_dma: u32) -> Result {
> +        self.bar.update(
> +            regs::NV_PFALCON_FBIF_TRANSCFG::of::<E>()
> +                .try_at(usize::from_safe_cast(ctx_dma))
> +                .ok_or(EINVAL)?,
> +            |v| {
> +                v.with_target(FalconFbifTarget::CoherentSysmem)
> +                    .with_mem_type(FalconFbifMemType::Physical)
> +            },
> +        );
> +        Ok(())
> +    }

Having this will be nice in that it will also enable us to keep
`pfalcon` private in [1]. But I'd like the method to look at bit less
ad-hoc and more confined. So would you:

- Move it to `falcon/gsp.rs` and implement it only to `Falcon<Gsp>`, as
  that's the only case where we need it so far,
- Make `ctx_dma` a `usize` (it's the caller's problem to provide the
  correct type),
- Add the `FalconFbifTarget` and `FalconFbifMemType` as arguments of the
  method,
- Maybe rename it to `set_fbif_transcfg`, because the fact we touch
  registers is an abstraction detail.

As a side-note, the series is going to clash heavily with Gary's, and
will need to be rebased on top of it after Gary's series is merged
(which as far as I'm concerned should be the next version). Apologies
for the inconvenience, but thankfully this should be mostly mechanical.

[1] https://lore.kernel.org/all/DL068LFDXPM1.7A1482C1UJF@nvidia.com/

  reply	other threads:[~2026-08-28  1:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-25 23:44 [PATCH 0/4] gpu: nova-core: Extract falcon registers Antonin Malzieu Ridolfi via B4 Relay
2026-08-25 23:44 ` [PATCH 1/4] gpu: nova-core: Extract PFSP register definitions Antonin Malzieu Ridolfi via B4 Relay
2026-08-25 23:44 ` [PATCH 2/4] gpu: nova-core: falcon: Extract PRISCV register Antonin Malzieu Ridolfi via B4 Relay
2026-08-25 23:44 ` [PATCH 3/4] gpu: nova-core: falcon: Extract PFALCON2 register Antonin Malzieu Ridolfi via B4 Relay
2026-08-25 23:44 ` [PATCH 4/4] gpu: nova-core: Extract PFALCON register Antonin Malzieu Ridolfi via B4 Relay
2026-08-28  1:12   ` Alexandre Courbot [this message]
2026-08-28 23:30     ` Nanonej Dev

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=DL06EAP0GF04.2X3P68IPD0Y7X@nvidia.com \
    --to=acourbot@nvidia.com \
    --cc=airlied@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=dakr@kernel.org \
    --cc=dev@nanonej.com \
    --cc=devnull+dev.nanonej.com@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nova-gpu@lists.linux.dev \
    --cc=simona@ffwll.ch \
    /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®