drm/amdgpu: LVDS-1 output only turns on with sleep 1s workaround

Peter Stuge peter at stuge.se
Thu Oct 12 13:49:26 UTC 2017


Hi,

I have a situation which might be a bug in drm/amd/amdgpu:

I've got a TFT screen unit with an integrated AMD G-T56N mainboard
used in a signage application.

I build kernel and xorg myself.

Kernels 4.9.29, 4.9.52 and 4.13.4 behave the same.

git.freedesktop.org/~airlied/linux.git drm-next commit 754270c7c (Sep 28)
had a regression where amdgpu would not take the console and mode 03h
remained indefinitely. No /dev/dri/card0 so X could not start.

That side issue was fixed though, and
git.freedesktop.org/~airlied/linux.git drm-next commit baf7c1f7e (Oct 6)
(I think 4.14.0 rc4) again behaves like 4.9 and 4.13.4, ie. also has this
problem that I am facing.


I use the xorg modeset video driver because one software image must
support different hardware and I think drm is a good way.

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.

systemd starts X with xinit and a script of mine which runs xrandr
to set rotation and to make all outputs same-as the primary output,
and finally exec the 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 stay off, I guess because there's no kmscon. All good.


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, not very easy to
investigate. There is a BIOS setting to disable the encoder, that
leads to there never being any output on the internal panel.

My guess is that there is a timing issue between amdgpu and that
encoder, but that's pure speculation.


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


Discovered workaround so far:

Adding the following to kiosk.sh turns the internal panel on:

xrandr --output LVDS-1 --off
sleep 1s
xrandr --output LVDS-1 --auto

Without the sleep, the internal panel does *not* turn on.


Questions:

What is the relationship between drm connector names and X output names?
More specifically: How could I find out that drm HDMI-A-1 == X HDMI-1?

Can I help find the cause of my problem and make the internal panel turn
on without my workaround? What information would be needed, and should I
send here or use bugzilla?

What is "ib test on ring 5" ? It currently needs 500 ms. Could I help
optimize that?


--8<-- dmesg drm snippet
[    1.575518] Linux agpgart interface v0.103
[    1.575888] [drm] radeon kernel modesetting enabled.
[    1.578517] [drm] initializing kernel modesetting (PALM 0x1002:0x9806 0x1022:0x1511 0x00).
[    1.578806] ATOM BIOS: AMD
[    1.578967] radeon 0000:00:01.0: VRAM: 384M 0x0000000000000000 - 0x0000000017FFFFFF (384M used)
[    1.578978] radeon 0000:00:01.0: GTT: 1024M 0x0000000018000000 - 0x0000000057FFFFFF
[    1.578996] [drm] Detected VRAM RAM=384M, BAR=256M
[    1.579085] [drm] RAM width 32bits DDR
[    1.579600] [TTM] Zone  kernel: Available graphics memory: 432660 kiB
[    1.579616] [TTM] Zone highmem: Available graphics memory: 1352552 kiB
[    1.579624] [TTM] Initializing pool allocator
[    1.580000] [drm] radeon: 384M of VRAM memory ready
[    1.580096] [drm] radeon: 1024M of GTT memory ready.
[    1.580200] [drm] Loading PALM Microcode
[    1.580219] [drm] Internal thermal controller without fan control
[    1.580542] [drm] Found smc ucode version: 0x00010601
[    1.580726] [drm] radeon: dpm initialized
[    1.580830] [drm] GART: num cpu pages 262144, num gpu pages 262144
[    1.604202] [drm] PCIE GART of 1024M enabled (table at 0x0000000000162000).
[    1.604648] radeon 0000:00:01.0: WB enabled
[    1.604662] radeon 0000:00:01.0: fence driver on ring 0 use gpu addr 0x0000000018000c00 and cpu addr 0xff801c00
[    1.604674] radeon 0000:00:01.0: fence driver on ring 3 use gpu addr 0x0000000018000c0c and cpu addr 0xff801c0c
[    1.605369] radeon 0000:00:01.0: fence driver on ring 5 use gpu addr 0x0000000000072118 and cpu addr 0xf8232118
[    1.605384] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.605392] [drm] Driver supports precise vblank timestamp query.
[    1.605402] radeon 0000:00:01.0: radeon: MSI limited to 32-bit
[    1.605649] radeon 0000:00:01.0: radeon: using MSI.
[    1.605824] [drm] radeon: irq initialized.
[    1.624412] [drm] ring test on 0 succeeded in 1 usecs
[    1.624429] [drm] ring test on 3 succeeded in 2 usecs
[    1.670591] [drm] ring test on 5 succeeded in 1 usecs
[    1.690632] [drm] UVD initialized successfully.
[    1.692542] [drm] ib test on ring 0 succeeded in 0 usecs
[    1.692656] [drm] ib test on ring 3 succeeded in 0 usecs
[    2.216364] [drm] ib test on ring 5 succeeded
[    2.240589] [drm] radeon atom DIG backlight initialized
[    2.240603] [drm] Radeon Display Connectors
[    2.240612] [drm] Connector 0:
[    2.240620] [drm]   LVDS-1
[    2.240628] [drm]   HPD1
[    2.240638] [drm]   DDC: 0x6430 0x6430 0x6434 0x6434 0x6438 0x6438 0x643c 0x643c
[    2.240646] [drm]   Encoders:
[    2.240654] [drm]     LCD1: INTERNAL_UNIPHY
[    2.240662] [drm]     LCD1: TRAVIS
[    2.240670] [drm] Connector 1:
[    2.240678] [drm]   HDMI-A-1
[    2.240686] [drm]   HPD2
[    2.240695] [drm]   DDC: 0x6440 0x6440 0x6444 0x6444 0x6448 0x6448 0x644c 0x644c
[    2.240702] [drm]   Encoders:
[    2.240710] [drm]     DFP1: INTERNAL_UNIPHY
[    2.240718] [drm] Connector 2:
[    2.240726] [drm]   VGA-1
[    2.240735] [drm]   DDC: 0x64d8 0x64d8 0x64dc 0x64dc 0x64e0 0x64e0 0x64e4 0x64e4
[    2.240742] [drm]   Encoders:
[    2.240750] [drm]     CRT1: INTERNAL_KLDSCP_DAC1
[    2.256098] [drm] Initialized radeon 2.50.0 20080528 for 0000:00:01.0 on minor 0
[    2.256410] [drm] amdgpu kernel modesetting enabled.
[    2.264741] loop: module loaded
-->8--


Thanks very much and kind regards

//Peter


More information about the amd-gfx mailing list