Skip to contentSkip to conversation

drm/amdgpu: allow more APUs to do mode2 reset when go to S4 (v2)

PATCH In review Tim Huang 1 participant 2 messages Mar 31, 2023

Subsystems (2)
lore
Share & tools
lore

Tim Huang

author
#0 lore raw

PATCH 1/1 drm/amdgpu: allow more APUs to do mode2 reset when go to S4 (v2)

Skip mode2 reset only for IMU enabled APUs when do S4 to fix the possible S4 regression issues on old ASICs.

v2:
Update this commit message to add Fixes and Link tags.

Fixes 2bedd3f21b30 ("drm/amdgpu: skip ASIC reset for APUs when go to S4")
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +6 -1
index 0f7cd3e8e00b..edaf3ded4a04 100644
@@ -981,7 +981,12 @@ static bool amdgpu_atcs_pci_probe_handle(struct pci_dev *pdev)
  */
 bool amdgpu_acpi_should_gpu_reset(struct amdgpu_device *adev)
 {
-	if (adev->flags & AMD_IS_APU)
+	if ((adev->flags & AMD_IS_APU) &&
+	    adev->gfx.imu.funcs) /* Not need to do mode2 reset for IMU enabled APUs */
+		return false;
+
+	if ((adev->flags & AMD_IS_APU) &&
+	    amdgpu_acpi_is_s3_active(adev))
 		return false;
 
 	if (amdgpu_sriov_vf(adev))
Signature · 1 line
2.25.1
author Tested-by Yuan Perry on v1 1/1
#1 lore raw

[AMD Official Use Only - General]

Please ignore this v2 patch, already have one with the fix. Thanks.
https://gitlab.freedesktop.org/agd5f/linux/-/commit/2fec9dc8e0acc3dfb56d1389151bcf405f087b10

Best Regards,
Tim Huang

-----Original Message-----
From: Huang, Tim <[email protected]>
Sent: Friday, March 31, 2023 11:41 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Limonciello, Mario <[email protected]>; Zhang, Yifan <[email protected]>; Yuan, Perry <[email protected]>; Du, Xiaojian <[email protected]>; Ma, Li <[email protected]>; Huang, Tim <[email protected]>; Yuan, Perry <[email protected]>
Subject: [PATCH] drm/amdgpu: allow more APUs to do mode2 reset when go to S4 (v2)

Skip mode2 reset only for IMU enabled APUs when do S4 to fix the possible S4 regression issues on old ASICs.

v2:
Update this commit message to add Fixes and Link tags.

Fixes 2bedd3f21b30 ("drm/amdgpu: skip ASIC reset for APUs when go to S4")
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +6 -2
index 0f7cd3e8e00b..edaf3ded4a04 100644
@@ -981,7 +981,12 @@ static bool amdgpu_atcs_pci_probe_handle(struct pci_dev *pdev)
  */
 bool amdgpu_acpi_should_gpu_reset(struct amdgpu_device *adev)  {
-       if (adev->flags & AMD_IS_APU)
+       if ((adev->flags & AMD_IS_APU) &&
+           adev->gfx.imu.funcs) /* Not need to do mode2 reset for IMU enabled APUs */
+               return false;
+
+       if ((adev->flags & AMD_IS_APU) &&
+           amdgpu_acpi_is_s3_active(adev))
                return false;
 
        if (amdgpu_sriov_vf(adev))
--

2.25.1