Re: [PATCH 1/3] drm/stm: drv: fix suspend/resume

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

 



Le mar. 18 juin 2019 à 11:57, Philippe CORNU <philippe.cornu@xxxxxx> a écrit :
>
> Hi Yannick,
>
> Thank you for your patch.
>
> Acked-by: Philippe Cornu <philippe.cornu@xxxxxx>

I have corrected Fixes sha1 (should be 12 digits)
Applied on drm-misc-next.

Benjamin

>
> Philippe :-)
>
> On 6/17/19 9:18 AM, Yannick Fertré wrote:
> > Without this fix, the system can not go in "suspend" mode
> > due to an error in drv_suspend function.
> >
> > Fixes: 35ab6cf ("drm/stm: support runtime power management")
> >
> > Signed-off-by: Yannick Fertré <yannick.fertre@xxxxxx>
> > ---
> >   drivers/gpu/drm/stm/drv.c | 15 ++++++++-------
> >   1 file changed, 8 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/stm/drv.c b/drivers/gpu/drm/stm/drv.c
> > index 5659572..9dee4e4 100644
> > --- a/drivers/gpu/drm/stm/drv.c
> > +++ b/drivers/gpu/drm/stm/drv.c
> > @@ -136,8 +136,7 @@ static __maybe_unused int drv_suspend(struct device *dev)
> >       struct ltdc_device *ldev = ddev->dev_private;
> >       struct drm_atomic_state *state;
> >
> > -     if (WARN_ON(!ldev->suspend_state))
> > -             return -ENOENT;
> > +     WARN_ON(ldev->suspend_state);
> >
> >       state = drm_atomic_helper_suspend(ddev);
> >       if (IS_ERR(state))
> > @@ -155,15 +154,17 @@ static __maybe_unused int drv_resume(struct device *dev)
> >       struct ltdc_device *ldev = ddev->dev_private;
> >       int ret;
> >
> > +     if (WARN_ON(!ldev->suspend_state))
> > +             return -ENOENT;
> > +
> >       pm_runtime_force_resume(dev);
> >       ret = drm_atomic_helper_resume(ddev, ldev->suspend_state);
> > -     if (ret) {
> > +     if (ret)
> >               pm_runtime_force_suspend(dev);
> > -             ldev->suspend_state = NULL;
> > -             return ret;
> > -     }
> >
> > -     return 0;
> > +     ldev->suspend_state = NULL;
> > +
> > +     return ret;
> >   }
> >
> >   static __maybe_unused int drv_runtime_suspend(struct device *dev)
> >
> _______________________________________________
> dri-devel mailing list
> dri-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://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