From: Alyssa Rosenzweig <alyssa@rosenzweig.io>
To: Rob Clark <robdclark@gmail.com>
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>,
"Janne Grunau" <j@jannau.net>, "Sven Peter" <sven@svenpeter.dev>,
"Jonathan Corbet" <corbet@lwn.net>,
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>
Subject: Re: [PATCH] drm: Add UAPI for the Asahi driver
Date: Tue, 11 Mar 2025 08:46:30 -0400 [thread overview]
Message-ID: <Z9Awpj5Avh0rx_fq@blossom> (raw)
In-Reply-To: <CAF6AEGukrBzwwdDWX5jUXDKqj7+kn7LBRy6NocE4=bw1D9WjcQ@mail.gmail.com>
> > +/**
> > + * struct drm_asahi_gem_bind - Arguments passed to
> > + * DRM_IOCTL_ASAHI_GEM_BIND
> > + */
> > +struct drm_asahi_gem_bind {
> > + /** @op: Bind operation (enum drm_asahi_bind_op) */
> > + __u32 op;
> > +
> > + /** @flags: One or more of ASAHI_BIND_* (BIND only) */
> > + __u32 flags;
> > +
> > + /** @handle: GEM object to bind/unbind (BIND or UNBIND_ALL) */
> > + __u32 handle;
> > +
> > + /** @vm_id: The ID of the VM to operate on */
> > + __u32 vm_id;
> > +
> > + /** @offset: Offset into the object (BIND only) */
> > + __u64 offset;
> > +
> > + /**
> > + * @range: Number of bytes to bind/unbind to addr (BIND or UNBIND only)
> > + */
> > + __u64 range;
> > +
> > + /** @addr: Address to bind to (BIND or UNBIND only) */
> > + __u64 addr;
> > +};
>
> No in/out syncobj/fences? This seems to diverge from xe/nouveau/panthor..
Async vm_bind is useful mainly as an optimization, it's not (as far as I
know) required for correctness - you can always wait/signal from a
userspace submit thread with sync vm_bind. It's my understanding (from
when I chatted with Faith about this when bringing up sparse) that this
is how sparse was implemented historically and maybe still is on
Windows?
> > +/**
> > + * enum drm_asahi_sync_type - Sync item type
> > + */
> > +enum drm_asahi_sync_type {
> > + /** @DRM_ASAHI_SYNC_SYNCOBJ: Binary sync object */
> > + DRM_ASAHI_SYNC_SYNCOBJ = 0,
> > +
> > + /** @DRM_ASAHI_SYNC_TIMELINE_SYNCOBJ: Timeline sync object */
> > + DRM_ASAHI_SYNC_TIMELINE_SYNCOBJ = 1,
> > +};
>
> IMHO it would still be worthwhile to also support fence fd's, since it
> would avoid a couple extra ioctls to convert btwn fence fds and
> syncobj for virtgpu native context..
Ditto for this as an optimization. Both of these can be added in a
straightforward backwards-compat way later, so I'm inclined to not add
any extra functionality beyond what we already have (and know works),
rather than commit prematurely to new features and risk getting
something wrong.
(and then it means more rust bindings...)
prev parent reply other threads:[~2025-03-11 12:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-10 14:14 [PATCH] drm: Add UAPI for the Asahi driver Alyssa Rosenzweig
2025-03-10 21:12 ` Rob Clark
2025-03-11 12:46 ` Alyssa Rosenzweig [this message]
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=Z9Awpj5Avh0rx_fq@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=robdclark@gmail.com \
--cc=rust-for-linux@vger.kernel.org \
--cc=simona@ffwll.ch \
--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).