Bug 101988 - blackscreen after modprobe amdgpu on R9M370X mac edition
Summary: blackscreen after modprobe amdgpu on R9M370X mac edition
Status: RESOLVED MOVED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/AMDgpu (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium blocker
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-31 16:53 UTC by newincpp
Modified: 2019-11-19 08:20 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
dmesg after `modprobe amdgpu` and getting blackscreen (79.81 KB, text/plain)
2017-07-31 16:53 UTC, newincpp
no flags Details
My kernel .config (109.98 KB, text/plain)
2017-07-31 17:04 UTC, newincpp
no flags Details

Description newincpp 2017-07-31 16:53:06 UTC
Created attachment 133154 [details]
dmesg after `modprobe amdgpu` and getting blackscreen

I don't know if this is specific to R9M370X - mac edition but I couldn't reproduce it on other AMD PC I have.

This is fairly simple to reproduce, I just have to mount the amdgpu and I get a black screen on my main screen and my main screen only (my second screen is fine)

I don't have this problem using radeon with the exact same kernel config.
dmesg is saying everything is fine and X11 log is irrelevant because it happen _before_ startx.
I am using Linux 4.12.4-gentoo.
Comment 1 newincpp 2017-07-31 17:04:24 UTC
Created attachment 133155 [details]
My kernel .config

note that I disabled the intel driver and the runtime gpu switch despite the fact that 2015 MBP have an internal intel GPU but this bug is also reproducible with it.
Comment 2 Alex Deucher 2017-07-31 17:40:28 UTC
I don't see any problems with the driver load.  The display switching is handled by a proprietary mechanism independent of the GPU driver on macs.  I'm not sure what the status of that support is.  I think your problem is likely related to that.
Comment 3 Alex Deucher 2017-08-01 14:44:43 UTC
Does using this branch help?
https://cgit.freedesktop.org/~agd5f/linux/log/?h=drm-next-4.14-wip
Comment 4 Alex Deucher 2017-08-01 14:45:21 UTC
Sorry. I didn't realize this worked on radeon.
Comment 5 newincpp 2017-08-01 16:49:08 UTC
I cloned "~agd5f/linux" on the branch "drm-next-4.14-wip" and copied my .config from the 4.12.4 I was using.
`uname -r` give me "4.12.0-rc7+"

Now `modprobe amdgpu` is freezing my screen instead of blackscreen.
`dmesg | grep amdgpu -i` give this :

[  107.804074] [drm] amdgpu kernel modesetting enabled.
[  107.804109] fb: switching to amdgpudrmfb from EFI VGA
[  107.804672] amdgpu 0000:01:00.0: SI support provided by radeon.
[  107.804674] amdgpu 0000:01:00.0: Use radeon.si_support=0 amdgpu.si_support=1 to override.

Using 4.12.4 my second screen was fine, that isn't the case anymore with drm-next-4.14-wip.
Using 4.12.4 I could startx (with a second screen obviously, my main screen was remaining black) now startx seems to return "no screen found".


Note that radeon is still working perfectly.
Comment 7 newincpp 2017-08-01 17:45:47 UTC
git apply returned me:
"error: patch failed: drivers/gpu/drm/amd/amdgpu/si.c:1413
error: drivers/gpu/drm/amd/amdgpu/si.c: patch does not apply"

So I checked manually:
1413                 amdgpu_program_register_sequence(adev,
1414                                                  pitcairn_mgcg_cgcg_init,
1415                                                  (const u32)ARRAY_SIZE(pitcairn_mgcg_cgcg_init));
1416                 break;
1417

1438                 amdgpu_program_register_sequence(adev,
1439                                                  oland_mgcg_cgcg_init,
1440                                                  (const u32)ARRAY_SIZE(oland_mgcg_cgcg_init));
1441                 break;
1442         case CHIP_HAINAN:
1443


The two break are already there. I checked if I cloned what you said:
`git branch` return
"* drm-next-4.14-wip"
I also checked using git log and the patch e5c8d400da67abc1c033b9a4af1806926b55e5f6 is already in the list

PS: I'm very far from being a git expert so maybe I got something wrong and not cloned the good one ?
Comment 8 Alex Deucher 2017-08-01 18:08:07 UTC
(In reply to newincpp from comment #7)

> The two break are already there. I checked if I cloned what you said:
> `git branch` return
> "* drm-next-4.14-wip"
> I also checked using git log and the patch
> e5c8d400da67abc1c033b9a4af1806926b55e5f6 is already in the list

The patch is already there in my 4.14-wip branch, but you seem to be having other problems with that kernel, so I suggested that patch if you want to try the patch on an older kernel that works better.
Comment 9 newincpp 2017-08-01 20:35:52 UTC
Having this patch or not on 4.12.4 does not change anything (at least on this bug)
Comment 10 Michel Dänzer 2017-08-02 01:45:49 UTC
(In reply to newincpp from comment #5)
> [  107.804672] amdgpu 0000:01:00.0: SI support provided by radeon.
> [  107.804674] amdgpu 0000:01:00.0: Use radeon.si_support=0
> amdgpu.si_support=1 to override.

Follow this advice and set radeon.si_support=0 amdgpu.si_support=1 to use the amdgpu driver. (In exchange, you no longer need to blacklist the radeon driver)
Comment 11 Martin Peres 2019-11-19 08:20:59 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/216.


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.