diff mbox

[10/13] drm/i915: Remove connectors_active from state checking.

Message ID 1437037166-9339-11-git-send-email-maarten.lankhorst@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Maarten Lankhorst July 16, 2015, 8:59 a.m. UTC
Connectors are updated atomically now, so the only interaction
with the encoder is through base.crtc.

If it's NULL the encoder's not part of any crtc, and if it's
not NULL then active should be equal to crtc_state->active.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 24 ++++++++----------------
 1 file changed, 8 insertions(+), 16 deletions(-)
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 30ece88703f0..bd6319bba2e3 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -6303,9 +6303,6 @@  static void intel_connector_check_state(struct intel_connector *connector)
 		     "active connector not linked to encoder\n");
 
 		if (encoder) {
-			I915_STATE_WARN(!encoder->connectors_active,
-			     "encoder->connectors_active not set\n");
-
 			encoder_enabled = encoder->get_hw_state(encoder, &pipe);
 			I915_STATE_WARN(!encoder_enabled, "encoder not enabled\n");
 			if (I915_STATE_WARN_ON(!encoder->base.crtc))
@@ -12655,9 +12652,6 @@  check_encoder_state(struct drm_device *dev)
 			      encoder->base.base.id,
 			      encoder->base.name);
 
-		I915_STATE_WARN(encoder->connectors_active && !encoder->base.crtc,
-		     "encoder's active_connectors set, but no crtc\n");
-
 		for_each_intel_connector(dev, connector) {
 			if (connector->base.encoder != &encoder->base)
 				continue;
@@ -12684,18 +12678,16 @@  check_encoder_state(struct drm_device *dev)
 		I915_STATE_WARN(active && !encoder->base.crtc,
 		     "active encoder with no crtc\n");
 
-		I915_STATE_WARN(encoder->connectors_active != active,
-		     "encoder's computed active state doesn't match tracked active state "
-		     "(expected %i, found %i)\n", active, encoder->connectors_active);
-
 		active = encoder->get_hw_state(encoder, &pipe);
-		I915_STATE_WARN(active != encoder->connectors_active,
-		     "encoder's hw state doesn't match sw tracking "
-		     "(expected %i, found %i)\n",
-		     encoder->connectors_active, active);
-
-		if (!encoder->base.crtc)
+		if (!encoder->base.crtc) {
+			I915_STATE_WARN(active,
+			     "encoder's active but not enabled in sw tracking");
 			continue;
+		}
+
+		I915_STATE_WARN(active != encoder->base.crtc->state->active,
+			     "encoder's active state %i doesn't match crtc state %i\n",
+			     active, encoder->base.crtc->state->active);
 
 		tracked_pipe = to_intel_crtc(encoder->base.crtc)->pipe;
 		I915_STATE_WARN(active && pipe != tracked_pipe,