Commit 3fc6376e authored by Aric Cyr's avatar Aric Cyr Committed by Alex Deucher

drm/amd/display: Only round InfoFrame refresh rates

[Why]
When calculating nominal refresh rates, don't round.
Only the VSIF needs to be rounded.

[How]
Revert rounding change for nominal and just round when forming the
FreeSync VSIF.
Signed-off-by: default avatarAric Cyr <aric.cyr@amd.com>
Reviewed-by: default avatarAnthony Koo <Anthony.Koo@amd.com>
Acked-by: default avatarRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Acked-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 0062972b
...@@ -524,12 +524,12 @@ static void build_vrr_infopacket_data(const struct mod_vrr_params *vrr, ...@@ -524,12 +524,12 @@ static void build_vrr_infopacket_data(const struct mod_vrr_params *vrr,
infopacket->sb[6] |= 0x04; infopacket->sb[6] |= 0x04;
/* PB7 = FreeSync Minimum refresh rate (Hz) */ /* PB7 = FreeSync Minimum refresh rate (Hz) */
infopacket->sb[7] = (unsigned char)(vrr->min_refresh_in_uhz / 1000000); infopacket->sb[7] = (unsigned char)((vrr->min_refresh_in_uhz + 500000) / 1000000);
/* PB8 = FreeSync Maximum refresh rate (Hz) /* PB8 = FreeSync Maximum refresh rate (Hz)
* Note: We should never go above the field rate of the mode timing set. * Note: We should never go above the field rate of the mode timing set.
*/ */
infopacket->sb[8] = (unsigned char)(vrr->max_refresh_in_uhz / 1000000); infopacket->sb[8] = (unsigned char)((vrr->max_refresh_in_uhz + 500000) / 1000000);
//FreeSync HDR //FreeSync HDR
...@@ -747,10 +747,6 @@ void mod_freesync_build_vrr_params(struct mod_freesync *mod_freesync, ...@@ -747,10 +747,6 @@ void mod_freesync_build_vrr_params(struct mod_freesync *mod_freesync,
nominal_field_rate_in_uhz = nominal_field_rate_in_uhz =
mod_freesync_calc_nominal_field_rate(stream); mod_freesync_calc_nominal_field_rate(stream);
/* Rounded to the nearest Hz */
nominal_field_rate_in_uhz = 1000000ULL *
div_u64(nominal_field_rate_in_uhz + 500000, 1000000);
min_refresh_in_uhz = in_config->min_refresh_in_uhz; min_refresh_in_uhz = in_config->min_refresh_in_uhz;
max_refresh_in_uhz = in_config->max_refresh_in_uhz; max_refresh_in_uhz = in_config->max_refresh_in_uhz;
......
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