aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorJim Qu <Jim.Qu@amd.com>2017-03-01 15:53:29 +0800
committerAlex Deucher <alexander.deucher@amd.com>2017-03-08 17:21:59 -0500
commitc085bd5119d5d0bdf3ef591a5563566be7dedced (patch)
tree4cfd242fcb2cf7ea09737dfe838d28f57569bc19 /drivers/gpu
parentLinux 4.11-rc1 (diff)
downloadlinux-dev-c085bd5119d5d0bdf3ef591a5563566be7dedced.tar.xz
linux-dev-c085bd5119d5d0bdf3ef591a5563566be7dedced.zip
drm/amd/amdgpu: fix console deadlock if late init failed
Signed-off-by: Jim Qu <Jim.Qu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_device.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 6abb238b25c9..4120b351a8e5 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2094,8 +2094,11 @@ int amdgpu_device_resume(struct drm_device *dev, bool resume, bool fbcon)
}
r = amdgpu_late_init(adev);
- if (r)
+ if (r) {
+ if (fbcon)
+ console_unlock();
return r;
+ }
/* pin cursors */
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {