[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <DBQYV65GPE9H.34LFC8IDBDIWQ@kernel.org>
Date: Fri, 01 Aug 2025 11:00:12 +0200
From: "Benno Lossin" <lossin@...nel.org>
To: "Danilo Krummrich" <dakr@...nel.org>
Cc: <lorenzo.stoakes@...cle.com>, <vbabka@...e.cz>,
<Liam.Howlett@...cle.com>, <urezki@...il.com>, <ojeda@...nel.org>,
<alex.gaynor@...il.com>, <boqun.feng@...il.com>, <gary@...yguo.net>,
<bjorn3_gh@...tonmail.com>, <a.hindborg@...nel.org>,
<aliceryhl@...gle.com>, <tmgross@...ch.edu>,
<maarten.lankhorst@...ux.intel.com>, <mripard@...nel.org>,
<tzimmermann@...e.de>, <airlied@...il.com>, <simona@...ll.ch>,
<rust-for-linux@...r.kernel.org>, <dri-devel@...ts.freedesktop.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/4] rust: drm: remove pin annotations from drm::Device
On Fri Aug 1, 2025 at 10:21 AM CEST, Danilo Krummrich wrote:
> On Thu Jul 31, 2025 at 8:54 PM CEST, Benno Lossin wrote:
>> On Thu Jul 31, 2025 at 5:48 PM CEST, Danilo Krummrich wrote:
>>> #[repr(C)]
>>> -#[pin_data]
>>> pub struct Device<T: drm::Driver> {
>>> dev: Opaque<bindings::drm_device>,
>>> - #[pin]
>>> data: T::Data,
>>
>> Looking at this code again, I also noticed that it was wrong before this
>> patch: `Device<T>` implemented `Unpin` if `T::Data` did which is most
>> likely wrong (or is `drm_device` not address sensitive?).
>
> It is, but as mentioned above a drm::Device only ever exists as
> ARef<drm::Device>.
Yeah the `Unpin` thing isn't a problem for `ARef`, but we are
theoretically allowed to implement moving out of an `ARef` (given that
it is unique) when the type is `Unpin`.
Thanks for confirming.
---
Cheers,
Benno
Powered by blists - more mailing lists