[Nouveau] [PATCH 30/32] secboot/acr352: Reset PMU after secboot

Karol Herbst karolherbst at gmail.com
Fri Nov 17 00:04:34 UTC 2017


This is needed for using Nouveaus PMU image after performing secboot. This will
be helpful for Maxwell2 reclocking on boards without externally controlled
fans like on most laptops or fanless boards.

Signed-off-by: Karol Herbst <karolherbst at gmail.com>
---
 drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drm/nouveau/nvkm/subdev/secboot/acr_r352.c b/drm/nouveau/nvkm/subdev/secboot/acr_r352.c
index a7213542..bb8b7233 100644
--- a/drm/nouveau/nvkm/subdev/secboot/acr_r352.c
+++ b/drm/nouveau/nvkm/subdev/secboot/acr_r352.c
@@ -924,6 +924,20 @@ acr_r352_bootstrap(struct acr_r352 *acr, struct nvkm_secboot *sb)
 		}
 	}
 
+	/* reset the PMU if needed */
+	if (acr->base.boot_falcon == NVKM_SECBOOT_FALCON_PMU &&
+	    !nvkm_secboot_is_managed(sb, NVKM_SECBOOT_FALCON_PMU)) {
+		struct nvkm_pmu *pmu = subdev->device->pmu;
+
+		if (pmu) {
+			ret = nvkm_subdev_init(&pmu->subdev);
+			if (ret < 0) {
+				nvkm_error(subdev, "Failed to reset PMU\n");
+				return ret;
+			}
+		}
+	}
+
 	return 0;
 }
 
-- 
2.15.0



More information about the Nouveau mailing list