[(rebase)] drm/i915: Ignore previous watermarks on ILK if inherited
diff mbox

Message ID 20171102083722.32283-1-maarten.lankhorst@linux.intel.com
State New
Headers show

Commit Message

Maarten Lankhorst Nov. 2, 2017, 8:37 a.m. UTC
Fixes the following error when fastset is enabled, caught by CI:

[drm:ilk_validate_wm_level.part.8 [i915]] Sprite WM0 too large 56 (max 0)
[drm:ilk_validate_pipe_wm [i915]] LP0 watermark invalid
[drm:intel_crtc_atomic_check [i915]] No valid intermediate pipe watermarks are possible

Triggered on debugfs_test.read_all_entries, but could have been any igt
test depending on ordering.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Patch
diff mbox

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 79f2e3865921..266aa702aabc 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -3377,7 +3377,9 @@  static int ilk_compute_intermediate_wm(struct drm_device *dev,
 	 * and after the vblank.
 	 */
 	*a = newstate->wm.ilk.optimal;
-	if (!newstate->base.active || drm_atomic_crtc_needs_modeset(&newstate->base))
+	if (!newstate->base.active ||
+	    drm_atomic_crtc_needs_modeset(&newstate->base) ||
+	    oldstate->base.mode.private_flags & I915_MODE_FLAG_INHERITED)
 		return 0;
 
 	a->pipe_enabled |= b->pipe_enabled;