summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/bochs
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2018-09-07 00:18:07 +0200
committerGerd Hoffmann <kraxel@redhat.com>2018-09-10 07:10:37 +0200
commit70c0ef7bd39991cdf3f190c9545c4ecdd6899a74 (patch)
treed9e104d0c624c6319eddb0abcc3a559f0f58cea2 /drivers/gpu/drm/bochs
parenteae06120f1974e1a4cab0f80f4b07d27eb80ab32 (diff)
bochs: use drm_fb_helper_set_suspend_unlocked in suspend/resume
The "initialized" member is going away. suspend/resume still works (even if bochsfb_create is forced to fail). Signed-off-by: Peter Wu <peter@lekensteyn.nl> Link: http://patchwork.freedesktop.org/patch/msgid/20180906221810.20170-2-peter@lekensteyn.nl Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/bochs')
-rw-r--r--drivers/gpu/drm/bochs/bochs_drv.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/gpu/drm/bochs/bochs_drv.c b/drivers/gpu/drm/bochs/bochs_drv.c
index c61b40c72b62..0e79d9acf89e 100644
--- a/drivers/gpu/drm/bochs/bochs_drv.c
+++ b/drivers/gpu/drm/bochs/bochs_drv.c
@@ -107,11 +107,7 @@ static int bochs_pm_suspend(struct device *dev)
drm_kms_helper_poll_disable(drm_dev);
- if (bochs->fb.initialized) {
- console_lock();
- drm_fb_helper_set_suspend(&bochs->fb.helper, 1);
- console_unlock();
- }
+ drm_fb_helper_set_suspend_unlocked(&bochs->fb.helper, 1);
return 0;
}
@@ -124,11 +120,7 @@ static int bochs_pm_resume(struct device *dev)
drm_helper_resume_force_mode(drm_dev);
- if (bochs->fb.initialized) {
- console_lock();
- drm_fb_helper_set_suspend(&bochs->fb.helper, 0);
- console_unlock();
- }
+ drm_fb_helper_set_suspend_unlocked(&bochs->fb.helper, 0);
drm_kms_helper_poll_enable(drm_dev);
return 0;