Skip to contentSkip to conversation

New: [amdgpu] resuming from suspend fails when IOMMU is missing

Bug 214963 [email protected] 1 participant 3 messages Nov 7, 2021 – Dec 28, 2021

lore
Share & tools
lore
#0 lore raw

https://bugzilla.kernel.org/show_bug.cgi?id=214963

            Bug ID: 214963
           Summary: [amdgpu] resuming from suspend fails when IOMMU is
                    missing
           Product: Drivers
           Version: 2.5
    Kernel Version: 5.15.0, 5.15.1
          Hardware: All
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: Video(DRI - non Intel)
          Assignee: [email protected]
          Reporter: [email protected]
        Regression: No

On the HP bw064-ng Laptop the BIOS does not correctly initialize the IOMMU. This brakes resuming from suspend:

Nov  7 23:23:02 bart kernel: [   96.378265] kfd kfd: amdgpu: Failed to resume
IOMMU for device 1002:9874
Nov  7 23:23:02 bart kernel: [   96.378271] amdgpu 0000:00:01.0: amdgpu:
amdgpu_device_ip_resume failed (-6).
Nov  7 23:23:02 bart kernel: [   96.378274] PM: dpm_run_callback():
pci_pm_resume+0x0/0x110 returns -6
Nov  7 23:23:02 bart kernel: [   96.378283] amdgpu 0000:00:01.0: PM: failed to

resume async: error -6

leading to the follow up errors:
Nov 7 23:23:03 bart kernel: [ 97.580799] [drm]
perform_link_training_with_retries: Link training attempt 1 of 4 failed
...

Nov  7 23:23:04 bart kernel: [   98.646241] [drm]
perform_link_training_with_retries: Link training attempt 2 of 4 failed
...
Nov  7 23:23:05 bart kernel: [   99.709472] [drm]
perform_link_training_with_retries: Link training attempt 3 of 4 failed
Nov  7 23:23:06 bart kernel: [  100.772840] [drm] enabling link 0 failed: 15
Nov  7 23:23:22 bart kernel: [  106.160854] [drm:amdgpu_dm_atomic_commit_tail
[amdgpu]] *ERROR* Waiting for fences timed out!
Nov  7 23:23:22 bart kernel: [  116.397484]

[drm:drm_atomic_helper_wait_for_flip_done] *ERROR* [CRTC:47:crtc-0] flip_done timed out

Simply changing the amdgpu_device_ip function in drivers/gpu/drm/amd/amdgpu/amdgpu_device.c to
static int amdgpu_device_ip_resume(struct amdgpu_device *adev)

{
        int r;
#if 0 
        r = amdgpu_amdkfd_resume_iommu(adev);
        if (r)
                return r;

#endif

        r = amdgpu_device_ip_resume_phase1(adev);
        if (r)
                return r;

        r = amdgpu_device_fw_loading(adev);
        if (r)
                return r;

        r = amdgpu_device_ip_resume_phase2(adev);

        return r;
}

makes resuming from suspend work for me again. But of course this is not a viable solution as on systems with working IOMMU this is needed. One could probably add a flag so that in case of missing IOMMU amdgpu_amdkfd_resume_iommu returns 0.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#1 lore raw

[Bug 214963] [amdgpu] resuming from suspend fails when IOMMU is missing

https://bugzilla.kernel.org/show_bug.cgi?id=214963

[email protected] changed:

What |Removed |Added
----------------------------------------------------------------------------

     Kernel Version|5.15.0, 5.15.1              |5.15.0, 5.15.1, 5.15.2
Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#2 lore raw

[Bug 214963] [amdgpu] resuming from suspend fails when IOMMU is missing

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=214963

[email protected] changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|---                         |CODE_FIX
Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.