[PATCH v2 3/3] drm/tegra: Implement subsystem-level suspend/resume
Emil Velikov
emil.l.velikov at gmail.com
Wed Aug 12 08:50:19 PDT 2015
On 12 August 2015 at 15:37, Thierry Reding <thierry.reding at gmail.com> wrote:
> From: Thierry Reding <treding at nvidia.com>
>
> Use the drm_atomic_helper_suspend() and drm_atomic_helper_resume()
> helpers to implement subsystem-level suspend/resume.
>
> v2: suspend framebuffer device to avoid concurrency issues
>
> Signed-off-by: Thierry Reding <treding at nvidia.com>
> ---
> drivers/gpu/drm/tegra/drm.c | 11 +++++++++++
> drivers/gpu/drm/tegra/drm.h | 4 ++++
> drivers/gpu/drm/tegra/fb.c | 24 ++++++++++++++++++++++++
> 3 files changed, 39 insertions(+)
>
> diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c
> index b5f24c0f93dc..10d62e3077de 100644
> --- a/drivers/gpu/drm/tegra/drm.c
> +++ b/drivers/gpu/drm/tegra/drm.c
> @@ -1022,8 +1022,16 @@ static int host1x_drm_remove(struct host1x_device *dev)
> static int host1x_drm_suspend(struct device *dev)
> {
> struct drm_device *drm = dev_get_drvdata(dev);
> + struct tegra_drm *tegra = drm->dev_private;
>
> drm_kms_helper_poll_disable(drm);
> + tegra_drm_fb_suspend(drm);
> +
> + tegra->state = drm_atomic_helper_suspend(drm);
> + if (IS_ERR(tegra->state)) {
I'd assume that tegra_drm_fb_resume(drm) should be used here ?
> + drm_kms_helper_poll_enable(drm);
> + return PTR_ERR(tegra->state);
> + }
>
> return 0;
> }
Cheers
Emil
More information about the dri-devel
mailing list