From: sashiko-bot@kernel.org
To: "Eliot Courtney" <ecourtney@nvidia.com>
Cc: dri-devel@lists.freedesktop.org,
"Alexandre Courbot" <acourbot@nvidia.com>,
"Danilo Krummrich" <dakr@kernel.org>,
ojeda@kernel.org
Subject: Re: [PATCH 10/13] gpu: nova-core: split FbLayout into FSP and non-FSP versions
Date: Tue, 23 Jun 2026 20:45:45 +0000 [thread overview]
Message-ID: <20260623204545.A80ED1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260615-blackwell-fixes-v1-10-f2853e49ff7d@nvidia.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The overall framebuffer size (`fb_size`) is calculated but omitted from `FbSizes`, causing the `fbSize` parameter in `GspFwWprMeta` to incorrectly default to 0 on FSP architectures.
--
commit e3787f5a66f5e8d087e62ad8eace078a355f8a6f
Author: Eliot Courtney <ecourtney@nvidia.com>
gpu: nova-core: split FbLayout into FSP and non-FSP versions
The commit splits `FbLayout` into `FbRanges` and `FbSizes` to distinguish
between pre and post FSP architectures. For post-FSP architectures, only
sizes are calculated and passed instead of ranges.
> diff --git a/drivers/gpu/nova-core/fb.rs b/drivers/gpu/nova-core/fb.rs
> index 725e428154cf0..facecb8b411fe 100644
> --- a/drivers/gpu/nova-core/fb.rs
> +++ b/drivers/gpu/nova-core/fb.rs
[ ... ]
> +/// Framebuffer region sizes needed for GSP-FMC boot.
> +#[derive(Debug)]
> +pub(crate) struct FbSizes {
> + /// VGA workspace size, in bytes.
> + pub(crate) vga_workspace_size: u64,
> + /// FRTS size, in bytes.
> + pub(crate) frts_size: u64,
> + /// WPR2 heap size, in bytes.
> + pub(crate) wpr2_heap_size: u64,
> + /// Non-WPR heap size, in bytes.
> + pub(crate) heap_size: u64,
> + /// PMU reserved memory size, in bytes.
> + pub(crate) pmu_reserved_size: u32,
> + /// Number of VF partitions.
> + pub(crate) vf_partition_count: u8,
> +}
> +
> +impl FbSizes {
> + /// Computes the framebuffer region sizes for GSP-FMC boot.
> + fn new(chipset: Chipset, bar: Bar0<'_>) -> Result<Self> {
> + let hal = hal::fb_hal(chipset);
> + let fb_size = hal.vidmem_size(bar);
> +
> + Ok(Self {
> + vga_workspace_size: u64::SZ_128K,
> + frts_size: hal.frts_size(),
> + wpr2_heap_size: gsp::LibosParams::from_chipset(chipset)
> + .wpr_heap_size(chipset, fb_size)?,
> + heap_size: u64::from(hal.non_wpr_heap_size()),
> + pmu_reserved_size: hal.pmu_reserved_size(),
> + vf_partition_count: 0,
> + })
> + }
> +}
[ ... ]
> diff --git a/drivers/gpu/nova-core/gsp/fw.rs b/drivers/gpu/nova-core/gsp/fw.rs
> index 4db0cfa4dc4d1..042b0122e98dc 100644
> --- a/drivers/gpu/nova-core/gsp/fw.rs
> +++ b/drivers/gpu/nova-core/gsp/fw.rs
[ ... ]
> + let fields = match fb_info {
[ ... ]
> + GspFbInfo::Sizes(sizes) => WprMetaFields {
> + non_wpr_heap_size: sizes.heap_size,
> + gsp_fw_heap_size: sizes.wpr2_heap_size,
> + frts_size: sizes.frts_size,
> + gsp_fw_heap_vf_partition_count: sizes.vf_partition_count,
> + vga_workspace_size: sizes.vga_workspace_size,
> + pmu_reserved_size: sizes.pmu_reserved_size,
> + // When only sizes are supplied, offsets and several other parameters are not used.
> + ..Default::default()
> + },
> + };
> +
[ ... ]
> - gspFwHeapVfPartitionCount: fb_layout.vf_partition_count,
> - fbSize: fb_layout.fb.end - fb_layout.fb.start,
[ ... ]
> + gspFwHeapVfPartitionCount: fields.gsp_fw_heap_vf_partition_count,
> + fbSize: fields.fb_size,
[Severity: Medium]
Since `fb_size` is calculated in `FbSizes::new()` but not saved into `FbSizes`,
`fields.fb_size` will be set to 0 via `..Default::default()` for FSP architectures.
Even though the comment mentions that "offsets and several other parameters are
not used" by FSP, can omitting `fb_size` here and passing `fbSize` as 0 in
`GspFwWprMeta` cause firmware initialization failures or memory mapping errors
if the firmware still relies on this field?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260615-blackwell-fixes-v1-0-f2853e49ff7d@nvidia.com?part=10
next prev parent reply other threads:[~2026-06-23 20:45 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-15 14:40 [PATCH 00/13] gpu: nova-core: blackwell follow-ups and fixes Eliot Courtney
2026-06-15 14:40 ` [PATCH 01/13] gpu: nova-core: fsp: limit FSP receive message allocation size Eliot Courtney
2026-06-15 17:11 ` Gary Guo
2026-06-16 7:33 ` Alistair Popple
2026-06-20 14:08 ` Alexandre Courbot
2026-06-22 9:11 ` Eliot Courtney
2026-06-15 14:40 ` [PATCH 02/13] gpu: nova-core: fsp: catch bogus queue pointer issues Eliot Courtney
2026-06-15 17:15 ` Gary Guo
2026-06-16 7:57 ` Alistair Popple
2026-06-16 10:57 ` Gary Guo
2026-06-17 3:51 ` Eliot Courtney
2026-06-17 4:31 ` Alistair Popple
2026-06-15 14:40 ` [PATCH 03/13] gpu: nova-core: fsp: try to enforce exclusive access to FSP channel Eliot Courtney
2026-06-15 17:16 ` Gary Guo
2026-06-17 2:55 ` Eliot Courtney
2026-06-17 3:12 ` John Hubbard
2026-06-23 20:06 ` sashiko-bot
2026-06-15 14:40 ` [PATCH 04/13] gpu: nova-core: falcon: gsp: move PRIV target mask constants Eliot Courtney
2026-06-15 17:17 ` Gary Guo
2026-06-16 8:02 ` Alistair Popple
2026-06-20 10:48 ` Alexandre Courbot
2026-06-15 14:40 ` [PATCH 05/13] gpu: nova-core: gsp: keep FMC boot params DMA region alive during error Eliot Courtney
2026-06-15 17:23 ` Gary Guo
2026-06-17 5:27 ` Eliot Courtney
2026-06-17 13:52 ` Gary Guo
2026-06-22 9:26 ` Eliot Courtney
2026-06-15 14:40 ` [PATCH 06/13] gpu: nova-core: fsp: move FMC firmware loading into wait_secure_boot Eliot Courtney
2026-06-15 17:24 ` Gary Guo
2026-06-20 10:48 ` Alexandre Courbot
2026-06-15 14:40 ` [PATCH 07/13] gpu: nova-core: gsp: ensure lifetime for FMC boot DMA allocations Eliot Courtney
2026-06-15 14:40 ` [PATCH 08/13] gpu: nova-core: gsp: ensure LibOS DMA allocation lives long enough Eliot Courtney
2026-06-17 6:11 ` Alistair Popple
2026-06-15 14:40 ` [PATCH 09/13] gpu: nova-core: wait for FSP boot earlier Eliot Courtney
2026-06-17 14:27 ` Alexandre Courbot
2026-06-24 1:21 ` Eliot Courtney
2026-06-15 14:40 ` [PATCH 10/13] gpu: nova-core: split FbLayout into FSP and non-FSP versions Eliot Courtney
2026-06-23 20:45 ` sashiko-bot [this message]
2026-06-15 14:40 ` [PATCH 11/13] gpu: nova-core: correct FRTS vidmem offset calculation Eliot Courtney
2026-06-15 14:40 ` [PATCH 12/13] gpu: nova-core: rename heap size field Eliot Courtney
2026-06-15 14:40 ` [PATCH 13/13] gpu: nova-core: return non-WPR heap size as u64 from HALs Eliot Courtney
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=20260623204545.A80ED1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=acourbot@nvidia.com \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=ecourtney@nvidia.com \
--cc=ojeda@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.