From: Alice Ryhl <aliceryhl@google.com>
To: Daniel Almeida <daniel.almeida@collabora.com>
Cc: Boris Brezillon <boris.brezillon@collabora.com>,
Deborah Brouwer <deborah.brouwer@collabora.com>,
dri-devel@lists.freedesktop.org, rust-for-linux@vger.kernel.org,
beata.michalska@arm.com, lyude@redhat.com
Subject: Re: [PATCH 07/12] drm/tyr: Add generic slot manager
Date: Sat, 21 Feb 2026 13:40:28 +0000 [thread overview]
Message-ID: <aZm1zL1nA97zur0v@google.com> (raw)
In-Reply-To: <4A56F56B-7366-451E-9B65-09B2EE16075E@collabora.com>
On Sat, Feb 21, 2026 at 09:44:45AM -0300, Daniel Almeida wrote:
>
>
> > On 21 Feb 2026, at 08:17, Alice Ryhl <aliceryhl@google.com> wrote:
> >
> > On Thu, Feb 12, 2026 at 11:11:13AM +0100, Boris Brezillon wrote:
> >>> +type LockedSeat<T, const MAX_SLOTS: usize> = LockedBy<Seat, SlotManager<T, MAX_SLOTS>>;
> >>> +
> >>> +impl<T: SlotOperations, const MAX_SLOTS: usize> Unpin for SlotManager<T, MAX_SLOTS> {}
> >>
> >> Do we really need to explicitly flag this type Unpin? I thought this
> >> was the default if the struct is not pinned (and it's not AFAICT).
> >
> > It may be cleaner to add `#[pin_data]` to the struct and rely on the
> > Unpin impl it generates.
> >
> > In general, the default Unpin implementation is to inherit from the
> > fields. When you add #[pin_data], it's changed to only inherit from
> > fields marked #[pin]. By adding #[pin_data] but not marking any fields
> > #[pin], it will be Unpin unless any of the zero fields marked #[pin] are
> > Unpin, i.e. it will always be Unpin.
>
> Why do we need this if all fields are Unpin?
Its fields are not necessarily Unpin. 'manager' could be any type,
including !Unpin types.
Adding #[pin_data] without marking any fields #[pin] is equivalent to
the explicit impl Unpin the patch has now.
> >>> + // FIXME: Annoying manual copy. The original idea was to not add Copy+Clone to SeatInfo,
> >>> + // so that only slot.rs can change the seat state, but there might be better solutions
> >>> + // to prevent that.
> >>
> >> Okay, I guess we want some inputs from Daniel and/or Alice on that one.
> >
> > You could consider only implementing Clone. That way, copies do not
> > happen unless you do so explicitly. Or add a private method on the type
> > that has the same function as Clone if you do not wish to expose it.
>
> Please check my solution where clone is not needed.
If you do not need to return it from the function, then that's fine too,
of course.
Alice
next prev parent reply other threads:[~2026-02-21 13:40 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-12 1:37 [PATCH 0/12] drm/tyr: firmware loading and MCU boot support Deborah Brouwer
2026-02-12 1:37 ` [PATCH 01/12] drm/tyr: select DRM abstractions in Kconfig Deborah Brouwer
2026-02-12 1:37 ` [PATCH 02/12] drm/tyr: move clock cleanup into Clocks Drop impl Deborah Brouwer
2026-02-12 8:12 ` Boris Brezillon
2026-02-28 0:18 ` Deborah Brouwer
2026-02-20 14:03 ` Daniel Almeida
2026-02-21 9:01 ` Alice Ryhl
2026-02-12 1:37 ` [PATCH 03/12] drm/tyr: rename TyrObject to BoData Deborah Brouwer
2026-02-20 14:04 ` Daniel Almeida
2026-02-21 9:01 ` Alice Ryhl
2026-02-12 1:37 ` [PATCH 04/12] drm/tyr: set DMA mask using GPU physical address Deborah Brouwer
2026-02-12 10:16 ` Boris Brezillon
2026-02-20 14:19 ` Daniel Almeida
2026-02-21 9:03 ` Alice Ryhl
2026-02-12 1:37 ` [PATCH 05/12] drm/tyr: add MMU address space registers Deborah Brouwer
2026-02-12 8:16 ` Boris Brezillon
2026-02-28 0:12 ` Deborah Brouwer
2026-02-20 14:21 ` Daniel Almeida
2026-02-21 9:09 ` Alice Ryhl
2026-02-22 18:13 ` Boris Brezillon
2026-02-28 0:13 ` Deborah Brouwer
2026-02-12 1:37 ` [PATCH 06/12] drm/tyr: add shmem backing for GEM objects Deborah Brouwer
2026-02-12 8:17 ` Boris Brezillon
2026-02-28 0:15 ` Deborah Brouwer
2026-02-20 14:25 ` Daniel Almeida
2026-02-28 0:17 ` Deborah Brouwer
2026-03-02 10:17 ` Boris Brezillon
2026-03-02 17:03 ` Deborah Brouwer
2026-02-12 1:37 ` [PATCH 07/12] drm/tyr: Add generic slot manager Deborah Brouwer
2026-02-12 10:11 ` Boris Brezillon
2026-02-12 10:45 ` Miguel Ojeda
2026-02-20 15:25 ` Daniel Almeida
2026-02-20 16:21 ` Boris Brezillon
2026-02-20 16:55 ` Daniel Almeida
2026-02-22 17:57 ` Boris Brezillon
2026-02-22 18:46 ` Daniel Almeida
2026-02-28 0:28 ` Deborah Brouwer
2026-03-02 10:10 ` Boris Brezillon
2026-02-21 11:16 ` Alice Ryhl
2026-02-21 12:44 ` Daniel Almeida
2026-02-21 13:40 ` Alice Ryhl [this message]
2026-02-21 13:48 ` Daniel Almeida
2026-02-28 0:25 ` Deborah Brouwer
2026-02-12 1:37 ` [PATCH 08/12] drm/tyr: add MMU module Deborah Brouwer
2026-02-12 10:44 ` Boris Brezillon
2026-02-28 0:31 ` Deborah Brouwer
2026-02-12 11:05 ` Boris Brezillon
2026-02-20 15:41 ` Daniel Almeida
2026-02-21 11:17 ` Alice Ryhl
2026-02-20 17:11 ` Daniel Almeida
2026-02-28 0:46 ` Deborah Brouwer
2026-02-21 11:20 ` Alice Ryhl
2026-02-28 0:49 ` Deborah Brouwer
2026-02-12 1:37 ` [PATCH 09/12] drm/tyr: add GPU virtual memory module Deborah Brouwer
2026-02-12 10:54 ` Boris Brezillon
2026-02-28 0:52 ` Deborah Brouwer
2026-02-12 1:37 ` [PATCH 10/12] drm/tyr: add a kernel buffer object Deborah Brouwer
2026-02-12 11:00 ` Boris Brezillon
2026-02-28 1:01 ` Deborah Brouwer
2026-02-12 1:37 ` [PATCH 11/12] drm/tyr: add parser for firmware binary Deborah Brouwer
2026-02-12 1:37 ` [PATCH 12/12] drm/tyr: add firmware loading and MCU boot support Deborah Brouwer
2026-02-21 11:25 ` Alice Ryhl
2026-02-28 1:02 ` Deborah Brouwer
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=aZm1zL1nA97zur0v@google.com \
--to=aliceryhl@google.com \
--cc=beata.michalska@arm.com \
--cc=boris.brezillon@collabora.com \
--cc=daniel.almeida@collabora.com \
--cc=deborah.brouwer@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=lyude@redhat.com \
--cc=rust-for-linux@vger.kernel.org \
/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