diff options
author | 2018-02-13 14:33:51 -0500 | |
---|---|---|
committer | 2018-02-19 14:20:22 -0500 | |
commit | 7a572b1eda235052b9e0a41954938fa29f4b0f20 (patch) | |
tree | 85a77b24281d4582cb373500323d68d04f96cb08 /drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | |
parent | drm/amd/powerplay/smu7: allow mclk switching with no displays (diff) | |
download | linux-7a572b1eda235052b9e0a41954938fa29f4b0f20.tar.gz linux-7a572b1eda235052b9e0a41954938fa29f4b0f20.tar.bz2 linux-7a572b1eda235052b9e0a41954938fa29f4b0f20.zip |
drm/amdgpu/cgs: add refresh rate checking to non-DC display code
Clamp the vblank period to 0 if the refresh rate is larger than
120 hz for non-DC. This allows us to remove the refresh rate
checks from powerplay for mclk switching.
Reviewed-by: Eric Huang <JinhuiEric.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c index 71b4aec7f650..dc3360b16bda 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c @@ -953,6 +953,11 @@ static int amdgpu_cgs_get_active_displays_info(struct cgs_device *cgs_device, (amdgpu_crtc->v_border * 2); mode_info->vblank_time_us = vblank_lines * line_time_us; mode_info->refresh_rate = drm_mode_vrefresh(&amdgpu_crtc->hw_mode); + /* we have issues with mclk switching with refresh rates + * over 120 hz on the non-DC code. + */ + if (mode_info->refresh_rate > 120) + mode_info->vblank_time_us = 0; mode_info = NULL; } } |