From: "Eliot Courtney" <ecourtney@nvidia.com>
To: "Alexandre Courbot" <acourbot@nvidia.com>,
"Danilo Krummrich" <dakr@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>
Cc: "John Hubbard" <jhubbard@nvidia.com>,
"Alistair Popple" <apopple@nvidia.com>,
"Timur Tabi" <ttabi@nvidia.com>,
"Eliot Courtney" <ecourtney@nvidia.com>,
"Zhi Wang" <zhiw@nvidia.com>, <nova-gpu@lists.linux.dev>,
<rust-for-linux@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 08/12] gpu: nova-core: falcon: rename the local variables of dma_wr()
Date: Mon, 09 Nov 2026 14:39:39 +0900 [thread overview]
Message-ID: <DMQFSYAJBSCJ.2XAKFM2Q5ITFW@nvidia.com> (raw)
In-Reply-To: <20261107-r000-fw-v2-8-fb37cc5b20cd@nvidia.com>
On Sat Nov 7, 2026 at 6:48 PM JST, Alexandre Courbot wrote:
> The local variables of dma_wr() are named after a generic DMA address,
> while what they hold are the values programmed into specific registers.
> Worse, the `src_start` local has the same name as the `src_start` field
> of `FalconDmaLoadTarget`, but a different value for DMEM transfers.
>
> Rename them after the registers they end up in:
>
> - `dma_address` -> `dma_base`, programmed into DMATRFBASE,
> - `src_start` -> `fb_offset`, programmed into DMATRFFBOFFS,
> - `dma_start` -> `base_offset`, the part of the source offset that is
> folded into the DMA base.
>
> No functional change.
>
> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
> ---
> drivers/gpu/nova-core/falcon.rs | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/nova-core/falcon.rs b/drivers/gpu/nova-core/falcon.rs
> index ad497a5704ec..3b3e8e0f821a 100644
> --- a/drivers/gpu/nova-core/falcon.rs
> +++ b/drivers/gpu/nova-core/falcon.rs
> @@ -562,13 +562,13 @@ fn dma_wr(
> // For IMEM, we want to use the start offset as a virtual address tag for each page, since
> // code addresses in the firmware (and the boot vector) are virtual.
> //
> - // For DMEM, the start offset is folded into the DMA address.
> - let (src_start, dma_start) = match target_mem {
> + // For DMEM, the start offset is folded into the DMA base.
> + let (fb_offset, base_offset) = match target_mem {
> FalconMem::ImemSecure | FalconMem::ImemNonSecure => (load_offsets.src_start, 0),
> FalconMem::Dmem => (0, usize::from_safe_cast(load_offsets.src_start)),
> };
>
> - let dma_address = {
> + let dma_base = {
> // Upper limit of transfer is `(num_transfers * DMA_LEN) + load_offsets.src_start`.
> let dma_end = num_transfers
nit: also rename `dma_end`? e.g. `end_offset`
Reviewed-by: Eliot Courtney <ecourtney@nvidia.com>
next prev parent reply other threads:[~2026-11-09 5:39 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-07 9:47 [PATCH v2 00/12] gpu: nova-core: generic bootloader and falcon DMA changes for r000 Alexandre Courbot
2026-11-07 9:47 ` [PATCH v2 01/12] gpu: nova-core: separate the generic falcon bootloader from FWSEC Alexandre Courbot
2026-11-07 9:47 ` [PATCH v2 02/12] gpu: nova-core: falcon: widen the IMEM PIO offset to 24 bits Alexandre Courbot
2026-11-09 4:32 ` Eliot Courtney
2026-11-07 9:47 ` [PATCH v2 03/12] gpu: nova-core: place the generic bootloader at the top of IMEM Alexandre Courbot
2026-11-09 4:53 ` Eliot Courtney
2026-11-07 9:48 ` [PATCH v2 04/12] gpu: nova-core: move the bootloader DMEM descriptor out of FWSEC Alexandre Courbot
2026-11-07 9:48 ` [PATCH v2 05/12] gpu: nova-core: run the generic bootloader from its own type Alexandre Courbot
2026-11-09 4:59 ` Eliot Courtney
2026-11-07 9:48 ` [PATCH v2 06/12] rust: io: register: implement Copy and Clone for RegisterArrayLoc Alexandre Courbot
2026-11-07 13:05 ` Danilo Krummrich
2026-11-09 5:00 ` Eliot Courtney
2026-11-07 9:48 ` [PATCH v2 07/12] gpu: nova-core: falcon: introduce and use with_fbif_transcfg Alexandre Courbot
2026-11-09 5:36 ` Eliot Courtney
2026-11-07 9:48 ` [PATCH v2 08/12] gpu: nova-core: falcon: rename the local variables of dma_wr() Alexandre Courbot
2026-11-09 5:39 ` Eliot Courtney [this message]
2026-11-07 9:48 ` [PATCH v2 09/12] gpu: nova-core: falcon: allow DMEM DMA transfers to request tagging Alexandre Courbot
2026-11-09 5:47 ` Eliot Courtney
2026-11-07 9:48 ` [PATCH v2 10/12] gpu: nova-core: falcon: allow DMA transfers to read from a framebuffer address Alexandre Courbot
2026-11-07 9:48 ` [PATCH v2 11/12] gpu: nova-core: falcon: check the per-block DMA offsets for overflow Alexandre Courbot
2026-11-07 9:48 ` [PATCH v2 12/12] gpu: nova-core: falcon: program the FBIF_TRANSCFG register in dma_wr 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=DMQFSYAJBSCJ.2XAKFM2Q5ITFW@nvidia.com \
--to=ecourtney@nvidia.com \
--cc=acourbot@nvidia.com \
--cc=airlied@gmail.com \
--cc=aliceryhl@google.com \
--cc=apopple@nvidia.com \
--cc=dakr@kernel.org \
--cc=jhubbard@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nova-gpu@lists.linux.dev \
--cc=rust-for-linux@vger.kernel.org \
--cc=simona@ffwll.ch \
--cc=ttabi@nvidia.com \
--cc=zhiw@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®