Re: [PATCH v5 6/6] gpu: nova-core: reserve vGPU WPR2 heap

"Alexandre Courbot" <[email protected]> Thu, 23 Jul 2026 16:23:40 +0900
Newsgroups dev.linux.lists.nova-gpu,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Wed Jul 22, 2026 at 4:39 PM JST, Zhi Wang wrote:
> GSP-RM needs a larger WPR2 heap when booting in vGPU mode. The heap size
> is firmware-dependent, so it should come from the generated firmware
> bindings instead of being open-coded in nova-core.
>
> Pass the detected vGPU state into the framebuffer layout calculation. Keep
> baremetal boots on the existing heap sizing path, and use the 570.144
> vGPU default heap binding only when vGPU is enabled. The same state match
> also sets the VF partition count, so disabled and invalid 0/1-VF states do
> not enter the vGPU heap path.
>
> Cc: Alexandre Courbot <[email protected]>
> Signed-off-by: Zhi Wang <[email protected]>

I think Sashiko has a point regarding the possible subtraction
underflow due to the increased WPR2 size, I will change the code to use
checked operations when applying.