Re: [PATCH v2 3/3] drm/tegra: Implement subsystem-level suspend/resume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12 August 2015 at 15:37, Thierry Reding <thierry.reding@xxxxxxxxx> wrote:
> From: Thierry Reding <treding@xxxxxxxxxx>
>
> 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@xxxxxxxxxx>
> ---
>  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
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux