diff options
author | Mikita Lipski <mikita.lipski@amd.com> | 2018-02-03 15:19:20 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-02-19 14:19:56 -0500 |
commit | 15b9bc9aa8b551a59f555a61bc575c167e201adc (patch) | |
tree | 40403eac57a16d5454dd5699f4d5c117c625fc94 | |
parent | 7bb0d4b986ea0fa144c459a7e4d5fd6676dcc039 (diff) |
drm/amdgpu: Unify the dm resume calls into one
amdgpu_dm_display_resume is now called from dm_resume to
unify DAL resume call into a single function call
There is no more need to separately call 2 resume functions
for DM.
Initially they were separated to resume display state after
cursor is pinned. But because there is no longer any corruption
with the cursor - the calls can be merged into one function hook.
Signed-off-by: Mikita Lipski <mikita.lipski@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 |
2 files changed, 3 insertions, 10 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index c9a8cf87934e..d2a5f48c5767 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |||
@@ -2301,14 +2301,6 @@ int amdgpu_device_resume(struct drm_device *dev, bool resume, bool fbcon) | |||
2301 | drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON); | 2301 | drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON); |
2302 | } | 2302 | } |
2303 | drm_modeset_unlock_all(dev); | 2303 | drm_modeset_unlock_all(dev); |
2304 | } else { | ||
2305 | /* | ||
2306 | * There is no equivalent atomic helper to turn on | ||
2307 | * display, so we defined our own function for this, | ||
2308 | * once suspend resume is supported by the atomic | ||
2309 | * framework this will be reworked | ||
2310 | */ | ||
2311 | amdgpu_dm_display_resume(adev); | ||
2312 | } | 2304 | } |
2313 | } | 2305 | } |
2314 | 2306 | ||
@@ -2743,7 +2735,6 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev, | |||
2743 | if (amdgpu_device_has_dc_support(adev)) { | 2735 | if (amdgpu_device_has_dc_support(adev)) { |
2744 | if (drm_atomic_helper_resume(adev->ddev, state)) | 2736 | if (drm_atomic_helper_resume(adev->ddev, state)) |
2745 | dev_info(adev->dev, "drm resume failed:%d\n", r); | 2737 | dev_info(adev->dev, "drm resume failed:%d\n", r); |
2746 | amdgpu_dm_display_resume(adev); | ||
2747 | } else { | 2738 | } else { |
2748 | drm_helper_resume_force_mode(adev->ddev); | 2739 | drm_helper_resume_force_mode(adev->ddev); |
2749 | } | 2740 | } |
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index e27f4e65dcf0..44271f813a0d 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | |||
@@ -659,11 +659,13 @@ static int dm_resume(void *handle) | |||
659 | { | 659 | { |
660 | struct amdgpu_device *adev = handle; | 660 | struct amdgpu_device *adev = handle; |
661 | struct amdgpu_display_manager *dm = &adev->dm; | 661 | struct amdgpu_display_manager *dm = &adev->dm; |
662 | int ret = 0; | ||
662 | 663 | ||
663 | /* power on hardware */ | 664 | /* power on hardware */ |
664 | dc_set_power_state(dm->dc, DC_ACPI_CM_POWER_STATE_D0); | 665 | dc_set_power_state(dm->dc, DC_ACPI_CM_POWER_STATE_D0); |
665 | 666 | ||
666 | return 0; | 667 | ret = amdgpu_dm_display_resume(adev); |
668 | return ret; | ||
667 | } | 669 | } |
668 | 670 | ||
669 | int amdgpu_dm_display_resume(struct amdgpu_device *adev) | 671 | int amdgpu_dm_display_resume(struct amdgpu_device *adev) |