summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2021-02-04 09:32:17 -0500
committerAlex Deucher <alexander.deucher@amd.com>2021-02-09 15:30:13 -0500
commitcef8b03bbc0b727e1ef9e45d612a6487a7063205 (patch)
tree34733b796a3eac1650e2d916c7d3cc78ddbca640
parentad887af9b6d0d5d7866a3953563fb0fee7556ea8 (diff)
downloadlinux-cef8b03bbc0b727e1ef9e45d612a6487a7063205.tar.bz2
drm/amdgpu: reset runpm flag if device suspend fails
If device suspend fails when we attempt to runtime suspend, reset the runpm flag. Acked-by: Evan Quan <evan.quan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index 0b07cc15ebdd..03c529630c21 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -1350,8 +1350,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