]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
drm/amdgpu: don't do resets on APUs which don't support it
authorAlex Deucher <alexander.deucher@amd.com>
Thu, 13 Jan 2022 03:38:51 +0000 (22:38 -0500)
committerPaolo Pisati <paolo.pisati@canonical.com>
Fri, 28 Jan 2022 10:03:10 +0000 (11:03 +0100)
BugLink: https://bugs.launchpad.net/bugs/1959376
commit e8309d50e97851ff135c4e33325d37b032666b94 upstream.

It can cause a hang.  This is normally not enabled for GPU
hangs on these asics, but was recently enabled for handling
aborted suspends.  This causes hangs on some platforms
on suspend.

Fixes: daf8de0874ab5b ("drm/amdgpu: always reset the asic in suspend (v2)")
Cc: stable@vger.kernel.org
Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1858
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/gpu/drm/amd/amdgpu/cik.c
drivers/gpu/drm/amd/amdgpu/vi.c

index 54f28c075f214b0cb806e056de129ef0d9b654eb..f10ce740a29ccefdb841c4f232769f79398ecdff 100644 (file)
@@ -1428,6 +1428,10 @@ static int cik_asic_reset(struct amdgpu_device *adev)
 {
        int r;
 
+       /* APUs don't have full asic reset */
+       if (adev->flags & AMD_IS_APU)
+               return 0;
+
        if (cik_asic_reset_method(adev) == AMD_RESET_METHOD_BACO) {
                dev_info(adev->dev, "BACO reset\n");
                r = amdgpu_dpm_baco_reset(adev);
index fe9a7cc8d9eb0b932985c331bcbbec0a4b9ec9b4..6645ebbd2696c6b653165b18c74770d2bc42bbe8 100644 (file)
@@ -956,6 +956,10 @@ static int vi_asic_reset(struct amdgpu_device *adev)
 {
        int r;
 
+       /* APUs don't have full asic reset */
+       if (adev->flags & AMD_IS_APU)
+               return 0;
+
        if (vi_asic_reset_method(adev) == AMD_RESET_METHOD_BACO) {
                dev_info(adev->dev, "BACO reset\n");
                r = amdgpu_dpm_baco_reset(adev);