From: Alyssa Rosenzweig <alyssa@rosenzweig.io>
To: Janne Grunau <j@jannau.net>
Cc: "David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <benno.lossin@proton.me>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"Faith Ekstrand" <faith.ekstrand@collabora.com>,
"Sven Peter" <sven@svenpeter.dev>,
"Jonathan Corbet" <corbet@lwn.net>,
"Sergio Lopez Pascual" <slp@sinrega.org>,
"Ryan Houdek" <sonicadvance1@gmail.com>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
rust-for-linux@vger.kernel.org, asahi@lists.linux.dev,
linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org,
"Asahi Lina" <lina@asahilina.net>,
"Simona Vetter" <simona.vetter@ffwll.ch>
Subject: Re: [PATCH v5] drm: Add UAPI for the Asahi driver
Date: Thu, 27 Mar 2025 10:31:37 -0400 [thread overview]
Message-ID: <Z-VhSaE8nopGy0e-@blossom> (raw)
In-Reply-To: <20250327085817.GA341311@robin.jannau.net>
> > +/**
> > + * struct drm_asahi_params_global - Global parameters.
> > + *
> > + * This struct may be queried by drm_asahi_get_params.
> > + */
> > +struct drm_asahi_params_global {
> > + /** @features: Feature bits from drm_asahi_feature */
> > + __u64 features;
> > +
> > + /** @gpu_generation: GPU generation, e.g. 13 for G13G */
> > + __u32 gpu_generation;
> > +
> > + /** @gpu_variant: GPU variant as a character, e.g. 'G' for G13G */
> > + __u32 gpu_variant;
>
> nit: the example can avoid the duplication of 'G' with "e.g. 'C' for
> G13C"
done in v6, thanks.
> > +/**
> > + * struct drm_asahi_get_params - Arguments passed to DRM_IOCTL_ASAHI_GET_PARAMS
> > + */
> > +struct drm_asahi_get_params {
> > + /** @param_group: Parameter group to fetch (MBZ) */
> > + __u32 param_group;
> > +
> > + /** @pad: MBZ */
> > + __u32 pad;
> > +
> > + /** @pointer: User pointer to write parameter struct */
> > + __u64 pointer;
> > +
> > + /** @size: Size of user buffer, max size supported on return */
> > + __u64 size;
>
> The comment is misleading in the case of newer / extended kernel which
> supports a larger size than supplied. You could change it to "size
> written on return" or clarify that the value on return will not exceed
> the input value.
fixed.
> > +struct drm_asahi_vm_create {
> > + /**
> > + * @kernel_start: Start of the kernel-reserved address range. See
> > + * drm_asahi_params_global::vm_kernel_min_size.
> > + *
> > + * Both @kernel_start and @kernel_end must be within the range of
> > + * valid VAs given by drm_asahi_params_global::vm_user_start and
> > + * drm_asahi_params_global::vm_user_end. The size of the kernel range
>
> This reads a little strange. Would it make sense to rename drm_asahi_params_global's
> vm_user_start and vm_user_end to vm_start/vm_end?
Good point, renamed.
> > + /**
> > + * @bind: Union holding the bind request.
> > + *
> > + * This union is named to make the Rust bindings nicer to work with.
> > + */
>
> This comment could use a short justification why this union does not
> defeat extensibility after the initial statement that "structures should
> not contain unions"
Added.
> > + /**
> > + * @syncs: An optional array of drm_asahi_sync. First @in_sync_count
> > + * in-syncs then @out_sync_count out-syncs.
> > + */
> > + __u64 syncs;
>
> Would it make sense to explictly state that this is a pointer?
Done.
> Reviewed-by: Janne Grunau <j@jannau.net>
Thanks!
next prev parent reply other threads:[~2025-03-27 14:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-26 18:16 [PATCH v5] drm: Add UAPI for the Asahi driver Alyssa Rosenzweig
2025-03-27 8:58 ` Janne Grunau
2025-03-27 14:31 ` Alyssa Rosenzweig [this message]
2025-03-27 13:17 ` Neal Gompa
2025-03-27 15:01 ` Alyssa Rosenzweig
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=Z-VhSaE8nopGy0e-@blossom \
--to=alyssa@rosenzweig.io \
--cc=a.hindborg@kernel.org \
--cc=airlied@gmail.com \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=asahi@lists.linux.dev \
--cc=benno.lossin@proton.me \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=corbet@lwn.net \
--cc=dri-devel@lists.freedesktop.org \
--cc=faith.ekstrand@collabora.com \
--cc=gary@garyguo.net \
--cc=j@jannau.net \
--cc=lina@asahilina.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=simona.vetter@ffwll.ch \
--cc=simona@ffwll.ch \
--cc=slp@sinrega.org \
--cc=sonicadvance1@gmail.com \
--cc=sven@svenpeter.dev \
--cc=tmgross@umich.edu \
--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 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).