[PATCH] drm/amd/pp: Supply Max DGPU clock for DC validation

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

 



On 2018-01-02 10:20 PM, Rex Zhu wrote:
> This patch can fix MultiGPU-Display blank
> out with 1 IGPU-4k display and 2 DGPU-two 4K
> displays.
> 
> Change-Id: I41208feb6b275d9e8b45e9ef129e19c9739107a4
> Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
> ---
>  drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> index fa9d161..977fcdf 100644
> --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> @@ -1425,9 +1425,14 @@ static int pp_get_display_mode_validation_clocks(void *handle,
>  
>  	if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_DynamicPatchPowerState))
>  		ret = phm_get_max_high_clocks(hwmgr, clocks);
> -
>  	mutex_unlock(&pp_handle->pp_lock);
> -	return ret;
> +
> +	if (ret) {

Does phm_get_max_high_clocks fail because get_max_high_clocks is not implemented for dGPU?

> +		clocks->memory_max_clock = pp_dpm_get_mclk(handle, false);
> +		clocks->engine_max_clock = pp_dpm_get_sclk(handle, false);

Would it make more sense to keep this inside phm_get_max_high_clocks as fallback when get_max_high_clocks is not implemented? Should we also print a warning in this case?

Harry

> +	}
> +
> +	return 0;
>  }
>  
>  const struct amd_pm_funcs pp_dpm_funcs = {
> 


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

  Powered by Linux