Just add the call before taking locks. Signed-off-by: Christian König <christian.koenig@xxxxxxx> --- drivers/gpu/drm/msm/msm_gem_submit.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/gpu/drm/msm/msm_gem_submit.c index 5480852bdeda..a77389ce23d0 100644 --- a/drivers/gpu/drm/msm/msm_gem_submit.c +++ b/drivers/gpu/drm/msm/msm_gem_submit.c @@ -285,6 +285,20 @@ static int submit_lock_objects(struct msm_gem_submit *submit) return ret; } +static int submit_sync_user_fence(struct msm_gem_submit *submit) +{ + int i, ret; + + for (i = 0; i < submit->nr_bos; i++) { + struct msm_gem_object *msm_obj = submit->bos[i].obj; + + ret = dma_resv_sync_user_fence(msm_obj->base.resv); + if (ret) + return ret; + } + return 0; +} + static int submit_fence_sync(struct msm_gem_submit *submit, bool no_implicit) { int i, ret = 0; @@ -769,6 +783,10 @@ int msm_ioctl_gem_submit(struct drm_device *dev, void *data, */ pm_runtime_get_sync(&gpu->pdev->dev); + ret = submit_sync_user_fence(submit); + if (ret) + goto out; + /* copy_*_user while holding a ww ticket upsets lockdep */ ww_acquire_init(&submit->ticket, &reservation_ww_class); has_ww_ticket = true; -- 2.25.1 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel