Commit 76e8173b authored by Akash Goel's avatar Akash Goel Committed by Liviu Dudau
Browse files

drm/panthor: Correct the order of arguments passed to gem_sync



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: cd2c9c30 ("drm/panthor: Add flag to map GEM object Write-Back Cacheable")
Signed-off-by: default avatarAkash Goel <akash.goel@arm.com>
Reviewed-by: default avatarSteven Price <steven.price@arm.com>
Reviewed-by: default avatarBoris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
Link: https://patch.msgid.link/20260305110723.2871733-1-akash.goel@arm.com


Signed-off-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
parent ee8ade4d
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -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;