<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [CI][BAT] igt@* - dmesg-warn / dmesg-fail - Missing case (intel_dig_port->tc_type == 0)"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=108924#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [CI][BAT] igt@* - dmesg-warn / dmesg-fail - Missing case (intel_dig_port->tc_type == 0)"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=108924">bug 108924</a>
              from <span class="vcard"><a class="email" href="mailto:imre.deak@intel.com" title="Imre Deak <imre.deak@intel.com>"> <span class="fn">Imre Deak</span></a>
</span></b>
        <pre>This is similar to
<a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - [CI][BAT] igt@. - dmesg-warn - WARN_ON(intel_wait_for_register(dev_priv, regs->driver, (0x1 << ((pw_idx) * 2)), (0x1 << ((pw_idx) * 2)), 1))"
   href="show_bug.cgi?id=108070">https://bugs.freedesktop.org/show_bug.cgi?id=108070</a>

HPD arriving at the wrong moment while we are trying to do a modeset. I think
the solution for both issues will be to keep the port switched to TypeC native
mode according to the patch below. Before going with such a change though we
would need (a) confirmation from HW people that it's safe to do this and (b) a
new flag in VBT that marks the port as TypeC native (vs. being a TypeC USB
alternate/Thunderbolt DP port). The VBT flag would allow us to switch to native
mode right after driver loading, eliminating problems with other use-cases (DP
AUX reading from userspace, modesetting on a port without a sink being
connected). I have opened company internal tickets to track both (a) and (b)
issues, once those are resolved somehow I will follow up here.

commit 1d4ea665f65445817220a7956bf8bca3bd8686e2
Author: Imre Deak <<a href="mailto:imre.deak@intel.com">imre.deak@intel.com</a>>
Date:   Fri Nov 30 23:01:56 2018 +0200

    drm/i915/icl: Remain in legacy mode after TC port disconnect IRQ

    Signed-off-by: Imre Deak <<a href="mailto:imre.deak@intel.com">imre.deak@intel.com</a>>

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 70ae3d57316b..41f9883240cd 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -4948,6 +4948,12 @@ static void icl_tc_phy_disconnect(struct
drm_i915_private *dev_priv,
        if (dig_port->tc_type == TC_PORT_UNKNOWN)
                return;

+       if (dig_port->tc_type == TC_PORT_LEGACY) {
+               DRM_DEBUG_DRIVER("Keep TC port %c in legacy mode after
disconnect\n",
+                                port_name(dig_port->base.port));
+               return;
+       }
+
        /*
         * TBT disconnection flow is read the live status, what was done in
         * caller.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>