From cad63ac9edb87eec92b58e7cce36c95bdaa8212f Mon Sep 17 00:00:00 2001 From: jsg Date: Mon, 7 Oct 2024 05:28:20 +0000 Subject: [PATCH] drm/amd/display: Round calculated vtotal From Robin Chen 9ce1ee22dc6829175ec2dfd74d78d79eb20e0732 in linux-6.6.y/6.6.54 c03fca619fc687338a3b6511fdbed94096abdf79 in mainline linux --- sys/dev/pci/drm/amd/display/modules/freesync/freesync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/pci/drm/amd/display/modules/freesync/freesync.c b/sys/dev/pci/drm/amd/display/modules/freesync/freesync.c index 04602d6f05d..fb9e86a55c5 100644 --- a/sys/dev/pci/drm/amd/display/modules/freesync/freesync.c +++ b/sys/dev/pci/drm/amd/display/modules/freesync/freesync.c @@ -133,7 +133,7 @@ unsigned int mod_freesync_calc_v_total_from_refresh( v_total = div64_u64(div64_u64(((unsigned long long)( frame_duration_in_ns) * (stream->timing.pix_clk_100hz / 10)), - stream->timing.h_total), 1000000); + stream->timing.h_total) + 500000, 1000000); /* v_total cannot be less than nominal */ if (v_total < stream->timing.v_total) { -- 2.20.1