Skip to content

Commit 7039d3f

Browse files
committed
drm/msm/submit: Simplify out-fence-fd handling
No need for this to be split in two parts. Signed-off-by: Rob Clark <[email protected]> Acked-by: Christian König <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rob Clark <[email protected]>
1 parent 390ad42 commit 7039d3f

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

drivers/gpu/drm/msm/msm_gem_submit.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,6 @@ int msm_ioctl_gem_submit(struct drm_device *dev, void *data,
645645
struct msm_file_private *ctx = file->driver_priv;
646646
struct msm_gem_submit *submit;
647647
struct msm_gpu *gpu = priv->gpu;
648-
struct sync_file *sync_file = NULL;
649648
struct msm_gpu_submitqueue *queue;
650649
struct msm_ringbuffer *ring;
651650
struct msm_submit_post_dep *post_deps = NULL;
@@ -824,22 +823,19 @@ int msm_ioctl_gem_submit(struct drm_device *dev, void *data,
824823
}
825824

826825
if (args->flags & MSM_SUBMIT_FENCE_FD_OUT) {
827-
sync_file = sync_file_create(submit->fence);
826+
struct sync_file *sync_file = sync_file_create(submit->fence);
828827
if (!sync_file) {
829828
ret = -ENOMEM;
830829
goto out;
831830
}
831+
fd_install(out_fence_fd, sync_file->file);
832+
args->fence_fd = out_fence_fd;
832833
}
833834

834835
msm_gpu_submit(gpu, submit);
835836

836837
args->fence = submit->fence->seqno;
837838

838-
if (args->flags & MSM_SUBMIT_FENCE_FD_OUT) {
839-
fd_install(out_fence_fd, sync_file->file);
840-
args->fence_fd = out_fence_fd;
841-
}
842-
843839
msm_reset_syncobjs(syncobjs_to_reset, args->nr_in_syncobjs);
844840
msm_process_post_deps(post_deps, args->nr_out_syncobjs,
845841
submit->fence);

0 commit comments

Comments
 (0)