Skip to content

NVKM GSP RPC kernel docs, cleanups and fixes

Zhi Wang nouveau 2 versions – Applied

Status from this message: Applied to drm-misc-next.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest15 patches 2 repliesApplied
  2. v315 patches 10 repliesSuperseded

Changes in v4 from the cover letter

- Introduce a documentation in Documentation/gpu/nouveau.rst.
- Fix the reference link of NVIDIA SDK headers in the document.
- Replace the "decoders" term with "terminology".
- Explain the adding offset in r535_gsp_msgq_get_entry().
- Replace the magic number 0x1000 with GSP_PAGE_SIZE in the re-factor.
- Introduce a DOC to explain the GSP message receiving flow.

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/15drm/nouveau: add a kernel doc to introduce the GSP RPCDocumentation/gpu/drivers.rst Documentation/gpu/nouveau.rst drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c+73 -00 replies
2/15drm/nouveau: rename "repc" to "gsp_rpc_len" on the GSP message recv pathdrivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c+27 -190 replies
3/15drm/nouveau: rename "argv" to what it represents on the GSP message send pathdrivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c+15 -120 replies
4/15drm/nouveau: remove unused param repc in *rm_alloc_push()drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c+7 -90 replies
5/15drm/nouveau: rename "argv" to what it represents in *rm_{alloc, ctrl}_*()drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c+14 -110 replies
6/15drm/nouveau: rename "argc" to what it represents in GSP RPC routinesdrivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c+34 -240 replies
7/15drm/nouveau: fix the broken marco GSP_MSG_MAX_SIZEdrivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c+1 -10 replies
8/15drm/nouveau: remove the magic number in r535_gsp_rpc_push()drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c+1 -10 replies
9/15drm/nouveau: refine the variable names in r535_gsp_rpc_push()drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c+15 -120 replies
10/15drm/nouveau: refine the variable names in r535_gsp_msg_recv()drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c+24 -230 replies
11/15drm/nouveau: rename the variable "cmd" to "msg" in r535_gsp_cmdq_{get, push}()drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c+16 -160 replies
12/15drm/nouveau: factor out r535_gsp_msgq_peek()drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c+66 -230 replies
13/15drm/nouveau: factor out r535_gsp_msgq_recv_one_elem()drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c+52 -200 replies
14/15drm/nouveau: support handling the return of large GSP messagedrivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c+97 -190 replies
15/15drm/nouveau: consume the return of large GSP messagedrivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c+18 -140 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 00/15] NVKM GSP RPC kernel docs, cleanups and fixes

Hi folks:

Here is another re-spin of handling the large GSP message return.

Besides the support of the large GSP message, kernel doc and many cleanups are introduced according to the comments in the previous spin [1].

For testing, I tried the following without any problem:

- run Uniengine Heaven [2] on my RTX 4060 for 8 hours
- the GL CTS runner [3] (commandline: ./cts-runner --type-gl40) from Khronos
- with the vGPU RFC patches [4], boot up a ubuntu VM with a vGPU on a L40 and run glmark2.

v4:
- Introduce a documentation in Documentation/gpu/nouveau.rst.
- Fix the reference link of NVIDIA SDK headers in the document.
- Replace the "decoders" term with "terminology".
- Explain the adding offset in r535_gsp_msgq_get_entry().
- Replace the magic number 0x1000 with GSP_PAGE_SIZE in the re-factor.
- Introduce a DOC to explain the GSP message receiving flow.

v3:

- Add a kernel doc and chart to introduce the GSP message and denote the memory layout.
- Add a decoder section in the kernel doc to explain the terms in the code.
- Refine the many confusing variable names to align with the terms in the kernel doc.
- Introduce the continaution records in the kernel doc.
- Re-factor the complicated function r535_gsp_msgq_wait().
- Other minor cleanups.

v2:

- Remove the Fixes: tags as the vanilla nouveau aren't going to hit these bugs. (Danilo)
- Test the patchset on VK-GL-CTS. (Danilo)
- Remove the ambiguous empty line in PATCH 2. (Danilo)
- Rename the r535_gsp_msgq_wait to gsp_msgq_recv. (Danilo)
- Introduce a data structure to hold the params of gsp_msgq_recv(). (Danilo)
- Document the params and the states they are related to. (Danilo)

[1] https://lore.kernel.org/nouveau/[email protected]/
[2] https://benchmark.unigine.com/heaven
[3] https://github.com/KhronosGroup/VK-GL-CTS
[4] https://lore.kernel.org/kvm/[email protected]/T/#t

Zhi Wang (15):
drm/nouveau: add a kernel doc to introduce the GSP RPC drm/nouveau: rename "repc" to "gsp_rpc_len" on the GSP message recv
path
drm/nouveau: rename "argv" to what it represents on the GSP message
send path
drm/nouveau: remove unused param repc in *rm_alloc_push() drm/nouveau: rename "argv" to what it represents in *rm_{alloc,

    ctrl}_*()
  drm/nouveau: rename "argc" to what it represents in GSP RPC routines
  drm/nouveau: fix the broken marco GSP_MSG_MAX_SIZE
  drm/nouveau: remove the magic number in r535_gsp_rpc_push()
  drm/nouveau: refine the variable names in r535_gsp_rpc_push()
  drm/nouveau: refine the variable names in r535_gsp_msg_recv()
  drm/nouveau: rename the variable "cmd" to "msg" in r535_gsp_cmdq_{get,
    push}()

drm/nouveau: factor out r535_gsp_msgq_peek() drm/nouveau: factor out r535_gsp_msgq_recv_one_elem() drm/nouveau: support handling the return of large GSP message drm/nouveau: consume the return of large GSP message

 Documentation/gpu/drivers.rst                 |   1 +
 Documentation/gpu/nouveau.rst                 |  27 +
 .../gpu/drm/nouveau/include/nvkm/subdev/gsp.h |   8 +-
 .../gpu/drm/nouveau/nvkm/subdev/gsp/r535.c    | 526 +++++++++++++-----
 4 files changed, 409 insertions(+), 153 deletions(-)
 create mode 100644 Documentation/gpu/nouveau.rst
Signature · 1 line
2.34.1