drm/i915: Fix divide by zero on watermark update
authorMika Kuoppala <mika.kuoppala@linux.intel.com>
Thu, 16 Jul 2015 16:36:51 +0000 (19:36 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 17 Jul 2015 07:06:40 +0000 (09:06 +0200)
commit661abfc028886eb1c6b5b9dbc433ef8cfb11217d
treecef34dd59093046aebc551b5a29ab5f21ac8dbd4
parent264954811af62dcfe17fc44cef379b315bb066eb
drm/i915: Fix divide by zero on watermark update

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 <przanoni@gmail.com>
Cc: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_pm.c