aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/5211-drm-amdgpu-Enable-disable-gfx-PG-feature-in-rlc-safe.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/5211-drm-amdgpu-Enable-disable-gfx-PG-feature-in-rlc-safe.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.14.71/5211-drm-amdgpu-Enable-disable-gfx-PG-feature-in-rlc-safe.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/5211-drm-amdgpu-Enable-disable-gfx-PG-feature-in-rlc-safe.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/5211-drm-amdgpu-Enable-disable-gfx-PG-feature-in-rlc-safe.patch
new file mode 100644
index 00000000..e6319208
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/5211-drm-amdgpu-Enable-disable-gfx-PG-feature-in-rlc-safe.patch
@@ -0,0 +1,49 @@
+From 522ad169b4ddd0140b26dc104d615980327d5d7d Mon Sep 17 00:00:00 2001
+From: Rex Zhu <Rex.Zhu@amd.com>
+Date: Fri, 24 Aug 2018 17:26:23 +0800
+Subject: [PATCH 5211/5725] drm/amdgpu: Enable/disable gfx PG feature in rlc
+ safe mode
+
+This is required by gfx hw and can fix the rlc hang when
+do s3 stree test on Cz/St.
+
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Hang Zhou <hang.zhou@amd.com>
+Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+index 19b65cf..be2cd71 100644
+--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
++++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+@@ -5659,6 +5659,11 @@ static int gfx_v8_0_set_powergating_state(void *handle,
+ if (amdgpu_sriov_vf(adev))
+ return 0;
+
++ if (adev->pg_flags & (AMD_PG_SUPPORT_GFX_SMG |
++ AMD_PG_SUPPORT_RLC_SMU_HS |
++ AMD_PG_SUPPORT_CP |
++ AMD_PG_SUPPORT_GFX_DMG))
++ adev->gfx.rlc.funcs->enter_safe_mode(adev);
+ switch (adev->asic_type) {
+ case CHIP_CARRIZO:
+ case CHIP_STONEY:
+@@ -5708,7 +5713,11 @@ static int gfx_v8_0_set_powergating_state(void *handle,
+ default:
+ break;
+ }
+-
++ if (adev->pg_flags & (AMD_PG_SUPPORT_GFX_SMG |
++ AMD_PG_SUPPORT_RLC_SMU_HS |
++ AMD_PG_SUPPORT_CP |
++ AMD_PG_SUPPORT_GFX_DMG))
++ adev->gfx.rlc.funcs->exit_safe_mode(adev);
+ return 0;
+ }
+
+--
+2.7.4
+