Commit 3e337d15 authored by Charlene Liu's avatar Charlene Liu Committed by Alex Deucher

drm/amd/display: sometime VtotalMin less than VTotal (rounding issue)

Signed-off-by: default avatarCharlene Liu <charlene.liu@amd.com>
Acked-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Reviewed-by: default avatarJordan Lazare <Jordan.Lazare@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 773d1bca
...@@ -905,7 +905,6 @@ void mod_freesync_notify_mode_change(struct mod_freesync *mod_freesync, ...@@ -905,7 +905,6 @@ void mod_freesync_notify_mode_change(struct mod_freesync *mod_freesync,
core_freesync = MOD_FREESYNC_TO_CORE(mod_freesync); core_freesync = MOD_FREESYNC_TO_CORE(mod_freesync);
for (stream_index = 0; stream_index < num_streams; stream_index++) { for (stream_index = 0; stream_index < num_streams; stream_index++) {
map_index = map_index_from_stream(core_freesync, map_index = map_index_from_stream(core_freesync,
streams[stream_index]); streams[stream_index]);
...@@ -913,11 +912,12 @@ void mod_freesync_notify_mode_change(struct mod_freesync *mod_freesync, ...@@ -913,11 +912,12 @@ void mod_freesync_notify_mode_change(struct mod_freesync *mod_freesync,
if (core_freesync->map[map_index].caps->supported) { if (core_freesync->map[map_index].caps->supported) {
/* Update the field rate for new timing */ /* Update the field rate for new timing */
state->nominal_refresh_rate_in_micro_hz = 1000000 * unsigned long long temp;
div64_u64(div64_u64((streams[stream_index]-> temp = streams[stream_index]->timing.pix_clk_khz;
timing.pix_clk_khz * 1000), temp *= 1000ULL * 1000ULL * 1000ULL;
streams[stream_index]->timing.v_total), temp = div_u64(temp, streams[stream_index]->timing.h_total);
streams[stream_index]->timing.h_total); temp = div_u64(temp, streams[stream_index]->timing.v_total);
state->nominal_refresh_rate_in_micro_hz = (unsigned int) temp;
/* Update the stream */ /* Update the stream */
update_stream(core_freesync, streams[stream_index]); update_stream(core_freesync, streams[stream_index]);
......
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