RE: [PATCH] drm/amd/powerplay: Add SMU WMTABLE Validity Check for Renoir

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ping...

> -----Original Message-----
> From: Liu, Zhan <Zhan.Liu@xxxxxxx>
> Sent: 2019/December/13, Friday 11:50 AM
> To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx; Wu, Hersen <hersenxs.wu@xxxxxxx>;
> Deucher, Alexander <Alexander.Deucher@xxxxxxx>; Wang, Kevin(Yang)
> <Kevin1.Wang@xxxxxxx>; Quan, Evan <Evan.Quan@xxxxxxx>; Yin, Tianci
> (Rico) <Tianci.Yin@xxxxxxx>
> Cc: Liu, Zhan <Zhan.Liu@xxxxxxx>
> Subject: [PATCH] drm/amd/powerplay: Add SMU WMTABLE Validity Check
> for Renoir
> 
> [Why]
> SMU watermark table (WMTABLE) validity check is missing on Renoir. This
> validity check is very useful for checking whether WMTABLE is updated
> successfully.
> 
> [How]
> Add SMU watermark validity check.
> 
> Signed-off-by: Zhan Liu <zhan.liu@xxxxxxx>
> ---
>  drivers/gpu/drm/amd/powerplay/renoir_ppt.c | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/powerplay/renoir_ppt.c
> b/drivers/gpu/drm/amd/powerplay/renoir_ppt.c
> index 89a54f8e08d3..81520b0fca68 100644
> --- a/drivers/gpu/drm/amd/powerplay/renoir_ppt.c
> +++ b/drivers/gpu/drm/amd/powerplay/renoir_ppt.c
> @@ -777,9 +777,17 @@ static int renoir_set_watermarks_table(
>  	}
> 
>  	/* pass data to smu controller */
> -	ret = smu_write_watermarks_table(smu);
> +	if ((smu->watermarks_bitmap & WATERMARKS_EXIST) &&
> +			!(smu->watermarks_bitmap &
> WATERMARKS_LOADED)) {
> +		ret = smu_write_watermarks_table(smu);
> +		if (ret) {
> +			pr_err("Failed to update WMTABLE!");
> +			return ret;
> +		}
> +		smu->watermarks_bitmap |= WATERMARKS_LOADED;
> +	}
> 
> -	return ret;
> +	return 0;
>  }
> 
>  static int renoir_get_power_profile_mode(struct smu_context *smu,
> --
> 2.17.1

_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux