aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2017-06-30 09:58:34 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-06-30 11:28:35 -0400
commit73cc90798ff765341a1d9c2cfe18153ab231c9bb (patch)
treeea6f85b5c4a3d2448922635e26f23cbfe3e7ccd1 /drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
parentbeb3777682d5c296cc15a2a424f5a7a98476def0 (diff)
drm/amdgpu/cgs: always set reference clock in mode_info
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 Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
index 8b8eda7d1703..c0a806280257 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,
838 return -EINVAL; 838 return -EINVAL;
839 839
840 mode_info = info->mode_info; 840 mode_info = info->mode_info;
841 if (mode_info) 841 if (mode_info) {
842 /* if the displays are off, vblank time is max */ 842 /* if the displays are off, vblank time is max */
843 mode_info->vblank_time_us = 0xffffffff; 843 mode_info->vblank_time_us = 0xffffffff;
844 /* always set the reference clock */
845 mode_info->ref_clock = adev->clock.spll.reference_freq;
846 }
844 847
845 if (adev->mode_info.num_crtc && adev->mode_info.mode_config_initialized) { 848 if (adev->mode_info.num_crtc && adev->mode_info.mode_config_initialized) {
846 list_for_each_entry(crtc, 849 list_for_each_entry(crtc,