mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-16 16:26:18 +07:00
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:
parent
60bf1860d2
commit
0a214e2fb6
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user