diff mbox

[2/6] drm/i915: Add a delay in Displayport AUX transactions for compliance testing

Message ID 1403647974-42377-3-git-send-email-tprevite@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Todd Previte June 24, 2014, 10:12 p.m. UTC
Several compliance tests require that follow-up AUX transactions (after a
failure or no response) are not resent sooner than 400us later. Add a 400us
delay to the response time of any failed transaction to account for this.

Signed-off-by: Todd Previte <tprevite@gmail.com>
---
 drivers/gpu/drm/i915/intel_dp.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Chris Wilson June 25, 2014, 6:45 a.m. UTC | #1
On Tue, Jun 24, 2014 at 03:12:50PM -0700, Todd Previte wrote:
> Several compliance tests require that follow-up AUX transactions (after a
> failure or no response) are not resent sooner than 400us later. Add a 400us
> delay to the response time of any failed transaction to account for this.
> 
> Signed-off-by: Todd Previte <tprevite@gmail.com>
> ---
>  drivers/gpu/drm/i915/intel_dp.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 3bd1780..43fcabe 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -561,8 +561,12 @@ intel_dp_aux_ch(struct intel_dp *intel_dp,
>  				   DP_AUX_CH_CTL_RECEIVE_ERROR);
>  
>  			if (status & (DP_AUX_CH_CTL_TIME_OUT_ERROR |
> -				      DP_AUX_CH_CTL_RECEIVE_ERROR))
> +				      DP_AUX_CH_CTL_RECEIVE_ERROR)) {

I think "required for DP compliance testing" is a little verbose and can
be shortened to "DP requires". If you have a spec reference handy, that
would be useful.

/* 10.2.1: DP requires 400us delay after an error. */
> +				/* 400us delay between transactions for errors/timeouts
> +				   required for DP compliance testing */
> +				udelay(400);
>  				continue;
> +			}
>  			if (status & DP_AUX_CH_CTL_DONE)
>  				break;
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 3bd1780..43fcabe 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -561,8 +561,12 @@  intel_dp_aux_ch(struct intel_dp *intel_dp,
 				   DP_AUX_CH_CTL_RECEIVE_ERROR);
 
 			if (status & (DP_AUX_CH_CTL_TIME_OUT_ERROR |
-				      DP_AUX_CH_CTL_RECEIVE_ERROR))
+				      DP_AUX_CH_CTL_RECEIVE_ERROR)) {
+				/* 400us delay between transactions for errors/timeouts
+				   required for DP compliance testing */
+				udelay(400);
 				continue;
+			}
 			if (status & DP_AUX_CH_CTL_DONE)
 				break;
 		}