summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
diff options
context:
space:
mode:
authorEvan Quan <evan.quan@amd.com>2019-10-31 14:10:27 +0800
committerAlex Deucher <alexander.deucher@amd.com>2019-11-06 16:27:46 -0500
commit39ea6e5f9e2d6e094b7a48592ecae6c69a82e471 (patch)
tree42ec3d06be46f504430836f002e7415165f78cad /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
parent89b3d86403f1025f6b430d8f9ffc590efbadce62 (diff)
drm/amdgpu: change pstate only after all XGMI device initialized
Pstate settings should be performed after all device of the XGMI setup get initialized. Signed-off-by: Evan Quan <evan.quan@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_device.c15
1 files 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 d36d2b093539..40ff06b99e5b 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;
}
@@ -2197,6 +2194,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)