RE: [PATCH] drm/amdgpu/powerplay: use local renoir array sizes for clock fetching

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

 



Reviewed-by: Prike Liang <Prike.Liang@xxxxxxx>

> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of Alex
> Deucher
> Sent: Friday, October 18, 2019 12:00 AM
> To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> Cc: Deucher, Alexander <Alexander.Deucher@xxxxxxx>
> Subject: [PATCH] drm/amdgpu/powerplay: use local renoir array sizes for
> clock fetching
> 
> To avoid walking past the end of the arrays since the PP_SMU defines don't
> match the renoir defines.
> 
> Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
> ---
>  drivers/gpu/drm/amd/powerplay/renoir_ppt.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/powerplay/renoir_ppt.c
> b/drivers/gpu/drm/amd/powerplay/renoir_ppt.c
> index fa314c275a82..f0c8d1ad2a80 100644
> --- a/drivers/gpu/drm/amd/powerplay/renoir_ppt.c
> +++ b/drivers/gpu/drm/amd/powerplay/renoir_ppt.c
> @@ -427,22 +427,22 @@ static int renoir_get_dpm_clock_table(struct
> smu_context *smu, struct dpm_clocks
>  	if (!clock_table || !table)
>  		return -EINVAL;
> 
> -	for (i = 0; i < PP_SMU_NUM_DCFCLK_DPM_LEVELS; i++) {
> +	for (i = 0; i < NUM_DCFCLK_DPM_LEVELS; i++) {
>  		clock_table->DcfClocks[i].Freq = table->DcfClocks[i].Freq;
>  		clock_table->DcfClocks[i].Vol = table->DcfClocks[i].Vol;
>  	}
> 
> -	for (i = 0; i < PP_SMU_NUM_SOCCLK_DPM_LEVELS; i++) {
> +	for (i = 0; i < NUM_SOCCLK_DPM_LEVELS; i++) {
>  		clock_table->SocClocks[i].Freq = table->SocClocks[i].Freq;
>  		clock_table->SocClocks[i].Vol = table->SocClocks[i].Vol;
>  	}
> 
> -	for (i = 0; i < PP_SMU_NUM_FCLK_DPM_LEVELS; i++) {
> +	for (i = 0; i < NUM_FCLK_DPM_LEVELS; i++) {
>  		clock_table->FClocks[i].Freq = table->FClocks[i].Freq;
>  		clock_table->FClocks[i].Vol = table->FClocks[i].Vol;
>  	}
> 
> -	for (i = 0; i<  PP_SMU_NUM_MEMCLK_DPM_LEVELS; i++) {
> +	for (i = 0; i<  NUM_MEMCLK_DPM_LEVELS; i++) {
>  		clock_table->MemClocks[i].Freq = table->MemClocks[i].Freq;
>  		clock_table->MemClocks[i].Vol = table->MemClocks[i].Vol;
>  	}
> --
> 2.23.0
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
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