Commit b92e01b4 authored by Maíra Canal's avatar Maíra Canal Committed by Dmitry Baryshkov

drm/msm: Use drm_sched_job_add_syncobj_dependency()

As msm_parse_deps() performs the same steps as
drm_sched_job_add_syncobj_dependency(), replace the open-coded
implementation in msm in order to simply use the DRM function.
Signed-off-by: default avatarMaíra Canal <mcanal@igalia.com>
Patchwork: https://patchwork.freedesktop.org/patch/524090/
Link: https://lore.kernel.org/r/20230224214133.411966-2-mcanal@igalia.comSigned-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
parent 648cb683
......@@ -573,7 +573,6 @@ static struct drm_syncobj **msm_parse_deps(struct msm_gem_submit *submit,
for (i = 0; i < nr_in_syncobjs; ++i) {
uint64_t address = in_syncobjs_addr + i * syncobj_stride;
struct dma_fence *fence;
if (copy_from_user(&syncobj_desc,
u64_to_user_ptr(address),
......@@ -593,12 +592,8 @@ static struct drm_syncobj **msm_parse_deps(struct msm_gem_submit *submit,
break;
}
ret = drm_syncobj_find_fence(file, syncobj_desc.handle,
syncobj_desc.point, 0, &fence);
if (ret)
break;
ret = drm_sched_job_add_dependency(&submit->base, fence);
ret = drm_sched_job_add_syncobj_dependency(&submit->base, file,
syncobj_desc.handle, syncobj_desc.point);
if (ret)
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment