Bug 198745

Summary: Blank screen on RX 580 with AMDGPU Display Core enabled
Product: Drivers Reporter: Kyle De'Vir (kyle.devir)
Component: Video(DRI - non Intel)Assignee: drivers_video-dri
Status: RESOLVED UNREPRODUCIBLE    
Severity: high CC: alexdeucher, bjo, claude, harry.wentland, kyle.devir, nicholas.kazlauskas
Priority: P1    
Hardware: Other   
OS: Linux   
Kernel Version: 4.15.2 Subsystem:
Regression: No Bisected commit-id:
Attachments: journalctl output for amdgpu
journalctl output for drm
dmesg log
xorg log
dmesg log with amdgpu.dc_log=1 and drm.debug=6
[PATCH] drm/amd/display: Disable HPD filter for HDMI

Description Kyle De'Vir 2018-02-10 17:49:25 UTC
Created attachment 274089 [details]
journalctl output for amdgpu

When enabling AMDGPU Display Core for my Gigabyte RX 580, I get nothing more than a blank screen on my HDMI monitor.
Comment 1 Kyle De'Vir 2018-02-10 17:50:05 UTC
Created attachment 274091 [details]
journalctl output for drm
Comment 2 Kyle De'Vir 2018-02-10 17:51:55 UTC
Comment on attachment 274091 [details]
journalctl output for drm

> Feb 10 17:33:47 valmar-desktop kernel: [drm] Cannot find any crtc or sizes

This is the only error from the log.
Comment 3 Kyle De'Vir 2018-02-10 20:07:56 UTC
Is there anything I can do to get any interest debug output?
Comment 4 Alex Deucher 2018-02-11 16:57:19 UTC
Please attach your full dmesg output and xorg log if you are using X.
Comment 5 Kyle De'Vir 2018-02-11 18:29:21 UTC
Created attachment 274115 [details]
dmesg log
Comment 6 Kyle De'Vir 2018-02-11 18:29:41 UTC
Created attachment 274117 [details]
xorg log
Comment 7 Harry Wentland 2018-02-12 15:47:31 UTC
Please capture dmesg again with amdgpu.dc_log=1 and drm.debug=6 kernel options.

What monitor are you using? Is it connected via a dongle?
Comment 8 Kyle De'Vir 2018-02-12 16:58:16 UTC
Created attachment 274131 [details]
dmesg log with amdgpu.dc_log=1 and drm.debug=6

My monitor is an AOC I2379VHE. It's attached via a HDMI cable.

