Skip to content

Commit

Permalink
nouveau/gsp: use correct size for registry rpc.
Browse files Browse the repository at this point in the history
commit 61712c9 upstream.

Timur pointed this out before, and it just slipped my mind,
but this might help some things work better, around pcie power
management.

Cc: <[email protected]> # v6.7
Fixes: 8d55b0a ("nouveau/gsp: add some basic registry entries.")
Signed-off-by: Dave Airlie <[email protected]>
Signed-off-by: Danilo Krummrich <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
airlied authored and gregkh committed Feb 23, 2024
1 parent 7958c1b commit 18db77b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,6 @@ r535_gsp_rpc_set_registry(struct nvkm_gsp *gsp)
if (IS_ERR(rpc))
return PTR_ERR(rpc);

rpc->size = sizeof(*rpc);
rpc->numEntries = NV_GSP_REG_NUM_ENTRIES;

str_offset = offsetof(typeof(*rpc), entries[NV_GSP_REG_NUM_ENTRIES]);
Expand All @@ -1127,6 +1126,7 @@ r535_gsp_rpc_set_registry(struct nvkm_gsp *gsp)
strings += name_len;
str_offset += name_len;
}
rpc->size = str_offset;

return nvkm_gsp_rpc_wr(gsp, rpc, false);
}
Expand Down

0 comments on commit 18db77b

Please sign in to comment.