Re: [PATCH] drm/amdgpu: Check pmops for desired suspend state

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

 



[AMD Official Use Only]


I sent a similar patch out a while ago, but never had a chance to follow up on it.  The problem is users might change the default.


Alex


From: Vishwakarma, Pratik <Pratik.Vishwakarma@xxxxxxx>
Sent: Thursday, July 22, 2021 1:27 AM
To: Deucher, Alexander <Alexander.Deucher@xxxxxxx>; amd-gfx@xxxxxxxxxxxxxxxxxxxxx <amd-gfx@xxxxxxxxxxxxxxxxxxxxx>
Cc: Vishwakarma, Pratik <Pratik.Vishwakarma@xxxxxxx>
Subject: [PATCH] drm/amdgpu: Check pmops for desired suspend state
 
[Why]
User might set mem_sleep as deep and it will result
in amdgpu resume errors.

[How]
Check with pm for default suspend state

Signed-off-by: Pratik Vishwakarma <Pratik.Vishwakarma@xxxxxxx>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index af1710971ff3..d92196429741 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -1468,7 +1468,8 @@ static int amdgpu_pmops_suspend(struct device *dev)
         struct amdgpu_device *adev = drm_to_adev(drm_dev);
         int r;
 
-       if (amdgpu_acpi_is_s0ix_supported(adev))
+       if (amdgpu_acpi_is_s0ix_supported(adev)
+               && pm_suspend_default_s2idle())
                 adev->in_s0ix = true;
         adev->in_s3 = true;
         r = amdgpu_device_suspend(drm_dev, true);
--
2.25.1

_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

  Powered by Linux