[PATCH v3 08/15] nvkm: remove the magic number in r535_gsp_rpc_push()
Zhi Wang
zhiw at nvidia.com
Thu Oct 31 08:52:43 UTC 2024
There has been a GSP_MSG_MAX_SIZE which represents the max size of a GSP
message element header. Use it instead of a magic number.
No functional change is intended.
Signed-off-by: Zhi Wang <zhiw at nvidia.com>
---
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c
index 8d7b884f5adb..5bc56a9ba3f8 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c
@@ -796,7 +796,7 @@ r535_gsp_rpc_push(struct nvkm_gsp *gsp, void *payload, bool wait,
{
struct nvfw_gsp_rpc *rpc = to_gsp_hdr(payload, rpc);
struct r535_gsp_msg *cmd = to_gsp_hdr(rpc, cmd);
- const u32 max_msg_size = (16 * 0x1000) - sizeof(struct r535_gsp_msg);
+ const u32 max_msg_size = GSP_MSG_MAX_SIZE - sizeof(*cmd);
const u32 max_rpc_size = max_msg_size - sizeof(*rpc);
u32 rpc_size = rpc->length - sizeof(*rpc);
void *repv;
--
2.34.1
More information about the Nouveau
mailing list