secboot/gm200: fix suspend/resume

Submitted by Alexandre Courbot on March 9, 2016, 9:37 a.m.

Details

Message ID 1457516228-20317-1-git-send-email-acourbot@nvidia.com
State New
Headers show
Series "secboot/gm200: fix suspend/resume" ( rev: 1 ) in Nouveau

Not browsing as part of any series.

Commit Message

Alexandre Courbot March 9, 2016, 9:37 a.m.
The state of the falcons was not properly updated after running the
unload ACR, which caused it to be run again (and thus fail) when
nvkm_secboot_fini() was called during resume.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
---
Ben, please feel free to squash this into the gm200 secboot implementation
patch - this fixes a bug that should not have been here to begin with.

 drm/nouveau/nvkm/subdev/secboot/gm200.c | 4 ++++
 1 file changed, 4 insertions(+)

Patch hide | download patch | download mbox

diff --git a/drm/nouveau/nvkm/subdev/secboot/gm200.c b/drm/nouveau/nvkm/subdev/secboot/gm200.c
index 137c821213bb..cc100dc940ea 100644
--- a/drm/nouveau/nvkm/subdev/secboot/gm200.c
+++ b/drm/nouveau/nvkm/subdev/secboot/gm200.c
@@ -1335,6 +1335,7 @@  gm200_secboot_fini(struct nvkm_secboot *sb, bool suspend)
 {
 	struct gm200_secboot *gsb = gm200_secboot(sb);
 	int ret = 0;
+	int i;
 
 	/* Run the unload blob to unprotect the WPR region */
 	if (gsb->acr_unload_blob &&
@@ -1342,6 +1343,9 @@  gm200_secboot_fini(struct nvkm_secboot *sb, bool suspend)
 		ret = gm200_secboot_run_hs_blob(gsb, gsb->acr_unload_blob,
 						&gsb->acr_unload_bl_desc);
 
+	for (i = 0; i < NVKM_SECBOOT_FALCON_END; i++)
+		gsb->falcon_state[i] = NON_SECURE;
+
 	return ret;
 }