mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 06:01:57 +00:00
drm/msm: call drm_atomic_helper_suspend() and drm_atomic_helper_resume()
To make suspend and resume work on msm8916 platforms, call into the generic helpers and preserve the state across suspends. Signed-off-by: Daniel Mack <daniel@zonque.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
This commit is contained in:
parent
500775074f
commit
ec446d0936
@ -894,16 +894,25 @@ static struct drm_driver msm_driver = {
|
||||
static int msm_pm_suspend(struct device *dev)
|
||||
{
|
||||
struct drm_device *ddev = dev_get_drvdata(dev);
|
||||
struct msm_drm_private *priv = ddev->dev_private;
|
||||
|
||||
drm_kms_helper_poll_disable(ddev);
|
||||
|
||||
priv->pm_state = drm_atomic_helper_suspend(ddev);
|
||||
if (IS_ERR(priv->pm_state)) {
|
||||
drm_kms_helper_poll_enable(ddev);
|
||||
return PTR_ERR(priv->pm_state);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int msm_pm_resume(struct device *dev)
|
||||
{
|
||||
struct drm_device *ddev = dev_get_drvdata(dev);
|
||||
struct msm_drm_private *priv = ddev->dev_private;
|
||||
|
||||
drm_atomic_helper_resume(ddev, priv->pm_state);
|
||||
drm_kms_helper_poll_enable(ddev);
|
||||
|
||||
return 0;
|
||||
|
@ -150,6 +150,7 @@ struct msm_drm_private {
|
||||
struct shrinker shrinker;
|
||||
|
||||
struct msm_vblank_ctrl vblank_ctrl;
|
||||
struct drm_atomic_state *pm_state;
|
||||
};
|
||||
|
||||
struct msm_format {
|
||||
|
Loading…
Reference in New Issue
Block a user