aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2021-01-22 17:45:29 -0500
committerAlex Deucher <alexander.deucher@amd.com>2021-04-09 16:36:02 -0400
commitb2aba43af90415e0538b0201fe93f0c72b5741d9 (patch)
treec3b4c2927628c19bf82c908885483407fbd90d66 /drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
parentdrm/amdgpu: add a dev_pm_ops prepare callback (v2) (diff)
downloadlinux-dev-b2aba43af90415e0538b0201fe93f0c72b5741d9.tar.xz
linux-dev-b2aba43af90415e0538b0201fe93f0c72b5741d9.zip
drm/amdgpu: enable DPM_FLAG_MAY_SKIP_RESUME and DPM_FLAG_SMART_SUSPEND flags (v2)
Once the device has runtime suspended, we don't need to power it back up again for system suspend. Likewise for resume, we don't to power up the device again on resume only to power it back off again via runtime pm because it's still idle. v2: add DPM_FLAG_SMART_PREPARE as well Reviewed-by: Evan Quan <evan.quan@amd.com> Acked-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@amd.com> (v1) Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index ada807de978b..23c8f4cb0ac9 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -203,6 +203,13 @@ int amdgpu_driver_load_kms(struct amdgpu_device *adev, unsigned long flags)
if (amdgpu_device_supports_atpx(dev) &&
!amdgpu_is_atpx_hybrid())
dev_pm_set_driver_flags(dev->dev, DPM_FLAG_NO_DIRECT_COMPLETE);
+ /* we want direct complete for BOCO */
+ if ((amdgpu_device_supports_atpx(dev) &&
+ amdgpu_is_atpx_hybrid()) ||
+ amdgpu_device_supports_boco(dev))
+ dev_pm_set_driver_flags(dev->dev, DPM_FLAG_SMART_PREPARE |
+ DPM_FLAG_SMART_SUSPEND |
+ DPM_FLAG_MAY_SKIP_RESUME);
pm_runtime_use_autosuspend(dev->dev);
pm_runtime_set_autosuspend_delay(dev->dev, 5000);
pm_runtime_allow(dev->dev);