FAILED: patch "[PATCH] drm/amd: Fix shutdown (again) on some SMU v13.0.4/11" failed to apply to 6.6-stable tree
[email protected]
maintainerThe patch below does not apply to the 6.6-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x ff4e49f446ed24772182c724e0ef1a5be23c622a
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2024081248-evident-fever-c73b@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^..
Possible dependencies:
ff4e49f446ed ("drm/amd: Fix shutdown (again) on some SMU v13.0.4/11 platforms") b911505e6ba4 ("dm/amd/pm: Fix problems with reboot/shutdown for some SMU 13.0.4/13.0.11 users") fedb6ae49758 ("drm/amd/pm: fixes a random hang in S4 for SMU v13.0.4/11")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From ff4e49f446ed24772182c724e0ef1a5be23c622a Mon Sep 17 00:00:00 2001
From: Mario Limonciello <[email protected]>
Date: Sun, 26 May 2024 07:59:08 -0500
Subject: [PATCH] drm/amd: Fix shutdown (again) on some SMU v13.0.4/11
platforms
commit cd94d1b182d2 ("dm/amd/pm: Fix problems with reboot/shutdown for some SMU 13.0.4/13.0.11 users") attempted to fix shutdown issues that were reported since commit 31729e8c21ec ("drm/amd/pm: fixes a random hang in S4 for SMU v13.0.4/11") but caused issues for some people.
Adjust the workaround flow to properly only apply in the S4 case:
-> For shutdown go through SMU_MSG_PrepareMp1ForUnload -> For S4 go through SMU_MSG_GfxDeviceDriverReset and
SMU_MSG_PrepareMp1ForUnload
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c +11 -9
@@ -226,15 +226,17 @@ static int smu_v13_0_4_system_features_control(struct smu_context *smu, bool en)struct amdgpu_device *adev = smu->adev;int ret =0 ; -if (!en && adev->in_s4) { -/* Adds a GFX reset as workaround just before sending the -* MP1_UNLOAD message to prevent GC/RLC/PMFW from entering -* an invalid state. -*/ - ret =smu_cmn_send_smc_msg_with_param (smu, SMU_MSG_GfxDeviceDriverReset, -SMU_RESET_MODE_2 ,NULL ); -if (ret) -return ret; +if (!en && !adev->in_s0ix) { +if (adev->in_s4) { +/* Adds a GFX reset as workaround just before sending the +* MP1_UNLOAD message to prevent GC/RLC/PMFW from entering +* an invalid state. +*/ + ret =smu_cmn_send_smc_msg_with_param (smu, SMU_MSG_GfxDeviceDriverReset, +SMU_RESET_MODE_2 ,NULL ); +if (ret) +return ret; + } ret =smu_cmn_send_smc_msg (smu, SMU_MSG_PrepareMp1ForUnload,NULL ); }