]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Add extra paranoia to ILK watermark calculations
authorMatt Roper <matthew.d.roper@intel.com>
Thu, 3 Dec 2015 19:37:40 +0000 (11:37 -0800)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Wed, 6 Jan 2016 10:35:29 +0000 (11:35 +0100)
commit9ca95a00357a80b12590a3659f4c9eecce91a114
treef337a00ef44c248b8d700bf28c8dea1c4846718e
parent2db0ef883d3a2d36dcfed2e4a2e245a19df59bd9
drm/i915: Add extra paranoia to ILK watermark calculations

Our low-level watermark calculation functions don't get called when the
CRTC is disabled or the relevant plane is invisible, so they should
never see a zero htotal or zero bpp.  However add some checks to ensure
this is true so that we don't wind up dividing by zero if we make a
mistake elsewhere in the driver (which the atomic watermark series has
revealed we might be).

References: http://lists.freedesktop.org/archives/intel-gfx/2015-October/077370.html
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1449171462-30763-6-git-send-email-matthew.d.roper@intel.com
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
drivers/gpu/drm/i915/intel_pm.c