[PATCH 3/3] drm/amdgpu: load np fw prior before loading the TAs

Deucher, Alexander Alexander.Deucher at amd.com
Mon Dec 2 16:45:24 UTC 2019


> -----Original Message-----
> From: Hawking Zhang <Hawking.Zhang at amd.com>
> Sent: Monday, December 2, 2019 1:04 AM
> To: amd-gfx at lists.freedesktop.org; Min, Frank <Frank.Min at amd.com>;
> Clements, John <John.Clements at amd.com>; Deucher, Alexander
> <Alexander.Deucher at amd.com>
> Cc: Zhang, Hawking <Hawking.Zhang at amd.com>
> Subject: [PATCH 3/3] drm/amdgpu: load np fw prior before loading the TAs
> 
> Platform TAs will independently toggle DF Cstate.
> for instance, get/set topology from xgmi ta. do error injection from ras ta. In
> such case, PMFW needs to be loaded before TAs so that all the subsequent
> Cstate calls recieved by PSP FW can be routed to PMFW.
> 
> Change-Id: I83db1a22577a84ae647e7e570c200057650096c5
> Signed-off-by: Hawking Zhang <Hawking.Zhang at amd.com>


Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 66 ++++++++++++----------
> ---
>  1 file changed, 33 insertions(+), 33 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> index 0e8907179e07..ceea8314d88d 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> @@ -1218,39 +1218,6 @@ static int psp_hw_start(struct psp_context *psp)
>  		return ret;
>  	}
> 
> -	ret = psp_asd_load(psp);
> -	if (ret) {
> -		DRM_ERROR("PSP load asd failed!\n");
> -		return ret;
> -	}
> -
> -	if (adev->gmc.xgmi.num_physical_nodes > 1) {
> -		ret = psp_xgmi_initialize(psp);
> -		/* Warning the XGMI seesion initialize failure
> -		 * Instead of stop driver initialization
> -		 */
> -		if (ret)
> -			dev_err(psp->adev->dev,
> -				"XGMI: Failed to initialize XGMI session\n");
> -	}
> -
> -	if (psp->adev->psp.ta_fw) {
> -		ret = psp_ras_initialize(psp);
> -		if (ret)
> -			dev_err(psp->adev->dev,
> -					"RAS: Failed to initialize RAS\n");
> -
> -		ret = psp_hdcp_initialize(psp);
> -		if (ret)
> -			dev_err(psp->adev->dev,
> -				"HDCP: Failed to initialize HDCP\n");
> -
> -		ret = psp_dtm_initialize(psp);
> -		if (ret)
> -			dev_err(psp->adev->dev,
> -				"DTM: Failed to initialize DTM\n");
> -	}
> -
>  	return 0;
>  }
> 
> @@ -1560,6 +1527,39 @@ static int psp_load_fw(struct amdgpu_device
> *adev)
>  	if (ret)
>  		goto failed;
> 
> +	ret = psp_asd_load(psp);
> +	if (ret) {
> +		DRM_ERROR("PSP load asd failed!\n");
> +		return ret;
> +	}
> +
> +	if (adev->gmc.xgmi.num_physical_nodes > 1) {
> +		ret = psp_xgmi_initialize(psp);
> +		/* Warning the XGMI seesion initialize failure
> +		 * Instead of stop driver initialization
> +		 */
> +		if (ret)
> +			dev_err(psp->adev->dev,
> +				"XGMI: Failed to initialize XGMI session\n");
> +	}
> +
> +	if (psp->adev->psp.ta_fw) {
> +		ret = psp_ras_initialize(psp);
> +		if (ret)
> +			dev_err(psp->adev->dev,
> +					"RAS: Failed to initialize RAS\n");
> +
> +		ret = psp_hdcp_initialize(psp);
> +		if (ret)
> +			dev_err(psp->adev->dev,
> +				"HDCP: Failed to initialize HDCP\n");
> +
> +		ret = psp_dtm_initialize(psp);
> +		if (ret)
> +			dev_err(psp->adev->dev,
> +				"DTM: Failed to initialize DTM\n");
> +	}
> +
>  	return 0;
> 
>  failed:
> --
> 2.17.1



More information about the amd-gfx mailing list