dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Chunming Zhou <david1.zhou@amd.com>
To: dri-devel@lists.freedesktop.org
Cc: amd-gfx@lists.freedesktop.org
Subject: [PATCH 3/5] drm: expand drm_syncobj_find_fence to support timeline point v2
Date: Wed, 29 Aug 2018 18:44:32 +0800	[thread overview]
Message-ID: <20180829104434.13265-3-david1.zhou@amd.com> (raw)
In-Reply-To: <20180829104434.13265-1-david1.zhou@amd.com>

we can fetch timeline point fence after expanded.
v2: The parameter fence is the result of the function and should come last.

Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +-
 drivers/gpu/drm/drm_syncobj.c          | 5 +++--
 drivers/gpu/drm/v3d/v3d_gem.c          | 4 ++--
 drivers/gpu/drm/vc4/vc4_gem.c          | 2 +-
 include/drm/drm_syncobj.h              | 2 +-
 5 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index 7a625f3989a0..0e8cf088175f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -1062,7 +1062,7 @@ static int amdgpu_syncobj_lookup_and_add_to_sync(struct amdgpu_cs_parser *p,
 {
 	int r;
 	struct dma_fence *fence;
-	r = drm_syncobj_find_fence(p->filp, handle, &fence);
+	r = drm_syncobj_find_fence(p->filp, handle, 0, &fence);
 	if (r)
 		return r;
 
diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c
index d4b48fb410a1..2dcb60f4c0f7 100644
--- a/drivers/gpu/drm/drm_syncobj.c
+++ b/drivers/gpu/drm/drm_syncobj.c
@@ -217,6 +217,7 @@ static int drm_syncobj_assign_null_handle(struct drm_syncobj *syncobj)
  * drm_syncobj_find_fence - lookup and reference the fence in a sync object
  * @file_private: drm file private pointer
  * @handle: sync object handle to lookup.
+ * @point: timeline point
  * @fence: out parameter for the fence
  *
  * This is just a convenience function that combines drm_syncobj_find() and
@@ -227,7 +228,7 @@ static int drm_syncobj_assign_null_handle(struct drm_syncobj *syncobj)
  * dma_fence_put().
  */
 int drm_syncobj_find_fence(struct drm_file *file_private,
-			   u32 handle,
+			   u32 handle, u64 point,
 			   struct dma_fence **fence)
 {
 	struct drm_syncobj *syncobj = drm_syncobj_find(file_private, handle);
@@ -498,7 +499,7 @@ static int drm_syncobj_export_sync_file(struct drm_file *file_private,
 	if (fd < 0)
 		return fd;
 
-	ret = drm_syncobj_find_fence(file_private, handle, &fence);
+	ret = drm_syncobj_find_fence(file_private, handle, 0, &fence);
 	if (ret)
 		goto err_put_fd;
 
diff --git a/drivers/gpu/drm/v3d/v3d_gem.c b/drivers/gpu/drm/v3d/v3d_gem.c
index e1fcbb4cd0ae..d25c35c45c33 100644
--- a/drivers/gpu/drm/v3d/v3d_gem.c
+++ b/drivers/gpu/drm/v3d/v3d_gem.c
@@ -521,12 +521,12 @@ v3d_submit_cl_ioctl(struct drm_device *dev, void *data,
 	kref_init(&exec->refcount);
 
 	ret = drm_syncobj_find_fence(file_priv, args->in_sync_bcl,
-				     &exec->bin.in_fence);
+				     0, &exec->bin.in_fence);
 	if (ret == -EINVAL)
 		goto fail;
 
 	ret = drm_syncobj_find_fence(file_priv, args->in_sync_rcl,
-				     &exec->render.in_fence);
+				     0, &exec->render.in_fence);
 	if (ret == -EINVAL)
 		goto fail;
 
diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c
index 7910b9acedd6..928718b467bd 100644
--- a/drivers/gpu/drm/vc4/vc4_gem.c
+++ b/drivers/gpu/drm/vc4/vc4_gem.c
@@ -1173,7 +1173,7 @@ vc4_submit_cl_ioctl(struct drm_device *dev, void *data,
 
 	if (args->in_sync) {
 		ret = drm_syncobj_find_fence(file_priv, args->in_sync,
-					     &in_fence);
+					     0, &in_fence);
 		if (ret)
 			goto fail;
 
diff --git a/include/drm/drm_syncobj.h b/include/drm/drm_syncobj.h
index e419c79ba94d..ab9055f943c7 100644
--- a/include/drm/drm_syncobj.h
+++ b/include/drm/drm_syncobj.h
@@ -134,7 +134,7 @@ struct drm_syncobj *drm_syncobj_find(struct drm_file *file_private,
 void drm_syncobj_replace_fence(struct drm_syncobj *syncobj,
 			       struct dma_fence *fence);
 int drm_syncobj_find_fence(struct drm_file *file_private,
-			   u32 handle,
+			   u32 handle, u64 point,
 			   struct dma_fence **fence);
 void drm_syncobj_free(struct kref *kref);
 int drm_syncobj_create(struct drm_syncobj **out_syncobj, uint32_t flags,
-- 
2.17.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2018-08-29 10:44 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-29 10:44 [PATCH 1/5] drm: fix syncobj null_fence_enable_signaling Chunming Zhou
2018-08-29 10:44 ` Chunming Zhou [this message]
     [not found] ` <20180829104434.13265-1-david1.zhou-5C7GfCeVMHo@public.gmane.org>
2018-08-29 10:44   ` [PATCH 2/5] drm: rename null fence to stub fence in syncobj Chunming Zhou
2018-08-29 10:44   ` [PATCH 4/5] drm: expand replace_fence to support timeline point v2 Chunming Zhou
2018-08-29 10:44   ` [PATCH 5/5] [RFC]drm: add syncobj timeline support v3 Chunming Zhou
     [not found]     ` <20180829104434.13265-5-david1.zhou-5C7GfCeVMHo@public.gmane.org>
2018-08-29 11:42       ` Christian König
2018-08-30  3:50         ` zhoucm1
     [not found]           ` <45ed2e67-0b20-fa45-9575-e3f29470d4fd-5C7GfCeVMHo@public.gmane.org>
2018-08-30  7:25             ` Christian König
     [not found]               ` <f6bf45a6-6f7e-587a-f41c-5ddb8df5284e-5C7GfCeVMHo@public.gmane.org>
2018-08-30 10:40                 ` zhoucm1
     [not found]                   ` <e3d4a0c9-80f9-73e6-d9ad-ecaf1e055bcf-5C7GfCeVMHo@public.gmane.org>
2018-08-30 11:32                     ` Christian König
     [not found]                       ` <60e0dd83-93c1-8cbf-03b6-f00739fb7078-5C7GfCeVMHo@public.gmane.org>
2018-09-03  4:13                         ` Chunming Zhou
2018-09-03  8:50                           ` Christian König
     [not found]                             ` <43b69e04-d71b-e77a-6a41-1d8cb9ec1b95-5C7GfCeVMHo@public.gmane.org>
2018-09-03 10:07                               ` Chunming Zhou
     [not found]                                 ` <ffdac62f-8c9d-ff29-d699-f42873250ac6-5C7GfCeVMHo@public.gmane.org>
2018-09-03 11:19                                   ` Christian König
     [not found]                                     ` <879aa2ac-26f4-b726-3e7e-807de27208c6-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-09-04  4:04                                       ` zhoucm1
2018-09-04  7:00                                         ` Christian König
     [not found]                                           ` <4701566f-3b32-055c-3a5b-9c46708d85f1-5C7GfCeVMHo@public.gmane.org>
2018-09-04  7:53                                             ` zhoucm1
     [not found]                                               ` <9b3ba227-c8c5-4789-daff-6436fa5a2f28-5C7GfCeVMHo@public.gmane.org>
2018-09-04  8:05                                                 ` Christian König
     [not found]                                                   ` <94dd248e-15e2-7d27-e0ca-74e00b3e52c4-5C7GfCeVMHo@public.gmane.org>
2018-09-04  8:27                                                     ` zhoucm1
     [not found]                                                       ` <84d83bb0-5576-558d-1f73-8f41276dcf87-5C7GfCeVMHo@public.gmane.org>
2018-09-04  8:42                                                         ` Christian König
     [not found]                                                           ` <2f04c699-3259-ea87-e415-10c7e834460b-5C7GfCeVMHo@public.gmane.org>
2018-09-04  9:00                                                             ` zhoucm1
     [not found]                                                               ` <f2808965-22a5-bfe8-9eb1-e206e20265d8-5C7GfCeVMHo@public.gmane.org>
2018-09-04  9:20                                                                 ` Christian König
2018-09-05  3:36                                                                   ` zhoucm1
     [not found]                                                                     ` <8363b46b-52c4-1539-0928-df5b8894370e-5C7GfCeVMHo@public.gmane.org>
2018-09-05  6:55                                                                       ` Christian König
  -- strict thread matches above, loose matches on Subject: below --
2018-08-30  6:48 [PATCH 1/5] drm: fix syncobj null_fence_enable_signaling Chunming Zhou
     [not found] ` <20180830064831.5868-1-david1.zhou-5C7GfCeVMHo@public.gmane.org>
2018-08-30  6:48   ` [PATCH 3/5] drm: expand drm_syncobj_find_fence to support timeline point v2 Chunming Zhou

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=20180829104434.13265-3-david1.zhou@amd.com \
    --to=david1.zhou@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).