From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ramalingam C <ramalingam.c@intel.com>,
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: Tue, 30 Jun 2020 11:06:30 +0300 [thread overview]
Message-ID: <87k0zpm0zd.fsf@intel.com> (raw)
In-Reply-To: <20200505121213.GA24840@intel.com>
On Tue, 05 May 2020, Ramalingam C <ramalingam.c@intel.com> wrote:
> On 2020-05-05 at 14:06:51 +0200, Oliver Barta wrote:
>> On Tue, May 5, 2020 at 9:38 AM Ramalingam C <ramalingam.c@intel.com> wrote:
>> >
>> > On 2020-05-04 at 14:35:24 +0200, Oliver Barta 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.
>> >
>> > Thanks for working on this. Btw, did you face this sporadic link check
>> > failure or theoretically you are fixing it?
>> >
>> > IMO this change will rule out possible sporadic link check failures as
>> > mentioned in the commit msg. Though I haven't faced this issue at my
>> > testings.
>> >
>> > Reviewed-by: Ramalingam C <ramalingam.c@intel.com>
>> >
>>
>> I found it by code inspection, the probability for this to happen is
>> very low. In order to test the patch I'm decreasing the value of
>> DRM_HDCP_CHECK_PERIOD_MS to just a few ms. Once you do that it happens
>> every few seconds.
> Ok. That make sense. Thanks for the explanation.
Finally pushed, thanks for the patch and reviews.
Ram, I was kind of expecting you to push this.
BR,
Jani.
>
> -Ram
>>
>> Thanks,
>> Oliver
>>
>> > >
>> > > 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)) {
>> > > - 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
>> > >
--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2020-06-30 8:06 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 ` [Intel-gfx] [PATCH] " Sean Paul
2020-05-05 7:27 ` 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 [this message]
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=87k0zpm0zd.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--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=ramalingam.c@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox