public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/panthor: Correct the order of arguments passed to gem_sync
@ 2026-03-05 11:07 Akash Goel
  2026-03-05 11:11 ` Boris Brezillon
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Akash Goel @ 2026-03-05 11:07 UTC (permalink / raw)
  To: boris.brezillon, liviu.dudau, steven.price
  Cc: dri-devel, linux-kernel, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, nd, Akash Goel

This commit corrects the order of arguments passed to panthor_gem_sync()
function, called when the SYNC_WAIT condition has to be evaluated for a
blocked GPU queue.

Fixes: cd2c9c3015e6 (drm/panthor: Add flag to map GEM object Write-Back Cacheable)
Signed-off-by: Akash Goel <akash.goel@arm.com>
---
 drivers/gpu/drm/panthor/panthor_sched.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c
index bd703a2904a1..a70f1db0764e 100644
--- a/drivers/gpu/drm/panthor/panthor_sched.c
+++ b/drivers/gpu/drm/panthor/panthor_sched.c
@@ -893,14 +893,15 @@ panthor_queue_get_syncwait_obj(struct panthor_group *group, struct panthor_queue
 
 out_sync:
 	/* Make sure the CPU caches are invalidated before the seqno is read.
-	 * drm_gem_shmem_sync() is a NOP if map_wc=true, so no need to check
+	 * panthor_gem_sync() is a NOP if map_wc=true, so no need to check
 	 * it here.
 	 */
-	panthor_gem_sync(&bo->base.base, queue->syncwait.offset,
+	panthor_gem_sync(&bo->base.base,
+			 DRM_PANTHOR_BO_SYNC_CPU_CACHE_FLUSH_AND_INVALIDATE,
+			 queue->syncwait.offset,
 			 queue->syncwait.sync64 ?
 			 sizeof(struct panthor_syncobj_64b) :
-			 sizeof(struct panthor_syncobj_32b),
-			 DRM_PANTHOR_BO_SYNC_CPU_CACHE_FLUSH_AND_INVALIDATE);
+			 sizeof(struct panthor_syncobj_32b));
 
 	return queue->syncwait.kmap + queue->syncwait.offset;
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/panthor: Correct the order of arguments passed to gem_sync
  2026-03-05 11:07 [PATCH] drm/panthor: Correct the order of arguments passed to gem_sync Akash Goel
@ 2026-03-05 11:11 ` Boris Brezillon
  2026-03-05 15:43 ` Steven Price
  2026-03-05 16:54 ` Liviu Dudau
  2 siblings, 0 replies; 4+ messages in thread
From: Boris Brezillon @ 2026-03-05 11:11 UTC (permalink / raw)
  To: Akash Goel
  Cc: liviu.dudau, steven.price, dri-devel, linux-kernel,
	maarten.lankhorst, mripard, tzimmermann, airlied, daniel, nd

On Thu,  5 Mar 2026 11:07:23 +0000
Akash Goel <akash.goel@arm.com> wrote:

> This commit corrects the order of arguments passed to panthor_gem_sync()
> function, called when the SYNC_WAIT condition has to be evaluated for a
> blocked GPU queue.
> 
> Fixes: cd2c9c3015e6 (drm/panthor: Add flag to map GEM object Write-Back Cacheable)
> Signed-off-by: Akash Goel <akash.goel@arm.com>

Oops, good catch!

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>

