<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 - LVDS-1 output only turns on with sleep 1s workaround"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=103354">103354</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>LVDS-1 output only turns on with sleep 1s workaround
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>unspecified
          </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/AMDgpu
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>dri-devel@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>peter@stuge.se
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=134915" name="attach_134915" title="dmesg drm snippet">attachment 134915</a> <a href="attachment.cgi?id=134915&action=edit" title="dmesg drm snippet">[details]</a></span>
dmesg drm snippet

I've got a TFT screen unit with an integrated AMD G-T56N mainboard used for
signage. I build kernel and xorg myself.

I have this problem on kernels 4.9.29, 4.9.52, 4.13.4 and
git.freedesktop.org/~airlied/linux.git drm-next commit baf7c1f7e from Oct 6th.

I am using the xorg modeset video driver.

I want to lock FHD resolution so on the kernel cmdline I have:
drm_kms_helper.edid_firmware=edid/1920x1080.bin

This works well. X reports the LNX EDID as expected.

systemd starts X with xinit and a simple client script of mine which runs
xrandr to set rotation, make all outputs same-as the primary output and then
exec the signage application.

The built-in TFT panel is on connector 0, which drm and X both call LVDS-1.

The unit also has an external HDMI connector, that's connector 1, which drm
calls HDMI-A-1 but X calls HDMI-1.

During boot, BIOS and mode 03h with MBR bootloader are visible on the internal
TFT.

When drm takes over and switches from mode 03h all connected panels turn off
and remain off, I guess because there's no kmscon. That's OK.


The problem:

When X has started (with or without my script) xrandr always reports the
internal panel (connector 0 AKA LVDS-1) as connected primary and on with FHD
resolution *but* the panel stays off.

Connector 0 seems to have a DP->HDMI encoder connected to it, internally in the
unit. I'm not sure - no docs on that level and it's not very easy to
investigate inside the unit. There is a BIOS setting to disable the encoder,
choosing "Disabled" causes there to be no output at all on the internal panel,
not even mode 03h BIOS/MBR.

I guess that there is a timing issue between amdgpu and that encoder?

Connector 1 AKA HDMI-A-1 AKA HDMI-1 works reliably. If a screen is connected,
it turns on and shows the expected contents, as set by xrandr. Whether a screen
is connected to HDMI-1 has no effect on the internal panel.


I've found a workaround for the problem. Adding this to the xinit client script
makes the internal panel turn on:

--8<--
xrandr --output LVDS-1 --off
sleep 1s
xrandr --output LVDS-1 --auto
-->8--

The sleep is required. If I remove it then the internal panel does *not* turn
on.


Questions:

Can I help find the cause of my problem and make the internal panel turn on
without the workaround? What additional information is needed?

What is the relationship between drm connector names and X output names? More
specifically, how could I find out that drm HDMI-A-1 is called HDMI-1 by X?

What is "ib test on ring 5" ? It currently takes 500 ms. How to optimize that?</pre>
        </div>
      </p>


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

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>