https://bugzilla.kernel.org/show_bug.cgi?id=216119
Bug ID: 216119 Summary: 087451f372bf76d breaks hibernation on amdgpu Radeon R9 390 Product: Drivers Version: 2.5 Kernel Version: v5.17+ Hardware: All OS: Linux Tree: Mainline Status: NEW Severity: normal Priority: P1 Component: Video(DRI - non Intel) Assignee: drivers_video-dri@kernel-bugs.osdl.org Reporter: h.judt@gmx.at Regression: No
This is a problem with amdgpu only, as I did not experience this on my other machines, and caused by [087451f372bf76d971184caa258807b7c35aac8f] drm/amdgpu: use generic fb helpers instead of setting up AMD own's https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?i...
Reverting this patch makes me a happy amdgpu user with working hibernation again on Linux 5.18.3.
Note I did the bisect on the stable linux repo, but that shouldn't matter.
git bisect start # good: [c19a885e12f114b799b5d0d877219f0695e0d4de] Linux 5.16.20 git bisect good c19a885e12f114b799b5d0d877219f0695e0d4de # bad: [f443e374ae131c168a065ea1748feac6b2e76613] Linux 5.17 git bisect bad f443e374ae131c168a065ea1748feac6b2e76613 # good: [df0cc57e057f18e44dac8e6c18aba47ab53202f9] Linux 5.16 git bisect good df0cc57e057f18e44dac8e6c18aba47ab53202f9 # bad: [22ef12195e13c5ec58320dbf99ef85059a2c0820] Merge tag 'staging-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging git bisect bad 22ef12195e13c5ec58320dbf99ef85059a2c0820 # bad: [9bcbf894b6872216ef61faf17248ec234e3db6bc] Merge tag 'media/v5.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media git bisect bad 9bcbf894b6872216ef61faf17248ec234e3db6bc # bad: [cb6846fbb83b574c85c2a80211b402a6347b60b1] Merge tag 'amd-drm-next-5.17-2021-12-30' of ssh://gitlab.freedesktop.org/agd5f/linux into drm-next git bisect bad cb6846fbb83b574c85c2a80211b402a6347b60b1 # bad: [15bb79910fe734ad21c765d1cae762e855969caa] Merge tag 'drm-misc-next-2021-12-09' of git://anongit.freedesktop.org/drm/drm-misc into drm-next git bisect bad 15bb79910fe734ad21c765d1cae762e855969caa # good: [03848335b5b1faa4a4641fcf30b7c233579a45aa] drm/bridge: sn65dsi86: defer if there is no dsi host git bisect good 03848335b5b1faa4a4641fcf30b7c233579a45aa # good: [6bb0a0e0fd358d4f9f6ce4c2d36c1f80d7496f6a] drm/i915: Clean up FPGA_DBG/CLAIM_ER bits git bisect good 6bb0a0e0fd358d4f9f6ce4c2d36c1f80d7496f6a # bad: [13d20aabd6ef501229ac002493c6f237482c47de] drm/amd/display: remove no need NULL check before kfree git bisect bad 13d20aabd6ef501229ac002493c6f237482c47de # bad: [a6506cd845824fe92b1760aaf104011cc04dfa78] drm/radeon: correct indentation git bisect bad a6506cd845824fe92b1760aaf104011cc04dfa78 # bad: [f0d0c39149f817e5ecdff8fa164f44da455b3317] drm/amd/display: Pass panel inst to a PSR command git bisect bad f0d0c39149f817e5ecdff8fa164f44da455b3317 # good: [574c4183ef75117f763e9f2b35e08c85f5dcad2d] drm/amdkfd: replace kgd_dev in get amdgpu_amdkfd funcs git bisect good 574c4183ef75117f763e9f2b35e08c85f5dcad2d # bad: [b5f57384805a34f497edb8b04d694a8a1b3d81d4] drm/amdkfd: Add sysfs bitfields and enums to uAPI git bisect bad b5f57384805a34f497edb8b04d694a8a1b3d81d4 # good: [56c5977eae8799c9a71ee2112802fd1f1591dc3a] drm/amdkfd: replace/remove remaining kgd_dev references git bisect good 56c5977eae8799c9a71ee2112802fd1f1591dc3a # bad: [087451f372bf76d971184caa258807b7c35aac8f] drm/amdgpu: use generic fb helpers instead of setting up AMD own's. git bisect bad 087451f372bf76d971184caa258807b7c35aac8f # good: [b5d1d755c1344075d4f16a3e6183ed04b4d022ef] drm/amdkfd: remove kgd_dev declaration and initialization git bisect good b5d1d755c1344075d4f16a3e6183ed04b4d022ef # first bad commit: [087451f372bf76d971184caa258807b7c35aac8f] drm/amdgpu: use generic fb helpers instead of setting up AMD own's.
lspci: 01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Hawaii PRO [Radeon R9 290/390] (rev 80) (prog-if 00 [VGA controller]) Subsystem: XFX Pine Group Inc. Hawaii PRO [Radeon R9 290/390] Flags: bus master, fast devsel, latency 0, IRQ 25 Memory at e0000000 (64-bit, prefetchable) [size=256M] Memory at f0000000 (64-bit, prefetchable) [size=8M] I/O ports at e000 [size=256] Memory at f7e00000 (32-bit, non-prefetchable) [size=256K] Expansion ROM at 000c0000 [disabled] [size=128K] Capabilities: <access denied> Kernel driver in use: amdgpu
https://bugzilla.kernel.org/show_bug.cgi?id=216119
Harald Judt (h.judt@gmx.at) changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |h.judt@gmx.at
--- Comment #1 from Harald Judt (h.judt@gmx.at) --- Created attachment 301161 --> https://bugzilla.kernel.org/attachment.cgi?id=301161&action=edit Error when resuming fails
Screenshot with error message when resuming fails. Screen will blank out and come back, looping endlessly.
https://bugzilla.kernel.org/show_bug.cgi?id=216119
Artem S. Tashkinov (aros@gmx.com) changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |aros@gmx.com Resolution|--- |ANSWERED
--- Comment #2 from Artem S. Tashkinov (aros@gmx.com) --- Please refile here: https://gitlab.freedesktop.org/drm/amd/-/issues (when the website gets restored - it's currently down).
https://bugzilla.kernel.org/show_bug.cgi?id=216119
Alex Deucher (alexdeucher@gmail.com) changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |alexdeucher@gmail.com
--- Comment #3 from Alex Deucher (alexdeucher@gmail.com) --- Does this patch fix it in your case?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h...
https://bugzilla.kernel.org/show_bug.cgi?id=216119
Harald Judt (h.judt@gmx.at) changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|ANSWERED |---
--- Comment #4 from Harald Judt (h.judt@gmx.at) --- I have tried 5.18.4 which includes this patch, and I also think 5.18.3 came with this patch. Unfortunately, this does not fix hibernation for me, though the symptoms are a bit different: No longer can I see any kernel messages like before (see comment #1), but the screen stays black. I can reboot my kernel with keyboard sysrq keys, though.
https://bugzilla.kernel.org/show_bug.cgi?id=216119
--- Comment #5 from Alex Deucher (alexdeucher@gmail.com) --- Does setting amdgpu.runpm=0 help?
https://bugzilla.kernel.org/show_bug.cgi?id=216119
--- Comment #6 from Alex Deucher (alexdeucher@gmail.com) --- On the kernel command line in grub.
https://bugzilla.kernel.org/show_bug.cgi?id=216119
--- Comment #7 from Harald Judt (h.judt@gmx.at) --- Unfortunately, no it did not help (tested with 5.18.4).
https://bugzilla.kernel.org/show_bug.cgi?id=216119
--- Comment #8 from Alex Deucher (alexdeucher@gmail.com) --- Can you attach your full dmesg output?
https://bugzilla.kernel.org/show_bug.cgi?id=216119
--- Comment #9 from Harald Judt (h.judt@gmx.at) --- Created attachment 301189 --> https://bugzilla.kernel.org/attachment.cgi?id=301189&action=edit dmesg.out
Here is the dmesg out from my linux-5.18.3 right after boot (that version is with the reverted patch). If you need something more specific or the dmesg from another version, please tell me.
https://bugzilla.kernel.org/show_bug.cgi?id=216119
--- Comment #10 from Harald Judt (h.judt@gmx.at) --- Again, the same applies to 5.18.4: Reverting the fb helper patch gets me a working resume from hibernation.
https://bugzilla.kernel.org/show_bug.cgi?id=216119
--- Comment #11 from Alex Deucher (alexdeucher@gmail.com) --- Does changing the the prefer_shadow hint help? E.g., something like:
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index c2bc7db85d7e..4b6bd1a5804a 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -3852,7 +3852,7 @@ static int amdgpu_dm_mode_config_init(struct amdgpu_device *adev) adev_to_drm(adev)->mode_config.max_height = 16384;
adev_to_drm(adev)->mode_config.preferred_depth = 24; - adev_to_drm(adev)->mode_config.prefer_shadow = 1; + adev_to_drm(adev)->mode_config.prefer_shadow = 0; /* indicates support for immediate flip */ adev_to_drm(adev)->mode_config.async_page_flip = true;
https://bugzilla.kernel.org/show_bug.cgi?id=216119
--- Comment #12 from Harald Judt (h.judt@gmx.at) --- Yes, changing this single line indeed solves the issue! Thanks.
https://bugzilla.kernel.org/show_bug.cgi?id=216119
--- Comment #13 from Alex Deucher (alexdeucher@gmail.com) --- Created attachment 301243 --> https://bugzilla.kernel.org/attachment.cgi?id=301243&action=edit patch 1/4
Can you try this patch set instead?
https://bugzilla.kernel.org/show_bug.cgi?id=216119
--- Comment #14 from Alex Deucher (alexdeucher@gmail.com) --- Created attachment 301244 --> https://bugzilla.kernel.org/attachment.cgi?id=301244&action=edit patch 2/4
https://bugzilla.kernel.org/show_bug.cgi?id=216119
--- Comment #15 from Alex Deucher (alexdeucher@gmail.com) --- Created attachment 301245 --> https://bugzilla.kernel.org/attachment.cgi?id=301245&action=edit patch 3/4
https://bugzilla.kernel.org/show_bug.cgi?id=216119
--- Comment #16 from Alex Deucher (alexdeucher@gmail.com) --- Created attachment 301246 --> https://bugzilla.kernel.org/attachment.cgi?id=301246&action=edit patch 4/4
https://bugzilla.kernel.org/show_bug.cgi?id=216119
--- Comment #17 from Harald Judt (h.judt@gmx.at) --- Yes, this patch set seems to work fine. Reporting two successful hibernate/resume cycles with them applied to 5.18.5.
https://bugzilla.kernel.org/show_bug.cgi?id=216119
--- Comment #18 from Alex Deucher (alexdeucher@gmail.com) --- Just to verify, you removed the patch from comment 11 before testing the new patches? Also, can you try the just patch 1/4 and then again with just patches 2/4 and 3/4? Do either of those combinations also work?
https://bugzilla.kernel.org/show_bug.cgi?id=216119
--- Comment #19 from Harald Judt (h.judt@gmx.at) --- Yes, I definitely removed the patch from comment 11 before testing the new patch set. I will try the other combinations later this week, I am a bit short on time at the moment.
dri-devel@lists.freedesktop.org