All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simona Vetter <simona.vetter@ffwll.ch>
To: David Francis <David.Francis@amd.com>
Cc: dri-devel@lists.freedesktop.org, tvrtko.ursulin@igalia.com,
	Felix.Kuehling@amd.com, David.YatSin@amd.com,
	Chris.Freehill@amd.com, Christian.Koenig@amd.com,
	dcostantino@meta.com, sruffell@meta.com, simona@ffwll.ch,
	mripard@kernel.org, tzimmermann@suse.de
Subject: Re: [PATCH 2/2] drm: Move drm_gem ioctl kerneldoc to uapi file
Date: Fri, 11 Jul 2025 23:55:12 +0200	[thread overview]
Message-ID: <aHGIQNEuDM-MgmnZ@phenom.ffwll.local> (raw)
In-Reply-To: <20250711145342.89720-3-David.Francis@amd.com>

On Fri, Jul 11, 2025 at 10:53:42AM -0400, David Francis wrote:
> The drm_gem ioctls were documented in internal file drm_gem.c
> instead of uapi header drm.h. Move them there and change to
> appropriate kerneldoc formatting.
> 
> Signed-off-by: David Francis <David.Francis@amd.com>

Thanks a lot for taking care of this!

Reviewed-by: Simona Vetter <simona.vetter@ffwll.ch>

I'll leave review for the first patch to folks who care about criu, but it
looked good to me too.
-Sima

> ---
>  drivers/gpu/drm/drm_gem.c | 30 -----------------------------
>  include/uapi/drm/drm.h    | 40 +++++++++++++++++++++++++++------------
>  2 files changed, 28 insertions(+), 42 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
> index 3166230d0119..08778a15eefb 100644
> --- a/drivers/gpu/drm/drm_gem.c
> +++ b/drivers/gpu/drm/drm_gem.c
> @@ -820,14 +820,6 @@ long drm_gem_dma_resv_wait(struct drm_file *filep, u32 handle,
>  }
>  EXPORT_SYMBOL(drm_gem_dma_resv_wait);
>  
> -/**
> - * drm_gem_close_ioctl - implementation of the GEM_CLOSE ioctl
> - * @dev: drm_device
> - * @data: ioctl data
> - * @file_priv: drm file-private structure
> - *
> - * Releases the handle to an mm object.
> - */
>  int
>  drm_gem_close_ioctl(struct drm_device *dev, void *data,
>  		    struct drm_file *file_priv)
> @@ -843,17 +835,6 @@ drm_gem_close_ioctl(struct drm_device *dev, void *data,
>  	return ret;
>  }
>  
> -/**
> - * drm_gem_flink_ioctl - implementation of the GEM_FLINK ioctl
> - * @dev: drm_device
> - * @data: ioctl data
> - * @file_priv: drm file-private structure
> - *
> - * Create a global name for an object, returning the name.
> - *
> - * Note that the name does not hold a reference; when the object
> - * is freed, the name goes away.
> - */
>  int
>  drm_gem_flink_ioctl(struct drm_device *dev, void *data,
>  		    struct drm_file *file_priv)
> @@ -893,17 +874,6 @@ drm_gem_flink_ioctl(struct drm_device *dev, void *data,
>  	return ret;
>  }
>  
> -/**
> - * drm_gem_open_ioctl - implementation of the GEM_OPEN ioctl
> - * @dev: drm_device
> - * @data: ioctl data
> - * @file_priv: drm file-private structure
> - *
> - * Open an object using the global name, returning a handle and the size.
> - *
> - * This handle (of course) holds a reference to the object, so the object
> - * will not go away until the handle is deleted.
> - */
>  int
>  drm_gem_open_ioctl(struct drm_device *dev, void *data,
>  		   struct drm_file *file_priv)
> diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h
> index e3940b657e16..e512da8f3baf 100644
> --- a/include/uapi/drm/drm.h
> +++ b/include/uapi/drm/drm.h
> @@ -597,31 +597,47 @@ struct drm_set_version {
>  	int drm_dd_minor;
>  };
>  
> -/* DRM_IOCTL_GEM_CLOSE ioctl argument type */
> +/**
> + * struct drm_gem_close - Argument for &DRM_IOCTL_GEM_CLOSE ioctl.
> + * @handle: Handle of the object to be closed.
> + * @pad: Padding.
> + *
> + * Releases the handle to an mm object.
> + */
>  struct drm_gem_close {
> -	/** Handle of the object to be closed. */
>  	__u32 handle;
>  	__u32 pad;
>  };
>  
> -/* DRM_IOCTL_GEM_FLINK ioctl argument type */
> +/**
> + * struct drm_gem_flink - Argument for &DRM_IOCTL_GEM_FLINK ioctl.
> + * @handle: Handle for the object being named.
> + * @name: Returned global name.
> + *
> + * Create a global name for an object, returning the name.
> + *
> + * Note that the name does not hold a reference; when the object
> + * is freed, the name goes away.
> + */
>  struct drm_gem_flink {
> -	/** Handle for the object being named */
>  	__u32 handle;
> -
> -	/** Returned global name */
>  	__u32 name;
>  };
>  
> -/* DRM_IOCTL_GEM_OPEN ioctl argument type */
> +/**
> + * struct drm_gem_open - Argument for &DRM_IOCTL_GEM_OPEN ioctl.
> + * @name: Name of object being opened.
> + * @handle: Returned handle for the object.
> + * @size: Returned size of the object
> + *
> + * Open an object using the global name, returning a handle and the size.
> + *
> + * This handle (of course) holds a reference to the object, so the object
> + * will not go away until the handle is deleted.
> + */
>  struct drm_gem_open {
> -	/** Name of object being opened */
>  	__u32 name;
> -
> -	/** Returned handle for the object */
>  	__u32 handle;
> -
> -	/** Returned size of the object */
>  	__u64 size;
>  };
>  
> -- 
> 2.34.1
> 

-- 
Simona Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

  reply	other threads:[~2025-07-11 21:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-11 14:53 Add CHANGE_HANDLE ioctl for drm gem v2 David Francis
2025-07-11 14:53 ` [PATCH 1/2] drm: Add DRM prime interface to reassign GEM handle David Francis
2025-07-17  6:23   ` Zhang, Jesse(Jie)
2025-07-11 14:53 ` [PATCH 2/2] drm: Move drm_gem ioctl kerneldoc to uapi file David Francis
2025-07-11 21:55   ` Simona Vetter [this message]
2025-07-14  9:50     ` Christian König
2025-07-14 12:40       ` Simona Vetter
2025-07-18  7:24         ` Christian König

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=aHGIQNEuDM-MgmnZ@phenom.ffwll.local \
    --to=simona.vetter@ffwll.ch \
    --cc=Chris.Freehill@amd.com \
    --cc=Christian.Koenig@amd.com \
    --cc=David.Francis@amd.com \
    --cc=David.YatSin@amd.com \
    --cc=Felix.Kuehling@amd.com \
    --cc=dcostantino@meta.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=mripard@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=sruffell@meta.com \
    --cc=tvrtko.ursulin@igalia.com \
    --cc=tzimmermann@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.