public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Ramalingam C <ramalingam.c@intel.com>
To: Sean Paul <seanpaul@chromium.org>
Cc: daniel.vetter@ffwll.ch, intel-gfx@lists.freedesktop.org,
	rodrigo.vivi@intel.com
Subject: Re: [PATCH 4/8] drm/i915: Retry HDCP BKSV read
Date: Fri, 2 Feb 2018 19:56:22 +0530	[thread overview]
Message-ID: <6f5d913f-a043-8645-e738-5f1053c20103@intel.com> (raw)
In-Reply-To: <20180202141620.wbxc3enbp3qg23ow@art_vandelay>



On Friday 02 February 2018 07:46 PM, Sean Paul wrote:
> On Fri, Feb 02, 2018 at 04:15:16PM +0530, Ramalingam C wrote:
>> When BKSV is invalid, to mitigate any communication errors,
>> BKSV is read once again.
> Why is the Bksv read any more volatile than other reads? If the channel is
> noisy, the retries should be done in the shim implementation (I think there are
> already i2c retries).
>
> Sean
True. But compliance spec says that when we determine that bksv is 
invalid (not with 20 1s), we should re-read and confirm.
CTS test 1A-05 test expect this behavior.

--Ram

>
>> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
>> ---
>>   drivers/gpu/drm/i915/intel_hdcp.c | 13 +++++++++----
>>   1 file changed, 9 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_hdcp.c b/drivers/gpu/drm/i915/intel_hdcp.c
>> index b3f407cef8b0..fa2e7c727d00 100644
>> --- a/drivers/gpu/drm/i915/intel_hdcp.c
>> +++ b/drivers/gpu/drm/i915/intel_hdcp.c
>> @@ -401,7 +401,7 @@ static int intel_hdcp_auth(struct intel_connector *connector)
>>   	struct drm_i915_private *dev_priv;
>>   	enum port port;
>>   	unsigned long r0_prime_gen_start;
>> -	int ret, i;
>> +	int ret, i, retry = 1;
>>   	union {
>>   		u32 reg[2];
>>   		u8 shim[DRM_HDCP_AN_LEN];
>> @@ -443,11 +443,16 @@ static int intel_hdcp_auth(struct intel_connector *connector)
>>   	r0_prime_gen_start = jiffies;
>>   
>>   	memset(&bksv, 0, sizeof(bksv));
>> -	ret = shim->read_bksv(intel_dig_port, bksv.shim);
>> +
>> +	do {
>> +		ret = shim->read_bksv(intel_dig_port, bksv.shim);
>> +		if (!ret)
>> +			if (!intel_hdcp_is_ksv_valid(bksv.shim))
>> +				ret = -ENODEV;
>> +	} while (ret && retry--);
>> +
>>   	if (ret)
>>   		return ret;
>> -	else if (!intel_hdcp_is_ksv_valid(bksv.shim))
>> -		return -ENODEV;
>>   
>>   	I915_WRITE(PORT_HDCP_BKSVLO(port), bksv.reg[0]);
>>   	I915_WRITE(PORT_HDCP_BKSVHI(port), bksv.reg[1]);
>> -- 
>> 2.7.4
>>

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-02-02 14:32 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-02 10:45 [PATCH 0/8] Adhering to HDCP1.4 Compliance Test Spec Ramalingam C
2018-02-02 10:45 ` [PATCH 1/8] drm/i915: Handle failure from 2nd stage HDCP auth Ramalingam C
2018-02-02 14:09   ` Sean Paul
2018-02-02 14:22     ` Ramalingam C
2018-02-02 14:45       ` Sean Paul
2018-02-02 14:51         ` Ramalingam C
2018-02-02 15:22           ` Sean Paul
2018-02-02 15:26             ` Ramalingam C
2018-02-02 10:45 ` [PATCH 2/8] drm/i915: Stop encryption for repeater with no sink Ramalingam C
2018-02-02 14:13   ` Sean Paul
2018-02-02 14:12     ` Ramalingam C
2018-02-02 14:48       ` Sean Paul
2018-02-02 15:03         ` Ramalingam C
2018-02-02 15:19           ` Sean Paul
2018-02-02 10:45 ` [PATCH 3/8] drm/i915: Connector info in HDCP debug msgs Ramalingam C
2018-02-02 14:15   ` Sean Paul
2018-02-02 10:45 ` [PATCH 4/8] drm/i915: Retry HDCP BKSV read Ramalingam C
2018-02-02 14:16   ` Sean Paul
2018-02-02 14:26     ` Ramalingam C [this message]
2018-02-02 14:44       ` Sean Paul
2018-02-02 10:45 ` [PATCH 5/8] drm/i915: Optimize HDCP key load Ramalingam C
2018-02-02 14:18   ` Sean Paul
2018-02-02 14:33     ` Ramalingam C
2018-02-02 15:24       ` Sean Paul
2018-02-02 10:45 ` [PATCH 6/8] drm/i915: Detect panel's hdcp capability Ramalingam C
2018-02-02 14:24   ` Sean Paul
2018-02-02 14:38     ` Ramalingam C
2018-02-02 15:40       ` Sean Paul
2018-02-02 10:45 ` [PATCH 7/8] drm/i915: Reauthenticate HDCP on failure Ramalingam C
2018-02-02 14:37   ` Sean Paul
2018-02-02 15:05     ` Ramalingam C
2018-02-02 10:45 ` [PATCH 8/8] drm/i915: fix misalignment in HDCP register def Ramalingam C
2018-02-02 14:38   ` Sean Paul
2018-02-02 11:10 ` ✓ Fi.CI.BAT: success for Adhering to HDCP1.4 Compliance Test Spec Patchwork
2018-02-02 12:50 ` ✗ Fi.CI.IGT: failure " Patchwork

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=6f5d913f-a043-8645-e738-5f1053c20103@intel.com \
    --to=ramalingam.c@intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=rodrigo.vivi@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