mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-14 13:19:36 +02:00
drm/amd/display: Round calculated vtotal
commit c03fca619f
upstream.
[WHY]
The calculated vtotal may has 1 line deviation. To get precisely
vtotal number, round the vtotal result.
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Reviewed-by: Anthony Koo <anthony.koo@amd.com>
Signed-off-by: Robin Chen <robin.chen@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
55fcbe5f60
commit
9ce1ee22dc
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user