mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-03-06 16:41:14 +07:00
drm/i915: Round to closest when computing the VGA dotclock for LPT-H
Bspec says we should round to closest when computing the LPT-H VGA dotclock, so let's do that. v2: Fix typo in commit message (Paulo) Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1449260421-14243-1-git-send-email-ville.syrjala@linux.intel.com
This commit is contained in:
parent
f7be2c2150
commit
a2572f5cfb
@ -3978,7 +3978,7 @@ static void lpt_program_iclkip(struct drm_crtc *crtc)
|
||||
u32 iclk_pi_range = 64;
|
||||
u32 desired_divisor, msb_divisor_value, pi_value;
|
||||
|
||||
desired_divisor = (iclk_virtual_root_freq / clock);
|
||||
desired_divisor = DIV_ROUND_CLOSEST(iclk_virtual_root_freq, clock);
|
||||
msb_divisor_value = desired_divisor / iclk_pi_range;
|
||||
pi_value = desired_divisor % iclk_pi_range;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user