Skip to content

Commit

Permalink
bochs: use drm_fb_helper_set_suspend_unlocked in suspend/resume
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Wu authored and Gerd Hoffmann committed Sep 10, 2018
1 parent eae0612 commit 70c0ef7
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions drivers/gpu/drm/bochs/bochs_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
Expand Down

0 comments on commit 70c0ef7

Please sign in to comment.