From: Pekka Paalanen <ppaalanen@gmail.com>
To: Rob Clark <robdclark@gmail.com>
Cc: dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org,
"Daniel Vetter" <daniel@ffwll.ch>,
"Christian König" <ckoenig.leichtzumerken@gmail.com>,
"Michel Dänzer" <michel@daenzer.net>,
"Tvrtko Ursulin" <tvrtko.ursulin@intel.com>,
"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Simon Ser" <contact@emersion.fr>,
"Luben Tuikov" <luben.tuikov@amd.com>,
"Rob Clark" <robdclark@chromium.org>,
"Sumit Semwal" <sumit.semwal@linaro.org>,
"Christian König" <christian.koenig@amd.com>,
"Jonathan Corbet" <corbet@lwn.net>,
"Gustavo Padovan" <gustavo@padovan.org>,
linux-media@vger.kernel.org (open list:DMA BUFFER SHARING
FRAMEWORK),
linaro-mm-sig@lists.linaro.org (moderated list:DMA BUFFER
SHARING FRAMEWORK),
linux-doc@vger.kernel.org (open list:DOCUMENTATION),
linux-kernel@vger.kernel.org (open list)
Subject: Re: [PATCH v8 05/16] dma-buf/sync_file: Surface sync-file uABI
Date: Wed, 1 Mar 2023 10:52:27 +0200 [thread overview]
Message-ID: <20230301105227.756021aa@eldfell> (raw)
In-Reply-To: <20230228225833.2920879-6-robdclark@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 4918 bytes --]
On Tue, 28 Feb 2023 14:58:09 -0800
Rob Clark <robdclark@gmail.com> wrote:
> From: Rob Clark <robdclark@chromium.org>
>
> We had all of the internal driver APIs, but not the all important
> userspace uABI, in the dma-buf doc. Fix that. And re-arrange the
> comments slightly as otherwise the comments for the ioctl nr defines
> would not show up.
>
> Signed-off-by: Rob Clark <robdclark@chromium.org>
> ---
> Documentation/driver-api/dma-buf.rst | 10 ++++++--
> include/uapi/linux/sync_file.h | 35 +++++++++++-----------------
> 2 files changed, 22 insertions(+), 23 deletions(-)
>
Sounds good.
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Thanks,
pq
> diff --git a/Documentation/driver-api/dma-buf.rst b/Documentation/driver-api/dma-buf.rst
> index 183e480d8cea..ff3f8da296af 100644
> --- a/Documentation/driver-api/dma-buf.rst
> +++ b/Documentation/driver-api/dma-buf.rst
> @@ -203,8 +203,8 @@ DMA Fence unwrap
> .. kernel-doc:: include/linux/dma-fence-unwrap.h
> :internal:
>
> -DMA Fence uABI/Sync File
> -~~~~~~~~~~~~~~~~~~~~~~~~
> +DMA Fence Sync File
> +~~~~~~~~~~~~~~~~~~~
>
> .. kernel-doc:: drivers/dma-buf/sync_file.c
> :export:
> @@ -212,6 +212,12 @@ DMA Fence uABI/Sync File
> .. kernel-doc:: include/linux/sync_file.h
> :internal:
>
> +DMA Fence Sync File uABI
> +~~~~~~~~~~~~~~~~~~~~~~~~
> +
> +.. kernel-doc:: include/uapi/linux/sync_file.h
> + :internal:
> +
> Indefinite DMA Fences
> ~~~~~~~~~~~~~~~~~~~~~
>
> diff --git a/include/uapi/linux/sync_file.h b/include/uapi/linux/sync_file.h
> index ee2dcfb3d660..eced40c204d7 100644
> --- a/include/uapi/linux/sync_file.h
> +++ b/include/uapi/linux/sync_file.h
> @@ -16,12 +16,16 @@
> #include <linux/types.h>
>
> /**
> - * struct sync_merge_data - data passed to merge ioctl
> + * struct sync_merge_data - SYNC_IOC_MERGE: merge two fences
> * @name: name of new fence
> * @fd2: file descriptor of second fence
> * @fence: returns the fd of the new fence to userspace
> * @flags: merge_data flags
> * @pad: padding for 64-bit alignment, should always be zero
> + *
> + * Creates a new fence containing copies of the sync_pts in both
> + * the calling fd and sync_merge_data.fd2. Returns the new fence's
> + * fd in sync_merge_data.fence
> */
> struct sync_merge_data {
> char name[32];
> @@ -34,8 +38,8 @@ struct sync_merge_data {
> /**
> * struct sync_fence_info - detailed fence information
> * @obj_name: name of parent sync_timeline
> -* @driver_name: name of driver implementing the parent
> -* @status: status of the fence 0:active 1:signaled <0:error
> + * @driver_name: name of driver implementing the parent
> + * @status: status of the fence 0:active 1:signaled <0:error
> * @flags: fence_info flags
> * @timestamp_ns: timestamp of status change in nanoseconds
> */
> @@ -48,14 +52,19 @@ struct sync_fence_info {
> };
>
> /**
> - * struct sync_file_info - data returned from fence info ioctl
> + * struct sync_file_info - SYNC_IOC_FILE_INFO: get detailed information on a sync_file
> * @name: name of fence
> * @status: status of fence. 1: signaled 0:active <0:error
> * @flags: sync_file_info flags
> * @num_fences number of fences in the sync_file
> * @pad: padding for 64-bit alignment, should always be zero
> - * @sync_fence_info: pointer to array of structs sync_fence_info with all
> + * @sync_fence_info: pointer to array of struct &sync_fence_info with all
> * fences in the sync_file
> + *
> + * Takes a struct sync_file_info. If num_fences is 0, the field is updated
> + * with the actual number of fences. If num_fences is > 0, the system will
> + * use the pointer provided on sync_fence_info to return up to num_fences of
> + * struct sync_fence_info, with detailed fence information.
> */
> struct sync_file_info {
> char name[32];
> @@ -76,23 +85,7 @@ struct sync_file_info {
> * no upstream users available.
> */
>
> -/**
> - * DOC: SYNC_IOC_MERGE - merge two fences
> - *
> - * Takes a struct sync_merge_data. Creates a new fence containing copies of
> - * the sync_pts in both the calling fd and sync_merge_data.fd2. Returns the
> - * new fence's fd in sync_merge_data.fence
> - */
> #define SYNC_IOC_MERGE _IOWR(SYNC_IOC_MAGIC, 3, struct sync_merge_data)
> -
> -/**
> - * DOC: SYNC_IOC_FILE_INFO - get detailed information on a sync_file
> - *
> - * Takes a struct sync_file_info. If num_fences is 0, the field is updated
> - * with the actual number of fences. If num_fences is > 0, the system will
> - * use the pointer provided on sync_fence_info to return up to num_fences of
> - * struct sync_fence_info, with detailed fence information.
> - */
> #define SYNC_IOC_FILE_INFO _IOWR(SYNC_IOC_MAGIC, 4, struct sync_file_info)
>
> #endif /* _UAPI_LINUX_SYNC_H */
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2023-03-01 8:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-28 22:58 [PATCH v8 00/16] dma-fence: Deadline awareness Rob Clark
2023-02-28 22:58 ` [PATCH v8 01/16] dma-buf/dma-fence: Add deadline awareness Rob Clark
2023-03-01 8:28 ` Bagas Sanjaya
2023-02-28 22:58 ` [PATCH v8 05/16] dma-buf/sync_file: Surface sync-file uABI Rob Clark
2023-03-01 8:52 ` Pekka Paalanen [this message]
2023-03-02 3:50 ` kernel test robot
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=20230301105227.756021aa@eldfell \
--to=ppaalanen@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=christian.koenig@amd.com \
--cc=ckoenig.leichtzumerken@gmail.com \
--cc=contact@emersion.fr \
--cc=corbet@lwn.net \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=gustavo@padovan.org \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=luben.tuikov@amd.com \
--cc=michel@daenzer.net \
--cc=robdclark@chromium.org \
--cc=robdclark@gmail.com \
--cc=rodrigo.vivi@intel.com \
--cc=sumit.semwal@linaro.org \
--cc=tvrtko.ursulin@intel.com \
/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).