<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">2014-07-15 12:34 GMT-03:00 Todd Previte <span dir="ltr"><<a href="mailto:tprevite@gmail.com" target="_blank">tprevite@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div bgcolor="#FFFFFF" text="#000000"><br>
<blockquote style="border:0px none" type="cite">
  <div style="margin:30px 25px 10px 25px"><div style="display:table;width:100%;border-top:1px solid #edeef0;padding-top:5px">   <div style="display:table-cell;vertical-align:middle;padding-right:6px"><img src="cid:part1.00000201.07080008@gmail.com" name="1473aa907d6dc60d_postbox-contact.jpg" height="25px" width="25px"></div>
   <div style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
        <a href="mailto:daniel@ffwll.ch" style="color:#737f92!important;padding-right:6px;font-weight:bold;text-decoration:none!important" target="_blank">Daniel Vetter</a></div>   <div style="display:table-cell;white-space:nowrap;vertical-align:middle">
   
  <font color="#9FA2A5"><span style="padding-left:6px">Tuesday, July 15,
 2014 12:46 AM</span></font></div></div></div><div class="">
  <div style="color:rgb(136,136,136);margin-left:24px;margin-right:24px"><pre>On Mon, Jul 14, 2014 at 12:10:47PM -0700, Todd Previte wrote:
</pre><blockquote type="cite"><pre>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 <a href="mailto:tprevite@gmail.com" target="_blank"><tprevite@gmail.com></a>
</pre></blockquote><pre>Since this is a minimal timeout ... shouldn't we put it into the dp
helpers instead?
-Daniel</pre></div>
</div></blockquote>
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.
 <span>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. <br>
  <br></span></div></blockquote><div><br></div><div>I agree your patch idea seems to be correct, but you should probably also do a little review of drm_dp_dpcd_access() since it also retries everything 7 times and already has 400ms sleep.<br>
<br></div><div>Just one minor comment: why not use usleep_range() instead of udelay()?<br></div><div><br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000">
<span>
</span><br>
-T<br>


<blockquote style="border:0px none" type="cite"><div><div class="h5">
  <div style="color:#888888;margin-left:24px;margin-right:24px"><blockquote type="cite">
    <pre>---
 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
<a href="mailto:Intel-gfx@lists.freedesktop.org" target="_blank">Intel-gfx@lists.freedesktop.org</a>
<a href="http://lists.freedesktop.org/mailman/listinfo/intel-gfx" target="_blank">http://lists.freedesktop.org/mailman/listinfo/intel-gfx</a>
</pre>
</blockquote><pre></pre></div>
  </div></div><div style="margin:30px 25px 10px 25px"><div style="display:table;width:100%;border-top:1px solid #edeef0;padding-top:5px">   <div style="display:table-cell;vertical-align:middle;padding-right:6px"><img src="cid:part2.04080504.03010304@gmail.com" name="1473aa907d6dc60d_compose-unknown-contact.jpg" height="25px" width="25px"></div>
   <div style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
        <a href="mailto:tprevite@gmail.com" style="color:#737f92!important;padding-right:6px;font-weight:bold;text-decoration:none!important" target="_blank">Todd Previte</a></div>   <div style="display:table-cell;white-space:nowrap;vertical-align:middle">
   
  <font color="#9FA2A5"><span style="padding-left:6px">Monday, July 14, 
2014 12:10 PM</span></font></div></div></div>
  <div style="color:#888888;margin-left:24px;margin-right:24px"><div><div class="">The Displayport Link Layer
 Compliance Testing Specification 1.2 rev 1.1 specifies that<br>repeated
 AUX transactions after a failure (NACK, DEFER or no response) must have<br>a
 minimum delay of 400us before the resend can occur. Tests 4.2.1.1 and 
4.2.1.2 are two<br>tests that require this specifically.<br><br>Signed-off-by:
 Todd Previte <a href="mailto:tprevite@gmail.com" target="_blank"><tprevite@gmail.com></a><br></div><div class="">---<br> 
drivers/gpu/drm/i915/intel_dp.c | 6 +++++-<br> 1 file changed, 5 
insertions(+), 1 deletion(-)<br><br>diff --git 
a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c<br>index
 0e207aaf..f0664cd 100644<br>--- a/drivers/gpu/drm/i915/intel_dp.c<br>+++
 b/drivers/gpu/drm/i915/intel_dp.c<br>@@ -573,8 +573,12 @@ 
intel_dp_aux_ch(struct intel_dp *intel_dp,<br>                               
DP_AUX_CH_CTL_RECEIVE_ERROR);<br> <br>                      if (status & 
(DP_AUX_CH_CTL_TIME_OUT_ERROR |<br>-                                    
DP_AUX_CH_CTL_RECEIVE_ERROR))<br>+                                      
DP_AUX_CH_CTL_RECEIVE_ERROR)) {<br>+                              /* DP compliance requires 400us 
delay for errors/timeouts<br>+                               (DP CTS 1.2 Core Rev 1.1, 4.2.1.1 
& 4.2.1.2) */<br>+                            udelay(400);<br>                          continue;<br>+                    }<br>             
        if (status & DP_AUX_CH_CTL_DONE)<br>                          break;<br>                }<br></div></div></div>
  <div style="margin:30px 25px 10px 25px"><div style="display:table;width:100%;border-top:1px solid #edeef0;padding-top:5px">   <div style="display:table-cell;vertical-align:middle;padding-right:6px"><img src="cid:part2.04080504.03010304@gmail.com" name="1473aa907d6dc60d_compose-unknown-contact.jpg" height="25px" width="25px"></div>
   <div style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
        <a href="mailto:tprevite@gmail.com" style="color:#737f92!important;padding-right:6px;font-weight:bold;text-decoration:none!important" target="_blank">Todd Previte</a></div>   <div style="display:table-cell;white-space:nowrap;vertical-align:middle">
   
  <font color="#9FA2A5"><span style="padding-left:6px">Monday, July 14, 
2014 12:10 PM</span></font></div></div></div>
  <div style="color:#888888;margin-left:24px;margin-right:24px"><div><br>V2:<br>- 
Addressed review feedback from the mailing list<br>- Broke up patches 
into smaller, easily managed chunks<br>- Reordered the patches such that
 they can be applied in order<br>- Fixed <a href="http://checkpatch.pl" target="_blank">checkpatch.pl</a> errors across the
 patchset  <br>- Updated and enhanced functionality for the EDID test 
function<br>- Completely revamped the mode set operations for compliance
 testing<br><br></div></div><span class="HOEnZb"><font color="#888888">
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
<div>-- <br>
<div>Sent with <a href="http://www.getpostbox.com" target="_blank"><span style="color:rgb(51,102,153)">Postbox</span></a></div></div>
</font></span></div>
<br>_______________________________________________<br>
Intel-gfx mailing list<br>
<a href="mailto:Intel-gfx@lists.freedesktop.org">Intel-gfx@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/intel-gfx" target="_blank">http://lists.freedesktop.org/mailman/listinfo/intel-gfx</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Paulo Zanoni
</div></div>