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:
Maíra Canal 2023-02-09 09:44:47 -03:00 committed by Maíra Canal
parent c087bbb6d8
commit 4636c4a5ea
No known key found for this signature in database
GPG Key ID: B02EE8FD76781ED5

View File

@ -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;
}