]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/nouveau/gr/gm200: do not load firmware for secure falcons
authorAlexandre Courbot <acourbot@nvidia.com>
Wed, 24 Feb 2016 05:42:22 +0000 (14:42 +0900)
committerBen Skeggs <bskeggs@redhat.com>
Mon, 14 Mar 2016 00:13:23 +0000 (10:13 +1000)
Secure falcons' firmware is managed by secboot. Do not load it in GR for
them.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/engine/gr/gm200.c

index 24c0c45be5ca543f7d8d3a1064f74b29e81ec7ac..5e232e5849ad5f0cb30d57c7a3f4777ea2a8eacb 100644 (file)
@@ -24,6 +24,8 @@
 #include "gf100.h"
 #include "ctxgf100.h"
 
+#include <subdev/secboot.h>
+
 #include <nvif/class.h>
 
 /*******************************************************************************
@@ -366,12 +368,19 @@ gm200_gr_new_(const struct gf100_gr_func *func, struct nvkm_device *device,
        if (ret)
                return ret;
 
-       if ((ret = gf100_gr_ctor_fw(gr, "gr/fecs_inst", &gr->fuc409c)) ||
-           (ret = gf100_gr_ctor_fw(gr, "gr/fecs_data", &gr->fuc409d)))
-               return ret;
-       if ((ret = gf100_gr_ctor_fw(gr, "gr/gpccs_inst", &gr->fuc41ac)) ||
-           (ret = gf100_gr_ctor_fw(gr, "gr/gpccs_data", &gr->fuc41ad)))
-               return ret;
+       /* Load firmwares for non-secure falcons */
+       if (!nvkm_secboot_is_managed(device->secboot,
+                                    NVKM_SECBOOT_FALCON_FECS)) {
+               if ((ret = gf100_gr_ctor_fw(gr, "gr/fecs_inst", &gr->fuc409c)) ||
+                   (ret = gf100_gr_ctor_fw(gr, "gr/fecs_data", &gr->fuc409d)))
+                       return ret;
+       }
+       if (!nvkm_secboot_is_managed(device->secboot,
+                                    NVKM_SECBOOT_FALCON_GPCCS)) {
+               if ((ret = gf100_gr_ctor_fw(gr, "gr/gpccs_inst", &gr->fuc41ac)) ||
+                   (ret = gf100_gr_ctor_fw(gr, "gr/gpccs_data", &gr->fuc41ad)))
+                       return ret;
+       }
 
        if ((ret = gk20a_gr_av_to_init(gr, "gr/sw_nonctx", &gr->fuc_sw_nonctx)) ||
            (ret = gk20a_gr_aiv_to_init(gr, "gr/sw_ctx", &gr->fuc_sw_ctx)) ||