diff options
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/0379-drm-amd-display-Check-for-Zero-Range-in-FreeSync-Cal.patch')
-rw-r--r-- | common/recipes-kernel/linux/linux-yocto-4.14.71/0379-drm-amd-display-Check-for-Zero-Range-in-FreeSync-Cal.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/0379-drm-amd-display-Check-for-Zero-Range-in-FreeSync-Cal.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/0379-drm-amd-display-Check-for-Zero-Range-in-FreeSync-Cal.patch new file mode 100644 index 00000000..369170f8 --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/0379-drm-amd-display-Check-for-Zero-Range-in-FreeSync-Cal.patch @@ -0,0 +1,45 @@ +From 7f74b1e45cc1f554a61ee946a0d478857ec5d558 Mon Sep 17 00:00:00 2001 +From: Eric Cook <Eric.Cook@amd.com> +Date: Wed, 26 Apr 2017 11:51:38 -0400 +Subject: [PATCH 0379/4131] drm/amd/display: Check for Zero Range in FreeSync + Calc + +-check for min/max range in freesync calculation and handle it accordingly + +Signed-off-by: Eric <eric.cook@amd.com> +Acked-by: Harry Wentland <Harry.Wentland@amd.com> +Reviewed-by: Anthony Koo <Anthony.Koo@amd.com> +Signed-off-by: Alex Deucher <alexander.deucher@amd.com> +--- + drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c +index d3d5700..009cb79 100644 +--- a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c ++++ b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c +@@ -363,6 +363,21 @@ static void calc_freesync_range(struct core_freesync *core_freesync, + unsigned int index = map_index_from_stream(core_freesync, stream); + uint32_t vtotal = stream->timing.v_total; + ++ if ((min_refresh_in_uhz == 0) || (max_refresh_in_uhz == 0)) { ++ state->freesync_range.min_refresh = ++ state->nominal_refresh_rate_in_micro_hz; ++ state->freesync_range.max_refresh = ++ state->nominal_refresh_rate_in_micro_hz; ++ ++ state->freesync_range.max_frame_duration = 0; ++ state->freesync_range.min_frame_duration = 0; ++ ++ state->freesync_range.vmax = vtotal; ++ state->freesync_range.vmin = vtotal; ++ ++ return; ++ } ++ + min_frame_duration_in_ns = ((unsigned int) (div64_u64( + (1000000000ULL * 1000000), + max_refresh_in_uhz))); +-- +2.7.4 + |