From mboxrd@z Thu Jan 1 00:00:00 1970 From: Todd Previte Subject: Re: [PATCH 12/12] drm/i915: Add a delay in Displayport AUX transactions for compliance testing Date: Tue, 15 Jul 2014 08:34:18 -0700 Message-ID: <53C549FA.4050102@gmail.com> References: <1405365047-6866-1-git-send-email-tprevite@gmail.com> <1405365047-6866-13-git-send-email-tprevite@gmail.com> <20140715074628.GO15237@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0167890971==" Return-path: Received: from mail-pd0-f173.google.com (mail-pd0-f173.google.com [209.85.192.173]) by gabe.freedesktop.org (Postfix) with ESMTP id 1843B6E5B1 for ; Tue, 15 Jul 2014 08:34:19 -0700 (PDT) Received: by mail-pd0-f173.google.com with SMTP id w10so29592pde.4 for ; Tue, 15 Jul 2014 08:34:18 -0700 (PDT) In-Reply-To: <20140715074628.GO15237@phenom.ffwll.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Daniel Vetter Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org This is a multi-part message in MIME format. --===============0167890971== Content-Type: multipart/alternative; boundary="------------050106050707010705020200" This is a multi-part message in MIME format. --------------050106050707010705020200 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit > Daniel Vetter > Tuesday, July 15, 2014 12:46 AM > On Mon, Jul 14, 2014 at 12:10:47PM -0700, Todd Previte wrote: >> The Displayport Link Layer Compliance Testing Specification 1.2 rev 1.1 specifies that >> repeated AUX transactions after a failure (NACK, DEFER or no response) must have >> a minimum delay of 400us before the resend can occur. Tests 4.2.1.1 and 4.2.1.2 are two >> tests that require this specifically. >> >> Signed-off-by: Todd Previte > > Since this is a minimal timeout ... shouldn't we put it into the dp > helpers instead? > -Daniel This delay catches the case where the sink device either does not respond at all or responds with an invalid AUX transaction. These are lower level errors than the DRM helper functions are supposed to handle. I mistakenly mentioned NACK/DEFER in the commit message - that's not an accurate description of what this patch does. I will fix the commit message for v3 of this patch. -T >> --- >> 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 0e207aaf..f0664cd 100644 >> --- a/drivers/gpu/drm/i915/intel_dp.c >> +++ b/drivers/gpu/drm/i915/intel_dp.c >> @@ -573,8 +573,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)) { >> + /* DP compliance requires 400us delay for errors/timeouts >> + (DP CTS 1.2 Core Rev 1.1, 4.2.1.1& 4.2.1.2) */ >> + udelay(400); >> continue; >> + } >> if (status& DP_AUX_CH_CTL_DONE) >> break; >> } >> -- >> 1.9.1 >> >> _______________________________________________ >> Intel-gfx mailing list >> Intel-gfx@lists.freedesktop.org >> http://lists.freedesktop.org/mailman/listinfo/intel-gfx > > Todd Previte > Monday, July 14, 2014 12:10 PM > The Displayport Link Layer Compliance Testing Specification 1.2 rev > 1.1 specifies that > repeated AUX transactions after a failure (NACK, DEFER or no response) > must have > a minimum delay of 400us before the resend can occur. Tests 4.2.1.1 > and 4.2.1.2 are two > tests that require this specifically. > > Signed-off-by: Todd Previte > --- > 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 0e207aaf..f0664cd 100644 > --- a/drivers/gpu/drm/i915/intel_dp.c > +++ b/drivers/gpu/drm/i915/intel_dp.c > @@ -573,8 +573,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)) { > + /* DP compliance requires 400us delay for errors/timeouts > + (DP CTS 1.2 Core Rev 1.1, 4.2.1.1 & 4.2.1.2) */ > + udelay(400); > continue; > + } > if (status & DP_AUX_CH_CTL_DONE) > break; > } > Todd Previte > Monday, July 14, 2014 12:10 PM > > V2: > - Addressed review feedback from the mailing list > - Broke up patches into smaller, easily managed chunks > - Reordered the patches such that they can be applied in order > - Fixed checkpatch.pl errors across the patchset > - Updated and enhanced functionality for the EDID test function > - Completely revamped the mode set operations for compliance testing > -- Sent with Postbox --------------050106050707010705020200 Content-Type: multipart/related; boundary="------------070108090105030901040309" --------------070108090105030901040309 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
Tuesday, July 15, 2014 12:46 AM
On Mon, Jul 14, 2014 at 12:10:47PM -0700, Todd Previte wrote:
The Displayport Link Layer Compliance Testing Specification 1.2 rev 1.1 specifies that
repeated AUX transactions after a failure (NACK, DEFER or no response) must have
a minimum delay of 400us before the resend can occur. Tests 4.2.1.1 and 4.2.1.2 are two
tests that require this specifically.

