Skip to content

Commit a2572f5

Browse files
committed
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ä <[email protected]> Reviewed-by: Paulo Zanoni <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent f7be2c2 commit a2572f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/i915/intel_display.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3978,7 +3978,7 @@ static void lpt_program_iclkip(struct drm_crtc *crtc)
39783978
u32 iclk_pi_range = 64;
39793979
u32 desired_divisor, msb_divisor_value, pi_value;
39803980

3981-
desired_divisor = (iclk_virtual_root_freq / clock);
3981+
desired_divisor = DIV_ROUND_CLOSEST(iclk_virtual_root_freq, clock);
39823982
msb_divisor_value = desired_divisor / iclk_pi_range;
39833983
pi_value = desired_divisor % iclk_pi_range;
39843984

0 commit comments

Comments
 (0)