diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2015-12-04 22:20:21 +0200 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2015-12-08 16:30:21 +0200 |
commit | a2572f5cfb6c373cd4bc0acbd9f25f0af591ee7c (patch) | |
tree | 42ada6ad7ea35cdb8d83e7bee8e701611f9fee1b /drivers/gpu/drm/i915/intel_display.c | |
parent | f7be2c2150b0457ae88cb1cf7799846f996d72c7 (diff) | |
download | blackbird-op-linux-a2572f5cfb6c373cd4bc0acbd9f25f0af591ee7c.tar.gz blackbird-op-linux-a2572f5cfb6c373cd4bc0acbd9f25f0af591ee7c.zip |
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
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index c69a0d6c5a1e..7e3afcc62997 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -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; |