projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
43b0ac5
)
drm/i915: Use DIV_ROUND_CLOSEST()
author
Ville Syrjälä
<
[email protected]
>
Tue, 24 Sep 2013 18:26:19 +0000
(21:26 +0300)
committer
Daniel Vetter
<
[email protected]
>
Tue, 1 Oct 2013 05:45:42 +0000
(07:45 +0200)
vlv_find_best_dpll() has an open coded DIV_ROUND_CLOSEST(). Replace it
with the real thing.
Signed-off-by: Ville Syrjälä <
[email protected]
>
Reviewed-by: Mika Kuoppala <
[email protected]
>
Signed-off-by: Daniel Vetter <
[email protected]
>
drivers/gpu/drm/i915/intel_display.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/i915/intel_display.c
b/drivers/gpu/drm/i915/intel_display.c
index fcf22960d88b6172c5dbec195a3e5766bfc1e01d..76870f0ffa7a2b4574de5f57a1053ad8b0c60704 100644
(file)
--- a/
drivers/gpu/drm/i915/intel_display.c
+++ b/
drivers/gpu/drm/i915/intel_display.c
@@
-695,8
+695,7
@@
vlv_find_best_dpll(const intel_limit_t *limit, struct drm_crtc *crtc,
p = p1 * p2;
/* based on hardware requirement, prefer bigger m1,m2 values */
for (m1 = limit->m1.min; m1 <= limit->m1.max; m1++) {
- m2 = (((2*(fastclk * p * n / m1 )) +
- refclk) / (2*refclk));
+ m2 = DIV_ROUND_CLOSEST(fastclk * p * n, refclk * m1);
m = m1 * m2;
vco = updrate * m;