From: Thierry Reding <thierry.reding@gmail.com>
To: Dmitry Osipenko <digetx@gmail.com>
Cc: linux-tegra@vger.kernel.org, dri-devel@lists.freedesktop.org,
Mikko Perttunen <mperttunen@nvidia.com>
Subject: Re: [PATCH 7/7] drm/tegra: Add kerneldoc for UAPI
Date: Sat, 19 May 2018 00:01:27 +0200 [thread overview]
Message-ID: <20180518220127.GB28123@ulmo> (raw)
In-Reply-To: <f9ee428a-aff5-f95b-8877-33ee3d452555@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 3762 bytes --]
On Sat, May 19, 2018 at 12:07:15AM +0300, Dmitry Osipenko wrote:
> On 18.05.2018 23:12, Thierry Reding wrote:
> > On Fri, May 18, 2018 at 08:19:55PM +0300, Dmitry Osipenko wrote:
> >> On 17.05.2018 18:41, Thierry Reding wrote:
> >>> From: Thierry Reding <treding@nvidia.com>
> >>>
> >>> Document the userspace ABI with kerneldoc to provide some information on
> >>> how to use it.
> >>>
> >>> Signed-off-by: Thierry Reding <treding@nvidia.com>
> >>> ---
> >>> drivers/gpu/drm/tegra/gem.c | 4 +-
> >>> include/uapi/drm/tegra_drm.h | 480 ++++++++++++++++++++++++++++++++++-
> >>> 2 files changed, 468 insertions(+), 16 deletions(-)
> >>>
> >>> diff --git a/drivers/gpu/drm/tegra/gem.c b/drivers/gpu/drm/tegra/gem.c
> >>> index 387ba1dfbe0d..e2987a19541d 100644
> >>> --- a/drivers/gpu/drm/tegra/gem.c
> >>> +++ b/drivers/gpu/drm/tegra/gem.c
> >>> @@ -291,10 +291,10 @@ struct tegra_bo *tegra_bo_create(struct drm_device *drm, size_t size,
> >>> if (err < 0)
> >>> goto release;
> >>>
> >>> - if (flags & DRM_TEGRA_GEM_CREATE_TILED)
> >>> + if (flags & DRM_TEGRA_GEM_TILED)
> >>> bo->tiling.mode = TEGRA_BO_TILING_MODE_TILED;
> >>>
> >>> - if (flags & DRM_TEGRA_GEM_CREATE_BOTTOM_UP)
> >>> + if (flags & DRM_TEGRA_GEM_BOTTOM_UP)
> >>> bo->flags |= TEGRA_BO_BOTTOM_UP;
> >>>
> >>> return bo;
> >>> diff --git a/include/uapi/drm/tegra_drm.h b/include/uapi/drm/tegra_drm.h
> >>> index 99e15d82d1e9..86a7b1e7559d 100644
> >>> --- a/include/uapi/drm/tegra_drm.h
> >>> +++ b/include/uapi/drm/tegra_drm.h
> >>> @@ -29,146 +29,598 @@
> >>> extern "C" {
> >>> #endif
> >>>
> >>> -#define DRM_TEGRA_GEM_CREATE_TILED (1 << 0)
> >>> -#define DRM_TEGRA_GEM_CREATE_BOTTOM_UP (1 << 1)
> >>> +#define DRM_TEGRA_GEM_TILED (1 << 0)
> >>> +#define DRM_TEGRA_GEM_BOTTOM_UP (1 << 1)
> >>> +#define DRM_TEGRA_GEM_FLAGS (DRM_TEGRA_GEM_TILED | \
> >>> + DRM_TEGRA_GEM_BOTTOM_UP)
> >>
> >> The current userspace won't compile with the above changes, so this is the ABI
> >> breakage. Please keep the old DRM_TEGRA_GEM_CREATE_* DRM_TEGRA_GEM_* flags for now.
> >
> > It looks like I fumbled this during a rebase and didn't catch it. I've
> > left the original flags in.
> >
> > [...]
> >>> +/**
> >>> + * struct drm_tegra_syncpt_read - parameters for the read syncpoint IOCTL
> >>> + */
> >>> struct drm_tegra_syncpt_read {
> >>> + /**
> >>> + * @id:
> >>> + *
> >>> + * ID of the syncpoint to read the current value from.
> >>> + */
> >>> __u32 id;
> >>> +
> >>> + /**
> >>> + * @value:
> >>> + *
> >>> + * Return location for the current syncpoint value.
> >>> + */> __u32 value;
> >>> };
> >>
> >> What about:
> >>
> >> Returned value of the given syncpoint.
> >>
> >> Could we replace "return location for the.." with just "Returned.." in other
> >> places too? My mind is stuttering while reading "location for the value", though
> >> I know that my english isn't ideal and maybe it's only me.
> >
> > How about something a little more explicit, like:
> >
> > The current value of the syncpoint. Will be set by the kernel
> > upon successful completion of the IOCTL.
> >
> > ?
>
> That's better.
>
> Maybe we could also use format like this:
>
> /**
> * struct drm_tegra_syncpt_read - parameters for the read syncpoint IOCTL
> * @id: ID of the syncpoint to read the current value from.
> * @value: Return current value of the syncpoint.
> */
> struct drm_tegra_syncpt_read {
> __u32 id;
> __u32 value;
> };
The per-field description blocks are preferred in the DRM subsystem. I
think primarily this is to decrease the chances of anyone forgetting to
update the documentation when the code changes.
Thierry
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2018-05-18 22:01 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-17 15:41 [PATCH 0/7] drm/tegra: Preparation work for destaging ABI Thierry Reding
2018-05-17 15:41 ` [PATCH 1/7] drm/tegra: Use proper arguments for DRM_TEGRA_CLOSE_CHANNEL IOCTL Thierry Reding
2018-05-18 16:00 ` Dmitry Osipenko
2018-05-17 15:41 ` [PATCH 2/7] drm/tegra: gem: Fill in missing export info Thierry Reding
2018-05-18 16:00 ` Dmitry Osipenko
2018-05-17 15:41 ` [PATCH 3/7] drm/tegra: dc: Support rotation property Thierry Reding
2018-05-18 17:37 ` Dmitry Osipenko
2018-05-17 15:41 ` [PATCH 4/7] drm/tegra: gr2d: Track interface version Thierry Reding
2018-05-18 16:05 ` Dmitry Osipenko
2018-05-17 15:41 ` [PATCH 5/7] drm/tegra: gr3d: " Thierry Reding
2018-05-18 16:02 ` Dmitry Osipenko
2018-05-17 15:41 ` [PATCH 6/7] drm/tegra: vic: " Thierry Reding
2018-05-18 16:05 ` Dmitry Osipenko
2018-05-17 15:41 ` [PATCH 7/7] drm/tegra: Add kerneldoc for UAPI Thierry Reding
2018-05-18 17:19 ` Dmitry Osipenko
2018-05-18 20:12 ` Thierry Reding
2018-05-18 21:07 ` Dmitry Osipenko
2018-05-18 22:01 ` Thierry Reding [this message]
2018-05-18 20:33 ` [PATCH v2] " Thierry Reding
2018-05-18 21:42 ` Dmitry Osipenko
2018-05-18 21:58 ` Thierry Reding
2018-05-18 22:13 ` Thierry Reding
2018-05-18 22:18 ` Dmitry Osipenko
2018-05-18 22:24 ` Thierry Reding
2018-05-18 22:28 ` Dmitry Osipenko
2018-05-18 22:35 ` Thierry Reding
2018-05-18 22:45 ` Dmitry Osipenko
2018-05-23 8:59 ` Daniel Vetter
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=20180518220127.GB28123@ulmo \
--to=thierry.reding@gmail.com \
--cc=digetx@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mperttunen@nvidia.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).