提交 f0f7ddfc 编写于 作者: A Alex Deucher

drm/amdgpu: add flag for runtime suspend

So we know whether we in are in runtime suspend or
system suspend.
Reviewed-by: NEvan Quan <evan.quan@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 0a28eee9
......@@ -969,6 +969,7 @@ struct amdgpu_device {
int pstate;
/* enable runtime pm on the device */
bool runpm;
bool in_runpm;
bool pm_sysfs_en;
bool ucode_sysfs_en;
......
......@@ -1220,6 +1220,7 @@ static int amdgpu_pmops_runtime_suspend(struct device *dev)
}
}
adev->in_runpm = true;
if (amdgpu_device_supports_boco(drm_dev))
drm_dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
drm_kms_helper_poll_disable(drm_dev);
......@@ -1278,6 +1279,7 @@ static int amdgpu_pmops_runtime_resume(struct device *dev)
drm_kms_helper_poll_enable(drm_dev);
if (amdgpu_device_supports_boco(drm_dev))
drm_dev->switch_power_state = DRM_SWITCH_POWER_ON;
adev->in_runpm = false;
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册