amdgpu resume failure: failed to allocate wb slot
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
HWE Next |
Fix Released
|
Undecided
|
Unassigned | ||
linux (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
You-Sheng Yang |
Bug Description
[Impact]
Systems with video cards using amdgpu driver may fail to resume due to resource leakage.
[Fix]
73469585510d drm/amdgpu: fix&cleanups for wb_clear
[Test Case]
Verified with fwts for a thounsand runs.
[Regression Risk]
Low. This patch has been included in stable kernel v4.16.y and on, and
it's mostly a trivial bug fix.
==== Original Bug Report ====
[Summary]
When do the S3 stress test with AMD RX550 installed, the system hung after resume from S3 at 112nd S3.
The kernel message:
[ 8120.977916] amdgpu 0000:01:00.0: (-22) failed to allocate wb slot
[ 8120.977941] [drm:amdgpu_
[ 8120.979662] [drm] ib test on ring 12 succeeded
[ 8120.981952] [drm] ib test on ring 13 succeeded
[ 8120.984578] [drm] ib test on ring 14 succeeded
[ 8120.984813] [drm] ib test on ring 15 succeeded
[ 8120.984825] [drm:amdgpu_
[ 8120.997655] [drm] Type 1 DP-HDMI passive dongle 165Mhz:
[ 8121.022465] [drm] 92GH: [Block 0]
[ 8121.022465] [drm] 92GH: [Block 1]
[ 8121.022467] [drm] dc_link_detect: manufacturer_id = B838, product_id = 9202, serial_number = 1, manufacture_week = 29, manufacture_year = 18, display_name = 92GH, speaker_flag = 1, audio_mode_count = 1
[ 8121.022467] [drm] dc_link_detect: mode number = 0, format_code = 1, channel_count = 2, sample_rate = 7, sample_size = 7
[ 8121.022573] PM: resume of devices complete after 412.170 msecs
[ 8121.023076] acpi LNXPOWER:04: Turning OFF
[ 8121.023113] PM: Finishing wakeup.
[ 8121.023114] OOM killer enabled.
[ 8121.023114] Restarting tasks ...
[ 8121.023455] pci_bus 0000:04: Allocating resources
[ 8121.023471] pci 0000:03:00.0: bridge window [io 0x1000-0x0fff] to [bus 04] add_size 1000
[ 8121.023473] pci 0000:03:00.0: bridge window [mem 0x00100000-
[ 8121.023474] pci 0000:03:00.0: bridge window [mem 0x00100000-
[ 8121.023476] pci 0000:03:00.0: BAR 14: no space for [mem size 0x00200000]
[ 8121.023477] pci 0000:03:00.0: BAR 14: failed to assign [mem size 0x00200000]
[ 8121.023478] pci 0000:03:00.0: BAR 15: no space for [mem size 0x00200000 64bit pref]
[ 8121.023478] pci 0000:03:00.0: BAR 15: failed to assign [mem size 0x00200000 64bit pref]
[ 8121.023479] pci 0000:03:00.0: BAR 13: no space for [io size 0x1000]
[ 8121.023479] pci 0000:03:00.0: BAR 13: failed to assign [io size 0x1000]
[ 8121.023481] pci 0000:03:00.0: BAR 14: no space for [mem size 0x00200000]
[ 8121.023481] pci 0000:03:00.0: BAR 14: failed to assign [mem size 0x00200000]
[ 8121.023482] pci 0000:03:00.0: BAR 15: no space for [mem size 0x00200000 64bit pref]
[ 8121.023482] pci 0000:03:00.0: BAR 15: failed to assign [mem size 0x00200000 64bit pref]
[ 8121.023483] pci 0000:03:00.0: BAR 13: no space for [io size 0x1000]
[ 8121.023483] pci 0000:03:00.0: BAR 13: failed to assign [io size 0x1000]
[ 8121.023485] pci 0000:03:00.0: PCI bridge to [bus 04]
[ 8121.024358] done.
[ 8121.082344] video LNXVIDEO:00: Restoring backlight state
[ 8121.082346] PM: suspend exit
[ 8121.094634] IPv6: ADDRCONF(
[ 8121.112417] ata4: SATA link down (SStatus 4 SControl 300)
[ 8121.113212] ata3: SATA link down (SStatus 4 SControl 300)
[ 8121.113279] ata2: SATA link down (SStatus 4 SControl 300)
[ 8121.114133] ata1: SATA link down (SStatus 4 SControl 300)
[ 8121.192056] [drm] {1440x900, 1904x934@106500Khz}
[ 8121.282351] IPv6: ADDRCONF(
[ 8121.298481] amdgpu 0000:01:00.0: couldn't schedule ib on ring <sdma1>
[ 8121.298517] [drm:amdgpu_job_run [amdgpu]] *ERROR* Error scheduling IBs (-22)
[ 8121.298536] [drm:amd_sched_main [amdgpu]] *ERROR* Failed to run job!
[ 8122.183439] [drm] RC6 on
[ 8124.257908] e1000e: eno1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx
[ 8124.258035] IPv6: ADDRCONF(
[ 8124.269506] amdgpu 0000:01:00.0: couldn't schedule ib on ring <sdma1>
[ 8124.269539] [drm:amdgpu_job_run [amdgpu]] *ERROR* Error scheduling IBs (-22)
[ 8124.269558] [drm:amd_sched_main [amdgpu]] *ERROR* Failed to run job!
[ 8125.089361] amdgpu 0000:01:00.0: couldn't schedule ib on ring <sdma1>
[ 8125.089429] [drm:amdgpu_job_run [amdgpu]] *ERROR* Error scheduling IBs (-22)
[ 8125.089448] [drm:amd_sched_main [amdgpu]] *ERROR* Failed to run job!
[Reproduce Steps]
1. apt-get install -y fwts
2. fwts s3 --s3-multiple=1000 --s3-min-delay=60 --s3-max-delay=60
[Results]
Expected: pass the S3 stress test
Actual: system hung at 112nd S3
[Additional Information]
Kernel Version: 4.15.0-1035-oem
GPU: AMD RX550 (OPGA14) 1002:699f
tags: | added: originate-from-1824453 somerville |
Changed in linux (Ubuntu Bionic): | |
assignee: | nobody → You-Sheng Yang (vicamo) |
Changed in linux (Ubuntu): | |
status: | Incomplete → In Progress |
Changed in linux (Ubuntu Bionic): | |
status: | Incomplete → In Progress |
description: | updated |
tags: | added: patch |
Changed in linux (Ubuntu Bionic): | |
status: | In Progress → Fix Committed |
tags: |
added: verification-done-bionic removed: verification-needed-bionic |
Changed in linux (Ubuntu): | |
status: | In Progress → Fix Released |
Changed in hwe-next: | |
status: | New → Fix Released |
commit 97407b63ea60 drm/amdgpu: use 256 bit buffers for all wb allocations (v2)
commit 63ae07ca4fb4 drm/amdgpu:fix wb_clear
These two commits introduced buggy resource management and are latter fixed in commit 73469585510d "drm/amdgpu: fix&cleanups for wb_clear".
[1]: https:/ /git.kernel. org/pub/ scm/linux/ kernel/ git/torvalds/ linux.git/ commit/ ?id=97407b63ea6 0 /git.kernel. org/pub/ scm/linux/ kernel/ git/torvalds/ linux.git/ commit/ ?id=63ae07ca4fb 4 /git.kernel. org/pub/ scm/linux/ kernel/ git/torvalds/ linux.git/ commit/ ?id=73469585510 d
[2]: https:/
[3]: https:/