diff mbox series

[v2,1/4] drm/i915/display: Handle MST connector in intel_attached_dp

Message ID 20240906070033.289015-2-jouni.hogander@intel.com (mailing list archive)
State New, archived
Headers show
Series DP2.1 Panel Replay Fixes | expand

Commit Message

Hogander, Jouni Sept. 6, 2024, 7 a.m. UTC
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>
---
 drivers/gpu/drm/i915/display/intel_display_types.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Imre Deak Sept. 6, 2024, 10:51 a.m. UTC | #1
On Fri, Sep 06, 2024 at 10:00:30AM +0300, Jouni Högander wrote:
> 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>

> ---
>  drivers/gpu/drm/i915/display/intel_display_types.h | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
> index 733de5edcfdb3..000ab373c8879 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> @@ -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)
> -- 
> 2.34.1
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
index 733de5edcfdb3..000ab373c8879 100644
--- a/drivers/gpu/drm/i915/display/intel_display_types.h
+++ b/drivers/gpu/drm/i915/display/intel_display_types.h
@@ -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)