From: Rex Zhu Date: Thu, 30 Mar 2017 05:21:01 +0000 (+0800) Subject: drm/amdgpu: when resume failed, return error to avoid system hang. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e6707218f77bc850f41720dc70d3d4a0dce9ef4a;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Reviewed-by: Christian König Signed-off-by: Alex Deucher --- 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) {