[Nouveau] [PATCH] secboot/acr352: reset PMU after secboot

Ben Skeggs skeggsb at gmail.com
Wed Jul 5 01:23:47 UTC 2017


On 07/05/2017 03:35 AM, Karol Herbst wrote:
> 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.

> 
> Signed-off-by: Karol Herbst <karolherbst at gmail.com>
> ---
>  drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/drm/nouveau/nvkm/subdev/secboot/acr_r352.c b/drm/nouveau/nvkm/subdev/secboot/acr_r352.c
> index a7213542..00095ef8 100644
> --- a/drm/nouveau/nvkm/subdev/secboot/acr_r352.c
> +++ b/drm/nouveau/nvkm/subdev/secboot/acr_r352.c
> @@ -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;
>  }
>  
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/nouveau/attachments/20170705/eb26f188/attachment.sig>


More information about the Nouveau mailing list