Re: [PATCH v5 6/6] gpu: nova-core: reserve vGPU WPR2 heap
From: Alexandre Courbot
Date: Thu Jul 23 2026 - 03:25:57 EST
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 <acourbot@xxxxxxxxxx>
> Signed-off-by: Zhi Wang <zhiw@xxxxxxxxxx>
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.