Re: [PATCH 3/4] gpu: nova-core: gsp: Extract usable FB region from GSP
From: Gary Guo
Date: Wed Jun 10 2026 - 06:36:30 EST
On Wed Jun 10, 2026 at 11:23 AM BST, Gary Guo wrote:
> On Tue Jun 9, 2026 at 9:04 AM BST, Alexandre Courbot wrote:
>> From: Joel Fernandes <joelagnelf@xxxxxxxxxx>
>>
>> Add usable_fb_regions_iter() to GspStaticConfigInfo to extract the first
>> usable FB region from GSP's fbRegionInfoParams. Usable regions are those
>> that are not reserved or protected.
>>
>> The extracted region is stored in GetGspStaticInfoReply and exposed as
>> usable_fb_region field for use by the memory subsystem.
>>
>> Signed-off-by: Joel Fernandes <joelagnelf@xxxxxxxxxx>
>> Reviewed-by: John Hubbard <jhubbard@xxxxxxxxxx>
>> ---
>> drivers/gpu/nova-core/gsp/commands.rs | 9 +++++--
>> drivers/gpu/nova-core/gsp/fw/commands.rs | 40 +++++++++++++++++++++++++++++++-
>> 2 files changed, 46 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/nova-core/gsp/commands.rs b/drivers/gpu/nova-core/gsp/commands.rs
>> index f84de9f4f045..d955f52a93bb 100644
>> --- a/drivers/gpu/nova-core/gsp/commands.rs
>> +++ b/drivers/gpu/nova-core/gsp/commands.rs
>> @@ -5,6 +5,7 @@
>> array,
>> convert::Infallible,
>> ffi::FromBytesUntilNulError,
>> + ops::Range,
>> str::Utf8Error, //
>> };
>>
>> @@ -191,15 +192,18 @@ fn init(&self) -> impl Init<Self::Command, Self::InitError> {
>> }
>> }
>>
>> -/// The reply from the GSP to the [`GetGspInfo`] command.
>> +/// The reply from the GSP to the [`GetGspStaticInfo`] command.
>> pub(crate) struct GetGspStaticInfoReply {
>> gpu_name: [u8; 64],
>> + /// Usable FB (VRAM) region for driver memory allocation.
>> + #[expect(dead_code)]
>> + pub(crate) usable_fb_region: Range<u64>,
>> }
>>
>> impl MessageFromGsp for GetGspStaticInfoReply {
>> const FUNCTION: MsgFunction = MsgFunction::GetGspStaticInfo;
>> type Message = fw::commands::GspStaticConfigInfo;
>> - type InitError = Infallible;
>> + type InitError = Error;
>>
>> fn read(
>> msg: &Self::Message,
>> @@ -207,6 +211,7 @@ fn read(
>> ) -> Result<Self, Self::InitError> {
>> Ok(GetGspStaticInfoReply {
>> gpu_name: msg.gpu_name_str(),
>> + usable_fb_region: msg.usable_fb_regions_iter().next().ok_or(ENODEV)?,
>
> Does it just essentially require a FB to be present? What would happen to GPUs
> without display support like RTX PRO 4500 Blackwell Server Edition?
Actually looks like FB in Nova just means "VRAM" and not actually "Framebuffer".
Is this documented somewhere or am I just incapable of finding it?
Best,
Gary
>
> I feel that this check should be done by the user of `GetGspStaticInfoReply`,
> the firmware doesn't reply with an error.