diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2018-09-29 03:27:02 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-10-09 18:05:33 -0400 |
commit | 44779b43f15977885a0e3b45bf6deb6be18725e5 (patch) | |
tree | 2319438d337d6a81714532471b843f23f849b1ba /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
parent | 3023015f791639838ec5d80e5c14851238a1a7d9 (diff) |
drm/amdgpu: Move gfx flag in_suspend to adev
Move in_suspend flag to adev from gfx, so
can be used in other ip blocks, also keep
consistent with gpu_in_reset flag.
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@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.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index a1d8d97252e0..95095a8d2125 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |||
@@ -2649,6 +2649,7 @@ int amdgpu_device_suspend(struct drm_device *dev, bool suspend, bool fbcon) | |||
2649 | if (dev->switch_power_state == DRM_SWITCH_POWER_OFF) | 2649 | if (dev->switch_power_state == DRM_SWITCH_POWER_OFF) |
2650 | return 0; | 2650 | return 0; |
2651 | 2651 | ||
2652 | adev->in_suspend = true; | ||
2652 | drm_kms_helper_poll_disable(dev); | 2653 | drm_kms_helper_poll_disable(dev); |
2653 | 2654 | ||
2654 | if (fbcon) | 2655 | if (fbcon) |
@@ -2834,6 +2835,8 @@ int amdgpu_device_resume(struct drm_device *dev, bool resume, bool fbcon) | |||
2834 | #ifdef CONFIG_PM | 2835 | #ifdef CONFIG_PM |
2835 | dev->dev->power.disable_depth--; | 2836 | dev->dev->power.disable_depth--; |
2836 | #endif | 2837 | #endif |
2838 | adev->in_suspend = false; | ||
2839 | |||
2837 | return 0; | 2840 | return 0; |
2838 | } | 2841 | } |
2839 | 2842 | ||