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

"Danilo Krummrich" <[email protected]> Tue, 28 Jul 2026 16:00:36 +0200
Newsgroups dev.linux.lists.nova-gpu,org.freedesktop.lists.dri-devel,org.kernel.vger.linux-kernel,org.kernel.vger.rust-for-linux
Message-ID <[email protected]>
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 architectu=
re
ACR defines the location for each region and the driver only has to provide=
 the
corresponding sizes.

> +/// Framebuffer region sizes needed for GSP-FMC boot.

Some of them (e.g. frts_size or pmu_reserved_size) seem to be hardcoded bas=
ed 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 =3D u64::SZ_128K;

I assume this could also be handled by firmware?