From: John Hubbard <[email protected]>

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 <[email protected]>
Signed-off-by: Alexandre Courbot <[email protected]>
---
 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 {}

-- 
2.56.1

Reply via email to