[PATCH] drm/amdgpu/cgs: always set reference clock in mode_info

Christian König deathsimple at vodafone.de
Fri Jun 30 14:07:12 UTC 2017


Am 30.06.2017 um 16:05 schrieb Alex Deucher:
> It's relevent regardless of whether there are displays
> enabled.  Fixes garbage values for ref clock in powerplay
> leading to incorrect fan speed reporting when displays
> are disabled.
>
> bug: https://bugs.freedesktop.org/show_bug.cgi?id=101653
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
> Cc: stable at vger.kernel.org
Acked-by: Christian König <christian.koenig at amd.com>

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
> index 8b8eda7..c0a8062 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
> @@ -838,9 +838,12 @@ static int amdgpu_cgs_get_active_displays_info(struct cgs_device *cgs_device,
>   		return -EINVAL;
>   
>   	mode_info = info->mode_info;
> -	if (mode_info)
> +	if (mode_info) {
>   		/* if the displays are off, vblank time is max */
>   		mode_info->vblank_time_us = 0xffffffff;
> +		/* always set the reference clock */
> +		mode_info->ref_clock = adev->clock.spll.reference_freq;
> +	}
>   
>   	if (adev->mode_info.num_crtc && adev->mode_info.mode_config_initialized) {
>   		list_for_each_entry(crtc,




More information about the amd-gfx mailing list