Signed-off-by: Todd Previte <tprevite@gmail.com>

Since this is a minimal timeout ... shouldn't we put it into the dp
helpers instead?
-Daniel
This delay catches the case where the sink device either does not respond at all or responds with an invalid AUX transaction. These are lower level errors than the DRM helper functions are supposed to handle. I mistakenly mentioned NACK/DEFER in the commit message - that's not an accurate description of what this patch does. I will fix the commit message for v3 of this patch.


-T
---
 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 0e207aaf..f0664cd 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -573,8 +573,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)) {
+				/* DP compliance requires 400us delay for errors/timeouts
+				   (DP CTS 1.2 Core Rev 1.1, 4.2.1.1 & 4.2.1.2) */
+				udelay(400);
 				continue;
+			}
 			if (status & DP_AUX_CH_CTL_DONE)
 				break;
 		}
-- 
1.9.1

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

Monday, July 14, 2014 12:10 PM
The Displayport Link Layer Compliance Testing Specification 1.2 rev 1.1 specifies that
repeated AUX transactions after a failure (NACK, DEFER or no response) must have
a minimum delay of 400us before the resend can occur. Tests 4.2.1.1 and 4.2.1.2 are two
tests that require this specifically.

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 0e207aaf..f0664cd 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -573,8 +573,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)) {
+ /* DP compliance requires 400us delay for errors/timeouts
+ (DP CTS 1.2 Core Rev 1.1, 4.2.1.1 & 4.2.1.2) */
+ udelay(400);
continue;
+ }
if (status & DP_AUX_CH_CTL_DONE)
break;
}
Monday, July 14, 2014 12:10 PM

V2:
- Addressed review feedback from the mailing list
- Broke up patches into smaller, easily managed chunks
- Reordered the patches such that they can be applied in order
- Fixed checkpatch.pl errors across the patchset
- Updated and enhanced functionality for the EDID test function
- Completely revamped the mode set operations for compliance testing


