Commit ecb8c503 authored by Shirish S's avatar Shirish S Committed by Alex Deucher

drm/amdgpu: use drm_fb helper for console_(un)lock

This patch removes the usage of console_(un)lock
by replacing drm_fb_helper_set_suspend() to
drm_fb_helper_set_suspend_unlocked() which locks and
unlocks the console instead of locking ourselves.
Signed-off-by: default avatarShirish S <shirish.s@amd.com>
Reviewed-by: default avatarMichel Dänzer <michel.daenzer@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 3dbd823e
...@@ -2691,11 +2691,9 @@ int amdgpu_device_suspend(struct drm_device *dev, bool suspend, bool fbcon) ...@@ -2691,11 +2691,9 @@ int amdgpu_device_suspend(struct drm_device *dev, bool suspend, bool fbcon)
DRM_ERROR("amdgpu asic reset failed\n"); DRM_ERROR("amdgpu asic reset failed\n");
} }
if (fbcon) { if (fbcon)
console_lock();
amdgpu_fbdev_set_suspend(adev, 1); amdgpu_fbdev_set_suspend(adev, 1);
console_unlock();
}
return 0; return 0;
} }
...@@ -2780,9 +2778,7 @@ int amdgpu_device_resume(struct drm_device *dev, bool resume, bool fbcon) ...@@ -2780,9 +2778,7 @@ int amdgpu_device_resume(struct drm_device *dev, bool resume, bool fbcon)
} }
drm_modeset_unlock_all(dev); drm_modeset_unlock_all(dev);
} }
console_lock();
amdgpu_fbdev_set_suspend(adev, 0); amdgpu_fbdev_set_suspend(adev, 0);
console_unlock();
} }
drm_kms_helper_poll_enable(dev); drm_kms_helper_poll_enable(dev);
......
...@@ -373,7 +373,7 @@ void amdgpu_fbdev_fini(struct amdgpu_device *adev) ...@@ -373,7 +373,7 @@ void amdgpu_fbdev_fini(struct amdgpu_device *adev)
void amdgpu_fbdev_set_suspend(struct amdgpu_device *adev, int state) void amdgpu_fbdev_set_suspend(struct amdgpu_device *adev, int state)
{ {
if (adev->mode_info.rfbdev) if (adev->mode_info.rfbdev)
drm_fb_helper_set_suspend(&adev->mode_info.rfbdev->helper, drm_fb_helper_set_suspend_unlocked(&adev->mode_info.rfbdev->helper,
state); state);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment