Commit 1754cea1 authored by Alex Deucher's avatar Alex Deucher

drm/amd/display: fix 64 bit divide in freesync code

Use div_u64() rather than a a 64 bit divide.

Fixes: 3fe5739d ("drm/amd/display: Add flip interval workaround")
Reviewed-by: default avatarNathan Chancellor <nathan@kernel.org>
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Cc: Angus Wang <Angus.Wang@amd.com>
Cc: Anthony Koo <Anthony.Koo@amd.com>
Cc: Aric Cyr <Aric.Cyr@amd.com>
Cc: Nathan Chancellor <nathan@kernel.org>
parent 6f90a49b
...@@ -1239,7 +1239,7 @@ void mod_freesync_handle_v_update(struct mod_freesync *mod_freesync, ...@@ -1239,7 +1239,7 @@ void mod_freesync_handle_v_update(struct mod_freesync *mod_freesync,
if (in_out_vrr->supported == false) if (in_out_vrr->supported == false)
return; return;
cur_timestamp_in_us = dm_get_timestamp(core_freesync->dc->ctx)/10; cur_timestamp_in_us = div_u64(dm_get_timestamp(core_freesync->dc->ctx), 10);
in_out_vrr->flip_interval.vsyncs_between_flip++; in_out_vrr->flip_interval.vsyncs_between_flip++;
in_out_vrr->flip_interval.v_update_timestamp_in_us = cur_timestamp_in_us; in_out_vrr->flip_interval.v_update_timestamp_in_us = cur_timestamp_in_us;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment