[Intel-gfx] [PATCH] drm/i915/hdcp: Fix CP current state

Gupta, Anshuman anshuman.gupta at intel.com
Tue Apr 18 10:57:12 UTC 2023



> -----Original Message-----
> From: Kandpal, Suraj <suraj.kandpal at intel.com>
> Sent: Tuesday, April 18, 2023 4:16 PM
> To: Gupta, Anshuman <anshuman.gupta at intel.com>; intel-
> gfx at lists.freedesktop.org
> Cc: Nautiyal, Ankit K <ankit.k.nautiyal at intel.com>; Shankar, Uma
> <uma.shankar at intel.com>
> Subject: RE: [PATCH] drm/i915/hdcp: Fix CP current state
> 
> >
> > > -----Original Message-----
> > > From: Kandpal, Suraj <suraj.kandpal at intel.com>
> > > Sent: Wednesday, April 12, 2023 9:18 AM
> > > To: intel-gfx at lists.freedesktop.org
> > > Cc: Gupta, Anshuman <anshuman.gupta at intel.com>; Nautiyal, Ankit K
> > > <ankit.k.nautiyal at intel.com>; Kandpal, Suraj
> > > <suraj.kandpal at intel.com>
> > > Subject: [PATCH] drm/i915/hdcp: Fix CP current state
> > >
> > > In many cases there is a need to change the CP property to desired
> > > even if not modeset has been requested yet on such situation being
> > > lid gets closed while DP is still connected in this case HDCP
> > > authentication needs to be reenabled.
> > > Remove Fix me as we now send a uevent via
> drm_hdcp_update_property.
> > >
> > > Signed-off-by: Suraj Kandpal <suraj.kandpal at intel.com>
> > > ---
> > >  drivers/gpu/drm/i915/display/intel_hdcp.c | 7 ++-----
> > >  1 file changed, 2 insertions(+), 5 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c
> > > b/drivers/gpu/drm/i915/display/intel_hdcp.c
> > > index 650232c4892b..7b0648e3499c 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_hdcp.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
> > > @@ -2564,12 +2564,9 @@ void intel_hdcp_atomic_check(struct
> > > drm_connector *connector,
> > >  						   new_state->crtc);
> > >  	/*
> > >  	 * Fix the HDCP uapi content protection state in case of modeset.
> > > -	 * FIXME: As per HDCP content protection property uapi doc, an
> > > uevent()
> > > -	 * need to be sent if there is transition from ENABLED->DESIRED.
> > >  	 */
> > This comment was added because , we did not send uevent in
> > intel_hdcp_atomic_check() function as it is not possible.
> 
> Yes but now we do it from update_pipe or when there is a call to
> update_property which schedules Propwork and there we call
> drm_hdcp_update_property which sends a uevent
> 
> > > -	if (drm_atomic_crtc_needs_modeset(crtc_state) &&
> > > -	    (old_cp == DRM_MODE_CONTENT_PROTECTION_ENABLED &&
> > > -	    new_cp != DRM_MODE_CONTENT_PROTECTION_UNDESIRED))
> > > +	if ((old_cp == DRM_MODE_CONTENT_PROTECTION_ENABLED &&
> > > +	     new_cp != DRM_MODE_CONTENT_PROTECTION_UNDESIRED))
> > >  		new_state->content_protection =
> > >  			DRM_MODE_CONTENT_PROTECTION_DESIRED;
> > This is overkill, for every display flip there will be HDCP authentication?
> 
> True we are trying to see some other fix for this but as of now only this
> seems to fix the issue
Please get a Ack from atomic commit POV, this impacts the display flip path and hdcp calls to content protection firmware 
may take longer time in display flips, have you tested it with higher refresh rate panels ?
Br,
Anshuman Gupta. 
> 
> Regards,
> Suraj Kandpal
> > Br,
> > Anshuman Gupta.
> > >
> > > --
> > > 2.25.1



More information about the Intel-gfx mailing list