<div dir="ltr"><div>Hi all,</div><div><br></div><div>tl;dr: I've discovered what appears to be some kind of timing issue with DP link training on new hardware. I applied a hacky fix locally, but I need help with coming up with a real fix that we can actually use. </div><div><br></div><div>I recently got a new laptop, a Thinkpad X1 Extreme Gen 3, with an OLED display. I've been trying to debug inconsistent behavior during resume where the display would not power on the majority of the time.</div><div><br></div><div>This is all the first time I've ever worked with this stuff, so I have no idea what I'm really doing and so anything I say here might be wrong. When comparing logs between a good and bad resume, I noticed the following:</div><div><br></div><div>* Failed resumes would result in "Max Voltage Swing reached", and "Link Training failed".</div><div>* Successful and failed resumes would have the exact same behavior regarding link training in the logs, right up until the end, where for a bad resume. we'd read the following register state:</div><div>   [drm:drm_dp_dpcd_read [drm_kms_helper]] AUX A/DDI A/PHY A: 0x00202 AUX -> (ret=  6) 00 00 00 00 22 22</div><div>  <br></div><div>  and a good resume:</div><div>  [drm:drm_dp_dpcd_read [drm_kms_helper]] AUX A/DDI A/PHY A: 0x00202 AUX -> (ret=  6) 77 77 81 01 22 22</div><div><br></div><div>This led me to think that there's some kind of timing issue here where we're reading the register before it's fully populated. To test that, I added an additional 20ms sleep to intel_dp_link_training_clock_recovery right after the call to intel_dp_link_training_clock_recovery_delay. I attached the hack patch to the issue I filed tracking this: <a href="https://gitlab.freedesktop.org/drm/intel/-/issues/3173">https://gitlab.freedesktop.org/drm/intel/-/issues/3173</a></div><div><br></div><div>Since applying that patch, everything has been working perfectly. So now I'd love to figure out how to get this into a real fix, but I don't really know what to propose beyond my current hack of "wait longer".</div><div><br></div><div>Thanks in advance for any assistance!<br></div><div>   <br></div></div>