drm/amd/display: Release cached atomic state in S3.

Fixes memory leak.

Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Andrey Grodzovsky 2017-07-13 10:56:48 -04:00 committed by Alex Deucher
parent 60bf1860d2
commit 0a214e2fb6

View File

@ -508,6 +508,7 @@ static int dm_suspend(void *handle)
amdgpu_dm_irq_suspend(adev);
WARN_ON(adev->dm.cached_state);
adev->dm.cached_state = drm_atomic_helper_suspend(adev->ddev);
dc_set_power_state(
@ -607,6 +608,9 @@ int amdgpu_dm_display_resume(struct amdgpu_device *adev )
ret = drm_atomic_helper_resume(ddev, adev->dm.cached_state);
drm_atomic_state_put(adev->dm.cached_state);
adev->dm.cached_state = NULL;
amdgpu_dm_irq_resume_late(adev);
return ret;