From: Greg Kroah-Hartman Date: Mon, 10 Jan 2022 07:04:55 +0000 (+0100) Subject: 5.15-stable patches X-Git-Tag: v4.4.299~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d423c3e17c63e6ad91d07728cd6332813b919145;p=thirdparty%2Fkernel%2Fstable-queue.git 5.15-stable patches added patches: drm-amd-pm-keep-the-baco-feature-enabled-for-suspend.patch revert-drm-amdgpu-stop-scheduler-when-calling-hw_fini-v2.patch --- 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 index 00000000000..3c847457232 --- /dev/null +++ b/queue-5.15/drm-amd-pm-keep-the-baco-feature-enabled-for-suspend.patch @@ -0,0 +1,41 @@ +From eaa090538e8d21801c6d5f94590c3799e6a528b5 Mon Sep 17 00:00:00 2001 +From: Evan Quan +Date: Thu, 30 Dec 2021 17:53:54 +0800 +Subject: drm/amd/pm: keep the BACO feature enabled for suspend + +From: Evan Quan + +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 +Reviewed-by: Alex Deucher +Reviewed-by: Guchun Chen +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman +--- + 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 index 00000000000..abc086aca2b --- /dev/null +++ b/queue-5.15/revert-drm-amdgpu-stop-scheduler-when-calling-hw_fini-v2.patch @@ -0,0 +1,52 @@ +From df5bc0aa7ff6e2e14cb75182b4eda20253c711d4 Mon Sep 17 00:00:00 2001 +From: Len Brown +Date: Sun, 9 Jan 2022 13:11:37 -0500 +Subject: Revert "drm/amdgpu: stop scheduler when calling hw_fini (v2)" + +From: Len Brown + +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 +Cc: Andrey Grodzovsky +Cc: Christian Koenig +Cc: Alex Deucher +Cc: # 5.14+ +Signed-off-by: Len Brown +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman +--- + 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, diff --git a/queue-5.15/series b/queue-5.15/series index 409ff980c1b..89add522ea3 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -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