drm/i915/display: Handle MST connector in intel_attached_dp

Connector->encoder might be null for MST connector. Take this into account
in intel_attached_dp.

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240906070033.289015-2-jouni.hogander@intel.com
This commit is contained in:
Jouni Högander
2024-09-06 10:00:30 +03:00
parent d04d2348f5
commit 12f0176653

View File

@@ -1913,7 +1913,10 @@ static inline struct intel_dp *enc_to_intel_dp(struct intel_encoder *encoder)
static inline struct intel_dp *intel_attached_dp(struct intel_connector *connector)
{
return enc_to_intel_dp(intel_attached_encoder(connector));
if (connector->mst_port)
return connector->mst_port;
else
return enc_to_intel_dp(intel_attached_encoder(connector));
}
static inline bool intel_encoder_is_dp(struct intel_encoder *encoder)