Re: [PATCH 1/3] drm/i915/display: Handle MST connector in intel_attached_dp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 04, 2024 at 01:18:32PM +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@xxxxxxxxx>
> ---
>  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 868ff8976ed93..6327caa1054f2 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> @@ -2046,7 +2046,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));

Yes, connector->encoder is specific to the pipe used by the encoder and
will be set only at the first modeset. Another way would be to set this
to a default (for PIPE_A) encoder already in
intel_dp_add_mst_connector(), but not sure if that's better than the
above.

After this change intel_attached_dp() could be used instead of
intel_connector_to_intel_dp(), could you replace the use of those too?

>  }
>  
>  static inline bool intel_encoder_is_dp(struct intel_encoder *encoder)
> -- 
> 2.34.1
> 



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux