All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Paul <sean@poorly.run>
To: Oliver Barta <o.barta89@gmail.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	Ravisankar Madasamy <ravisankar.madasamy@intel.com>,
	Sean Paul <seanpaul@chromium.org>,
	Oliver Barta <oliver.barta@aptiv.com>,
	Chris Wilson <chris@chris-wilson.co.uk>
Subject: Re: [Intel-gfx] [PATCH] drm/i915: HDCP: retry link integrity check on failure
Date: Mon, 4 May 2020 16:24:22 -0400	[thread overview]
Message-ID: <CAMavQKJezSBt_KX_miWOums-CXy4iuxrCmoOgMYfSposiaGN5w@mail.gmail.com> (raw)
In-Reply-To: <20200504123524.7731-1-oliver.barta@aptiv.com>

On Mon, May 4, 2020 at 1:32 PM Oliver Barta <o.barta89@gmail.com> wrote:
>
> From: Oliver Barta <oliver.barta@aptiv.com>
>
> A single Ri mismatch doesn't automatically mean that the link integrity
> is broken. Update and check of Ri and Ri' are done asynchronously. In
> case an update happens just between the read of Ri' and the check against
> Ri there will be a mismatch even if the link integrity is fine otherwise.
>
> Signed-off-by: Oliver Barta <oliver.barta@aptiv.com>
> ---
>  drivers/gpu/drm/i915/display/intel_hdmi.c | 19 ++++++++++++++++---
>  1 file changed, 16 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
> index 010f37240710..3156fde392f2 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
> @@ -1540,7 +1540,7 @@ int intel_hdmi_hdcp_toggle_signalling(struct intel_digital_port *intel_dig_port,
>  }
>
>  static
> -bool intel_hdmi_hdcp_check_link(struct intel_digital_port *intel_dig_port)
> +bool intel_hdmi_hdcp_check_link_once(struct intel_digital_port *intel_dig_port)
>  {
>         struct drm_i915_private *i915 = to_i915(intel_dig_port->base.base.dev);
>         struct intel_connector *connector =
> @@ -1563,8 +1563,7 @@ bool intel_hdmi_hdcp_check_link(struct intel_digital_port *intel_dig_port)
>         if (wait_for((intel_de_read(i915, HDCP_STATUS(i915, cpu_transcoder, port)) &
>                       (HDCP_STATUS_RI_MATCH | HDCP_STATUS_ENC)) ==
>                      (HDCP_STATUS_RI_MATCH | HDCP_STATUS_ENC), 1)) {

Why doesn't the wait_for catch this?

Sean

> -               drm_err(&i915->drm,
> -                       "Ri' mismatch detected, link check failed (%x)\n",
> +               drm_dbg_kms(&i915->drm, "Ri' mismatch detected (%x)\n",
>                         intel_de_read(i915, HDCP_STATUS(i915, cpu_transcoder,
>                                                         port)));
>                 return false;
> @@ -1572,6 +1571,20 @@ bool intel_hdmi_hdcp_check_link(struct intel_digital_port *intel_dig_port)
>         return true;
>  }
>
> +static
> +bool intel_hdmi_hdcp_check_link(struct intel_digital_port *intel_dig_port)
> +{
> +       struct drm_i915_private *i915 = to_i915(intel_dig_port->base.base.dev);
> +       int retry;
> +
> +       for (retry = 0; retry < 3; retry++)
> +               if (intel_hdmi_hdcp_check_link_once(intel_dig_port))
> +                       return true;
> +
> +       drm_err(&i915->drm, "Link check failed\n");
> +       return false;
> +}
> +
>  struct hdcp2_hdmi_msg_timeout {
>         u8 msg_id;
>         u16 timeout;
> --
> 2.20.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2020-05-04 20:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-04 12:35 [Intel-gfx] [PATCH] drm/i915: HDCP: retry link integrity check on failure Oliver Barta
2020-05-04 18:14 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2020-05-04 18:38 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-05-04 20:24 ` Sean Paul [this message]
2020-05-05  7:27   ` [Intel-gfx] [PATCH] " Oliver Barta
2020-05-05 16:22     ` Sean Paul
2020-05-05  7:15 ` [Intel-gfx] ✓ Fi.CI.IGT: success for " Patchwork
2020-05-05  7:38 ` [Intel-gfx] [PATCH] " Ramalingam C
2020-05-05 12:06   ` Oliver Barta
2020-05-05 12:12     ` Ramalingam C
2020-06-30  8:06       ` Jani Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMavQKJezSBt_KX_miWOums-CXy4iuxrCmoOgMYfSposiaGN5w@mail.gmail.com \
    --to=sean@poorly.run \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=o.barta89@gmail.com \
    --cc=oliver.barta@aptiv.com \
    --cc=ravisankar.madasamy@intel.com \
    --cc=seanpaul@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.