Skip to contentSkip to conversation

nouveau: add command-line GSP-RM registry support

PATCH Superseded Timur Tabi 1 participant 1 message Jan 29, 2024

Subsystems (3)

v2 of 7 Superseded Latest is v7 →

lore
Share & tools
lore

Timur Tabi

author
#0 lore raw

PATCH v2 1/1 nouveau: add command-line GSP-RM registry support

Add the NVreg_RegistryDwords command line parameter, which allows specifying additional registry keys to be sent to GSP-RM. This allows additional configuration, debugging, and experimentation with GSP-RM, which uses these keys to alter its behavior.

Note that these keys are passed as-is to GSP-RM, and Nouveau does not parse them. This is in contrast to the Nvidia driver, which may parse some of the keys to configure some functionality in concert with GSP-RM. Therefore, any keys which also require action by the driver may not function correctly when passed by Nouveau. Caveat emptor.

The name and format of NVreg_RegistryDwords is the same as used by the Nvidia driver, to maintain compatibility.

---
v2: fix typos and a memory leak

 .../gpu/drm/nouveau/include/nvkm/subdev/gsp.h |   6 +
 .../gpu/drm/nouveau/nvkm/subdev/gsp/r535.c    | 276 ++++++++++++++++--
 2 files changed, 258 insertions(+), 24 deletions(-)
drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h +6 -0
index d1437c08645f..5c6b8536e31c 100644
@@ -211,6 +211,12 @@ struct nvkm_gsp {
 		struct mutex mutex;;
 		struct idr idr;
 	} client_id;
+
+	/* A linked list of registry items. The registry RPC will be built from it. */
+	struct list_head registry_list;
+
+	/* The size of the registry RPC */
+	size_t registry_rpc_size;
 };
 
 static inline bool
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c +252 -24

310 lines not on this page · raw message

Signature · 1 line
2.34.1