[PATCH v4 0/5] gpu: nova-core: blackwell follow-ups and fixes

Eliot Courtney posted 5 patches 1 month, 4 weeks ago
drivers/gpu/nova-core/fb.rs            | 75 +++++++++++++++++++++++-------
drivers/gpu/nova-core/fb/hal.rs        |  2 +-
drivers/gpu/nova-core/fb/hal/ga100.rs  |  2 +-
drivers/gpu/nova-core/fb/hal/ga102.rs  |  2 +-
drivers/gpu/nova-core/fb/hal/gb100.rs  |  5 +-
drivers/gpu/nova-core/fb/hal/gb202.rs  |  5 +-
drivers/gpu/nova-core/fb/hal/gh100.rs  |  4 +-
drivers/gpu/nova-core/fb/hal/tu102.rs  |  6 +--
drivers/gpu/nova-core/fsp.rs           | 44 +++++++++++-------
drivers/gpu/nova-core/fsp/hal.rs       |  4 ++
drivers/gpu/nova-core/fsp/hal/gb100.rs |  6 +++
drivers/gpu/nova-core/fsp/hal/gb202.rs |  9 +++-
drivers/gpu/nova-core/fsp/hal/gh100.rs |  9 +++-
drivers/gpu/nova-core/gsp/boot.rs      | 28 ++++-------
drivers/gpu/nova-core/gsp/fw.rs        | 85 ++++++++++++++++++++++++++--------
drivers/gpu/nova-core/gsp/hal.rs       | 12 ++---
drivers/gpu/nova-core/gsp/hal/gh100.rs | 21 +++++----
drivers/gpu/nova-core/gsp/hal/tu102.rs | 32 ++++++++-----
18 files changed, 234 insertions(+), 117 deletions(-)
[PATCH v4 0/5] gpu: nova-core: blackwell follow-ups and fixes
Posted by Eliot Courtney 1 month, 4 weeks ago
Make FbLayout code more obvious and correct.

Currently, the frts vidmem offset is calculated based on the non-wpr
heap size and pmu reservation size, but AFAICT this is not right. The fb
layout actually looks like: | non-wpr heap | WPR2 .. FRTS | PMU reserved
| ... | VGA workspace | It's just by coincidence + generous alignment
that the values happened to match with something more like pmu reserved
size + vga workspace.

`FbLayout` is used for both pre and post FSP architectures. FbLayout
contains ranges for each region of framebuffer, but on post FSP
architectures, only the size is actually used. The region locations are
decided by ACR, which runs as part of the GSP-FMC, not by the driver.
The driver only provides the sizes. So, for post FSP architectures
FbLayout contains essentially guesses for the offsets. Instead, make
separate types so that we only store the information that's actually
needed. This includes the actual reserved size after the pmu reservation
so we can properly compute the frts offset.

Signed-off-by: Eliot Courtney <ecourtney@nvidia.com>
---
Changes in v4:
- Rebased + added shared vGPU helper (Alex)
- Clarify comments w.r.t frts offset (Alex)
- Clarify "split Fb layout" commit message w.r.t. ACR (Danilo)
- Link to v3: https://patch.msgid.link/20260724-blackwell-fixes-v3-0-01aa6a54e3fd@nvidia.com

Changes in v3:
- Remove patches merged already
- Move `fb_end_reserved_size` to FspHal
- Move construction of FbSizes/FbRanges into GSP HAL.
- Link to v2: https://patch.msgid.link/20260703-blackwell-fixes-v2-0-8e3d8bc32bb9@nvidia.com

Changes in v2:
- Rebased on top of 20260629-nova-bootcontext-v4-0-5539d8469590@nvidia.com
- Dropped applied patches ("falcon: gsp: move PRIV target mask constants"
  and "fsp: move FMC firmware loading into wait_secure_boot")
- Dropped "gsp: keep FMC boot params DMA region alive during error" - 
  will finish discussion/fix on the bootcontext series from Alex
- Drop "fsp: try to enforce exclusive access to FSP channel" as not
  necessary.
- Added some extra fixes around the falcon "halted" state
- Drop "wait for FSP boot earlier" since FSP is now at Gpu level in the
  bootcontext series from Alex