--
Sent with Postbox
--------------070108090105030901040309 Content-Type: image/jpeg; x-apple-mail-type=stationery; name="postbox-contact.jpg" Content-Transfer-Encoding: base64 Content-ID: Content-Disposition: inline; filename="postbox-contact.jpg" /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgK CgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/2wBDAQMDAwQDBAgEBAgQCwkL EBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAAR CAAZABkDAREAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAA AgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkK FhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWG h4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl 5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREA AgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYk NOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOE hYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk 5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD0FvH1kV06/wBcitb671eGCea9lghlLyGK N5NzuM/xH1AHAxivhKzqyk7H01NU1FXZh3XxJuofitJocNhp8lgNHUfZhpcG1rouCDv2d1Yd PXuK09lP6rz9bmfPH6xyeR1s/iOdopNSg8LxmG0vIIZZYbWGNmOQG8squ/ILcMCMYBzwawo+ 0cleVrmtTkirJHmv/DWPxW/6GvxD/wCAi/8AxuvV56//AD8/I4eWl/Ic5pXifWrrw1p1hbeF 7SSygs4EdLnDD5YhvyOeD1II6E4zkCuarCHtG5VNfI3pSfLZQOVi13xDJ8To9ZjSCO7Nx9hQ RZaMYtlIwFHLAFRgDhhXdal9U5dX1/E4/wB4sRfRdPwPTdN/4TjUL20v9Q124t18xFSOC3WI yNjOA7deuc/7R9BnyfaUYNKML+rPR9nUfxSPn7+wtZ/6GH/yKler9Yj/AM+zi9m/5jYt/ijc 2lhFpq+HptOurC0hhdHITzJETayyI2GXBD5GM8FcAipeXe83J3LjjPdUYo5m9+IOtHV5NWLB DLqk9wlzFFt+fZsC4BHIwMjPfvXXTwtPk5fK1jknWlzc3mb998Ur8tb3l/4ljAuGWXahwjHI YqVOcNk85IAHbAwcqeEheygaTxEr6yPLv+EO+I3/AET7xL/4K7n/AOIr0vZ/3Tl5/M7L9r// AJOd8Y/9fw/9EJTn1CPQ8i1b/US/9hCWlR3Crt8y98OP+Rk8Jf8AYy2X/pZDXQvj+Rl9k/cm qA//2Q== --------------070108090105030901040309 Content-Type: image/jpeg; x-apple-mail-type=stationery; name="compose-unknown-contact.jpg" Content-Transfer-Encoding: base64 Content-ID: Content-Disposition: inline; filename="compose-unknown-contact.jpg" /9j/4AAQSkZJRgABAQEARwBHAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEC AQEBAQEBAgICAgICAgICAgICAgICAgICAgICAgICAgICAgL/2wBDAQEBAQEBAQICAgICAgIC AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgL/wAAR CAAZABkDAREAAhEBAxEB/8QAGAAAAwEBAAAAAAAAAAAAAAAABgcICQr/xAA0EAABAwMCAgUK BwAAAAAAAAACAQMEBQYRABITIQcUMUF2CBUXIjI2N0JRtVRWkZOV0dL/xAAYAQEAAwEAAAAA AAAAAAAAAAADAAEEAv/EACQRAAICAAQGAwAAAAAAAAAAAAABAhEDMrHREyExM0FxgfDx/9oA DAMBAAIRAxEAPwDuEt+gW/ULet6oVC3rfqNQqFv0OfPn1GhUqfOmzZtKZlS5UqZMaNwzNwiJ VIl7eXLCaZIGwBl3TY8epPx2+jy2ZNPjvkwc9uhW8j7nCPhvOsQliYIeS7cvCpp8o50qwrC4 v3lsNSDbdmTEhvs2tahxpfV3WnmbbozJEw/gwdadbYExVRXKEKoSdvJcaOSqxE7/AAiX0gXx +a69/JSf9alIlste0VzaNpeFrcT9KKymotyiaZ0KRCnzacoE7Kjzn4gi2KqUh3jqDHDHv4mR UfruTWlMzlVUKIVNp9GguEJnAh0+IZjyAiisgyRDnu5azS8miKqjOTVkKqS/psG37fo1Fbab eg25b8eZPeFJBBJSjMG5HjMeyihnaauZwe4OGiju13GAcpOwBeN+U8/IkGbsiS8b7ryogmbz hbyc9REROfZhERO5ETShjPtvpGqTUyLErytS4siSwx5x2tRH4hPOI0DkjZtaJtFxuVEbIUUi yeNujlBUJGbJN6nM/Cyf2Hf60YgjvKA+NPSP4gT7axpcPtr51YWJnYn9dnAQWl722p4ot37y zqnlfp6FrqbwawG8/9k= --------------070108090105030901040309-- --------------050106050707010705020200-- --===============0167890971== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx --===============0167890971==--