Re: [PATCH v3 4/5] gpu: nova-core: split FbLayout into FSP and non-FSP versions

From: Eliot Courtney

Date: Thu Jul 30 2026 - 00:12:50 EST


On Tue Jul 28, 2026 at 11:00 PM JST, Danilo Krummrich wrote:
> On Fri Jul 24, 2026 at 8:56 AM CEST, Eliot Courtney wrote:
>> `FbLayout` is currently used for both pre and post FSP architectures. It
>> contains ranges for each region of framebuffer, but on post FSP
>> architectures, only the size is actually used by GSP. The offsets are
>> not decided by the driver.
>
> GSP may be a bit fuzzy here, it should be ACR, right?
>
> Also, maybe we should be more explicit and say that with the FSP architecture
> ACR defines the location for each region and the driver only has to provide the
> corresponding sizes.

Yeah, you are right. Will do.

>
>> +/// Framebuffer region sizes needed for GSP-FMC boot.
>
> Some of them (e.g. frts_size or pmu_reserved_size) seem to be hardcoded based on
> chipid, architecture or FW version; could this eventually be handled by the
> firmware as well?
>
>> +#[derive(Debug)]
>> +pub(crate) struct FbSizes {
>> + /// FRTS size, in bytes.
>> + pub(crate) frts_size: u64,
>> + /// WPR2 heap size, in bytes.
>> + pub(crate) wpr2_heap_size: u64,
>> + /// Non-WPR heap size, in bytes.
>> + pub(crate) non_wpr_heap_size: u64,
>> + /// PMU reserved memory size, in bytes.
>> + pub(crate) pmu_reserved_size: u32,
>> + /// Number of VF partitions.
>> + pub(crate) vf_partition_count: u8,
>> +}
>
> [...]
>
>> + pub(crate) fn from_sizes<'a>(
>> + gsp_firmware: &'a GspFirmware,
>> + sizes: &'a FbSizes,
>> + ) -> impl Init<Self> + 'a {
>> + /// VGA workspace size to reserve at the end of the framebuffer, in bytes.
>> + const VGA_WORKSPACE_SIZE: u64 = u64::SZ_128K;
>
> I assume this could also be handled by firmware?

Yes, I think in principle this could be handled in firmware (although it
isn't now). A middle ground could be providing via TLV metadata.