Skip to content

Commit

Permalink
drm/nouveau/gr/gf100: handle secure boot errors
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexandre Courbot authored and Ben Skeggs committed Jul 14, 2016
1 parent e5da20a commit 7fcab83
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
Original file line number Diff line number Diff line change
Expand Up @@ -1457,22 +1457,28 @@ gf100_gr_init_ctxctl(struct gf100_gr *gr)
struct nvkm_device *device = subdev->device;
struct nvkm_secboot *sb = device->secboot;
int i;
int ret = 0;

if (gr->firmware) {
/* load fuc microcode */
nvkm_mc_unk260(device, 0);

/* securely-managed falcons must be reset using secure boot */
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
gf100_gr_init_fw(gr, 0x409000, &gr->fuc409c,
&gr->fuc409d);
if (ret)
return ret;

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
gf100_gr_init_fw(gr, 0x41a000, &gr->fuc41ac,
&gr->fuc41ad);
if (ret)
return ret;

nvkm_mc_unk260(device, 1);

Expand Down

0 comments on commit 7fcab83

Please sign in to comment.