aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4335-drm-amdgpu-change-pstate-only-after-all-XGMI-device-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4335-drm-amdgpu-change-pstate-only-after-all-XGMI-device-.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4335-drm-amdgpu-change-pstate-only-after-all-XGMI-device-.patch52
1 files changed, 52 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4335-drm-amdgpu-change-pstate-only-after-all-XGMI-device-.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4335-drm-amdgpu-change-pstate-only-after-all-XGMI-device-.patch
new file mode 100644
index 00000000..57eebf50
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4335-drm-amdgpu-change-pstate-only-after-all-XGMI-device-.patch
@@ -0,0 +1,52 @@
+From 911f01258c9fe327b6f6afbf77c693ad5c143505 Mon Sep 17 00:00:00 2001
+From: Evan Quan <evan.quan@amd.com>
+Date: Thu, 31 Oct 2019 14:10:27 +0800
+Subject: [PATCH 4335/4736] drm/amdgpu: change pstate only after all XGMI
+ device initialized
+
+Pstate settings should be performed after all device of the
+XGMI setup get initialized.
+
+Change-Id: I5c4b3f79fbd60a5ccfb4dc6f94d9e1db6faec694
+Signed-off-by: Evan Quan <evan.quan@amd.com>
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 15 ++++++++++++---
+ 1 file changed, 12 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+index 8e35ebdf4e10..beeae2573cb0 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+@@ -2082,9 +2082,6 @@ static int amdgpu_device_ip_late_init(struct amdgpu_device *adev)
+ if (r)
+ DRM_ERROR("enable mgpu fan boost failed (%d).\n", r);
+
+- /* set to low pstate by default */
+- amdgpu_xgmi_set_pstate(adev, 0);
+-
+ return 0;
+ }
+
+@@ -2196,6 +2193,18 @@ static void amdgpu_device_delayed_init_work_handler(struct work_struct *work)
+ r = amdgpu_ib_ring_tests(adev);
+ if (r)
+ DRM_ERROR("ib ring test failed (%d).\n", r);
++
++ /*
++ * set to low pstate by default
++ * This should be performed after all devices from
++ * XGMI finish their initializations. Thus it's moved
++ * to here.
++ * The time delay is 2S. TODO: confirm whether that
++ * is enough for all possible XGMI setups.
++ */
++ r = amdgpu_xgmi_set_pstate(adev, 0);
++ if (r)
++ DRM_ERROR("pstate setting failed (%d).\n", r);
+ }
+
+ static void amdgpu_device_delay_enable_gfx_off(struct work_struct *work)
+--
+2.17.1
+