Skip to content

Commit 2fd653b

Browse files
superm1alexdeucher
authored andcommitted
drm/amd/display: Drop dm_prepare_suspend() and dm_complete()
[Why] dm_prepare_suspend() was added in commit 50e0bae ("drm/amd/display: Add and use new dm_prepare_suspend() callback") to allow display to turn off earlier in the suspend sequence. This caused a regression that HDMI audio sometimes didn't work properly after resume unless audio was playing during suspend. [How] Drop dm_prepare_suspend() callback. All code in it will still run during dm_suspend(). Also drop unnecessary dm_complete() callback. dm_complete() was used for failed prepare and also for any case of successful resume. The code in it already runs in dm_resume(). This change will introduce more time that the display is turned on during suspend sequence. The compositor can turn it off sooner if desired. Cc: Harry Wentland <harry.wentland@amd.com> Reported-by: Przemysław Kopa <prz.kopa@gmail.com> Closes: https://lore.kernel.org/amd-gfx/1cea0d56-7739-4ad9-bf8e-c9330faea2bb@kernel.org/T/#m383d9c08397043a271b36c32b64bb80e524e4b0f Reported-by: Kalvin <hikaph+oss@gmail.com> Closes: alsa-project/alsa-lib#465 Closes: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/4809 Fixes: 50e0bae ("drm/amd/display: Add and use new dm_prepare_suspend() callback") Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 64cc12f commit 2fd653b

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3182,25 +3182,6 @@ static void dm_destroy_cached_state(struct amdgpu_device *adev)
31823182
dm->cached_state = NULL;
31833183
}
31843184

3185-
static void dm_complete(struct amdgpu_ip_block *ip_block)
3186-
{
3187-
struct amdgpu_device *adev = ip_block->adev;
3188-
3189-
dm_destroy_cached_state(adev);
3190-
}
3191-
3192-
static int dm_prepare_suspend(struct amdgpu_ip_block *ip_block)
3193-
{
3194-
struct amdgpu_device *adev = ip_block->adev;
3195-
3196-
if (amdgpu_in_reset(adev))
3197-
return 0;
3198-
3199-
WARN_ON(adev->dm.cached_state);
3200-
3201-
return dm_cache_state(adev);
3202-
}
3203-
32043185
static int dm_suspend(struct amdgpu_ip_block *ip_block)
32053186
{
32063187
struct amdgpu_device *adev = ip_block->adev;
@@ -3626,10 +3607,8 @@ static const struct amd_ip_funcs amdgpu_dm_funcs = {
36263607
.early_fini = amdgpu_dm_early_fini,
36273608
.hw_init = dm_hw_init,
36283609
.hw_fini = dm_hw_fini,
3629-
.prepare_suspend = dm_prepare_suspend,
36303610
.suspend = dm_suspend,
36313611
.resume = dm_resume,
3632-
.complete = dm_complete,
36333612
.is_idle = dm_is_idle,
36343613
.wait_for_idle = dm_wait_for_idle,
36353614
.check_soft_reset = dm_check_soft_reset,

0 commit comments

Comments
 (0)