diff mbox series

drm/lima: fix wait pp reset timeout

Message ID 20200719073050.776962-1-yuq825@gmail.com (mailing list archive)
State New, archived
Headers show
Series drm/lima: fix wait pp reset timeout | expand

Commit Message

Qiang Yu July 19, 2020, 7:30 a.m. UTC
PP bcast is marked as doing async reset after job is done.
When resume after suspend, each PP is reset individually,
so no need to reset in PP bcast resume. But I forgot to
clear the PP bcast async reset mark so call into async wait
before job run and gets timeout.

Fixes: 3446d7e9883d ("drm/lima: add resume/suspend callback for each ip")
Signed-off-by: Qiang Yu <yuq825@gmail.com>
---
 drivers/gpu/drm/lima/lima_pp.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Erico Nunes July 19, 2020, 10:41 a.m. UTC | #1
On Sun, Jul 19, 2020 at 9:31 AM Qiang Yu <yuq825@gmail.com> wrote:
>
> PP bcast is marked as doing async reset after job is done.
> When resume after suspend, each PP is reset individually,
> so no need to reset in PP bcast resume. But I forgot to
> clear the PP bcast async reset mark so call into async wait
> before job run and gets timeout.
>
> Fixes: 3446d7e9883d ("drm/lima: add resume/suspend callback for each ip")
> Signed-off-by: Qiang Yu <yuq825@gmail.com>
> ---
>  drivers/gpu/drm/lima/lima_pp.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/lima/lima_pp.c b/drivers/gpu/drm/lima/lima_pp.c
> index 33f01383409c..a5c95bed08c0 100644
> --- a/drivers/gpu/drm/lima/lima_pp.c
> +++ b/drivers/gpu/drm/lima/lima_pp.c
> @@ -271,6 +271,8 @@ void lima_pp_fini(struct lima_ip *ip)
>
>  int lima_pp_bcast_resume(struct lima_ip *ip)
>  {
> +       /* PP has been reset by individual PP resume */
> +       ip->data.async_reset = false;
>         return 0;
>  }
>
> --

Reviewed-by: Erico Nunes <nunes.erico@gmail.com>

This fixes the issue reported at
https://gitlab.freedesktop.org/lima/linux/-/issues/34 .
Qiang Yu July 20, 2020, 1 a.m. UTC | #2
Thanks, applied to drm-misc-fixes.

Regards,
Qiang

On Sun, Jul 19, 2020 at 6:41 PM Erico Nunes <nunes.erico@gmail.com> wrote:
>
> On Sun, Jul 19, 2020 at 9:31 AM Qiang Yu <yuq825@gmail.com> wrote:
> >
> > PP bcast is marked as doing async reset after job is done.
> > When resume after suspend, each PP is reset individually,
> > so no need to reset in PP bcast resume. But I forgot to
> > clear the PP bcast async reset mark so call into async wait
> > before job run and gets timeout.
> >
> > Fixes: 3446d7e9883d ("drm/lima: add resume/suspend callback for each ip")
> > Signed-off-by: Qiang Yu <yuq825@gmail.com>
> > ---
> >  drivers/gpu/drm/lima/lima_pp.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/lima/lima_pp.c b/drivers/gpu/drm/lima/lima_pp.c
> > index 33f01383409c..a5c95bed08c0 100644
> > --- a/drivers/gpu/drm/lima/lima_pp.c
> > +++ b/drivers/gpu/drm/lima/lima_pp.c
> > @@ -271,6 +271,8 @@ void lima_pp_fini(struct lima_ip *ip)
> >
> >  int lima_pp_bcast_resume(struct lima_ip *ip)
> >  {
> > +       /* PP has been reset by individual PP resume */
> > +       ip->data.async_reset = false;
> >         return 0;
> >  }
> >
> > --
>
> Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
>
> This fixes the issue reported at
> https://gitlab.freedesktop.org/lima/linux/-/issues/34 .
diff mbox series

Patch

diff --git a/drivers/gpu/drm/lima/lima_pp.c b/drivers/gpu/drm/lima/lima_pp.c
index 33f01383409c..a5c95bed08c0 100644
--- a/drivers/gpu/drm/lima/lima_pp.c
+++ b/drivers/gpu/drm/lima/lima_pp.c
@@ -271,6 +271,8 @@  void lima_pp_fini(struct lima_ip *ip)
 
 int lima_pp_bcast_resume(struct lima_ip *ip)
 {
+	/* PP has been reset by individual PP resume */
+	ip->data.async_reset = false;
 	return 0;
 }