Re: [PATCH 07/15] gpu: nova-core: gsp: define GSP_MSG_QUEUE_ELEMENT_SIZE_MAX without bindings
From: Eliot Courtney
Date: Thu Dec 03 2026 - 23:38:42 EST
On Thu Dec 3, 2026 at 9:09 PM JST, Alexandre Courbot wrote:
> From: John Hubbard <jhubbard@xxxxxxxxxx>
>
> The r570 bindings define GSP_MSG_QUEUE_ELEMENT_SIZE_MAX as 64 KiB (16
> GSP pages). Starting with r000, GSP-RM no longer hardcodes this limit in
> its headers and instead expects the driver to configure it at boot via
> MESSAGE_QUEUE_INIT_ARGUMENTS.queueElementSizeMax, which both sides then
> enforce on sent and received queue elements.
>
> Define GSP_MSG_QUEUE_ELEMENT_SIZE_MAX directly as GSP_PAGE_SIZE * 16 so
> we don't depend on the r570 bindings.
>
> No functional change.
>
> Signed-off-by: John Hubbard <jhubbard@xxxxxxxxxx>
> Signed-off-by: Alexandre Courbot <acourbot@xxxxxxxxxx>
> ---
> drivers/gpu/nova-core/gsp/fw.rs | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/nova-core/gsp/fw.rs b/drivers/gpu/nova-core/gsp/fw.rs
> index 927c6548fbdd..b08f0834ca91 100644
> --- a/drivers/gpu/nova-core/gsp/fw.rs
> +++ b/drivers/gpu/nova-core/gsp/fw.rs
> @@ -68,8 +68,9 @@
> };
>
> /// Maximum size of a single GSP message queue element in bytes.
> -pub(crate) const GSP_MSG_QUEUE_ELEMENT_SIZE_MAX: usize =
> - cv!(bindings::GSP_MSG_QUEUE_ELEMENT_SIZE_MAX);
> +///
> +/// GSP-RM receives this value at boot and allocates a heap staging buffer of that size.
> +pub(crate) const GSP_MSG_QUEUE_ELEMENT_SIZE_MAX: usize = GSP_PAGE_SIZE * 16;
>
> /// Empty type to group methods related to heap parameters for running the GSP firmware.
> enum GspFwHeapParams {}
Reviewed-by: Eliot Courtney <ecourtney@xxxxxxxxxx>