projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d5dd62b
)
drm/i915: check for div-by-zero in vlv_PLL_is_optimal
author
Imre Deak
<imre.deak@intel.com>
Tue, 17 Mar 2015 09:40:04 +0000
(11:40 +0200)
committer
Daniel Vetter
<daniel.vetter@ffwll.ch>
Fri, 20 Mar 2015 10:48:21 +0000
(11:48 +0100)
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
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
9dc9a85
..
b0aa6a4
100644
(file)
--- a/
drivers/gpu/drm/i915/intel_display.c
+++ b/
drivers/gpu/drm/i915/intel_display.c
@@
-786,6
+786,9
@@
static bool vlv_PLL_is_optimal(struct drm_device *dev, int target_freq,
unsigned int best_error_ppm,
unsigned int *error_ppm)
{
+ if (WARN_ON_ONCE(!target_freq))
+ return false;
+
*error_ppm = div_u64(1000000ULL *
abs(target_freq - calculated_clock->dot),
target_freq);