- Don't reset FSP queue pointers on error
- Add r-b from Alistair
- Return EMSGSIZE not EIO for FSP queue return message too big
- Link to v1: https://patch.msgid.link/20260615-blackwell-fixes-v1-0-f2853e49ff7d@nvidia.com

---
Eliot Courtney (5):
      gpu: nova-core: correct FRTS vidmem offset calculation
      gpu: nova-core: rename heap size field
      gpu: nova-core: return non-WPR heap size as u64 from HALs
      gpu: nova-core: split FbLayout into FSP and non-FSP versions
      gpu: nova-core: pass WPR metadata ownership to FmcBootArgs

 drivers/gpu/nova-core/fb.rs            | 75 +++++++++++++++++++++++-------
 drivers/gpu/nova-core/fb/hal.rs        |  2 +-
 drivers/gpu/nova-core/fb/hal/ga100.rs  |  2 +-
 drivers/gpu/nova-core/fb/hal/ga102.rs  |  2 +-
 drivers/gpu/nova-core/fb/hal/gb100.rs  |  5 +-
 drivers/gpu/nova-core/fb/hal/gb202.rs  |  5 +-
 drivers/gpu/nova-core/fb/hal/gh100.rs  |  4 +-
 drivers/gpu/nova-core/fb/hal/tu102.rs  |  6 +--
 drivers/gpu/nova-core/fsp.rs           | 44 +++++++++++-------
 drivers/gpu/nova-core/fsp/hal.rs       |  4 ++
 drivers/gpu/nova-core/fsp/hal/gb100.rs |  6 +++
 drivers/gpu/nova-core/fsp/hal/gb202.rs |  9 +++-
 drivers/gpu/nova-core/fsp/hal/gh100.rs |  9 +++-
 drivers/gpu/nova-core/gsp/boot.rs      | 28 ++++-------
 drivers/gpu/nova-core/gsp/fw.rs        | 85 ++++++++++++++++++++++++++--------
 drivers/gpu/nova-core/gsp/hal.rs       | 12 ++---
 drivers/gpu/nova-core/gsp/hal/gh100.rs | 21 +++++----
 drivers/gpu/nova-core/gsp/hal/tu102.rs | 32 ++++++++-----
 18 files changed, 234 insertions(+), 117 deletions(-)
---
base-commit: 44e7e7f7cffb10a93bb88e7cb59b7b8b3e2deb1c
change-id: 20260608-blackwell-fixes-30c9358c90a0

Best regards,
--  
Eliot Courtney <ecourtney@nvidia.com>
Re: [PATCH v4 0/5] gpu: nova-core: blackwell follow-ups and fixes
Posted by Alexandre Courbot 1 month, 4 weeks ago
On Tue, 04 Aug 2026 14:41:11 +0900, Eliot Courtney wrote:
> Make FbLayout code more obvious and correct.
> 
> Currently, the frts vidmem offset is calculated based on the non-wpr
> heap size and pmu reservation size, but AFAICT this is not right. The fb
> layout actually looks like: | non-wpr heap | WPR2 .. FRTS | PMU reserved
> | ... | VGA workspace | It's just by coincidence + generous alignment
> that the values happened to match with something more like pmu reserved
> size + vga workspace.
> 
> [...]

Applied to drm-rust-next, thanks!

Tested on TU106, GA107, GB203 - all booting and unloading successfully.

Edits on patch 1 done after offline confirmation with Eliot.

[1/5] gpu: nova-core: correct FRTS vidmem offset calculation
      [acourbot: add comment clarifying reason for testing pmu_reserved_size.]
      [acourbot: make fb_end_reserved_size() return u64.]
      commit: 5c9deba5578db5a3ea05be8a3e4a59ecb08ee76f
[2/5] gpu: nova-core: rename heap size field
      commit: b2bc53d34435043001223cbbd9429b0b6d71bc59
[3/5] gpu: nova-core: return non-WPR heap size as u64 from HALs
      commit: 744e168d62fc50b362a4835f77feafd417b965a1
[4/5] gpu: nova-core: split FbLayout into FSP and non-FSP versions
      commit: 6e46097f4d616a0f81083ae2c112efbb1473539e
[5/5] gpu: nova-core: pass WPR metadata ownership to FmcBootArgs
      commit: 528aef3a4bdd85137de9ec76bd02eacdf8160bb5