<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 - Invalid encoder after hotplug"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=108502">108502</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Invalid encoder after hotplug
          </td>
        </tr>

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

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

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (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>haupt.wolfgang@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=142105" name="attach_142105" title="dmesg">attachment 142105</a> <a href="attachment.cgi?id=142105&action=edit" title="dmesg">[details]</a></span>
dmesg

I'm working on hotplug support for linux/gbm in kodi.
Now I hit a roadblocker which looks like a driver issue to me.

I retrieve the hotplug info through a udev monitor and then I reinitialize the
graphic system of the application.
Unfortunately I always get an encoder ID 0 and initialization of the drm/kms
code fails.

I have attached a small test application, that can easily reproduce the issue.
These are the needed steps (for ubuntu):
sudo systemctl isolate multi-user.target
DISCONNECT HDMI
cd /path/of/testapp
./a.out
CONNECT HDMI

After this steps, if you stop the app and restart it you will always get an
invalid encoder.
The kernel log also shows an issue with getting the edid infos from the i2c
controller.

This state doesn't change until you do another hotplug or reboot the box.

I've tested this with kernel 4.17.12 and kernel 4.18.3 -> same results.

Attached is the source of my sample and the dmesg log with drm.debug=14.</pre>
        </div>
      </p>


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

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