secboot/acr352: reset PMU after secboot
PATCH 1/1 secboot/acr352: reset PMU after secboot
This is needed for using Nouveaus PMU image after performing secboot. This will be helpfull for Maxwell2 reclocking on boards without externally controlled fans like on most laptops or fanless boards.
--- drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
drm/nouveau/nvkm/subdev/secboot/acr_r352.c +13 -0
@@ -924,6 +924,19 @@ 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 ; }
Signature · 6 lines
2.13.2 _______________________________________________ Nouveau mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/nouveau
A message that is not in the archive (sent off-list or not yet received): 20170704173523.5308-1-karolherbst-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Quoted 3 lines · Karol Herbst
This is needed for using Nouveaus PMU image after performing secboot. This will be helpfull for Maxwell2 reclocking on boards without externally controlled fans like on most laptops or fanless boards.
I get the idea in principal, but have some concerns:
- Does this screw up re-running secboot during channel recovery (ie. page fault on gr)?
- What about the running of the unload blob?
It makes me angry that we even have to think about doing stuff like this! :P
Ben.
Quoted 21 lines
Signed-off-by Karol Herbst <[email protected]>--- drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)drm/nouveau/nvkm/subdev/secboot/acr_r352.c +6
-0@@ -924,6 +924,19 @@ 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);
drm/nouveau/nvkm/subdev/secboot/acr_r352.c acr_r352_bootstrap(struct acr_r352 *acr, struct nvkm_secboot *sb) · line 942
Quoted 10 lines
drm/nouveau/nvkm/subdev/secboot/acr_r352.c +7
-0+if (ret <0 ) { +nvkm_error (subdev,"Failed to reset PMU\n" ); +return ret; + } + } + } +return 0 ; }
_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
A message that is not in the archive (sent off-list or not yet received): 85f35af5-8ecc-63be-cd26-6b1566d5b3b0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Quoted 6 lines · Ben Skeggs
Quoted 3 lines · Karol Herbst
This is needed for using Nouveaus PMU image after performing secboot. This will be helpfull for Maxwell2 reclocking on boards without externally controlled fans like on most laptops or fanless boards.
I get the idea in principal, but have some concerns:
Quoted 8 lines
- Does this screw up re-running secboot during channel recovery (ie. page fault on gr)?
- What about the running of the unload blob?It makes me angry that we even have to think about doing stuff like this! :P
Ben.
Yeah I know, but this was the best I came up with. In earlier attempts I only came up with worse solutions.
I think it's technically fine, because nvkm_pmu_init calls nvkm_pmu_reset and pmu->func->init. In prior versions I've also added a fini call, but this made nouveau unhappy whenever I reclocked the GPU and reloaded nouveau afterwards. I could do some more testing though.
Good thing is that this is only a problem on GM20X GPUs and we only need a proper solution for those.
Quoted 29 lines
Quoted 29 lines
Signed-off-by Karol Herbst <[email protected]>--- drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)drm/nouveau/nvkm/subdev/secboot/acr_r352.c +13
-0@@ -924,6 +924,19 @@ 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 ; }
Quoted 9 lines
Quoted 2 lines
_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau
_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau