summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavan Kumar Ramayanam <pavan.ramayanam@amd.com>2021-04-27 06:51:18 +0200
committerAlex Deucher <alexander.deucher@amd.com>2021-04-29 06:03:11 +0200
commitb45aeb2dea9142d4d32fa3a117ba381d84f27065 (patch)
tree13d30e01e84cb8d3c1c8cd993ede161c9f6bf6b5
parentdrm/amdgpu: fix r initial values (diff)
downloadlinux-b45aeb2dea9142d4d32fa3a117ba381d84f27065.tar.xz
linux-b45aeb2dea9142d4d32fa3a117ba381d84f27065.zip
drm/amdgpu: Handling of amdgpu_device_resume return value for graceful teardown
The runtime resume PM op disregards the return value from amdgpu_device_resume(), masking errors for failed resumes at the PM layer. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Pavan Kumar Ramayanam <pavan.ramayanam@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index d8f131ed10cb..b0378cfe2218 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -1573,6 +1573,9 @@ static int amdgpu_pmops_runtime_resume(struct device *dev)
amdgpu_device_baco_exit(drm_dev);
}
ret = amdgpu_device_resume(drm_dev, false);
+ if (ret)
+ return ret;
+
if (amdgpu_device_supports_px(drm_dev))
drm_dev->switch_power_state = DRM_SWITCH_POWER_ON;
adev->in_runpm = false;