All of lore.kernel.org
 help / color / mirror / Atom feed
From: Liviu Dudau <liviu.dudau@arm.com>
To: Boris Brezillon <boris.brezillon@collabora.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 3/3] drm/panthor: Drop the dev_enter/exit() sections in _irq_suspend/resume()
Date: Tue, 26 Mar 2024 14:10:09 +0000	[thread overview]
Message-ID: <ZgLXQY1Y3xFnBvA5@e110455-lin.cambridge.arm.com> (raw)
In-Reply-To: <20240326111205.510019-3-boris.brezillon@collabora.com>

On Tue, Mar 26, 2024 at 12:12:05PM +0100, Boris Brezillon wrote:
> There's no reason for _irq_suspend/resume() to be called after the
> device has been unplugged, and keeping this dev_enter/exit()
> section in _irq_suspend() is turns _irq_suspend() into a NOP
> when called from the _unplug() functions, which we don't want.
> 
> v3:
> - New patch
> 
> Fixes: 5fe909cae118 ("drm/panthor: Add the device logical block")
> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>

Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>

Best regards,
Liviu

> ---
>  drivers/gpu/drm/panthor/panthor_device.h | 17 ++++-------------
>  1 file changed, 4 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panthor/panthor_device.h b/drivers/gpu/drm/panthor/panthor_device.h
> index 3a930a368ae1..99ddc41f2626 100644
> --- a/drivers/gpu/drm/panthor/panthor_device.h
> +++ b/drivers/gpu/drm/panthor/panthor_device.h
> @@ -326,13 +326,8 @@ static inline void panthor_ ## __name ## _irq_suspend(struct panthor_irq *pirq)
>  	int cookie;										\
>  												\
>  	pirq->mask = 0;										\
> -												\
> -	if (drm_dev_enter(&pirq->ptdev->base, &cookie)) {					\
> -		gpu_write(pirq->ptdev, __reg_prefix ## _INT_MASK, 0);				\
> -		synchronize_irq(pirq->irq);							\
> -		drm_dev_exit(cookie);								\
> -	}											\
> -												\
> +	gpu_write(pirq->ptdev, __reg_prefix ## _INT_MASK, 0);					\
> +	synchronize_irq(pirq->irq);								\
>  	atomic_set(&pirq->suspended, true);							\
>  }												\
>  												\
> @@ -342,12 +337,8 @@ static inline void panthor_ ## __name ## _irq_resume(struct panthor_irq *pirq, u
>  												\
>  	atomic_set(&pirq->suspended, false);							\
>  	pirq->mask = mask;									\
> -												\
> -	if (drm_dev_enter(&pirq->ptdev->base, &cookie)) {					\
> -		gpu_write(pirq->ptdev, __reg_prefix ## _INT_CLEAR, mask);			\
> -		gpu_write(pirq->ptdev, __reg_prefix ## _INT_MASK, mask);			\
> -		drm_dev_exit(cookie);								\
> -	}											\
> +	gpu_write(pirq->ptdev, __reg_prefix ## _INT_CLEAR, mask);				\
> +	gpu_write(pirq->ptdev, __reg_prefix ## _INT_MASK, mask);				\
>  }												\
>  												\
>  static int panthor_request_ ## __name ## _irq(struct panthor_device *ptdev,			\
> -- 
> 2.44.0
> 

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯

  parent reply	other threads:[~2024-03-26 14:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-26 11:12 [PATCH v3 1/3] drm/panthor: Fix IO-page mmap() for 32-bit userspace on 64-bit kernel Boris Brezillon
2024-03-26 11:12 ` [PATCH v3 2/3] drm/panthor: Fix ordering in _irq_suspend() Boris Brezillon
2024-03-26 14:09   ` Liviu Dudau
2024-03-26 11:12 ` [PATCH v3 3/3] drm/panthor: Drop the dev_enter/exit() sections in _irq_suspend/resume() Boris Brezillon
2024-03-26 11:14   ` Boris Brezillon
2024-03-26 14:10   ` Liviu Dudau [this message]
2024-03-27 15:25   ` Steven Price
2024-03-26 14:07 ` [PATCH v3 1/3] drm/panthor: Fix IO-page mmap() for 32-bit userspace on 64-bit kernel Liviu Dudau
2024-04-02  7:36 ` 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=ZgLXQY1Y3xFnBvA5@e110455-lin.cambridge.arm.com \
    --to=liviu.dudau@arm.com \
    --cc=adrian.larumbe@collabora.com \
    --cc=boris.brezillon@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel@collabora.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.