linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Clark <robdclark@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: "Rob Clark" <robdclark@chromium.org>,
	"Christian König" <christian.koenig@amd.com>,
	"Rob Clark" <robdclark@gmail.com>, "Sean Paul" <sean@poorly.run>,
	"David Airlie" <airlied@linux.ie>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	linux-arm-msm@vger.kernel.org (open list:DRM DRIVER FOR MSM
	ADRENO GPU),
	freedreno@lists.freedesktop.org (open list:DRM DRIVER FOR MSM
	ADRENO GPU), linux-kernel@vger.kernel.org (open list)
Subject: [PATCH v3 05/13] drm/msm/submit: Simplify out-fence-fd handling
Date: Tue, 27 Jul 2021 10:11:21 -0700	[thread overview]
Message-ID: <20210727171143.2549475-6-robdclark@gmail.com> (raw)
In-Reply-To: <20210727171143.2549475-1-robdclark@gmail.com>

From: Rob Clark <robdclark@chromium.org>

No need for this to be split in two parts.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Acked-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/msm/msm_gem_submit.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/gpu/drm/msm/msm_gem_submit.c
index e789f68d5be1..8abd743adfb0 100644
--- a/drivers/gpu/drm/msm/msm_gem_submit.c
+++ b/drivers/gpu/drm/msm/msm_gem_submit.c
@@ -645,7 +645,6 @@ int msm_ioctl_gem_submit(struct drm_device *dev, void *data,
 	struct msm_file_private *ctx = file->driver_priv;
 	struct msm_gem_submit *submit;
 	struct msm_gpu *gpu = priv->gpu;
-	struct sync_file *sync_file = NULL;
 	struct msm_gpu_submitqueue *queue;
 	struct msm_ringbuffer *ring;
 	struct msm_submit_post_dep *post_deps = NULL;
@@ -824,22 +823,19 @@ int msm_ioctl_gem_submit(struct drm_device *dev, void *data,
 	}
 
 	if (args->flags & MSM_SUBMIT_FENCE_FD_OUT) {
-		sync_file = sync_file_create(submit->fence);
+		struct sync_file *sync_file = sync_file_create(submit->fence);
 		if (!sync_file) {
 			ret = -ENOMEM;
 			goto out;
 		}
+		fd_install(out_fence_fd, sync_file->file);
+		args->fence_fd = out_fence_fd;
 	}
 
 	msm_gpu_submit(gpu, submit);
 
 	args->fence = submit->fence->seqno;
 
-	if (args->flags & MSM_SUBMIT_FENCE_FD_OUT) {
-		fd_install(out_fence_fd, sync_file->file);
-		args->fence_fd = out_fence_fd;
-	}
-
 	msm_reset_syncobjs(syncobjs_to_reset, args->nr_in_syncobjs);
 	msm_process_post_deps(post_deps, args->nr_out_syncobjs,
 	                      submit->fence);
-- 
2.31.1


  parent reply	other threads:[~2021-07-27 17:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-27 17:11 [PATCH v3 00/13] drm/msm: drm scheduler conversion and cleanups Rob Clark
2021-07-27 17:11 ` [PATCH v3 01/13] drm/msm: Docs and misc cleanup Rob Clark
2021-07-27 17:11 ` [PATCH v3 02/13] drm/msm: Small submitqueue creation cleanup Rob Clark
2021-07-27 17:11 ` [PATCH v3 03/13] drm/msm: drop drm_gem_object_put_locked() Rob Clark
2021-07-27 17:11 ` [PATCH v3 04/13] drm: Drop drm_gem_object_put_locked() Rob Clark
2021-07-27 17:11 ` Rob Clark [this message]
2021-07-27 17:11 ` [PATCH v3 06/13] drm/msm: Consolidate submit bo state Rob Clark
2021-07-27 17:11 ` [PATCH v3 07/13] drm/msm: Track "seqno" fences by idr Rob Clark
2021-07-27 17:11 ` [PATCH v3 08/13] drm/msm: Return ERR_PTR() from submit_create() Rob Clark
2021-07-27 17:11 ` [PATCH v3 09/13] drm/msm: Conversion to drm scheduler Rob Clark
2021-07-27 17:11 ` [PATCH v3 10/13] drm/msm: Drop submit bo_list Rob Clark
2021-07-27 17:11 ` [PATCH v3 11/13] drm/msm: Drop struct_mutex in submit path Rob Clark
2021-07-27 17:11 ` [PATCH v3 12/13] drm/msm: Utilize gpu scheduler priorities Rob Clark
2021-07-27 17:11 ` [PATCH v3 13/13] drm/msm/gem: Mark active before pinning Rob Clark

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210727171143.2549475-6-robdclark@gmail.com \
    --to=robdclark@gmail.com \
    --cc=airlied@linux.ie \
    --cc=christian.koenig@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robdclark@chromium.org \
    --cc=sean@poorly.run \
    --subject='Re: [PATCH v3 05/13] drm/msm/submit: Simplify out-fence-fd handling' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).