Skip to content

Commit 1d49294

Browse files
committed
nouveau/gsp: add kconfig option to enable GSP paths by default
Turing and Ampere will continue to use the old paths by default, but we should allow distros to decide what the policy is. Signed-off-by: Dave Airlie <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 7c54886 commit 1d49294

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

drivers/gpu/drm/nouveau/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,11 @@ config DRM_NOUVEAU_SVM
100100
help
101101
Say Y here if you want to enable experimental support for
102102
Shared Virtual Memory (SVM).
103+
104+
config DRM_NOUVEAU_GSP_DEFAULT
105+
bool "Use GSP firmware for Turing/Ampere (needs firmware installed)"
106+
depends on DRM_NOUVEAU
107+
default n
108+
help
109+
Say Y here if you want to use the GSP codepaths by default on
110+
Turing and Ampere GPUs.

drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2312,8 +2312,12 @@ r535_gsp_load(struct nvkm_gsp *gsp, int ver, const struct nvkm_gsp_fwif *fwif)
23122312
{
23132313
struct nvkm_subdev *subdev = &gsp->subdev;
23142314
int ret;
2315+
bool enable_gsp = fwif->enable;
23152316

2316-
if (!nvkm_boolopt(subdev->device->cfgopt, "NvGspRm", fwif->enable))
2317+
#if IS_ENABLED(CONFIG_DRM_NOUVEAU_GSP_DEFAULT)
2318+
enable_gsp = true;
2319+
#endif
2320+
if (!nvkm_boolopt(subdev->device->cfgopt, "NvGspRm", enable_gsp))
23172321
return -EINVAL;
23182322

23192323
if ((ret = r535_gsp_load_fw(gsp, "gsp", fwif->ver, &gsp->fws.rm)) ||

0 commit comments

Comments
 (0)