aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRex Zhu <[email protected]>2017-03-30 13:21:01 +0800
committerAlex Deucher <[email protected]>2017-04-04 13:40:32 -0400
commite6707218f77bc850f41720dc70d3d4a0dce9ef4a (patch)
tree42e8acd5d77c703569f807ab21b59be7b670450d
parenta9f87f6452543505108d7d9b36d948534ea28b0b (diff)
drm/amdgpu: when resume failed, return error to avoid system hang.
Continuing if the GPU fails to resume will end in pain. Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_device.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 83dda05325b8..4aa10d7baf43 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2249,9 +2249,10 @@ int amdgpu_device_resume(struct drm_device *dev, bool resume, bool fbcon)
}
r = amdgpu_resume(adev);
- if (r)
+ if (r) {
DRM_ERROR("amdgpu_resume failed (%d).\n", r);
-
+ return r;
+ }
amdgpu_fence_driver_resume(adev);
if (resume) {