]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 Jan 2022 07:04:55 +0000 (08:04 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 Jan 2022 07:04:55 +0000 (08:04 +0100)
added patches:
drm-amd-pm-keep-the-baco-feature-enabled-for-suspend.patch
revert-drm-amdgpu-stop-scheduler-when-calling-hw_fini-v2.patch

queue-5.15/drm-amd-pm-keep-the-baco-feature-enabled-for-suspend.patch [new file with mode: 0644]
queue-5.15/revert-drm-amdgpu-stop-scheduler-when-calling-hw_fini-v2.patch [new file with mode: 0644]
queue-5.15/series

diff --git a/queue-5.15/drm-amd-pm-keep-the-baco-feature-enabled-for-suspend.patch b/queue-5.15/drm-amd-pm-keep-the-baco-feature-enabled-for-suspend.patch
new file mode 100644 (file)
index 0000000..3c84745
--- /dev/null
@@ -0,0 +1,41 @@
+From eaa090538e8d21801c6d5f94590c3799e6a528b5 Mon Sep 17 00:00:00 2001
+From: Evan Quan <evan.quan@amd.com>
+Date: Thu, 30 Dec 2021 17:53:54 +0800
+Subject: drm/amd/pm: keep the BACO feature enabled for suspend
+
+From: Evan Quan <evan.quan@amd.com>
+
+commit eaa090538e8d21801c6d5f94590c3799e6a528b5 upstream.
+
+To pair with the workaround which always reset the ASIC in suspend.
+Otherwise, the reset which relies on BACO will fail.
+
+Fixes: daf8de0874ab5b ("drm/amdgpu: always reset the asic in suspend (v2)")
+
+Signed-off-by: Evan Quan <evan.quan@amd.com>
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+Reviewed-by: Guchun Chen <guchun.chen@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c |    8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
++++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
+@@ -1386,8 +1386,14 @@ static int smu_disable_dpms(struct smu_c
+ {
+       struct amdgpu_device *adev = smu->adev;
+       int ret = 0;
++      /*
++       * TODO: (adev->in_suspend && !adev->in_s0ix) is added to pair
++       * the workaround which always reset the asic in suspend.
++       * It's likely that workaround will be dropped in the future.
++       * Then the change here should be dropped together.
++       */
+       bool use_baco = !smu->is_apu &&
+-              ((amdgpu_in_reset(adev) &&
++              (((amdgpu_in_reset(adev) || (adev->in_suspend && !adev->in_s0ix)) &&
+                 (amdgpu_asic_reset_method(adev) == AMD_RESET_METHOD_BACO)) ||
+                ((adev->in_runpm || adev->in_s4) && amdgpu_asic_supports_baco(adev)));
diff --git a/queue-5.15/revert-drm-amdgpu-stop-scheduler-when-calling-hw_fini-v2.patch b/queue-5.15/revert-drm-amdgpu-stop-scheduler-when-calling-hw_fini-v2.patch
new file mode 100644 (file)
index 0000000..abc086a
--- /dev/null
@@ -0,0 +1,52 @@
+From df5bc0aa7ff6e2e14cb75182b4eda20253c711d4 Mon Sep 17 00:00:00 2001
+From: Len Brown <len.brown@intel.com>
+Date: Sun, 9 Jan 2022 13:11:37 -0500
+Subject: Revert "drm/amdgpu: stop scheduler when calling hw_fini (v2)"
+
+From: Len Brown <len.brown@intel.com>
+
+commit df5bc0aa7ff6e2e14cb75182b4eda20253c711d4 upstream.
+
+This reverts commit f7d6779df642720e22bffd449e683bb8690bd3bf.
+
+This bisected regression has impacted suspend-resume stability
+since 5.15-rc1. It regressed -stable via 5.14.10.
+
+Link: https://bugzilla.kernel.org/show_bug.cgi?id=215315
+Fixes: f7d6779df64 ("drm/amdgpu: stop scheduler when calling hw_fini (v2)")
+Cc: Guchun Chen <guchun.chen@amd.com>
+Cc: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
+Cc: Christian Koenig <christian.koenig@amd.com>
+Cc: Alex Deucher <alexander.deucher@amd.com>
+Cc: <stable@vger.kernel.org> # 5.14+
+Signed-off-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c |    8 --------
+ 1 file changed, 8 deletions(-)
+
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
+@@ -552,9 +552,6 @@ void amdgpu_fence_driver_hw_fini(struct
+               if (!ring || !ring->fence_drv.initialized)
+                       continue;
+-              if (!ring->no_scheduler)
+-                      drm_sched_stop(&ring->sched, NULL);
+-
+               /* You can't wait for HW to signal if it's gone */
+               if (!drm_dev_is_unplugged(&adev->ddev))
+                       r = amdgpu_fence_wait_empty(ring);
+@@ -614,11 +611,6 @@ void amdgpu_fence_driver_hw_init(struct
+               if (!ring || !ring->fence_drv.initialized)
+                       continue;
+-              if (!ring->no_scheduler) {
+-                      drm_sched_resubmit_jobs(&ring->sched);
+-                      drm_sched_start(&ring->sched, true);
+-              }
+-
+               /* enable the interrupt */
+               if (ring->fence_drv.irq_src)
+                       amdgpu_irq_get(adev, ring->fence_drv.irq_src,
index 409ff980c1bb9933b62d92ecea9acca3fb00064b..89add522ea3787b4d6065e41ccc063d964512c7b 100644 (file)
@@ -68,3 +68,5 @@ ipv6-raw-check-passed-optlen-before-reading.patch
 userfaultfd-selftests-fix-hugetlb-area-allocations.patch
 arm-dts-gpio-ranges-property-is-now-required.patch
 input-zinitix-make-sure-the-irq-is-allocated-before-.patch
+revert-drm-amdgpu-stop-scheduler-when-calling-hw_fini-v2.patch
+drm-amd-pm-keep-the-baco-feature-enabled-for-suspend.patch