What do you mean by dongle? Wifi?
Comment 9 Alex Deucher 2018-02-12 16:59:57 UTC
(In reply to Kyle De'Vir from comment #8)
> What do you mean by dongle? Wifi?

A display dongle (e.g., DP to HDMI adapter).
Comment 10 Kyle De'Vir 2018-02-12 17:03:25 UTC
Ah. None ~ just your average HDMI to HDMI cable.
Comment 11 Kyle De'Vir 2018-02-23 13:02:21 UTC
Any progress on this issue? Are there any other logs or debugging output that I might be able to supply to help with this issue? If so, how do I acquire them?
Comment 12 Harry Wentland 2018-02-23 14:37:37 UTC
It looks like we detect no display. We haven't yet had a chance to repro the problem. I'll see if I can find this display in the office.

It'd be difficult debugging this remotely but if I can't repro this I might send you some extra logging patches in the hopes of getting more info.
Comment 13 Kyle De'Vir 2018-02-24 01:23:03 UTC
Is there something that plain AMDGPU is doing that Display Core isn't, perhaps? Is there a way to find what the difference could be?
Comment 14 Harry Wentland 2018-02-27 20:21:23 UTC
Created attachment 274477 [details]
[PATCH] drm/amd/display: Disable HPD filter for HDMI

This is a bit of a shot in the dark but I'm curious if HPD filtering causes us to lose the HPD signal for some reason.

Do you have a chance to try this patch and see if it fixes the issue?

Note: This patch is really only for debug purposes and might lead to other instability with display detection.
Comment 15 Kyle De'Vir 2018-02-28 09:15:38 UTC
Am trying it out soon. Will try and capture dmesg log if it matters.
Comment 16 Kyle De'Vir 2018-02-28 11:03:41 UTC
No change... dmesg looks no different. :/
Comment 17 Harry Wentland 2018-02-28 15:26:00 UTC
Thanks for checking. Non-DC display driver and DC do detection somewhat differently. It's somewhat difficult to say what's going wrong there.

Do you see different behavior when booting headless, then plugging in the display?

If you're interested in debugging I'd probably use ftrace to get started, checking that the functions get hit:
- handle_hpd_irq (only on hotplug)
- dc_link_detect (crucial to detection)
- dc_sink_create
- dm_helpers_read_local_edid
- drm_get_edid
- dm_helpers_parse_edid_caps
- amdgpu_dm_update_connector_after_detect
- drm_mode_connector_update_edid_property

Script to do ftrace debugging (run as root):

#!/bin/bash
cd /sys/kernel/debug/tracing/

echo handle_hpd_irq >> set_ftrace_filter
echo dc_link_detect >> set_ftrace_filter
echo dc_sink_create >> set_ftrace_filter
echo dm_helpers_read_local_edid >> set_ftrace_filter
echo drm_get_edid >> set_ftrace_filter
echo dm_helpers_parse_edid_caps >> set_ftrace_filter
echo amdgpu_dm_update_connector_after_detect >> set_ftrace_filter
echo drm_mode_connector_update_edid_property >> set_ftrace_filter

echo function_graph >> current_tracer
echo '' >> trace
cat trace_pipe
Comment 18 Kyle De'Vir 2018-02-28 16:01:51 UTC
Actually, there was a change! Didn't have to boot headless at all, happily.

Your patch didn't seem to change anything, but the update to 4.15.6 might have done something...? Did anything change for Display Core in the latest stable update?
Comment 19 Harry Wentland 2018-02-28 16:17:29 UTC
I don't see any DC or other DRM change in the stable kernel between 4.15.5 and 4.15.6.
Comment 20 Kyle De'Vir 2018-02-28 16:40:17 UTC
I'm going to test without your patch to see if the problem pops up again.
Comment 21 Kyle De'Vir 2018-02-28 16:47:14 UTC
> I don't see any DC or other DRM change in the stable kernel between 4.15.5
> and 4.15.6.

What about any of the other point releases? I tried without your patch, and amdgpu.dc=1 mysteriously just works... so strange that it just didn't before.

I don't understand what even happened, and that's even more frustrating than it not working... urgh. :/
Comment 22 Claude Heiland-Allen 2018-07-31 18:04:19 UTC
I think I have this exact same issue with my RX 580.  When amdgpu.dc=1 is initialized at boot, the console goes blank as it thinks all displays are disconnected.  Xorg is not able to enable the display either.  With amdgpu.dc=0 all is fine.  Tried with various (mostly Debian) kernels from 4.16 through 4.18~rc4, all have the issue.  I'm building a 4.18~rc7 from kernel.org now to rule out Debian patches being the issue and will be able to provide logs.

Should I open a new issue as this one has been closed?  Or can this one be reopened?
Comment 23 Nicholas Kazlauskas 2018-07-31 18:08:00 UTC
(In reply to Claude Heiland-Allen from comment #22)
> I think I have this exact same issue with my RX 580.  When amdgpu.dc=1 is
> initialized at boot, the console goes blank as it thinks all displays are
> disconnected.  Xorg is not able to enable the display either.  With
> amdgpu.dc=0 all is fine.  Tried with various (mostly Debian) kernels from
> 4.16 through 4.18~rc4, all have the issue.  I'm building a 4.18~rc7 from
> kernel.org now to rule out Debian patches being the issue and will be able
> to provide logs.
> 
> Should I open a new issue as this one has been closed?  Or can this one be
> reopened?

Feel free to create a new ticket and include your dmesg and Xorg logs.