Skip to content

Commit 70c0ef7

Browse files
Lekensteynkraxel
authored andcommitted
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>
1 parent eae0612 commit 70c0ef7

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

drivers/gpu/drm/bochs/bochs_drv.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,7 @@ static int bochs_pm_suspend(struct device *dev)
107107

108108
drm_kms_helper_poll_disable(drm_dev);
109109

110-
if (bochs->fb.initialized) {
111-
console_lock();
112-
drm_fb_helper_set_suspend(&bochs->fb.helper, 1);
113-
console_unlock();
114-
}
110+
drm_fb_helper_set_suspend_unlocked(&bochs->fb.helper, 1);
115111

116112
return 0;
117113
}
@@ -124,11 +120,7 @@ static int bochs_pm_resume(struct device *dev)
124120

125121
drm_helper_resume_force_mode(drm_dev);
126122

127-
if (bochs->fb.initialized) {
128-
console_lock();
129-
drm_fb_helper_set_suspend(&bochs->fb.helper, 0);
130-
console_unlock();
131-
}
123+
drm_fb_helper_set_suspend_unlocked(&bochs->fb.helper, 0);
132124

133125
drm_kms_helper_poll_enable(drm_dev);
134126
return 0;

0 commit comments

Comments
 (0)