Skip to contentSkip to conversation

drm/nouveau/sched: Don't pass user flags to drm_syncobj_find_fence()

PATCH In review Faith Ekstrand 2 participants 2 messages Aug 7, 2023 – Aug 8, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/nouveau/sched: Don't pass user flags to drm_syncobj_find_fence()

The flags field in drm_syncobj_find_fence() takes SYNCOBJ_WAIT flags from the syncobj UAPI whereas sync->flags is from the nouveau UAPI. What we actually want is 0 flags which tells it to just try to find the fence and then return without waiting.

Fixes b88baab82871 ("drm/nouveau: implement new VM_BIND uAPI")
Cc Danilo Krummrich <[email protected]>
Cc Dave Airlie <[email protected]>
---
 drivers/gpu/drm/nouveau/nouveau_sched.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nouveau_sched.c +1 -1
index b3b59fbec291..3424a1bf6af3 100644
@@ -142,7 +142,7 @@ sync_find_fence(struct nouveau_job *job,
 
 	ret = drm_syncobj_find_fence(job->file_priv,
 				     sync->handle, point,
-				     sync->flags, fence);
+				     0 /* flags */, fence);
 	if (ret)
 		return ret;
 
Signature · 1 line
2.41.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Faith Ekstrand

The flags field in drm_syncobj_find_fence() takes SYNCOBJ_WAIT flags from the syncobj UAPI whereas sync->flags is from the nouveau UAPI. What we actually want is 0 flags which tells it to just try to find the fence and then return without waiting.

Good catch!

Quoted 25 lines
Fixes b88baab82871 ("drm/nouveau: implement new VM_BIND uAPI")
Cc Danilo Krummrich <[email protected]>
Cc Dave Airlie <[email protected]>
---
 drivers/gpu/drm/nouveau/nouveau_sched.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nouveau_sched.c +1 -1
index b3b59fbec291..3424a1bf6af3 100644
@@ -142,7 +142,7 @@ sync_find_fence(struct nouveau_job *job,
 
 	ret = drm_syncobj_find_fence(job->file_priv,
 				     sync->handle, point,
-				     sync->flags, fence);
+				     0 /* flags */, fence);
 	if (ret)
 		return ret;
 
Signature · 1 line
2.41.0