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 1/3] drm/panthor: Call panthor_gpu_coherency_init() after PM resume()
Date: Tue, 1 Apr 2025 18:43:46 +0200	[thread overview]
Message-ID: <20250401184346.22ea16c3@collabora.com> (raw)
In-Reply-To: <Z-wRpKpzlK4Xg7ed@e110455-lin.cambridge.arm.com>

On Tue, 1 Apr 2025 17:17:40 +0100
Liviu Dudau <liviu.dudau@arm.com> wrote:

> On Tue, Apr 01, 2025 at 09:57:08AM +0200, Boris Brezillon wrote:
> > When the device is coherent, panthor_gpu_coherency_init() will read
> > GPU_COHERENCY_FEATURES to make sure the GPU supports the ACE-Lite
> > coherency protocol, which will fail if the clocks/power-domains are
> > not enabled when the read is done. Move the
> > panthor_gpu_coherency_init() call after the device has been resumed
> > to prevent that.  
> 
> While doing this, do you mind fixing the definitions for GPU_COHERENCY_ACE
> and GPU_COHERENCY_ACE_LITE? They are swapped, according to my arch spec.

Oh, nice catch! I'll add a patch fixing that in v2.

> 
> Otherwise, patch looks good to me.
> 
> Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
> 
> Best regards,
> Liviu
> 
> > 
> > Fixes: dd7db8d911a1 ("drm/panthor: Explicitly set the coherency mode")
> > Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
> > ---
> >  drivers/gpu/drm/panthor/panthor_device.c | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/panthor/panthor_device.c b/drivers/gpu/drm/panthor/panthor_device.c
> > index a9da1d1eeb70..c73c1608d6e6 100644
> > --- a/drivers/gpu/drm/panthor/panthor_device.c
> > +++ b/drivers/gpu/drm/panthor/panthor_device.c
> > @@ -171,10 +171,6 @@ int panthor_device_init(struct panthor_device *ptdev)
> >  	struct page *p;
> >  	int ret;
> >  
> > -	ret = panthor_gpu_coherency_init(ptdev);
> > -	if (ret)
> > -		return ret;
> > -
> >  	init_completion(&ptdev->unplug.done);
> >  	ret = drmm_mutex_init(&ptdev->base, &ptdev->unplug.lock);
> >  	if (ret)
> > @@ -247,6 +243,10 @@ int panthor_device_init(struct panthor_device *ptdev)
> >  	if (ret)
> >  		goto err_rpm_put;
> >  
> > +	ret = panthor_gpu_coherency_init(ptdev);
> > +	if (ret)
> > +		return ret;
> > +
> >  	ret = panthor_mmu_init(ptdev);
> >  	if (ret)
> >  		goto err_unplug_gpu;
> > -- 
> > 2.48.1
> >   
> 


  reply	other threads:[~2025-04-01 16:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-01  7:57 [PATCH 0/3] drm/panthor: Misc fixes Boris Brezillon
2025-04-01  7:57 ` [PATCH 1/3] drm/panthor: Call panthor_gpu_coherency_init() after PM resume() Boris Brezillon
2025-04-01 16:17   ` Liviu Dudau
2025-04-01 16:43     ` Boris Brezillon [this message]
2025-04-01  7:57 ` [PATCH 2/3] drm/panthor: Update panthor_mmu::irq::mask when needed Boris Brezillon
2025-04-01 16:18   ` Liviu Dudau
2025-04-01  7:57 ` [PATCH 3/3] drm/panthor: Let IRQ handlers clear the interrupts themselves Boris Brezillon
2025-04-01  8:18   ` 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=20250401184346.22ea16c3@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.