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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/12/2025 19:42, Jiang Liu wrote:
Enhance amdgpu_dm_early_fini() so it can be called in power
management operations.

Signed-off-by: Jiang Liu <gerry@xxxxxxxxxxxxxxxxx>
---
  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;
+

I'm a bit confused how this has even happened over suspend. The call stack I see is:

amdgpu_pci_remove()
->amdgpu_driver_unload_kms()
->->amdgpu_device_fini_hw()
->->-> amdgpu_device_ip_fini_early()
->->->-> adev->ip_blocks[i].version->funcs->early_fini()

Is there another call stack I'm missing?

  	amdgpu_dm_audio_fini(adev);
return 0;




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux