<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [HSW MST] Warning...drm_dp_mst_get_validated_mstb_ref_locked, possible circular locking dependency detected"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=87099">87099</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[HSW MST] Warning...drm_dp_mst_get_validated_mstb_ref_locked, possible circular locking dependency detected
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>DRI
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>DRI git
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>DRM/Intel
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>intel-gfx-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>consume.noise@gmail.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>intel-gfx-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>intel-gfx-bugs@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=110564" name="attach_110564" title="dmesg drm-intel-nightly 3.18.0-00343-gfc7bddc">attachment 110564</a> <a href="attachment.cgi?id=110564&action=edit" title="dmesg drm-intel-nightly 3.18.0-00343-gfc7bddc">[details]</a></span>
dmesg drm-intel-nightly 3.18.0-00343-gfc7bddc

Hardware:
- Lenovo ThinkPad T440s + ThinkPad Pro Dock 40A1
- 1. monitor (Dell U2410 1920x1200) at DP of docking station
- 2. monitor (Dell U2413 1920x1200) at VGA of docking station

If I boot this setup with both monitor attached to the console and remove the
monitor (unplug the connector) at the DP, then I can reproduce the attached
backtrace (not?) always.

This happens with v3.17.6, v3.18 and current drm-intel-nightly (fc7bddc
drm-intel-nightly: 2014y-12m-08d-12h-45m-52s UTC integration manifest). The
dmesg log has been captured with drm-intel-nightly.

[   18.947852] WARNING: CPU: 1 PID: 128 at include/linux/kref.h:47
drm_dp_mst_get_validated_mstb_ref_locked+0x92/0xa0 [drm_kms_helper]()           
...
[   22.999859] [drm:drm_dp_mst_wait_tx_reply] timedout msg send
ffff88030cd51800 2 1
[   23.002183] ======================================================
[   23.003160] [ INFO: possible circular locking dependency detected ]
[   23.004108] 3.18.0-00343-gfc7bddc #11 Tainted: G        W     
[   23.005041] -------------------------------------------------------
[   23.005941] kworker/u16:2/128 is trying to acquire lock:
[   23.006826]  ((&mgr->work)){+.+.+.}, at: [<ffffffff81065585>]
flush_work+0x5/0x260
[   23.007667] 
but task is already holding lock:
[   23.009294]  (&dev->mode_config.mutex){+.+.+.}, at: [<ffffffffa03db365>]
drm_fb_helper_hotplug_event+0x25/0xe0 [drm_kms_helper]
[   23.010166] 
which lock already depends on the new lock.

[   23.012646] 
the existing dependency chain (in reverse order) is:
[   23.014307] 
-> #1 (&dev->mode_config.mutex){+.+.+.}:
[   23.015951]        [<ffffffff8109b58c>] lock_acquire+0xac/0x140
...
other info that might help us debug this:

[   23.060273]  Possible unsafe locking scenario:

[   23.061790]        CPU0                    CPU1
[   23.062536]        ----                    ----
[   23.063323]   lock(&dev->mode_config.mutex);
[   23.064096]                                lock((&mgr->work));
[   23.064814]                                lock(&dev->mode_config.mutex);
[   23.065531]   lock((&mgr->work));
[   23.066242] 
 *** DEADLOCK ***

[   23.068373] 3 locks held by kworker/u16:2/128:
[   23.069075]  #0:  ("i915-dp"){.+.+.+}, at: [<ffffffff81065f51>]
process_one_work+0x141/0x490
[   23.069823]  #1:  ((&dev_priv->dig_port_work)){+.+.+.}, at:
[<ffffffff81065f51>] process_one_work+0x141/0x490
[   23.070561]  #2:  (&dev->mode_config.mutex){+.+.+.}, at:
[<ffffffffa03db365>] drm_fb_helper_hotplug_event+0x25/0xe0 [drm_kms_helper]</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are on the CC list for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>