diff options
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/1846-drm-amd-display-Fix-and-simplify-apply_below_the_ran.patch')
-rw-r--r-- | common/recipes-kernel/linux/linux-yocto-4.19.8/1846-drm-amd-display-Fix-and-simplify-apply_below_the_ran.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/1846-drm-amd-display-Fix-and-simplify-apply_below_the_ran.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/1846-drm-amd-display-Fix-and-simplify-apply_below_the_ran.patch new file mode 100644 index 00000000..9b289028 --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/1846-drm-amd-display-Fix-and-simplify-apply_below_the_ran.patch @@ -0,0 +1,38 @@ +From 3358a23d3807e3341639243c3b25ec50f303160d Mon Sep 17 00:00:00 2001 +From: Mario Kleiner <mario.kleiner.de@gmail.com> +Date: Fri, 26 Apr 2019 23:40:14 +0200 +Subject: [PATCH 1846/2940] drm/amd/display: Fix and simplify + apply_below_the_range() + +The comparison of inserted_frame_duration_in_us against a +duration calculated from max_refresh_in_uhz is both wrong +in its math and not needed, as the min_duration_in_us value +is already cached in in_out_vrr for reuse. No need to +recalculate it wrongly at each invocation. + +Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> +Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com> +--- + drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c +index 3d867e34f8b3..19b1eaebe484 100644 +--- a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c ++++ b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c +@@ -437,10 +437,8 @@ static void apply_below_the_range(struct core_freesync *core_freesync, + inserted_frame_duration_in_us = last_render_time_in_us / + frames_to_insert; + +- if (inserted_frame_duration_in_us < +- (1000000 / in_out_vrr->max_refresh_in_uhz)) +- inserted_frame_duration_in_us = +- (1000000 / in_out_vrr->max_refresh_in_uhz); ++ if (inserted_frame_duration_in_us < in_out_vrr->min_duration_in_us) ++ inserted_frame_duration_in_us = in_out_vrr->min_duration_in_us; + + /* Cache the calculated variables */ + in_out_vrr->btr.inserted_duration_in_us = +-- +2.17.1 + |