Commit 568a4c72 authored by Gerd Hoffmann's avatar Gerd Hoffmann

drm/bochs: atomic: use suspend/resume helpers

Switch to atomic helpers: drm_mode_config_helper_suspend/resume().
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
Reviewed-by: default avatarOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20190111053752.4004-9-kraxel@redhat.com
parent b635ecb5
...@@ -103,11 +103,8 @@ static int bochs_pm_suspend(struct device *dev) ...@@ -103,11 +103,8 @@ static int bochs_pm_suspend(struct device *dev)
struct drm_device *drm_dev = pci_get_drvdata(pdev); struct drm_device *drm_dev = pci_get_drvdata(pdev);
struct bochs_device *bochs = drm_dev->dev_private; struct bochs_device *bochs = drm_dev->dev_private;
drm_kms_helper_poll_disable(drm_dev);
drm_fb_helper_set_suspend_unlocked(&bochs->fb.helper, 1); drm_fb_helper_set_suspend_unlocked(&bochs->fb.helper, 1);
return drm_mode_config_helper_suspend(drm_dev);
return 0;
} }
static int bochs_pm_resume(struct device *dev) static int bochs_pm_resume(struct device *dev)
...@@ -116,12 +113,8 @@ static int bochs_pm_resume(struct device *dev) ...@@ -116,12 +113,8 @@ static int bochs_pm_resume(struct device *dev)
struct drm_device *drm_dev = pci_get_drvdata(pdev); struct drm_device *drm_dev = pci_get_drvdata(pdev);
struct bochs_device *bochs = drm_dev->dev_private; struct bochs_device *bochs = drm_dev->dev_private;
drm_helper_resume_force_mode(drm_dev);
drm_fb_helper_set_suspend_unlocked(&bochs->fb.helper, 0); drm_fb_helper_set_suspend_unlocked(&bochs->fb.helper, 0);
return drm_mode_config_helper_resume(drm_dev);
drm_kms_helper_poll_enable(drm_dev);
return 0;
} }
#endif #endif
......
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