[Intel-gfx] [PATCH v3 05/11] drm/i915: Only enable IPS when primary plane is visible

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Fri Nov 10 11:34:57 UTC 2017


This prevents us from having to open code those checks in
intel_dp_sink_crc.

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

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index f5933b0719c9..1b3f258038b2 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -4836,8 +4836,10 @@ void hsw_enable_ips(struct intel_crtc *crtc)
 {
 	struct drm_device *dev = crtc->base.dev;
 	struct drm_i915_private *dev_priv = to_i915(dev);
+	struct intel_crtc_state *crtc_state = crtc->config;
 
-	if (!crtc->config->ips_enabled)
+	if (!crtc_state->ips_enabled ||
+	    !(crtc_state->active_planes & BIT(PLANE_PRIMARY)))
 		return;
 
 	/*
-- 
2.15.0



More information about the Intel-gfx mailing list