Commit 2b7bd20d authored by Souptick Joarder's avatar Souptick Joarder Committed by CK Hu

drm/mediatek: Convert drm_atomic_helper_suspend/resume()

convert drm_atomic_helper_suspend/resume() to use
drm_mode_config_helper_suspend/resume().
Signed-off-by: default avatarSouptick Joarder <jrdr.linux@gmail.com>
Signed-off-by: default avatarAjit Negi <ajitn.linux@gmail.com>
Signed-off-by: default avatarCK Hu <ck.hu@mediatek.com>
parent 5b394b2d
......@@ -580,29 +580,24 @@ static int mtk_drm_sys_suspend(struct device *dev)
{
struct mtk_drm_private *private = dev_get_drvdata(dev);
struct drm_device *drm = private->drm;
int ret;
drm_kms_helper_poll_disable(drm);
private->suspend_state = drm_atomic_helper_suspend(drm);
if (IS_ERR(private->suspend_state)) {
drm_kms_helper_poll_enable(drm);
return PTR_ERR(private->suspend_state);
}
ret = drm_mode_config_helper_suspend(drm);
DRM_DEBUG_DRIVER("mtk_drm_sys_suspend\n");
return 0;
return ret;
}
static int mtk_drm_sys_resume(struct device *dev)
{
struct mtk_drm_private *private = dev_get_drvdata(dev);
struct drm_device *drm = private->drm;
int ret;
drm_atomic_helper_resume(drm, private->suspend_state);
drm_kms_helper_poll_enable(drm);
ret = drm_mode_config_helper_resume(drm);
DRM_DEBUG_DRIVER("mtk_drm_sys_resume\n");
return 0;
return ret;
}
#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