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

Kandpal, Suraj suraj.kandpal at intel.com
Thu May 2 12:13:00 UTC 2024



> -----Original Message-----
> From: Jani Nikula <jani.nikula at linux.intel.com>
> Sent: Thursday, May 2, 2024 4:14 PM
> To: Kandpal, Suraj <suraj.kandpal at intel.com>; intel-gfx at lists.freedesktop.org
> Cc: Shankar, Uma <uma.shankar at intel.com>; Nautiyal, Ankit K
> <ankit.k.nautiyal at intel.com>; Kandpal, Suraj <suraj.kandpal at intel.com>
> Subject: Re: [PATCH 1/2] drm/i915/hdcp: Move aux assignment after
> connector type check
> 
> 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.
Oops typo here will remove this change.
Regards,
Suraj Kandpal
> 
> >  		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