Message ID | 1522763873-23041-32-git-send-email-ramalingam.c@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
>-----Original Message----- >From: Intel-gfx [mailto:intel-gfx-bounces@lists.freedesktop.org] On Behalf Of >Ramalingam C >Sent: Tuesday, April 3, 2018 7:28 PM >To: intel-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org; >seanpaul@chromium.org; daniel@ffwll.ch; chris@chris-wilson.co.uk; >jani.nikula@linux.intel.com; Winkler, Tomas <tomas.winkler@intel.com>; >Usyskin, Alexander <alexander.usyskin@intel.com> >Cc: Vivi, Rodrigo <rodrigo.vivi@intel.com> >Subject: [Intel-gfx] [PATCH v3 31/40] drm/i915: Schedule hdcp_check_link in >_intel_hdcp_enable > >As a preparation for making the intel_hdcp_enable as common function for both >HDCP1.4 and HDCP2.2, HDCP1.4 check_link scheduling is moved into >_intel_hdcp_enable() function. Looks ok to me. Reviewed-by: Uma Shankar <uma.shankar@intel.com> > >v3: > No Changes. > >Signed-off-by: Ramalingam C <ramalingam.c@intel.com> >--- > drivers/gpu/drm/i915/intel_hdcp.c | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > >diff --git a/drivers/gpu/drm/i915/intel_hdcp.c >b/drivers/gpu/drm/i915/intel_hdcp.c >index 6eb58a833c7d..383e35689fbd 100644 >--- a/drivers/gpu/drm/i915/intel_hdcp.c >+++ b/drivers/gpu/drm/i915/intel_hdcp.c >@@ -627,7 +627,7 @@ static int _intel_hdcp_enable(struct intel_connector >*connector) > ret = intel_hdcp_auth(conn_to_dig_port(connector), > hdcp->hdcp_shim); > if (!ret) >- return 0; >+ break; > > DRM_DEBUG_KMS("HDCP Auth failure (%d)\n", ret); > >@@ -635,7 +635,12 @@ static int _intel_hdcp_enable(struct intel_connector >*connector) > _intel_hdcp_disable(connector); > } > >- DRM_ERROR("HDCP authentication failed (%d tries/%d)\n", tries, ret); >+ if (i != tries) >+ schedule_delayed_work(&hdcp->hdcp_check_work, >+ DRM_HDCP_CHECK_PERIOD_MS); >+ else >+ DRM_ERROR("HDCP authentication failed (%d tries/%d)\n", >+ tries, ret); > return ret; > } > >@@ -730,8 +735,6 @@ int intel_hdcp_enable(struct intel_connector *connector) > > hdcp->hdcp_value = DRM_MODE_CONTENT_PROTECTION_ENABLED; > schedule_work(&hdcp->hdcp_prop_work); >- schedule_delayed_work(&hdcp->hdcp_check_work, >- DRM_HDCP_CHECK_PERIOD_MS); > out: > mutex_unlock(&hdcp->hdcp_mutex); > return ret; >-- >2.7.4 > >_______________________________________________ >Intel-gfx mailing list >Intel-gfx@lists.freedesktop.org >https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff --git a/drivers/gpu/drm/i915/intel_hdcp.c b/drivers/gpu/drm/i915/intel_hdcp.c index 6eb58a833c7d..383e35689fbd 100644 --- a/drivers/gpu/drm/i915/intel_hdcp.c +++ b/drivers/gpu/drm/i915/intel_hdcp.c @@ -627,7 +627,7 @@ static int _intel_hdcp_enable(struct intel_connector *connector) ret = intel_hdcp_auth(conn_to_dig_port(connector), hdcp->hdcp_shim); if (!ret) - return 0; + break; DRM_DEBUG_KMS("HDCP Auth failure (%d)\n", ret); @@ -635,7 +635,12 @@ static int _intel_hdcp_enable(struct intel_connector *connector) _intel_hdcp_disable(connector); } - DRM_ERROR("HDCP authentication failed (%d tries/%d)\n", tries, ret); + if (i != tries) + schedule_delayed_work(&hdcp->hdcp_check_work, + DRM_HDCP_CHECK_PERIOD_MS); + else + DRM_ERROR("HDCP authentication failed (%d tries/%d)\n", + tries, ret); return ret; } @@ -730,8 +735,6 @@ int intel_hdcp_enable(struct intel_connector *connector) hdcp->hdcp_value = DRM_MODE_CONTENT_PROTECTION_ENABLED; schedule_work(&hdcp->hdcp_prop_work); - schedule_delayed_work(&hdcp->hdcp_check_work, - DRM_HDCP_CHECK_PERIOD_MS); out: mutex_unlock(&hdcp->hdcp_mutex); return ret;
As a preparation for making the intel_hdcp_enable as common function for both HDCP1.4 and HDCP2.2, HDCP1.4 check_link scheduling is moved into _intel_hdcp_enable() function. v3: No Changes. Signed-off-by: Ramalingam C <ramalingam.c@intel.com> --- drivers/gpu/drm/i915/intel_hdcp.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)