Skip to content
Snippets Groups Projects
Commit 1bb9bb50 authored by Zhi Wang's avatar Zhi Wang Committed by Danilo Krummrich
Browse files

drm/nouveau: remove the magic number in r535_gsp_rpc_push()


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: default avatarZhi Wang <zhiw@nvidia.com>
Signed-off-by: default avatarDanilo Krummrich <dakr@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250124182958.2040494-9-zhiw@nvidia.com
parent bbae6680
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment