dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/hdcp: Add additional R0' wait
@ 2020-05-19 22:16 Sean Paul
  2020-05-20  6:46 ` Ramalingam C
  0 siblings, 1 reply; 5+ messages in thread
From: Sean Paul @ 2020-05-19 22:16 UTC (permalink / raw)
  To: dri-devel, intel-gfx; +Cc: seanpaul, rodrigo.vivi

From: Sean Paul <seanpaul@chromium.org>

We're seeing some R0' mismatches in the field, particularly with
repeaters. I'm guessing the (already lenient) 300ms wait time isn't
enough for some setups. So add an additional wait when R0' is
mismatched.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
---
 drivers/gpu/drm/i915/display/intel_hdcp.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c
index 2cbc4619b4ce..924a717a4fa4 100644
--- a/drivers/gpu/drm/i915/display/intel_hdcp.c
+++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
@@ -592,6 +592,9 @@ int intel_hdcp_auth_downstream(struct intel_connector *connector)
 						  bstatus);
 		if (!ret)
 			break;
+
+		/* Maybe the sink is lazy, give it some more time */
+		usleep_range(10000, 50000);
 	}
 
 	if (i == tries) {
-- 
Sean Paul, Software Engineer, Google / Chromium OS

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/i915/hdcp: Add additional R0' wait
  2020-05-19 22:16 [PATCH] drm/i915/hdcp: Add additional R0' wait Sean Paul
@ 2020-05-20  6:46 ` Ramalingam C
  2020-05-20 13:08   ` [PATCH v2] " Sean Paul
  0 siblings, 1 reply; 5+ messages in thread
From: Ramalingam C @ 2020-05-20  6:46 UTC (permalink / raw)
  To: Sean Paul; +Cc: intel-gfx, seanpaul, dri-devel, rodrigo.vivi

On 2020-05-19 at 18:16:21 -0400, Sean Paul wrote:
> From: Sean Paul <seanpaul@chromium.org>
> 
> We're seeing some R0' mismatches in the field, particularly with
I think you want to say Vprime verification? delay is added in between
the retry for vprime verfication.

-Ram
> repeaters. I'm guessing the (already lenient) 300ms wait time isn't
> enough for some setups. So add an additional wait when R0' is
> mismatched.
> 
> Signed-off-by: Sean Paul <seanpaul@chromium.org>
> ---
>  drivers/gpu/drm/i915/display/intel_hdcp.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c
> index 2cbc4619b4ce..924a717a4fa4 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdcp.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
> @@ -592,6 +592,9 @@ int intel_hdcp_auth_downstream(struct intel_connector *connector)
>  						  bstatus);
>  		if (!ret)
>  			break;
> +
> +		/* Maybe the sink is lazy, give it some more time */
> +		usleep_range(10000, 50000);
>  	}
>  
>  	if (i == tries) {
> -- 
> Sean Paul, Software Engineer, Google / Chromium OS
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2] drm/i915/hdcp: Add additional R0' wait
  2020-05-20  6:46 ` Ramalingam C
@ 2020-05-20 13:08   ` Sean Paul
  2020-05-20 19:50     ` Sean Paul
  0 siblings, 1 reply; 5+ messages in thread
From: Sean Paul @ 2020-05-20 13:08 UTC (permalink / raw)
  To: dri-devel, intel-gfx; +Cc: seanpaul, rodrigo.vivi

From: Sean Paul <seanpaul@chromium.org>

We're seeing some R0' mismatches in the field, particularly with
repeaters. I'm guessing the (already lenient) 300ms wait time isn't
enough for some setups. So add an additional wait when R0' is
mismatched.

Signed-off-by: Sean Paul <seanpaul@chromium.org>

Changes in v2:
- Actually add the delay in R0` wait (Ram)
---

Apologies, v1 was generated from a forward port from the CrOS kernel and
patch got confused and put the diff in V' wait instead of R0' wait.

Pay closer attention, Sean.

 drivers/gpu/drm/i915/display/intel_hdcp.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c
index 2cbc4619b4ce..3c2d8c0a6da6 100644
--- a/drivers/gpu/drm/i915/display/intel_hdcp.c
+++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
@@ -743,6 +743,9 @@ static int intel_hdcp_auth(struct intel_connector *connector)
 		if (!wait_for(intel_de_read(dev_priv, HDCP_STATUS(dev_priv, cpu_transcoder, port)) &
 			      (HDCP_STATUS_RI_MATCH | HDCP_STATUS_ENC), 1))
 			break;
+
+		/* Maybe the sink is lazy, give it some more time */
+		usleep_range(10000, 50000);
 	}
 
 	if (i == tries) {
-- 
Sean Paul, Software Engineer, Google / Chromium OS

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] drm/i915/hdcp: Add additional R0' wait
  2020-05-20 13:08   ` [PATCH v2] " Sean Paul
@ 2020-05-20 19:50     ` Sean Paul
  2020-05-21  5:12       ` Ramalingam C
  0 siblings, 1 reply; 5+ messages in thread
