Skip to contentSkip to conversation

nouveau/gsp: add kconfig option to enable GSP paths by default

PATCH In review Dave Airlie 1 participant 2 messages Feb 14, 2024

Subsystems (3)
lore
Share & tools
lore

Dave Airlie

author maintainer
#0 lore raw

PATCH 1/1 nouveau/gsp: add kconfig option to enable GSP paths by default

From: Dave Airlie <[email protected]>

Turing and Ampere will continue to use the old paths by default, but we should allow distros to decide what the policy is.

---
 drivers/gpu/drm/nouveau/Kconfig                | 8 ++++++++
 drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c | 3 +++
 2 files changed, 11 insertions(+)
drivers/gpu/drm/nouveau/Kconfig +8 -0
index 1e6aaf95ff7c..ceef470c9fbf 100644
@@ -100,3 +100,11 @@ config DRM_NOUVEAU_SVM
 	help
 	  Say Y here if you want to enable experimental support for
 	  Shared Virtual Memory (SVM).
+
+config DRM_NOUVEAU_GSP_DEFAULT
+	bool "Use GSP firmware for Turing/Ampere (needs firmware installed)"
+	depends on DRM_NOUVEAU
+	default n
+	help
+	  Say Y here if you want to use the GSP codepaths by default on
+	  Turing and Ampere GPUs.
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c +3 -0
index a41735ab6068..fadbb89ffff2 100644
@@ -2313,6 +2313,9 @@ r535_gsp_load(struct nvkm_gsp *gsp, int ver, const struct nvkm_gsp_fwif *fwif)
 	struct nvkm_subdev *subdev = &gsp->subdev;
 	int ret;
 
+#if IS_ENABLED(CONFIG_DRM_NOUVEAU_GSP_DEFAULT)
+	fwif->enable = true;
+#endif
 	if (!nvkm_boolopt(subdev->device->cfgopt, "NvGspRm", fwif->enable))
 		return -EINVAL;
 
Signature · 1 line
2.43.0
author maintainer
#1 lore raw

(ignore this one, sent another just after)

Quoted 45 lines · Dave Airlie

From: Dave Airlie <[email protected]>

Turing and Ampere will continue to use the old paths by default, but we should allow distros to decide what the policy is.

---
 drivers/gpu/drm/nouveau/Kconfig                | 8 ++++++++
 drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c | 3 +++
 2 files changed, 11 insertions(+)
drivers/gpu/drm/nouveau/Kconfig +8 -0
index 1e6aaf95ff7c..ceef470c9fbf 100644
@@ -100,3 +100,11 @@ config DRM_NOUVEAU_SVM
        help
          Say Y here if you want to enable experimental support for
          Shared Virtual Memory (SVM).
+
+config DRM_NOUVEAU_GSP_DEFAULT
+       bool "Use GSP firmware for Turing/Ampere (needs firmware installed)"
+       depends on DRM_NOUVEAU
+       default n
+       help
+         Say Y here if you want to use the GSP codepaths by default on
+         Turing and Ampere GPUs.
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c +3 -1
index a41735ab6068..fadbb89ffff2 100644
@@ -2313,6 +2313,9 @@ r535_gsp_load(struct nvkm_gsp *gsp, int ver, const struct nvkm_gsp_fwif *fwif)
        struct nvkm_subdev *subdev = &gsp->subdev;
        int ret;
 
+#if IS_ENABLED(CONFIG_DRM_NOUVEAU_GSP_DEFAULT)
+       fwif->enable = true;
+#endif
        if (!nvkm_boolopt(subdev->device->cfgopt, "NvGspRm", fwif->enable))
                return -EINVAL;
 
--

2.43.0