[RFC v2 09/15] drm/amdgpu_dm: enhance amdgpu_dm_early_fini() for PM ops

Jiang Liu gerry at linux.alibaba.com
Mon Jan 13 01:42:14 UTC 2025


Enhance amdgpu_dm_early_fini() so it can be called in power
management operations.

Signed-off-by: Jiang Liu <gerry at linux.alibaba.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++
 1 file changed, 3 insertions(+)

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 9121abe0e5ef..7b900b293c0d 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -2175,6 +2175,9 @@ static int amdgpu_dm_early_fini(struct amdgpu_ip_block *ip_block)
 {
 	struct amdgpu_device *adev = ip_block->adev;
 
+	if (adev->in_s0ix || adev->in_s3 || adev->in_s4 || adev->in_suspend)
+		return 0;
+
 	amdgpu_dm_audio_fini(adev);
 
 	return 0;
-- 
2.43.5



More information about the amd-gfx mailing list