<div dir="ltr"><div dir="ltr">On Thu, Jan 9, 2020 at 8:49 PM Alex Deucher <<a href="mailto:alexdeucher@gmail.com">alexdeucher@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, Jan 9, 2020 at 11:47 AM Mario Kleiner<br>
<<a href="mailto:mario.kleiner.de@gmail.com" target="_blank">mario.kleiner.de@gmail.com</a>> wrote:<br>
><br>
> On Thu, Jan 9, 2020 at 4:40 PM Alex Deucher <<a href="mailto:alexdeucher@gmail.com" target="_blank">alexdeucher@gmail.com</a>> wrote:<br>
>><br>
>> On Thu, Jan 9, 2020 at 10:08 AM Mario Kleiner<br>
>> <<a href="mailto:mario.kleiner.de@gmail.com" target="_blank">mario.kleiner.de@gmail.com</a>> wrote:<br>
>> ><br>As Harry mentioned in the other thread, won't this only work if the<br>
display was brought up by the vbios?  In the suspend/resume case,<br>
won't we just fall back to 2.7Gbps?<br>
<br>
Alex<br>
<br></blockquote></div><div class="gmail_quote"><br></div><div class="gmail_quote">Adding Harry to cc...<br></div><div class="gmail_quote"><br></div><div class="gmail_quote">The code is only executed for eDP. On the Intel side, it seems that intel_edp_init_dpcd() gets only called during driver load / modesetting init, so not on resume.</div><div class="gmail_quote"><br></div><div class="gmail_quote">On the AMD DC side, dc_link_detect_helper() has this early no-op return at the beginning:</div><div class="gmail_quote"><br></div><div class="gmail_quote"><pre><span class="gmail-k">if</span> <span class="gmail-p">((</span><span class="gmail-n"><a href="https://elixir.bootlin.com/linux/v5.5-rc5/ident/link">link</a></span><span class="gmail-o">-></span><span class="gmail-n">connector_signal</span> <span class="gmail-o">==</span> <span class="gmail-n"><a href="https://elixir.bootlin.com/linux/v5.5-rc5/ident/SIGNAL_TYPE_LVDS">SIGNAL_TYPE_LVDS</a></span> <span class="gmail-o">||</span>
                        <span class="gmail-n"><a href="https://elixir.bootlin.com/linux/v5.5-rc5/ident/link">link</a></span><span class="gmail-o">-></span><span class="gmail-n">connector_signal</span> <span class="gmail-o">==</span> <span class="gmail-n"><a href="https://elixir.bootlin.com/linux/v5.5-rc5/ident/SIGNAL_TYPE_EDP">SIGNAL_TYPE_EDP</a></span><span class="gmail-p">)</span> <span class="gmail-o">&&</span>
                        <span class="gmail-n"><a href="https://elixir.bootlin.com/linux/v5.5-rc5/ident/link">link</a></span><span class="gmail-o">-></span><span class="gmail-n">local_sink</span><span class="gmail-p">)</span>
                <span class="gmail-n"><a href="https://elixir.bootlin.com/linux/v5.5-rc5/ident/return">return</a></span> <span class="gmail-n"><a href="https://elixir.bootlin.com/linux/v5.5-rc5/ident/true">true</a></span><span class="gmail-p">;</span></pre></div><div class="gmail_quote"><br></div><div class="gmail_quote">So i guess if link->local_sink doesn't get NULL'ed during a suspend/resume cycle, then we never reach the setup code that would overwrite with non vbios settings?</div><div class="gmail_quote"><br></div><div class="gmail_quote">Sounds reasonable to me, given that eDP panels are usually fixed internal panels, nothing that gets hot(un-)plugged?</div><div class="gmail_quote"><br></div><div class="gmail_quote">I can't test, because suspend/resume with the Polaris gpu on the MBP 2017 is totally broken atm., just as vgaswitcheroo can't do its job. Looks like powering down the gpu works, but powering up doesn't. And also modesetting at vgaswitcheroo switch time is no-go, because the DDC/AUX lines apparently can't be switched on that Apple gmux, and handover of that data seems to be not implemented in current vgaswitcheroo. At the moment switching between AMD only or Intel+AMD Prime setup is quite a pita...<br></div><div class="gmail_quote"><br></div><div class="gmail_quote">-mario<br></div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div></div>