From: Francois Dugast <francois.dugast@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: intel-xe@lists.freedesktop.org, Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [PATCH v1 09/14] drm/xe/uapi: More uAPI documentation additions and cosmetic updates
Date: Thu, 14 Dec 2023 20:40:37 +0100 [thread overview]
Message-ID: <ZXtaNdOtc_ix1HoW@fdugast-desk.home> (raw)
In-Reply-To: <x372auciffcjchrgqo4k35orpocaycb4kpx2p4zxjwnrfoji5o@gkwsy7tnlebg>
On Thu, Dec 14, 2023 at 10:45:59AM -0600, Lucas De Marchi wrote:
> On Thu, Dec 07, 2023 at 01:50:04PM +0000, Francois Dugast wrote:
> > From: Rodrigo Vivi <rodrigo.vivi@intel.com>
> >
> > No functional change in this patch.
> >
> > Let's ensure all of our structs are documented and with a certain
> > standard. Also, let's have an overview and list of IOCTLs as the
> > very beginning of the generated HTML doc.
> >
> > Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > Signed-off-by: Francois Dugast <francois.dugast@intel.com>
> > ---
> > include/uapi/drm/xe_drm.h | 48 +++++++++++++++++++++++++++++++++------
> > 1 file changed, 41 insertions(+), 7 deletions(-)
> >
> > diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h
> > index b36f3bd53611..55cb22b2c7e2 100644
> > --- a/include/uapi/drm/xe_drm.h
> > +++ b/include/uapi/drm/xe_drm.h
> > @@ -25,6 +25,28 @@ extern "C" {
> > * 6. PMU
> > */
> >
> > +/**
> > + * DOC: Xe uAPI Overview
>
> not sure about the lowercase u. Isn't that used when it refers to µ, like in
> uC (microcontroller)?
uAPI seems used this way in DRM (though not everywhere), see Documentation/gpu/driver-uapi.rst.
>
> > + *
> > + * This section aims to describe the Xe's IOCTL entries, its structs, and other
> > + * Xe related uAPI such as uevents and PMU (Platform Monitoring Unit) related
> > + * entries and usage.
> > + *
> > + * List of supported IOCTLs:
> > + * - &DRM_IOCTL_XE_DEVICE_QUERY
> > + * - &DRM_IOCTL_XE_GEM_CREATE
> > + * - &DRM_IOCTL_XE_GEM_MMAP_OFFSET
> > + * - &DRM_IOCTL_XE_VM_CREATE
> > + * - &DRM_IOCTL_XE_VM_DESTROY
> > + * - &DRM_IOCTL_XE_VM_BIND
> > + * - &DRM_IOCTL_XE_EXEC
> > + * - &DRM_IOCTL_XE_EXEC_QUEUE_CREATE
> > + * - &DRM_IOCTL_XE_EXEC_QUEUE_DESTROY
> > + * - &DRM_IOCTL_XE_EXEC_QUEUE_GET_PROPERTY
> > + * - &DRM_IOCTL_XE_WAIT_USER_FENCE
> > + *
>
> stray newline
>
> > + */
> > +
> > /*
> > * xe specific ioctls.
> > *
> > @@ -59,7 +81,10 @@ extern "C" {
> > #define DRM_IOCTL_XE_WAIT_USER_FENCE DRM_IOWR(DRM_COMMAND_BASE + DRM_XE_WAIT_USER_FENCE, struct drm_xe_wait_user_fence)
> >
> > /**
> > - * struct xe_user_extension - Base class for defining a chain of extensions
> > + * DOC: Xe IOCT Extensions
>
> IOCTL
>
> > + *
> > + * Before detailing the IOCTLs and its structs, it is important to highlight
> > + * that every IOCTL in Xe is extensible.
> > *
> > * Many interfaces need to grow over time. In most cases we can simply
> > * extend the struct and have userspace pass in more data. Another option,
> > @@ -93,7 +118,10 @@ extern "C" {
> > * Typically the struct xe_user_extension would be embedded in some uAPI
>
> ^ to be renamed to drm_xe_...
>
> > * struct, and in this case we would feed it the head of the chain(i.e ext1),
> > * which would then apply all of the above extensions.
> > - *
> > +*/
> > +
> > +/**
> > + * struct xe_user_extension - Base class for defining a chain of extensions
> > */
> > struct xe_user_extension {
> > /**
> > @@ -123,7 +151,10 @@ struct xe_user_extension {
> > };
> >
> > /**
> > - * struct drm_xe_ext_set_property - XE set property extension
> > + * struct drm_xe_ext_set_property - Generic set property extension
> > + *
> > + * A generic struct that could allow any of the Xe's IOCTL to be extended
>
> IMO looks better in the present tense: s/that could allow/that allows/
>
>
> other than these nits,
>
>
> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
I will fix them, thanks.
Francois
>
> thanks
> Lucas De Marchi
>
> > + * with a set_property operation.
> > */
> > struct drm_xe_ext_set_property {
> > /** @base: base user extension */
> > @@ -294,7 +325,7 @@ struct drm_xe_mem_region {
> > * here will always be zero).
> > */
> > __u64 cpu_visible_used;
> > - /** @reserved: MBZ */
> > + /** @reserved: Reserved */
> > __u64 reserved[6];
> > };
> >
> > @@ -1051,8 +1082,8 @@ struct drm_xe_sync {
> > __u32 handle;
> >
> > /**
> > - * @addr: Address of user fence. When sync passed in via exec
> > - * IOCTL this a GPU address in the VM. When sync passed in via
> > + * @addr: Address of user fence. When sync is passed in via exec
> > + * IOCTL this is a GPU address in the VM. When sync passed in via
> > * VM bind IOCTL this is a user pointer. In either case, it is
> > * the users responsibility that this address is present and
> > * mapped when the user fence is signalled. Must be qword
> > @@ -1061,7 +1092,10 @@ struct drm_xe_sync {
> > __u64 addr;
> > };
> >
> > - /** @timeline_value: Timeline point of the sync object */
> > + /**
> > + * @timeline_value: Input for the timeline sync object. Needs to be
> > + * different than 0 when used with %DRM_XE_SYNC_FLAG_TIMELINE_SYNCOBJ.
> > + */
> > __u64 timeline_value;
> >
> > /** @reserved: Reserved */
> > --
> > 2.34.1
> >
next prev parent reply other threads:[~2023-12-14 19:40 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-07 13:49 [PATCH v1 00/14] uAPI Alignment - Documentation Francois Dugast
2023-12-07 13:49 ` [PATCH v1 01/14] drm/xe/uapi: Add a comment to each struct Francois Dugast
2023-12-14 14:17 ` Rodrigo Vivi
2023-12-07 13:49 ` [PATCH v1 02/14] drm/xe/uapi: Add missing documentation for struct members Francois Dugast
2023-12-14 14:17 ` Rodrigo Vivi
2023-12-07 13:49 ` [PATCH v1 03/14] drm/xe/uapi: Document use of size in drm_xe_device_query Francois Dugast
2023-12-13 18:16 ` Rodrigo Vivi
2023-12-07 13:49 ` [PATCH v1 04/14] drm/xe/uapi: Document drm_xe_query_config keys Francois Dugast
2023-12-13 18:14 ` Rodrigo Vivi
2023-12-07 13:50 ` [PATCH v1 05/14] drm/xe/uapi: Document DRM_XE_DEVICE_QUERY_HWCONFIG Francois Dugast
2023-12-13 18:14 ` Rodrigo Vivi
2023-12-07 13:50 ` [PATCH v1 06/14] drm/xe/uapi: Make constant comments visible in kernel doc Francois Dugast
2023-12-13 18:16 ` Rodrigo Vivi
2023-12-07 13:50 ` [PATCH v1 07/14] drm/xe/uapi: Replace BO with GEM in documentation Francois Dugast
2023-12-07 14:49 ` Matthew Auld
2023-12-13 18:27 ` Rodrigo Vivi
2023-12-07 13:50 ` [PATCH v1 08/14] drm/xe/uapi: Order sections Francois Dugast
2023-12-14 20:57 ` Lucas De Marchi
2023-12-15 4:06 ` Aravind Iddamsetty
2023-12-07 13:50 ` [PATCH v1 09/14] drm/xe/uapi: More uAPI documentation additions and cosmetic updates Francois Dugast
2023-12-14 16:45 ` Lucas De Marchi
2023-12-14 19:40 ` Francois Dugast [this message]
2023-12-07 13:50 ` [PATCH v1 10/14] drm/xe/uapi: Document the memory_region bitmask Francois Dugast
2023-12-14 21:23 ` Lucas De Marchi
2023-12-07 13:50 ` [PATCH v1 11/14] drm/xe/uapi: Add block diagram of a device Francois Dugast
2023-12-07 14:01 ` Souza, Jose
2023-12-07 13:50 ` [PATCH v1 12/14] drm/xe/uapi: Add examples of user space code Francois Dugast
2023-12-13 18:26 ` Rodrigo Vivi
2023-12-07 13:50 ` [PATCH v1 13/14] drm/xe/uapi: Move CPU_CACHING defines before doc Francois Dugast
2023-12-13 18:18 ` Rodrigo Vivi
2023-12-07 13:50 ` [PATCH v1 14/14] drm/xe/uapi: Move DRM_XE_ACC_GRANULARITY_* where they are used Francois Dugast
2023-12-13 18:17 ` Rodrigo Vivi
2023-12-07 16:42 ` ✓ CI.Patch_applied: success for uAPI Alignment - Documentation Patchwork
2023-12-07 16:42 ` ✗ CI.checkpatch: warning " Patchwork
2023-12-07 16:44 ` ✓ CI.KUnit: success " Patchwork
2023-12-07 16:51 ` ✓ CI.Build: " Patchwork
2023-12-07 16:51 ` ✓ CI.Hooks: " Patchwork
2023-12-07 16:53 ` ✓ CI.checksparse: " Patchwork
2023-12-07 17:28 ` ✓ CI.BAT: " Patchwork
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=ZXtaNdOtc_ix1HoW@fdugast-desk.home \
--to=francois.dugast@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--cc=rodrigo.vivi@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