[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aCHocJFyqSXU6Aam@pollux>
Date: Mon, 12 May 2025 14:24:16 +0200
From: Danilo Krummrich <dakr@...nel.org>
To: Lyude Paul <lyude@...hat.com>
Cc: dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
rust-for-linux@...r.kernel.org,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>,
Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <benno.lossin@...ton.me>,
Andreas Hindborg <a.hindborg@...nel.org>,
Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
Alyssa Rosenzweig <alyssa@...enzweig.io>,
Asahi Lina <lina@...hilina.net>
Subject: Re: [PATCH 4/4] rust: drm: gem: Implement AlwaysRefCounted for all
gem objects automatically
On Thu, May 01, 2025 at 02:33:19PM -0400, Lyude Paul wrote:
> Currently we are requiring AlwaysRefCounted in most trait bounds for gem
> objects, and implementing it by hand for our only current type of gem
> object. However, all gem objects use the same functions for reference
> counting - and all gem objects support reference counting.
>
> We're planning on adding support for shmem gem objects, let's move this
> around a bit by instead making IntoGEMObject require AlwaysRefCounted as a
> trait bound, and then provide a blanket AlwaysRefCounted implementation for
> any object that implements IntoGEMObject so all gem object types can use
> the same AlwaysRefCounted implementation. This also makes things less
> verbose by making the AlwaysRefCounted trait bound implicit for any
> IntoGEMObject bound.
>
> Signed-off-by: Lyude Paul <lyude@...hat.com>
Great idea!
Reviewed-by: Danilo Krummrich <dakr@...nel.org>
Powered by blists - more mailing lists