[Intel-gfx] [PATCH 2/4] drm/i915/uapi: convert drm_i915_gem_userptr to kernel doc
Maarten Lankhorst
maarten.lankhorst at linux.intel.com
Thu Jul 15 12:09:46 UTC 2021
Op 15-07-2021 om 12:15 schreef Matthew Auld:
> Add the missing kernel-doc.
>
> Signed-off-by: Matthew Auld <matthew.auld at intel.com>
> Cc: Thomas Hellström <thomas.hellstrom at linux.intel.com>
> Cc: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin at linux.intel.com>
> Cc: Jordan Justen <jordan.l.justen at intel.com>
> Cc: Kenneth Graunke <kenneth at whitecape.org>
> Cc: Jason Ekstrand <jason at jlekstrand.net>
> Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
> Cc: Ramalingam C <ramalingam.c at intel.com>
> ---
> include/uapi/drm/i915_drm.h | 40 ++++++++++++++++++++++++++++++++++++-
> 1 file changed, 39 insertions(+), 1 deletion(-)
>
> diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
> index 868c2ee7be60..e20eeeca7a1c 100644
> --- a/include/uapi/drm/i915_drm.h
> +++ b/include/uapi/drm/i915_drm.h
> @@ -2141,14 +2141,52 @@ struct drm_i915_reset_stats {
> __u32 pad;
> };
>
> +/**
> + * struct drm_i915_gem_userptr - Create GEM object from user allocated memory.
> + *
> + * Userptr objects have several restrictions on what ioctls can be used with the
> + * object handle.
> + */
> struct drm_i915_gem_userptr {
> + /**
> + * @user_ptr: The pointer to the allocated memory.
> + *
> + * Needs to be aligned to PAGE_SIZE.
> + */
> __u64 user_ptr;
> +
> + /**
> + * @user_size:
> + *
> + * The size in bytes for the allocated memory. This will also become the
> + * object size.
> + *
> + * Needs to be aligned to PAGE_SIZE, and should be at least PAGE_SIZE,
> + * or larger.
> + */
> __u64 user_size;
> +
> + /**
> + * @flags:
> + *
> + * Supported flags:
> + *
> + * I915_USERPTR_READ_ONLY:
> + *
> + * Mark the object as readonly, this also means GPU access can only be
> + * readonly. This is only supported on HW which supports readonly access
> + * through the GTT. If the HW can't support readonly access, an error is
> + * returned.
> + *
> + * I915_USERPTR_UNSYNCHRONIZED:
> + *
> + * NOT USED. Setting this flag will result in an error.
> + */
> __u32 flags;
> #define I915_USERPTR_READ_ONLY 0x1
> #define I915_USERPTR_UNSYNCHRONIZED 0x80000000
> /**
> - * Returned handle for the object.
> + * @handle: Returned handle for the object.
> *
> * Object handles are nonzero.
> */
Reviewed-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
Can you review
https://patchwork.freedesktop.org/patch/444147/?series=92359&rev=2
?
I noticed some parts of i915_drm.h missing.
More information about the Intel-gfx
mailing list