drm/i915: Always recompute watermarks when distrust_bios_wm is set, v2.
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Wed, 31 May 2017 15:42:36 +0000 (17:42 +0200)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Thu, 1 Jun 2017 07:46:37 +0000 (09:46 +0200)
commit367d73d2806085bb507ab44c1f532640917fd5ca
tree4b183f7d71f277db333b8043b4c65dd57b915a41
parentadfdf85d795f4d4f487b61ee0b169d64c6e19081
drm/i915: Always recompute watermarks when distrust_bios_wm is set, v2.

On some systems there can be a race condition in which no crtc state is
added to the first atomic commit. This results in all crtc's having a
null DDB allocation, causing a FIFO underrun on any update until the
first modeset.

Changes since v1:
- Do not take the connection_mutex, this is already done below.

Reported-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Inspired-by: Mahesh Kumar <mahesh1.kumar@intel.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Fixes: 98d39494d375 ("drm/i915/gen9: Compute DDB allocation at atomic
check time (v4)")
Cc: <stable@vger.kernel.org> # v4.8+
Cc: Mahesh Kumar <mahesh1.kumar@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170531154236.27180-1-maarten.lankhorst@linux.intel.com
Reviewed-by: Mahesh Kumar <mahesh1.kumar@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
drivers/gpu/drm/i915/intel_pm.c