[PATCH 3/3] drm/amdgpu: reset runpm flag if device suspend fails
Quan, Evan
Evan.Quan at amd.com
Fri Feb 5 02:10:04 UTC 2021
[AMD Official Use Only - Internal Distribution Only]
Series is acked-by: Evan Quan <evan.quan at amd.com>
-----Original Message-----
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Alex Deucher
Sent: Thursday, February 4, 2021 10:43 PM
To: amd-gfx at lists.freedesktop.org
Cc: Deucher, Alexander <Alexander.Deucher at amd.com>
Subject: [PATCH 3/3] drm/amdgpu: reset runpm flag if device suspend fails
If device suspend fails when we attempt to runtime suspend,
reset the runpm flag.
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index c9821f1dc357..e5c2377a54f8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -1369,8 +1369,10 @@ static int amdgpu_pmops_runtime_suspend(struct device *dev)
drm_dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
ret = amdgpu_device_suspend(drm_dev, false);
-if (ret)
+if (ret) {
+adev->in_runpm = false;
return ret;
+}
if (amdgpu_device_supports_atpx(drm_dev)) {
/* Only need to handle PCI state in the driver for ATPX
--
2.29.2
_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Cevan.quan%40amd.com%7C5402b357d36044fe5da108d8c91b4c7e%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637480466394703835%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=JoZXlRyAtQ0pDgsDEne7%2FuwRTud0hvFBe23j1cMUL10%3D&reserved=0
More information about the amd-gfx
mailing list