From 4a412f9fa05b51f785a936d92b29e72df741adfd Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Apr 20 2023 11:00:50 +0000 Subject: drm/amdgpu/gfx: set cg flags to enter/exit safe mode (bsc#1012628). --- diff --git a/patches.kernel.org/6.2.12-098-drm-amdgpu-gfx-set-cg-flags-to-enter-exit-safe.patch b/patches.kernel.org/6.2.12-098-drm-amdgpu-gfx-set-cg-flags-to-enter-exit-safe.patch new file mode 100644 index 0000000..4882ac8 --- /dev/null +++ b/patches.kernel.org/6.2.12-098-drm-amdgpu-gfx-set-cg-flags-to-enter-exit-safe.patch @@ -0,0 +1,40 @@ +From: Jane Jian +Date: Wed, 15 Mar 2023 18:59:59 +0800 +Subject: [PATCH] drm/amdgpu/gfx: set cg flags to enter/exit safe mode +References: bsc#1012628 +Patch-mainline: 6.2.12 +Git-commit: e06bfcc1a1c41bcb8c31470d437e147ce9f0acfd + +[ Upstream commit e06bfcc1a1c41bcb8c31470d437e147ce9f0acfd ] + +sriov needs to enter/exit safe mode in update umd p state +add the cg flag to let it enter or exit while needed + +Signed-off-by: Jane Jian +Reviewed-by: Lijo Lazar +Signed-off-by: Alex Deucher +Signed-off-by: Sasha Levin +Signed-off-by: Jiri Slaby +--- + drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +index c748d92c..ddb7b865 100644 +--- a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c ++++ b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +@@ -1315,6 +1315,11 @@ static int gfx_v11_0_sw_init(void *handle) + break; + } + ++ /* Enable CG flag in one VF mode for enabling RLC safe mode enter/exit */ ++ if (adev->ip_versions[GC_HWIP][0] == IP_VERSION(11, 0, 3) && ++ amdgpu_sriov_is_pp_one_vf(adev)) ++ adev->cg_flags = AMD_CG_SUPPORT_GFX_CGCG; ++ + /* EOP Event */ + r = amdgpu_irq_add_id(adev, SOC21_IH_CLIENTID_GRBM_CP, + GFX_11_0_0__SRCID__CP_EOP_INTERRUPT, +-- +2.35.3 + diff --git a/series.conf b/series.conf index 2a5690d..5d7c528 100644 --- a/series.conf +++ b/series.conf @@ -2325,6 +2325,7 @@ patches.kernel.org/6.2.12-095-wifi-iwlwifi-mvm-protect-TXQ-list-manipulation.patch patches.kernel.org/6.2.12-096-drm-amdgpu-add-mes-resume-when-do-gfx-post-sof.patch patches.kernel.org/6.2.12-097-drm-amdgpu-Force-signal-hw_fences-that-are-emb.patch + patches.kernel.org/6.2.12-098-drm-amdgpu-gfx-set-cg-flags-to-enter-exit-safe.patch ######################################################## # Build fixes that apply to the vanilla kernel too.