Just add the call before taking locks. Signed-off-by: Christian König <christian.koenig@xxxxxxx> --- drivers/gpu/drm/panfrost/panfrost_job.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/gpu/drm/panfrost/panfrost_job.c b/drivers/gpu/drm/panfrost/panfrost_job.c index 6003cfeb1322..9174ceb1d16d 100644 --- a/drivers/gpu/drm/panfrost/panfrost_job.c +++ b/drivers/gpu/drm/panfrost/panfrost_job.c @@ -216,6 +216,18 @@ static void panfrost_attach_object_fences(struct drm_gem_object **bos, dma_resv_add_excl_fence(bos[i]->resv, fence); } +static int panfrost_sync_user_fences(struct drm_gem_object **bos, int bo_count) +{ + int i, ret; + + for (i = 0; i < bo_count; i++) { + ret = dma_resv_sync_user_fence(bos[i]->resv); + if (ret) + return ret; + } + return 0; +} + int panfrost_job_push(struct panfrost_job *job) { struct panfrost_device *pfdev = job->pfdev; @@ -224,6 +236,10 @@ int panfrost_job_push(struct panfrost_job *job) struct ww_acquire_ctx acquire_ctx; int ret = 0; + ret = panfrost_sync_user_fences(job->bos, job->bo_count); + if (ret) + return ret; + mutex_lock(&pfdev->sched_lock); ret = drm_gem_lock_reservations(job->bos, job->bo_count, -- 2.25.1 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel