Blob Blame History Raw
From adbe5c5cd32c732a4ea1d4c5f41714fa836d69b6 Mon Sep 17 00:00:00 2001
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Date: Wed, 22 Nov 2017 19:39:06 +0100
Subject: [PATCH] drm/i915: Enable IPS with only sprite plane visible too, v4.
Mime-version: 1.0
Content-type: text/plain; charset=UTF-8
Content-transfer-encoding: 8bit
Git-commit: adbe5c5cd32c732a4ea1d4c5f41714fa836d69b6
Patch-mainline: v4.16-rc1
References: FATE#322643 bsc#1055900

This comment predates atomic, and I think with the way we currently
track IPS, it's safe to enable this for the case we switch too.

Changes since v1:
- Keep IPS enabled when switching planes.
Changes since v2:
- Enable IPS when at least one plane is enabled. (Ville)
Changes since v3:
- Actually do what was advertised in v3, sigh! (Ville, CI)

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171122183906.47767-1-maarten.lankhorst@linux.intel.com
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: Takashi Iwai <tiwai@suse.de>

---
 drivers/gpu/drm/i915/intel_display.c |    9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -6264,13 +6264,8 @@ static bool hsw_compute_ips_config(struc
 	if (crtc_state->ips_force_disable)
 		return false;
 
-	/*
-	 * FIXME IPS should be fine as long as one plane is
-	 * enabled, but in practice it seems to have problems
-	 * when going from primary only to sprite only and vice
-	 * versa.
-	 */
-	if (!(crtc_state->active_planes & BIT(PLANE_PRIMARY)))
+	/* IPS should be fine as long as at least one plane is enabled. */
+	if (!(crtc_state->active_planes & ~BIT(PLANE_CURSOR)))
 		return false;
 
 	/* pixel rate mustn't exceed 95% of cdclk with IPS on BDW */