]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
nouveau/gsp: add kconfig option to enable GSP paths by default
authorDave Airlie <airlied@redhat.com>
Wed, 14 Feb 2024 04:06:32 +0000 (14:06 +1000)
committerDave Airlie <airlied@redhat.com>
Fri, 23 Feb 2024 00:00:41 +0000 (10:00 +1000)
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 <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240214040632.661069-1-airlied@gmail.com
drivers/gpu/drm/nouveau/Kconfig
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c

index 1e6aaf95ff7c79483f7d8bba1ddce897bb7affcf..ceef470c9fbfcfb08be6abd69627b7e7bc66366d 100644 (file)
@@ -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.
index a41735ab60683f02fde33f0107a2edae89155a6e..a64c81385682158fb5bf29b1db93655f7b3f7cac 100644 (file)
@@ -2312,8 +2312,12 @@ r535_gsp_load(struct nvkm_gsp *gsp, int ver, const struct nvkm_gsp_fwif *fwif)
 {
        struct nvkm_subdev *subdev = &gsp->subdev;
        int ret;
+       bool enable_gsp = fwif->enable;
 
-       if (!nvkm_boolopt(subdev->device->cfgopt, "NvGspRm", fwif->enable))
+#if IS_ENABLED(CONFIG_DRM_NOUVEAU_GSP_DEFAULT)
+       enable_gsp = true;
+#endif
+       if (!nvkm_boolopt(subdev->device->cfgopt, "NvGspRm", enable_gsp))
                return -EINVAL;
 
        if ((ret = r535_gsp_load_fw(gsp, "gsp", fwif->ver, &gsp->fws.rm)) ||