From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 103354] LVDS-1 output only turns on with sleep 1s workaround Date: Wed, 18 Oct 2017 22:17:38 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2001928887==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id D57716E94C for ; Wed, 18 Oct 2017 22:17:38 +0000 (UTC) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============2001928887== Content-Type: multipart/alternative; boundary="15083650581.0EBf66d.20627"; charset="UTF-8" --15083650581.0EBf66d.20627 Date: Wed, 18 Oct 2017 22:17:38 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D103354 Bug ID: 103354 Summary: LVDS-1 output only turns on with sleep 1s workaround Product: DRI Version: unspecified Hardware: x86-64 (AMD64) OS: Linux (All) Status: NEW Severity: normal Priority: medium Component: DRM/AMDgpu Assignee: dri-devel@lists.freedesktop.org Reporter: peter@stuge.se Created attachment 134915 --> https://bugs.freedesktop.org/attachment.cgi?id=3D134915&action=3Dedit 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 6= th. 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=3Dedid/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 inter= nal 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 pan= el, 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 connecte= d, it turns on and shows the expected contents, as set by xrandr. Whether a sc= reen 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 sc= ript 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* tu= rn 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? Mo= re 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 th= at? --=20 You are receiving this mail because: You are the assignee for the bug.= --15083650581.0EBf66d.20627 Date: Wed, 18 Oct 2017 22:17:38 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated
Bug ID 103354
Summary LVDS-1 output only turns on with sleep 1s workaround
Product DRI
Version unspecified
Hardware x86-64 (AMD64)
OS Linux (All)
Status NEW
Severity normal
Priority medium
Component DRM/AMDgpu
Assignee dri-devel@lists.freedesktop.org
Reporter peter@stuge.se

Created attachment 134915 =
[details]
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 6=
th.

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=3Dedid/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 inter=
nal
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 in=
ternal 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 connecte=
d,
it turns on and shows the expected contents, as set by xrandr. Whether a sc=
reen
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 sc=
ript
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* tu=
rn
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? Mo=
re
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 o=
ptimize that?


You are receiving this mail because:
  • You are the assignee for the bug.
= --15083650581.0EBf66d.20627-- --===============2001928887== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============2001928887==--