[Intel-gfx] [PATCH v3.1 1/3] drm/i915: Fix broken mst get_hw_state.

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Thu Aug 6 04:47:35 PDT 2015


This function always returned false because intel_connector->encoder
is always NULL. Instead use the attached encoder from atomic.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
---
 drivers/gpu/drm/i915/intel_dp_mst.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c
index e3a5864160fa..ff01569158ea 100644
--- a/drivers/gpu/drm/i915/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/intel_dp_mst.c
@@ -395,9 +395,12 @@ static const struct drm_encoder_funcs intel_dp_mst_enc_funcs = {
 
 static bool intel_dp_mst_get_hw_state(struct intel_connector *connector)
 {
-	if (connector->encoder) {
+	struct intel_encoder *encoder;
+
+	encoder = to_intel_encoder(connector->base.state->best_encoder);
+	if (encoder) {
 		enum pipe pipe;
-		if (!connector->encoder->get_hw_state(connector->encoder, &pipe))
+		if (!encoder->get_hw_state(encoder, &pipe))
 			return false;
 		return true;
 	}
-- 
2.1.0



More information about the Intel-gfx mailing list