From: Sean Paul @ 2020-05-20 19:50 UTC (permalink / raw)
  To: dri-devel, Intel Graphics Development; +Cc: Sean Paul, Rodrigo Vivi

On Wed, May 20, 2020 at 9:08 AM Sean Paul <sean@poorly.run> wrote:
>
> From: Sean Paul <seanpaul@chromium.org>
>
> We're seeing some R0' mismatches in the field, particularly with
> repeaters. I'm guessing the (already lenient) 300ms wait time isn't
> enough for some setups. So add an additional wait when R0' is
> mismatched.
>

I think my guess was wrong and now suspect this issue is fixed with
"drm/i915/hdcp: Avoid duplicate HDCP enables".

While this patch probably still has some value in cases where R0' is
slow to update, I don't have any concrete examples where it helps.

Sean


> Signed-off-by: Sean Paul <seanpaul@chromium.org>
>
> Changes in v2:
> - Actually add the delay in R0` wait (Ram)
> ---
>
> Apologies, v1 was generated from a forward port from the CrOS kernel and
> patch got confused and put the diff in V' wait instead of R0' wait.
>
> Pay closer attention, Sean.
>
>  drivers/gpu/drm/i915/display/intel_hdcp.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c
> index 2cbc4619b4ce..3c2d8c0a6da6 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdcp.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
> @@ -743,6 +743,9 @@ static int intel_hdcp_auth(struct intel_connector *connector)
>                 if (!wait_for(intel_de_read(dev_priv, HDCP_STATUS(dev_priv, cpu_transcoder, port)) &
>                               (HDCP_STATUS_RI_MATCH | HDCP_STATUS_ENC), 1))
>                         break;
> +
> +               /* Maybe the sink is lazy, give it some more time */
> +               usleep_range(10000, 50000);
>         }
>
>         if (i == tries) {
> --
> Sean Paul, Software Engineer, Google / Chromium OS
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] drm/i915/hdcp: Add additional R0' wait
  2020-05-20 19:50     ` Sean Paul
@ 2020-05-21  5:12       ` Ramalingam C
  0 siblings, 0 replies; 5+ messages in thread
From: Ramalingam C @ 2020-05-21  5:12 UTC (permalink / raw)
  To: Sean Paul; +Cc: Intel Graphics Development, Sean Paul, dri-devel, Rodrigo Vivi

On 2020-05-20 at 15:50:15 -0400, Sean Paul wrote:
> On Wed, May 20, 2020 at 9:08 AM Sean Paul <sean@poorly.run> wrote:
> >
> > From: Sean Paul <seanpaul@chromium.org>
> >
> > We're seeing some R0' mismatches in the field, particularly with
> > repeaters. I'm guessing the (already lenient) 300ms wait time isn't
> > enough for some setups. So add an additional wait when R0' is
> > mismatched.
> >
> 
> I think my guess was wrong and now suspect this issue is fixed with
> "drm/i915/hdcp: Avoid duplicate HDCP enables".
> 
> While this patch probably still has some value in cases where R0' is
> slow to update, I don't have any concrete examples where it helps.
Sean, completely agree it will help to authenticate the slower hdcp sink,
as this is not breaking the spec too. But could we please introduce extra
delays when we encounter such needs?

As you mentioned, We already have a 3 * 100 mSec,
where spec says HDCP sink should keep the R0' ready after the 100mSec
from aksv write.

-Ram
> 
> Sean
> 
> 
> > Signed-off-by: Sean Paul <seanpaul@chromium.org>
> >
> > Changes in v2:
> > - Actually add the delay in R0` wait (Ram)
> > ---
> >
> > Apologies, v1 was generated from a forward port from the CrOS kernel and
> > patch got confused and put the diff in V' wait instead of R0' wait.
> >
> > Pay closer attention, Sean.
> >
> >  drivers/gpu/drm/i915/display/intel_hdcp.c | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c
> > index 2cbc4619b4ce..3c2d8c0a6da6 100644
> > --- a/drivers/gpu/drm/i915/display/intel_hdcp.c
> > +++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
> > @@ -743,6 +743,9 @@ static int intel_hdcp_auth(struct intel_connector *connector)
> >                 if (!wait_for(intel_de_read(dev_priv, HDCP_STATUS(dev_priv, cpu_transcoder, port)) &
> >                               (HDCP_STATUS_RI_MATCH | HDCP_STATUS_ENC), 1))
> >                         break;
> > +
> > +               /* Maybe the sink is lazy, give it some more time */
> > +               usleep_range(10000, 50000);
> >         }
> >
> >         if (i == tries) {
> > --
> > Sean Paul, Software Engineer, Google / Chromium OS
> >
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-05-21  5:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-19 22:16 [PATCH] drm/i915/hdcp: Add additional R0' wait Sean Paul
2020-05-20  6:46 ` Ramalingam C
2020-05-20 13:08   ` [PATCH v2] " Sean Paul
2020-05-20 19:50     ` Sean Paul
2020-05-21  5:12       ` Ramalingam C

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox