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

Signed-off-by: Maarten Lankhorst <[email protected]>
---
 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

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to