[PATCH v3 05/16] drm/i915/hdcp: Move HDCP enc status timeout to header
Shankar, Uma
uma.shankar at intel.com
Tue Oct 27 05:52:13 UTC 2020
> -----Original Message-----
> From: Anshuman Gupta <anshuman.gupta at intel.com>
> Sent: Friday, October 23, 2020 5:51 PM
> To: intel-gfx at lists.freedesktop.org; dri-devel at lists.freedesktop.org
> Cc: seanpaul at chromium.org; Nikula, Jani <jani.nikula at intel.com>; C,
> Ramalingam <ramalingam.c at intel.com>; Li, Juston <juston.li at intel.com>;
> Shankar, Uma <uma.shankar at intel.com>; Gupta, Anshuman
> <anshuman.gupta at intel.com>
> Subject: [PATCH v3 05/16] drm/i915/hdcp: Move HDCP enc status timeout to
> header
>
> DP MST stream encryption status requires time of a link frame in order to change
> its status, but as there were some HDCP encryption timeout observed earlier, it
> is safer to use ENCRYPT_STATUS_CHANGE_TIMEOUT_MS timeout for stream
> status too, it requires to move the macro to a header.
> It will be used by both HDCP{1.x,2.x} stream status timeout.
Looks Good to me.
Reviewed-by: Uma Shankar <uma.shankar at intel.com>
> Related: 7e90e8d0c0ea ("drm/i915: Increase timeout for Encrypt status change")
> Cc: Ramalingam C <ramalingam.c at intel.com>
> Signed-off-by: Anshuman Gupta <anshuman.gupta at intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_hdcp.c | 9 ++++-----
> drivers/gpu/drm/i915/display/intel_hdcp.h | 2 ++
> 2 files changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c
> b/drivers/gpu/drm/i915/display/intel_hdcp.c
> index a9b652c6e742..61252d4be3dd 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdcp.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
> @@ -23,7 +23,6 @@
> #include "intel_connector.h"
>
> #define KEY_LOAD_TRIES 5
> -#define ENCRYPT_STATUS_CHANGE_TIMEOUT_MS 50
> #define HDCP2_LC_RETRY_CNT 3
>
> static
> @@ -762,7 +761,7 @@ static int intel_hdcp_auth(struct intel_connector
> *connector)
> if (intel_de_wait_for_set(dev_priv,
> HDCP_STATUS(dev_priv, cpu_transcoder, port),
> HDCP_STATUS_ENC,
> - ENCRYPT_STATUS_CHANGE_TIMEOUT_MS)) {
> +
> HDCP_ENCRYPT_STATUS_CHANGE_TIMEOUT_MS)) {
> drm_err(&dev_priv->drm, "Timed out waiting for encryption\n");
> return -ETIMEDOUT;
> }
> @@ -809,7 +808,7 @@ static int _intel_hdcp_disable(struct intel_connector
> *connector)
> intel_de_write(dev_priv, HDCP_CONF(dev_priv, cpu_transcoder, port), 0);
> if (intel_de_wait_for_clear(dev_priv,
> HDCP_STATUS(dev_priv, cpu_transcoder, port),
> - ~0, ENCRYPT_STATUS_CHANGE_TIMEOUT_MS))
> {
> + ~0,
> HDCP_ENCRYPT_STATUS_CHANGE_TIMEOUT_MS)) {
> drm_err(&dev_priv->drm,
> "Failed to disable HDCP, timeout clearing status\n");
> return -ETIMEDOUT;
> @@ -1641,7 +1640,7 @@ static int hdcp2_enable_encryption(struct
> intel_connector *connector)
> HDCP2_STATUS(dev_priv, cpu_transcoder,
> port),
> LINK_ENCRYPTION_STATUS,
> - ENCRYPT_STATUS_CHANGE_TIMEOUT_MS);
> +
> HDCP_ENCRYPT_STATUS_CHANGE_TIMEOUT_MS);
>
> return ret;
> }
> @@ -1665,7 +1664,7 @@ static int hdcp2_disable_encryption(struct
> intel_connector *connector)
> HDCP2_STATUS(dev_priv, cpu_transcoder,
> port),
> LINK_ENCRYPTION_STATUS,
> - ENCRYPT_STATUS_CHANGE_TIMEOUT_MS);
> +
> HDCP_ENCRYPT_STATUS_CHANGE_TIMEOUT_MS);
> if (ret == -ETIMEDOUT)
> drm_dbg_kms(&dev_priv->drm, "Disable Encryption Timedout");
>
> diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.h
> b/drivers/gpu/drm/i915/display/intel_hdcp.h
> index bc51c1e9b481..b912a3a0f5b8 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdcp.h
> +++ b/drivers/gpu/drm/i915/display/intel_hdcp.h
> @@ -8,6 +8,8 @@
>
> #include <linux/types.h>
>
> +#define HDCP_ENCRYPT_STATUS_CHANGE_TIMEOUT_MS 50
> +
> struct drm_connector;
> struct drm_connector_state;
> struct drm_i915_private;
> --
> 2.26.2
More information about the dri-devel
mailing list