AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Chunming Zhou <david1.zhou-5C7GfCeVMHo@public.gmane.org>,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH libdrm] amdgpu: typedef syncobj handle
Date: Tue, 23 Jan 2018 11:05:43 +0100	[thread overview]
Message-ID: <d582647d-a3d3-6878-404b-5ab1dae5b4df@gmail.com> (raw)
In-Reply-To: <20180123060025.18968-1-david1.zhou-5C7GfCeVMHo@public.gmane.org>

Am 23.01.2018 um 07:00 schrieb Chunming Zhou:
> Change-Id: I1e798d0fbb7e2023d6619f515a9cfaf029b62b6d
> Signed-off-by: Chunming Zhou <david1.zhou@amd.com>

Not sure if that is a good idea cause the handle is actually not amdgpu 
specific but rather a general DRM handle, isn't it?

Christian.

> ---
>   amdgpu/amdgpu.h    | 21 +++++++++++++--------
>   amdgpu/amdgpu_cs.c | 16 ++++++++--------
>   2 files changed, 21 insertions(+), 16 deletions(-)
>
> diff --git a/amdgpu/amdgpu.h b/amdgpu/amdgpu.h
> index b5e4e3c6..583884e3 100644
> --- a/amdgpu/amdgpu.h
> +++ b/amdgpu/amdgpu.h
> @@ -146,6 +146,11 @@ typedef struct amdgpu_semaphore *amdgpu_semaphore_handle;
>    */
>   typedef uint32_t amdgpu_sem_handle;
>   
> +/**
> + * Define handle for syncobj
> + */
> +typedef uint32_t amdgpu_syncobj_handle;
> +
>   
>   /*--------------------------------------------------------------------------*/
>   /* -------------------------- Structures ---------------------------------- */
> @@ -1735,7 +1740,7 @@ const char *amdgpu_get_marketing_name(amdgpu_device_handle dev);
>    *
>   */
>   int amdgpu_cs_create_syncobj(amdgpu_device_handle dev,
> -			     uint32_t *syncobj);
> +			     amdgpu_syncobj_handle *syncobj);
>   /**
>    *  Destroy kernel sync object
>    *
> @@ -1747,7 +1752,7 @@ int amdgpu_cs_create_syncobj(amdgpu_device_handle dev,
>    *
>   */
>   int amdgpu_cs_destroy_syncobj(amdgpu_device_handle dev,
> -			      uint32_t syncobj);
> +			      amdgpu_syncobj_handle syncobj);
>   
>   /**
>    *  Wait for one or all sync objects to signal.
> @@ -1765,9 +1770,9 @@ int amdgpu_cs_destroy_syncobj(amdgpu_device_handle dev,
>    *
>    */
>   int amdgpu_cs_syncobj_wait(amdgpu_device_handle dev,
> -			   uint32_t *handles, unsigned num_handles,
> +			   amdgpu_syncobj_handle *handles, unsigned num_handles,
>   			   int64_t timeout_nsec, unsigned flags,
> -			   uint32_t *first_signaled);
> +			   amdgpu_syncobj_handle *first_signaled);
>   
>   /**
>    *  Export kernel sync object to shareable fd.
> @@ -1781,7 +1786,7 @@ int amdgpu_cs_syncobj_wait(amdgpu_device_handle dev,
>    *
>   */
>   int amdgpu_cs_export_syncobj(amdgpu_device_handle dev,
> -			     uint32_t syncobj,
> +			     amdgpu_syncobj_handle syncobj,
>   			     int *shared_fd);
>   /**
>    *  Import kernel sync object from shareable fd.
> @@ -1796,7 +1801,7 @@ int amdgpu_cs_export_syncobj(amdgpu_device_handle dev,
>   */
>   int amdgpu_cs_import_syncobj(amdgpu_device_handle dev,
>   			     int shared_fd,
> -			     uint32_t *syncobj);
> +			     amdgpu_syncobj_handle *syncobj);
>   
>   /**
>    *  Export kernel sync object to a sync_file.
> @@ -1810,7 +1815,7 @@ int amdgpu_cs_import_syncobj(amdgpu_device_handle dev,
>    *
>    */
>   int amdgpu_cs_syncobj_export_sync_file(amdgpu_device_handle dev,
> -				       uint32_t syncobj,
> +				       amdgpu_syncobj_handle syncobj,
>   				       int *sync_file_fd);
>   
>   /**
> @@ -1825,7 +1830,7 @@ int amdgpu_cs_syncobj_export_sync_file(amdgpu_device_handle dev,
>    *
>    */
>   int amdgpu_cs_syncobj_import_sync_file(amdgpu_device_handle dev,
> -				       uint32_t syncobj,
> +				       amdgpu_syncobj_handle syncobj,
>   				       int sync_file_fd);
>   
>   /**
> diff --git a/amdgpu/amdgpu_cs.c b/amdgpu/amdgpu_cs.c
> index 64ad9114..be7db19f 100644
> --- a/amdgpu/amdgpu_cs.c
> +++ b/amdgpu/amdgpu_cs.c
> @@ -607,7 +607,7 @@ int amdgpu_cs_destroy_semaphore(amdgpu_semaphore_handle sem)
>   }
>   
>   int amdgpu_cs_create_syncobj(amdgpu_device_handle dev,
> -			     uint32_t *handle)
> +			     amdgpu_syncobj_handle *handle)
>   {
>   	if (NULL == dev)
>   		return -EINVAL;
> @@ -616,7 +616,7 @@ int amdgpu_cs_create_syncobj(amdgpu_device_handle dev,
>   }
>   
>   int amdgpu_cs_destroy_syncobj(amdgpu_device_handle dev,
> -			      uint32_t handle)
> +			      amdgpu_syncobj_handle handle)
>   {
>   	if (NULL == dev)
>   		return -EINVAL;
> @@ -625,9 +625,9 @@ int amdgpu_cs_destroy_syncobj(amdgpu_device_handle dev,
>   }
>   
>   int amdgpu_cs_syncobj_wait(amdgpu_device_handle dev,
> -			   uint32_t *handles, unsigned num_handles,
> +			   amdgpu_syncobj_handle *handles, unsigned num_handles,
>   			   int64_t timeout_nsec, unsigned flags,
> -			   uint32_t *first_signaled)
> +			   amdgpu_syncobj_handle *first_signaled)
>   {
>   	if (NULL == dev)
>   		return -EINVAL;
> @@ -637,7 +637,7 @@ int amdgpu_cs_syncobj_wait(amdgpu_device_handle dev,
>   }
>   
>   int amdgpu_cs_export_syncobj(amdgpu_device_handle dev,
> -			     uint32_t handle,
> +			     amdgpu_syncobj_handle handle,
>   			     int *shared_fd)
>   {
>   	if (NULL == dev)
> @@ -648,7 +648,7 @@ int amdgpu_cs_export_syncobj(amdgpu_device_handle dev,
>   
>   int amdgpu_cs_import_syncobj(amdgpu_device_handle dev,
>   			     int shared_fd,
> -			     uint32_t *handle)
> +			     amdgpu_syncobj_handle *handle)
>   {
>   	if (NULL == dev)
>   		return -EINVAL;
> @@ -657,7 +657,7 @@ int amdgpu_cs_import_syncobj(amdgpu_device_handle dev,
>   }
>   
>   int amdgpu_cs_syncobj_export_sync_file(amdgpu_device_handle dev,
> -				       uint32_t syncobj,
> +				       amdgpu_syncobj_handle syncobj,
>   				       int *sync_file_fd)
>   {
>   	if (NULL == dev)
> @@ -667,7 +667,7 @@ int amdgpu_cs_syncobj_export_sync_file(amdgpu_device_handle dev,
>   }
>   
>   int amdgpu_cs_syncobj_import_sync_file(amdgpu_device_handle dev,
> -				       uint32_t syncobj,
> +				       amdgpu_syncobj_handle syncobj,
>   				       int sync_file_fd)
>   {
>   	if (NULL == dev)

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

      parent reply	other threads:[~2018-01-23 10:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-23  6:00 [PATCH libdrm] amdgpu: typedef syncobj handle Chunming Zhou
     [not found] ` <20180123060025.18968-1-david1.zhou-5C7GfCeVMHo@public.gmane.org>
2018-01-23 10:05   ` Christian König [this message]

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=d582647d-a3d3-6878-404b-5ab1dae5b4df@gmail.com \
    --to=ckoenig.leichtzumerken-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=christian.koenig-5C7GfCeVMHo@public.gmane.org \
    --cc=david1.zhou-5C7GfCeVMHo@public.gmane.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