Message ID | 20240416033918.567386-2-suraj.kandpal@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/i915/hdcp: Disable HDCP Line Rekeying for HDCP2.2 on HDMI | expand |
On Tue, 16 Apr 2024, Suraj Kandpal <suraj.kandpal@intel.com> wrote: > Disable HDCP Line Rekeying when HDCP ver > 1.4 and when we are > on HDMI TMDS operation for DISPLAY_VEY >= 14. Blank line here. > WA: 16022217614 The workarounds need to be listed in comments, not so much in the commit message. > Bspec: 49273 > Bspec: 69964 > No blank line here. > Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> > --- > drivers/gpu/drm/i915/display/intel_hdcp.c | 16 ++++++++++++++++ > drivers/gpu/drm/i915/i915_reg.h | 1 + > 2 files changed, 17 insertions(+) > > diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c > index d5ed4c7dfbc0..15af6e184ef8 100644 > --- a/drivers/gpu/drm/i915/display/intel_hdcp.c > +++ b/drivers/gpu/drm/i915/display/intel_hdcp.c > @@ -30,6 +30,20 @@ > #define KEY_LOAD_TRIES 5 > #define HDCP2_LC_RETRY_CNT 3 > > +static void > +intel_hdcp_disable_hdcp_line_rekeying(struct intel_encoder *encoder, > + struct intel_hdcp *hdcp) > +{ > + struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); > + > + if (encoder->type != INTEL_OUTPUT_HDMI) > + return; > + > + if (DISPLAY_VER(dev_priv) >= 14) > + intel_de_rmw(dev_priv, TRANS_DDI_FUNC_CTL(hdcp->cpu_transcoder), > + TRANS_DDI_HDCP_LINE_REKEY_DISABLE, 1); > +} > + > static int intel_conn_to_vcpi(struct intel_atomic_state *state, > struct intel_connector *connector) > { > @@ -2005,6 +2019,8 @@ static int _intel_hdcp2_enable(struct intel_atomic_state *state, > connector->base.base.id, connector->base.name, > hdcp->content_type); > > + intel_hdcp_disable_hdcp_line_rekeying(connector->encoder, hdcp); > + > ret = hdcp2_authenticate_and_encrypt(state, connector); > if (ret) { > drm_dbg_kms(&i915->drm, "HDCP2 Type%d Enabling Failed. (%d)\n", > diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h > index 3f34efcd7d6c..fbf4623cd536 100644 > --- a/drivers/gpu/drm/i915/i915_reg.h > +++ b/drivers/gpu/drm/i915/i915_reg.h > @@ -5630,6 +5630,7 @@ enum skl_power_gate { > #define TRANS_DDI_EDP_INPUT_B_ONOFF (5 << 12) > #define TRANS_DDI_EDP_INPUT_C_ONOFF (6 << 12) > #define TRANS_DDI_EDP_INPUT_D_ONOFF (7 << 12) > +#define TRANS_DDI_HDCP_LINE_REKEY_DISABLE REG_BIT(12) > #define TRANS_DDI_MST_TRANSPORT_SELECT_MASK REG_GENMASK(11, 10) > #define TRANS_DDI_MST_TRANSPORT_SELECT(trans) \ > REG_FIELD_PREP(TRANS_DDI_MST_TRANSPORT_SELECT_MASK, trans)
diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c index d5ed4c7dfbc0..15af6e184ef8 100644 --- a/drivers/gpu/drm/i915/display/intel_hdcp.c +++ b/drivers/gpu/drm/i915/display/intel_hdcp.c @@ -30,6 +30,20 @@ #define KEY_LOAD_TRIES 5 #define HDCP2_LC_RETRY_CNT 3 +static void +intel_hdcp_disable_hdcp_line_rekeying(struct intel_encoder *encoder, + struct intel_hdcp *hdcp) +{ + struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); + + if (encoder->type != INTEL_OUTPUT_HDMI) + return; + + if (DISPLAY_VER(dev_priv) >= 14) + intel_de_rmw(dev_priv, TRANS_DDI_FUNC_CTL(hdcp->cpu_transcoder), + TRANS_DDI_HDCP_LINE_REKEY_DISABLE, 1); +} + static int intel_conn_to_vcpi(struct intel_atomic_state *state, struct intel_connector *connector) { @@ -2005,6 +2019,8 @@ static int _intel_hdcp2_enable(struct intel_atomic_state *state, connector->base.base.id, connector->base.name, hdcp->content_type); + intel_hdcp_disable_hdcp_line_rekeying(connector->encoder, hdcp); + ret = hdcp2_authenticate_and_encrypt(state, connector); if (ret) { drm_dbg_kms(&i915->drm, "HDCP2 Type%d Enabling Failed. (%d)\n", diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 3f34efcd7d6c..fbf4623cd536 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h @@ -5630,6 +5630,7 @@ enum skl_power_gate { #define TRANS_DDI_EDP_INPUT_B_ONOFF (5 << 12) #define TRANS_DDI_EDP_INPUT_C_ONOFF (6 << 12) #define TRANS_DDI_EDP_INPUT_D_ONOFF (7 << 12) +#define TRANS_DDI_HDCP_LINE_REKEY_DISABLE REG_BIT(12) #define TRANS_DDI_MST_TRANSPORT_SELECT_MASK REG_GENMASK(11, 10) #define TRANS_DDI_MST_TRANSPORT_SELECT(trans) \ REG_FIELD_PREP(TRANS_DDI_MST_TRANSPORT_SELECT_MASK, trans)
Disable HDCP Line Rekeying when HDCP ver > 1.4 and when we are on HDMI TMDS operation for DISPLAY_VEY >= 14. WA: 16022217614 Bspec: 49273 Bspec: 69964 Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> --- drivers/gpu/drm/i915/display/intel_hdcp.c | 16 ++++++++++++++++ drivers/gpu/drm/i915/i915_reg.h | 1 + 2 files changed, 17 insertions(+)