Bug 107066 - [Regression] Tonga can't bring up > 1 display since DC enablement
Summary: [Regression] Tonga can't bring up > 1 display since DC enablement
Status: RESOLVED MOVED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/AMDgpu (show other bugs)
Version: DRI git
Hardware: Other All
: medium major
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-28 19:55 UTC by Lyude Paul
Modified: 2019-11-19 08:42 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Aforementioned dmesg (226.78 KB, text/plain)
2018-06-28 19:55 UTC, Lyude Paul
no flags Details
Don't share clk source between DP and other connectors (1.45 KB, patch)
2018-07-13 15:23 UTC, Mikita Lipski
no flags Details | Splinter Review
Update pix clk for HDMI connector with deep color (1.78 KB, patch)
2018-07-13 15:24 UTC, Mikita Lipski
no flags Details | Splinter Review
Disable clock source sharing (856 bytes, patch)
2018-07-13 15:24 UTC, Mikita Lipski
no flags Details | Splinter Review
dmesg after fix (128.59 KB, text/x-log)
2018-07-13 17:34 UTC, Lyude Paul
no flags Details

Description Lyude Paul 2018-06-28 19:55:50 UTC
Created attachment 140384 [details]
Aforementioned dmesg

Since DC got enabled for my GPU (R9 380 Tonga from Gigabyte, 22:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Tonga PRO [Radeon R9 285/380] [1002:6939] (rev f1)) I haven't been able to bring up more then a single display at a time. More then one display usually results in at least one display turning on, one other display possibly turning on but only showing purple and another not turning on, or one display works and the other two just don't come up at all. Additionally, my dmesg is filled with spam from amdgpu (see attachment).

I've confirmed this still seems to be present in amdgpu's drm-next-4.19, and it seems to be caused by the fact that none of the dc_states in the function mentioned in the WARN_ON() actually have a stream assigned to them. I'm currently swimming in a sea of bugs though, so any help would be appreciated :).
Comment 1 Lyude Paul 2018-06-28 19:56:20 UTC
Additionally I should note: disabling dc with amdgpu.dc=0 does workaround the problem
Comment 2 Alex Deucher 2018-06-28 20:37:48 UTC
What display types are you trying to use?  Using dongles?
Comment 3 Lyude Paul 2018-06-28 20:41:28 UTC
(In reply to Alex Deucher from comment #2)
> What display types are you trying to use?  Using dongles?

On my home setup (which this was also seen with), nothing special. Just two 1080p DVI displays and one 1080p HDMI display. I've managed to reproduce it at work with a similar setup as well (although there's one passive HDMI-DVI adaptor in the mix, but I'd be surprised if that made a difference). It only ever seems to happen with >1 display though
Comment 4 Lyude Paul 2018-06-29 00:52:33 UTC
Still looking into this and have made a tiny bit of progress. A couple of things to note:

- I've reproduced this with two monitors, but it's far more likely to occur with three. So, just use three
- Whenever the problem happens, it seems that the atomic commit actually fails (specifically, at drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:4651 . I thought this might be another userspace issue like one I fixed with X recently, but I wouldn't expect that to be triggerable through legacy modesetting...) which causes the DC streams to not be created which causes the warning message you saw in the earlier log

don't know much more then that yet, but I'll keep you updated
Comment 5 Michel Dänzer 2018-06-29 08:06:16 UTC
I'm also seeing the splats from drivers/gpu/drm/amd/display/dc/dce100/dce100_hw_sequencer.c:154 in dce100_set_bandwidth. For me, they happen when the single display connected via DVI is turned off. (I haven't noticed any issues other than the dmesg splats)

These were introduced by commit 308425ff39dc "drm/amd/display: redesign dce/dcn clock voltage update request".

(In reply to Lyude Paul from comment #3)
> Just two 1080p DVI displays and one 1080p HDMI display.

The hardware only supports two non-DP displays, so unless one of those involves an active adapter from DP, not sure how that could work.
Comment 6 Mikita Lipski 2018-07-03 15:15:43 UTC
I have just
Comment 7 Lyude Paul 2018-07-03 17:24:22 UTC
(In reply to mikita.lipski@amd.com from comment #6)
> I have just

???
Comment 8 Mikita Lipski 2018-07-13 15:23:25 UTC
Created attachment 140625 [details] [review]
Don't share clk source between DP and other connectors

Hi Paul,
sorry for the previous comment that was a part of the message for another bug.
Anyways, I was able to reproduce a similar issue as yours with 4 connectors plugged and only 2 would light up.
But in my case it was caused by DP and HDMI sharing the same clock source, but since you're not using DP I wonder, what could have caused an issue for you.
I'm attaching 3 experimental patches:
1. 0001-drm-amdgpu-display-Don-t-share-clk-source-between-DP-an.patch
   This patch should fix the issue for DP connection with Tonga
2.0001-drm-amdgpu-display-update-clk-for-various-HDMI-color.patch
   Allows programming of HDMI2.0 and later on Tonga
3. 0001-Disable-source-clock-sharing-between-multiple-connec.patch
   Disable clock sharing by an early return 

Can you try if any of them work for you? 
Thanks
Comment 9 Mikita Lipski 2018-07-13 15:24:32 UTC
Created attachment 140626 [details] [review]
Update pix clk for HDMI connector with deep color
Comment 10 Mikita Lipski 2018-07-13 15:24:58 UTC
Created attachment 140627 [details] [review]
Disable clock source sharing
Comment 11 Lyude Paul 2018-07-13 15:30:36 UTC
(In reply to Mikita Lipski from comment #10)
> Created attachment 140627 [details] [review] [review]
> Disable clock source sharing

Firing up an RPM build now, will have the results in a little bit
Comment 12 Lyude Paul 2018-07-13 17:34:37 UTC
Created attachment 140629 [details]
dmesg after fix

So the patch actually works, hooray! There are some pretty annoying dmesg warnings leftover though, I've linked to them in my dmesg

For the other patches:

Tested-by: Lyude Paul <lyude@redhat.com>
Comment 13 Mikita Lipski 2018-07-13 17:40:15 UTC
Which patch did you try? Or did you apply all of them?

Warnings: hmm, haven't seen those before, seems like something new got exposed. Will look into them more in depth.
Comment 14 Lyude Paul 2018-07-13 17:53:55 UTC
(In reply to Mikita Lipski from comment #13)
> Which patch did you try? Or did you apply all of them?
> 
> Warnings: hmm, haven't seen those before, seems like something new got
> exposed. Will look into them more in depth.

I applied all of them, yeah
Comment 15 Mikita Lipski 2018-07-13 17:57:59 UTC
Could you try building without the last patch if possible: 0001-Disable-source-clock-sharing-between-multiple-connec.patch .

Thanks
Comment 16 Lyude Paul 2018-07-14 02:32:40 UTC
(In reply to Mikita Lipski from comment #15)
> Could you try building without the last patch if possible:
> 0001-Disable-source-clock-sharing-between-multiple-connec.patch .
> 
> Thanks

Nope, doesn't get rid of the warning :(, just makes the screens stop coming back up
Comment 17 Martin Peres 2019-11-19 08:42:37 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/drm/amd/issues/432.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.