drm/panfrost: Use drm_sched_job_add_syncobj_dependency()
As panfrost_copy_in_sync() performs the same steps as drm_sched_job_add_syncobj_dependency(), replace the open-coded implementation in Panfrost in order to simply use the DRM function. Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com> Signed-off-by: Maíra Canal <mcanal@igalia.com> Reviewed-by: Steven Price <steven.price@arm.com> Signed-off-by: Maíra Canal <mairacanal@riseup.net> Link: https://patchwork.freedesktop.org/patch/msgid/20230209124447.467867-5-mcanal@igalia.com
This commit is contained in:
@@ -220,15 +220,8 @@ panfrost_copy_in_sync(struct drm_device *dev,
|
||||
}
|
||||
|
||||
for (i = 0; i < in_fence_count; i++) {
|
||||
struct dma_fence *fence;
|
||||
|
||||
ret = drm_syncobj_find_fence(file_priv, handles[i], 0, 0,
|
||||
&fence);
|
||||
if (ret)
|
||||
goto fail;
|
||||
|
||||
ret = drm_sched_job_add_dependency(&job->base, fence);
|
||||
|
||||
ret = drm_sched_job_add_syncobj_dependency(&job->base, file_priv,
|
||||
handles[i], 0);
|
||||
if (ret)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user