[PATCH 0/3] gpu: nova-core: Move PFB and PBUS register

Antonin Malzieu Ridolfi via B4 Relay posted 3 patches 3 days, 8 hours ago
drivers/gpu/nova-core/fb.rs            |  15 ++++
drivers/gpu/nova-core/fb/hal/ga100.rs  |   8 +-
drivers/gpu/nova-core/fb/hal/gb100.rs  |   6 +-
drivers/gpu/nova-core/fb/hal/gb202.rs  |   6 +-
drivers/gpu/nova-core/fb/hal/gh100.rs  |   6 +-
drivers/gpu/nova-core/fb/hal/tu102.rs  |   8 +-
drivers/gpu/nova-core/fb/regs.rs       | 132 ++++++++++++++++++++++++++++++++-
drivers/gpu/nova-core/gsp/hal/tu102.rs |  60 +++++++--------
drivers/gpu/nova-core/gsp/regs.rs      |  11 +++
drivers/gpu/nova-core/regs.rs          | 132 ---------------------------------
10 files changed, 206 insertions(+), 178 deletions(-)
[PATCH 0/3] gpu: nova-core: Move PFB and PBUS register
Posted by Antonin Malzieu Ridolfi via B4 Relay 3 days, 8 hours ago
Split part of the registers definitions grouped in nova root register file to
belonging modules whom actually use them.
Add WPR2 range query function to fb module.

To: Danilo Krummrich <dakr@kernel.org>
To: Alexandre Courbot <acourbot@nvidia.com>
To: Alice Ryhl <aliceryhl@google.com>
To: David Airlie <airlied@gmail.com>
To: Simona Vetter <simona@ffwll.ch>
Cc: nova-gpu@lists.linux.dev
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Cc: daniel.almeida@collabora.com

Suggested-by: Alexandre Courbot <acourbot@nvidia.com>
Suggested-by: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: Antonin Malzieu Ridolfi <dev@nanonej.com>
---
Antonin Malzieu Ridolfi (3):
      gpu: nova-core: Add function to query WPR2 range
      gpu: nova-core: Move PFB registers definitions
      gpu: nova-core: Move one PBUS register definition

 drivers/gpu/nova-core/fb.rs            |  15 ++++
 drivers/gpu/nova-core/fb/hal/ga100.rs  |   8 +-
 drivers/gpu/nova-core/fb/hal/gb100.rs  |   6 +-
 drivers/gpu/nova-core/fb/hal/gb202.rs  |   6 +-
 drivers/gpu/nova-core/fb/hal/gh100.rs  |   6 +-
 drivers/gpu/nova-core/fb/hal/tu102.rs  |   8 +-
 drivers/gpu/nova-core/fb/regs.rs       | 132 ++++++++++++++++++++++++++++++++-
 drivers/gpu/nova-core/gsp/hal/tu102.rs |  60 +++++++--------
 drivers/gpu/nova-core/gsp/regs.rs      |  11 +++
 drivers/gpu/nova-core/regs.rs          | 132 ---------------------------------
 10 files changed, 206 insertions(+), 178 deletions(-)
---
base-commit: 22e77d81d0a9ab3aee1c5538b3f2f8a66930bfa7
change-id: 20260721-nova-core-regs-split-d73383a155ed

Best regards,
--  
Antonin Malzieu Ridolfi <dev@nanonej.com>
Re: [PATCH 0/3] gpu: nova-core: Move PFB and PBUS register
Posted by Nanonej Dev 3 days, 8 hours ago
> There could be a function in the `fb` module that reads the registers
> and returns an `Option<Range<u64>>` - `None` if `is_wpr2_set` is
> `false`, or the WPR2 range otherwise. Then the GSP TU102 HAL would just
> use this function instead of poking the register as it currently does.
> 

> Doing so would move the WPR2 registers to the right place, and provide the
> right abstraction for the WPR2 region.
> 

> A patch series doing this could look like this:
> 

> - Add the `fb` module function abstracting the WPR2 region registers and
>   use it in the GSP's TU102 HAL.
> - Move the `NV_PFB_PRI_MMU_WPR2_ADDR*` registers under the `fb` module.
> - Move the `NV_PBUS_SW_SCRATCH_0E_FRTS_ERR` register under the `gsp`
>   module, since it is clearly themed after `FRTS`, which is part of the
>   GSP boot. But, without moving `NV_PBUS_SW_SCRATCH` (the actual
>   register being aliased). I expect you will hit a bug of the `register`
>   macro when doing this one - I'll try to address it, but the first two
>   steps should be safe to do and correct.

Thanks for the plan Alexandre, worked like a charm.