diff mbox series

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

Message ID 20230807234210.175968-1-faith.ekstrand@collabora.com (mailing list archive)
State New, archived
Headers show
Series drm/nouveau/sched: Don't pass user flags to drm_syncobj_find_fence() | expand

Commit Message

Faith Ekstrand Aug. 7, 2023, 11:41 p.m. UTC
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.

Signed-off-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Fixes: b88baab82871 ("drm/nouveau: implement new VM_BIND uAPI")
Cc: Danilo Krummrich <dakr@redhat.com>
Cc: Dave Airlie <airlied@redhat.com>
---
 drivers/gpu/drm/nouveau/nouveau_sched.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Danilo Krummrich Aug. 8, 2023, 1:08 a.m. UTC | #1
On Mon, Aug 07, 2023 at 06:41:44PM -0500, Faith Ekstrand wrote:
> 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!

Reviewed-by: Danilo Krummrich <dakr@redhat.com>

> 
> Signed-off-by: Faith Ekstrand <faith.ekstrand@collabora.com>
> Fixes: b88baab82871 ("drm/nouveau: implement new VM_BIND uAPI")
> Cc: Danilo Krummrich <dakr@redhat.com>
> Cc: Dave Airlie <airlied@redhat.com>
> ---
>  drivers/gpu/drm/nouveau/nouveau_sched.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/nouveau/nouveau_sched.c b/drivers/gpu/drm/nouveau/nouveau_sched.c
> index b3b59fbec291..3424a1bf6af3 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_sched.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_sched.c
> @@ -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;
>  
> -- 
> 2.41.0
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/nouveau/nouveau_sched.c b/drivers/gpu/drm/nouveau/nouveau_sched.c
index b3b59fbec291..3424a1bf6af3 100644
--- a/drivers/gpu/drm/nouveau/nouveau_sched.c
+++ b/drivers/gpu/drm/nouveau/nouveau_sched.c
@@ -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;