diff options
| author | Sylvia Tsai <[email protected]> | 2017-02-09 21:35:39 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2017-09-26 21:14:23 +0000 |
| commit | 8f16f28936afcf68b92625d331a8ca760a386139 (patch) | |
| tree | f13450706a368b919794151f83d3859f2bd03184 /drivers/gpu/drm/amd/display/modules/freesync/freesync.c | |
| parent | drm/amd/display: Enable regamma 25 segments and use double buffer. (diff) | |
| download | kernel-8f16f28936afcf68b92625d331a8ca760a386139.tar.gz kernel-8f16f28936afcf68b92625d331a8ca760a386139.zip | |
drm/amd/display: Set ignore_msa_timing flag for freesync modes
- Set ignore_msa_timing_param to 1 only for modes that can support freesync
Signed-off-by: Sylvia Tsai <[email protected]>
Reviewed-by: Tony Cheng <[email protected]>
Acked-by: Harry Wentland <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/display/modules/freesync/freesync.c')
| -rw-r--r-- | drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c index 1ee732768f6e..b00b1df71f3e 100644 --- a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c +++ b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c @@ -262,7 +262,11 @@ bool mod_freesync_add_stream(struct mod_freesync *mod_freesync, enable_for_video = false; } - if (caps->supported) + unsigned int nom_refresh_rate_micro_hz = (unsigned int) + (((unsigned long long) core_stream->public.timing.pix_clk_khz) * 1000ULL * 1000ULL * 1000ULL + / core_stream->public.timing.h_total / core_stream->public.timing.v_total); + + if (caps->supported && nom_refresh_rate_micro_hz >= caps->min_refresh_in_micro_hz && nom_refresh_rate_micro_hz <= caps->max_refresh_in_micro_hz) core_stream->public.ignore_msa_timing_param = 1; core_freesync->num_entities++; |
