aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaíra Canal <[email protected]>2023-02-09 09:44:47 -0300
committerMaíra Canal <[email protected]>2023-02-24 17:20:14 -0300
commit4636c4a5ea4258c34e44487798c83d5c79db4660 (patch)
treee0f51383d5394b4510927659d7485fa7ef0fa9d6
parentc087bbb6d84e7a2e8dc834fe066d2a91360c0db6 (diff)
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 <[email protected]> Signed-off-by: Maíra Canal <[email protected]> Reviewed-by: Steven Price <[email protected]> Signed-off-by: Maíra Canal <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r--drivers/gpu/drm/panfrost/panfrost_drv.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c
index abb0dadd8f63..f49096f53141 100644
--- a/drivers/gpu/drm/panfrost/panfrost_drv.c
+++ b/drivers/gpu/drm/panfrost/panfrost_drv.c
@@ -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;
}