Skip to contentSkip to conversation

FAILED: patch "[PATCH] drm/amdgpu/gfx10: Disable gfxoff before disabling" failed to apply to 5.15-stable tree

PATCH New [email protected] 2 participants 2 messages May 22, 2023 – Jun 5, 2023

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 5.15-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-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x 8173cab3368a13cdc3cad0bd5cf14e9399b0f501
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2023052257-kiwi-level-12a2@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..

Possible dependencies:

8173cab3368a ("drm/amdgpu/gfx10: Disable gfxoff before disabling powergating.") fabe1753851c ("drm/amdgpu: enable gfx power gating for GC 10.3.7") 874bfdfa4735 ("drm/amdgpu: add gc 10.3.6 support")
a65dbf7cded7 ("drm/amdgpu/gfx10: Add GC 10.3.7 Support") 35c27d957835 ("drm/amdgpu: update vcn/jpeg PG flags for VCN 3.1.1") b67f00e06f36 ("drm/amdgpu: set new revision id for 10.3.7 GC") dfcc3e8c24cc ("drm/amdgpu: make cyan skillfish support code more consistent") 212021297eaf ("drm/amdgpu: set APU flag based on IP discovery table") e8a423c589a0 ("drm/amdgpu: update RLC_PG_DELAY_3 Value to 200us for yellow carp") a61794bd2f65 ("drm/amdgpu: remove grbm cam index/data operations for gfx v10") b05b9c591f9e ("drm/amdgpu: clean up set IP function")
1d789535a036 ("drm/amdgpu: convert IP version array to include instances") 5c3720be7d46 ("drm/amdgpu: get VCN and SDMA instances from IP discovery table") 2cbc6f4259f6 ("drm/amd/display: fix error case handling") 75a07bcd1d30 ("drm/amdgpu/soc15: convert to IP version checking") 0b64a5a85229 ("drm/amdgpu/vcn2.5: convert to IP version checking") 96b8dd4423e7 ("drm/amdgpu/amdgpu_vcn: convert to IP version checking") 50638f7dbd0b ("drm/amdgpu/pm/amdgpu_smu: convert more IP version checking") 61b396b91196 ("drm/amdgpu/pm/smu_v13.0: convert IP version checking") 6b726a0a52cc ("drm/amdgpu/pm/smu_v11.0: update IP version checking")

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 8173cab3368a13cdc3cad0bd5cf14e9399b0f501 Mon Sep 17 00:00:00 2001
From: Bas Nieuwenhuizen <[email protected]>
Date: Tue, 9 May 2023 18:49:46 +0200
Subject: [PATCH] drm/amdgpu/gfx10: Disable gfxoff before disabling
powergating.

Otherwise we get a full system lock (looks like a FW mess).

Copied the order from the GFX9 powergating code.

drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +7 -1
index f5b5ce1051a2..1ec076517c96 100644
@@ -8152,8 +8152,14 @@ static int gfx_v10_0_set_powergating_state(void *handle,
 	case IP_VERSION(10, 3, 3):
 	case IP_VERSION(10, 3, 6):
 	case IP_VERSION(10, 3, 7):
+		if (!enable)
+			amdgpu_gfx_off_ctrl(adev, false);
+
 		gfx_v10_cntl_pg(adev, enable);
-		amdgpu_gfx_off_ctrl(adev, enable);
+
+		if (enable)
+			amdgpu_gfx_off_ctrl(adev, true);
+
 		break;
 	default:
 		break;
#1 lore raw

PATCH 1/1 drm/amdgpu/gfx10: Disable gfxoff before disabling powergating.

From: Bas Nieuwenhuizen <[email protected]>

commit 8173cab3368a13cdc3cad0bd5cf14e9399b0f501 upstream.

Otherwise we get a full system lock (looks like a FW mess).

Copied the order from the GFX9 powergating code.

Fixes 366468ff6c34 ("drm/amdgpu: Allow GfxOff on Vangogh as default")
Cc Alex Deucher <[email protected]>
[gpiccoli: adjusted to 5.15, before amdgpu changes from chip names to numbers.]
---
 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +7 -1
index 970d59a21005..9da0d5d6d73d 100644
@@ -8422,8 +8422,14 @@ static int gfx_v10_0_set_powergating_state(void *handle,
 		break;
 	case CHIP_VANGOGH:
 	case CHIP_YELLOW_CARP:
+		if (!enable)
+			amdgpu_gfx_off_ctrl(adev, false);
+
 		gfx_v10_cntl_pg(adev, enable);
-		amdgpu_gfx_off_ctrl(adev, enable);
+
+		if (enable)
+			amdgpu_gfx_off_ctrl(adev, true);
+
 		break;
 	default:
 		break;
Signature · 1 line
2.40.1