Browse Source

drm/nouveau/gr/gf100: handle secure boot errors

Handle and propagate secure boot errors. Failure to do so results in
Nouveau incorrectly believing init has succeeded and a completely
black display during boot. If we propagate the error, GR init will fail
and the user will at least have a working display.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Alexandre Courbot 9 years ago
parent
commit
7fcab83901
1 changed files with 8 additions and 2 deletions
  1. 8 2
      drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c

+ 8 - 2
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c

@@ -1457,6 +1457,7 @@ gf100_gr_init_ctxctl(struct gf100_gr *gr)
 	struct nvkm_device *device = subdev->device;
 	struct nvkm_device *device = subdev->device;
 	struct nvkm_secboot *sb = device->secboot;
 	struct nvkm_secboot *sb = device->secboot;
 	int i;
 	int i;
+	int ret = 0;
 
 
 	if (gr->firmware) {
 	if (gr->firmware) {
 		/* load fuc microcode */
 		/* load fuc microcode */
@@ -1464,15 +1465,20 @@ gf100_gr_init_ctxctl(struct gf100_gr *gr)
 
 
 		/* securely-managed falcons must be reset using secure boot */
 		/* securely-managed falcons must be reset using secure boot */
 		if (nvkm_secboot_is_managed(sb, NVKM_SECBOOT_FALCON_FECS))
 		if (nvkm_secboot_is_managed(sb, NVKM_SECBOOT_FALCON_FECS))
-			nvkm_secboot_reset(sb, NVKM_SECBOOT_FALCON_FECS);
+			ret = nvkm_secboot_reset(sb, NVKM_SECBOOT_FALCON_FECS);
 		else
 		else
 			gf100_gr_init_fw(gr, 0x409000, &gr->fuc409c,
 			gf100_gr_init_fw(gr, 0x409000, &gr->fuc409c,
 					 &gr->fuc409d);
 					 &gr->fuc409d);
+		if (ret)
+			return ret;
+
 		if (nvkm_secboot_is_managed(sb, NVKM_SECBOOT_FALCON_GPCCS))
 		if (nvkm_secboot_is_managed(sb, NVKM_SECBOOT_FALCON_GPCCS))
-			nvkm_secboot_reset(sb, NVKM_SECBOOT_FALCON_GPCCS);
+			ret = nvkm_secboot_reset(sb, NVKM_SECBOOT_FALCON_GPCCS);
 		else
 		else
 			gf100_gr_init_fw(gr, 0x41a000, &gr->fuc41ac,
 			gf100_gr_init_fw(gr, 0x41a000, &gr->fuc41ac,
 					 &gr->fuc41ad);
 					 &gr->fuc41ad);
+		if (ret)
+			return ret;
 
 
 		nvkm_mc_unk260(device, 1);
 		nvkm_mc_unk260(device, 1);