All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@collabora.com>
To: Liviu Dudau <liviu.dudau@arm.com>
Cc: "Steven Price" <steven.price@arm.com>,
	"Adrián Larumbe" <adrian.larumbe@collabora.com>,
	dri-devel@lists.freedesktop.org, kernel@collabora.com
Subject: Re: [PATCH v3 5/5] drm/panthor: Fix the fast-reset logic
Date: Wed, 11 Dec 2024 11:09:46 +0100	[thread overview]
Message-ID: <20241211110946.7477cc08@collabora.com> (raw)
In-Reply-To: <Z1lh89StMjaO9M5G@e110455-lin.cambridge.arm.com>

On Wed, 11 Dec 2024 09:57:07 +0000
Liviu Dudau <liviu.dudau@arm.com> wrote:

> On Wed, Dec 11, 2024 at 08:54:19AM +0100, Boris Brezillon wrote:
> > If we do a GPU soft-reset, that's no longer fast reset. This also means
> > the slow reset fallback doesn't work because the MCU state is only reset
> > after a GPU soft-reset.
> > 
> > Let's move the retry logic to panthor_device_resume() to issue a
> > soft-reset between the fast and slow attempts, and patch
> > panthor_gpu_suspend() to only power-off the L2 when a fast reset is
> > requested.
> > 
> > v3:
> > - No changes
> > 
> > v2:
> > - Add R-b
> > 
> > Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
> > Reviewed-by: Steven Price <steven.price@arm.com>  
> 
> For reasons that are not clear yet to me my v2 R-bs emails seem to have not
> reached you or the dri-devel mailing lists.
> 
> 
> > ---
> >  drivers/gpu/drm/panthor/panthor_device.c | 32 ++++++++++----
> >  drivers/gpu/drm/panthor/panthor_device.h | 11 +++++
> >  drivers/gpu/drm/panthor/panthor_fw.c     | 54 ++++++------------------
> >  drivers/gpu/drm/panthor/panthor_gpu.c    | 11 ++---
> >  4 files changed, 53 insertions(+), 55 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/panthor/panthor_device.c b/drivers/gpu/drm/panthor/panthor_device.c
> > index 0362101ea896..2c817e65e6be 100644
> > --- a/drivers/gpu/drm/panthor/panthor_device.c
> > +++ b/drivers/gpu/drm/panthor/panthor_device.c
> > @@ -431,6 +431,22 @@ int panthor_device_mmap_io(struct panthor_device *ptdev, struct vm_area_struct *
> >  	return 0;
> >  }
> >  
> > +static int panthor_device_resume_hw_components(struct panthor_device *ptdev)
> > +{
> > +	int ret;
> > +
> > +	panthor_gpu_resume(ptdev);
> > +	panthor_mmu_resume(ptdev);
> > +
> > +	ret = panthor_fw_resume(ptdev);
> > +	if (!ret)
> > +		return 0;
> > +
> > +	panthor_mmu_suspend(ptdev);
> > +	panthor_gpu_suspend(ptdev);
> > +	return ret;  
> 
> My only comment was a nit here where I prefer the construct:
> 
> 	if (ret) {
> 		panthor_mmu_suspend(ptdev);
> 		panthor_gpu_suspend(ptdev);
> 	}
> 
> 	return ret;
> 
> but feel free to ignore it.
> 
> For the whole series: Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>

I applied the series before seeing your replies. Sorry about that :-/.

  reply	other threads:[~2024-12-11 10:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-11  7:54 [PATCH v3 0/5] drm/panthor: Be robust against failures in the resume path Boris Brezillon
2024-12-11  7:54 ` [PATCH v3 1/5] drm/panthor: Preserve the result returned by panthor_fw_resume() Boris Brezillon
2024-12-11  9:50   ` Liviu Dudau
2024-12-11  7:54 ` [PATCH v3 2/5] drm/panthor: Be robust against runtime PM resume failures in the suspend path Boris Brezillon
2024-12-11  7:54 ` [PATCH v3 3/5] drm/panthor: Ignore devfreq_{suspend, resume}_device() failures Boris Brezillon
2024-12-11  7:54 ` [PATCH v3 4/5] drm/panthor: Be robust against resume failures Boris Brezillon
2024-12-11  7:54 ` [PATCH v3 5/5] drm/panthor: Fix the fast-reset logic Boris Brezillon
2024-12-11  9:57   ` Liviu Dudau
2024-12-11 10:09     ` Boris Brezillon [this message]
2024-12-11 10:10 ` [PATCH v3 0/5] drm/panthor: Be robust against failures in the resume path Boris Brezillon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241211110946.7477cc08@collabora.com \
    --to=boris.brezillon@collabora.com \
    --cc=adrian.larumbe@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel@collabora.com \
    --cc=liviu.dudau@arm.com \
    --cc=steven.price@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.