> ---
>  drivers/gpu/drm/panthor/panthor_sched.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c
> index bd703a2904a1..a70f1db0764e 100644
> --- a/drivers/gpu/drm/panthor/panthor_sched.c
> +++ b/drivers/gpu/drm/panthor/panthor_sched.c
> @@ -893,14 +893,15 @@ panthor_queue_get_syncwait_obj(struct panthor_group *group, struct panthor_queue
>  
>  out_sync:
>  	/* Make sure the CPU caches are invalidated before the seqno is read.
> -	 * drm_gem_shmem_sync() is a NOP if map_wc=true, so no need to check
> +	 * panthor_gem_sync() is a NOP if map_wc=true, so no need to check
>  	 * it here.
>  	 */
> -	panthor_gem_sync(&bo->base.base, queue->syncwait.offset,
> +	panthor_gem_sync(&bo->base.base,
> +			 DRM_PANTHOR_BO_SYNC_CPU_CACHE_FLUSH_AND_INVALIDATE,
> +			 queue->syncwait.offset,
>  			 queue->syncwait.sync64 ?
>  			 sizeof(struct panthor_syncobj_64b) :
> -			 sizeof(struct panthor_syncobj_32b),
> -			 DRM_PANTHOR_BO_SYNC_CPU_CACHE_FLUSH_AND_INVALIDATE);
> +			 sizeof(struct panthor_syncobj_32b));
>  
>  	return queue->syncwait.kmap + queue->syncwait.offset;
>  


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/panthor: Correct the order of arguments passed to gem_sync
  2026-03-05 11:07 [PATCH] drm/panthor: Correct the order of arguments passed to gem_sync Akash Goel
  2026-03-05 11:11 ` Boris Brezillon
@ 2026-03-05 15:43 ` Steven Price
  2026-03-05 16:54 ` Liviu Dudau
  2 siblings, 0 replies; 4+ messages in thread
From: Steven Price @ 2026-03-05 15:43 UTC (permalink / raw)
  To: Akash Goel, boris.brezillon, liviu.dudau
  Cc: dri-devel, linux-kernel, maarten.lankhorst, mripard, tzimmermann,
	airlied, daniel, nd

On 05/03/2026 11:07, Akash Goel wrote:
> This commit corrects the order of arguments passed to panthor_gem_sync()
> function, called when the SYNC_WAIT condition has to be evaluated for a
> blocked GPU queue.
> 
> Fixes: cd2c9c3015e6 (drm/panthor: Add flag to map GEM object Write-Back Cacheable)
> Signed-off-by: Akash Goel <akash.goel@arm.com>

Reviewed-by: Steven Price <steven.price@arm.com>

> ---
>  drivers/gpu/drm/panthor/panthor_sched.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c
> index bd703a2904a1..a70f1db0764e 100644
> --- a/drivers/gpu/drm/panthor/panthor_sched.c
> +++ b/drivers/gpu/drm/panthor/panthor_sched.c
> @@ -893,14 +893,15 @@ panthor_queue_get_syncwait_obj(struct panthor_group *group, struct panthor_queue
>  
>  out_sync:
>  	/* Make sure the CPU caches are invalidated before the seqno is read.
> -	 * drm_gem_shmem_sync() is a NOP if map_wc=true, so no need to check
> +	 * panthor_gem_sync() is a NOP if map_wc=true, so no need to check
>  	 * it here.
>  	 */
> -	panthor_gem_sync(&bo->base.base, queue->syncwait.offset,
> +	panthor_gem_sync(&bo->base.base,
> +			 DRM_PANTHOR_BO_SYNC_CPU_CACHE_FLUSH_AND_INVALIDATE,
> +			 queue->syncwait.offset,
>  			 queue->syncwait.sync64 ?
>  			 sizeof(struct panthor_syncobj_64b) :
> -			 sizeof(struct panthor_syncobj_32b),
> -			 DRM_PANTHOR_BO_SYNC_CPU_CACHE_FLUSH_AND_INVALIDATE);
> +			 sizeof(struct panthor_syncobj_32b));
>  
>  	return queue->syncwait.kmap + queue->syncwait.offset;
>  


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/panthor: Correct the order of arguments passed to gem_sync
  2026-03-05 11:07 [PATCH] drm/panthor: Correct the order of arguments passed to gem_sync Akash Goel
  2026-03-05 11:11 ` Boris Brezillon
  2026-03-05 15:43 ` Steven Price
@ 2026-03-05 16:54 ` Liviu Dudau
  2 siblings, 0 replies; 4+ messages in thread
From: Liviu Dudau @ 2026-03-05 16:54 UTC (permalink / raw)
  To: Akash Goel
  Cc: boris.brezillon, steven.price, dri-devel, linux-kernel,
	maarten.lankhorst, mripard, tzimmermann, airlied, daniel, nd

On Thu, Mar 05, 2026 at 11:07:23AM +0000, Akash Goel wrote:
> This commit corrects the order of arguments passed to panthor_gem_sync()
> function, called when the SYNC_WAIT condition has to be evaluated for a
> blocked GPU queue.
> 
> Fixes: cd2c9c3015e6 (drm/panthor: Add flag to map GEM object Write-Back Cacheable)
> Signed-off-by: Akash Goel <akash.goel@arm.com>

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

Pushed to drm-misc-fixes.

Best regards,
Liviu

> ---
>  drivers/gpu/drm/panthor/panthor_sched.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c
> index bd703a2904a1..a70f1db0764e 100644
> --- a/drivers/gpu/drm/panthor/panthor_sched.c
> +++ b/drivers/gpu/drm/panthor/panthor_sched.c
> @@ -893,14 +893,15 @@ panthor_queue_get_syncwait_obj(struct panthor_group *group, struct panthor_queue
>  
>  out_sync:
>  	/* Make sure the CPU caches are invalidated before the seqno is read.
> -	 * drm_gem_shmem_sync() is a NOP if map_wc=true, so no need to check
> +	 * panthor_gem_sync() is a NOP if map_wc=true, so no need to check
>  	 * it here.
>  	 */
> -	panthor_gem_sync(&bo->base.base, queue->syncwait.offset,
> +	panthor_gem_sync(&bo->base.base,
> +			 DRM_PANTHOR_BO_SYNC_CPU_CACHE_FLUSH_AND_INVALIDATE,
> +			 queue->syncwait.offset,
>  			 queue->syncwait.sync64 ?
>  			 sizeof(struct panthor_syncobj_64b) :
> -			 sizeof(struct panthor_syncobj_32b),
> -			 DRM_PANTHOR_BO_SYNC_CPU_CACHE_FLUSH_AND_INVALIDATE);
> +			 sizeof(struct panthor_syncobj_32b));
>  
>  	return queue->syncwait.kmap + queue->syncwait.offset;
>  
> -- 
> 2.25.1
> 

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-03-05 17:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-05 11:07 [PATCH] drm/panthor: Correct the order of arguments passed to gem_sync Akash Goel
2026-03-05 11:11 ` Boris Brezillon
2026-03-05 15:43 ` Steven Price
2026-03-05 16:54 ` Liviu Dudau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox