[PATCH 1/2] drm/i915/hdcp: Move aux assignment after connector type check

Jani Nikula jani.nikula at linux.intel.com
Thu May 2 10:43:47 UTC 2024


On Tue, 30 Apr 2024, Suraj Kandpal <suraj.kandpal at intel.com> wrote:
> Move assignment of aux after connector type check as port may not
> exist if connector is not DPMST.
>
> Signed-off-by: Suraj Kandpal <suraj.kandpal at intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dp_hdcp.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_hdcp.c b/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
> index 92b03073acdd..92be53d7c81f 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
> @@ -687,15 +687,16 @@ int intel_dp_hdcp_get_remote_capability(struct intel_connector *connector,
>  					bool *hdcp2_capable)
>  {
>  	struct drm_i915_private *i915 = to_i915(connector->base.dev);
> -	struct drm_dp_aux *aux = &connector->port->aux;
> +	struct drm_dp_aux *aux;
>  	u8 bcaps;
>  	int ret;
>  
>  	*hdcp_capable = false;
>  	*hdcp2_capable = false;
> -	if (!intel_encoder_is_mst(connector->encoder))
> +	if (intel_encoder_is_mst(connector->encoder))

Suspicious.

>  		return -EINVAL;
>  
> +	aux = &connector->port->aux;
>  	ret =  _intel_dp_hdcp2_get_capability(aux, hdcp2_capable);
>  	if (ret)
>  		drm_dbg_kms(&i915->drm,

-- 
Jani Nikula, Intel


More information about the Intel-gfx mailing list