[PATCH] drm/amd/display: explicitly disable psr_feature_enable appropriately

Leo Li sunpeng.li at amd.com
Fri Oct 7 13:51:15 UTC 2022



On 2022-10-07 00:28, Shirish S wrote:
> [Why]
> If psr_feature_enable is set to true by default, it continues to be enabled
> for non capable links.
> 
> [How]
> explicitly disable the feature on links that are not capable of the same.
> 
> Signed-off-by: Shirish S <shirish.s at amd.com>
Reviewed-by: Leo Li <sunpeng.li at amd.com>

Thanks!
> ---
>   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c
> index 8ca10ab3dfc1..26291db0a3cf 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c
> @@ -60,11 +60,15 @@ static bool link_supports_psrsu(struct dc_link *link)
>    */
>   void amdgpu_dm_set_psr_caps(struct dc_link *link)
>   {
> -	if (!(link->connector_signal & SIGNAL_TYPE_EDP))
> +	if (!(link->connector_signal & SIGNAL_TYPE_EDP)) {
> +		link->psr_settings.psr_feature_enabled = false;
>   		return;
> +	}
>   
> -	if (link->type == dc_connection_none)
> +	if (link->type == dc_connection_none) {
> +		link->psr_settings.psr_feature_enabled = false;
>   		return;
> +	}
>   
>   	if (link->dpcd_caps.psr_info.psr_version == 0) {
>   		link->psr_settings.psr_version = DC_PSR_VERSION_UNSUPPORTED;


More information about the amd-gfx mailing list