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:
2649548
)
drm/i915: Fix divide by zero on watermark update
author
Mika Kuoppala
<
[email protected]
>
Thu, 16 Jul 2015 16:36:51 +0000
(19:36 +0300)
committer
Daniel Vetter
<
[email protected]
>
Fri, 17 Jul 2015 07:06:40 +0000
(09:06 +0200)
Fix divide by zero if we end up updating the watermarks
with zero dotclock.
This is a stop gap measure to allow module load in cases
where our state keeping fails.
v2: WARN_ON added (Paulo)
Cc: Paulo Zanoni <
[email protected]
>
Cc: Damien Lespiau <
[email protected]
>
Signed-off-by: Mika Kuoppala <
[email protected]
>
Reviewed-by: Paulo Zanoni <
[email protected]
>
Reviewed-by: Damien Lespiau <
[email protected]
>
Signed-off-by: Daniel Vetter <
[email protected]
>
drivers/gpu/drm/i915/intel_pm.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/i915/intel_pm.c
b/drivers/gpu/drm/i915/intel_pm.c
index 5eeddc97ca2a2fddb0939e652e2b383529cdf29f..0d3e01434860faf9904814369e1e881a230f90f6 100644
(file)
--- a/
drivers/gpu/drm/i915/intel_pm.c
+++ b/
drivers/gpu/drm/i915/intel_pm.c
@@
-3316,8
+3316,10
@@
skl_compute_linetime_wm(struct drm_crtc *crtc, struct skl_pipe_wm_parameters *p)
if (!to_intel_crtc(crtc)->active)
return 0;
- return DIV_ROUND_UP(8 * p->pipe_htotal * 1000, p->pixel_rate);
+ if (WARN_ON(p->pixel_rate == 0))
+ return 0;
+ return DIV_ROUND_UP(8 * p->pipe_htotal * 1000, p->pixel_rate);
}
static void skl_compute_transition_wm(struct drm_crtc *crtc,