From: "Danilo Krummrich" <dakr@kernel.org>
To: "Alice Ryhl" <aliceryhl@google.com>
Cc: "Daniel Almeida" <daniel.almeida@collabora.com>,
"Boris Brezillon" <boris.brezillon@collabora.com>,
"Janne Grunau" <j@jannau.net>,
"Matthew Brost" <matthew.brost@intel.com>,
"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
"Lyude Paul" <lyude@redhat.com>,
"Asahi Lina" <lina+kernel@asahilina.net>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
rust-for-linux@vger.kernel.org
Subject: Re: [PATCH v4 3/6] rust: gpuvm: add GpuVm::obtain()
Date: Mon, 23 Feb 2026 11:44:12 +0100 [thread overview]
Message-ID: <DGMA3158PGED.1BQ63TEC2FC60@kernel.org> (raw)
In-Reply-To: <aZwalt_6KlOIDzkN@google.com>
On Mon Feb 23, 2026 at 10:15 AM CET, Alice Ryhl wrote:
> On Sat, Feb 21, 2026 at 04:09:41PM +0100, Danilo Krummrich wrote:
>> On Sat Feb 21, 2026 at 9:46 AM CET, Alice Ryhl wrote:
>> > So, should we get rid of GpuVmBoRegistered in favor of ARef<GpuVm<T>>?
>>
>> I wanted to avoid exposing the reference count, as I suspect drivers might not
>> need it in Rust, but I don't know for sure.
>>
>> We could also define it as GpuVmBo<T>(ARef<GpuVmBoInner<T>>), where
>> GpuVmBoInner<T> is private, but I also don't want you to go back and forth with
>> this in case it turns out we do need drivers to be able to take a reference
>> count and I also don't think it hurts too much exposing the reference count,
>> even if not needed.
>>
>> So, either is fine with me, ARef<GpuVmBo<T>> or
>> GpuVmBo<T>(ARef<GpuVmBoInner<T>>).
>
> I don't think GpuVmBo<T>(ARef<GpuVmBoInner<T>>) works because we need to
> be able to talk about both ARef<GpuVmBoInner<T>> and &GpuVmBoInner<T>.
> The reference type is returned by several different APIs, so the Inner
> type can't be private.
I meant NonNull<GpuVmBoInner<T>>, analogous to the current GpuVmBoRegistered.
next prev parent reply other threads:[~2026-02-23 10:44 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-30 14:24 [PATCH v4 0/6] Rust GPUVM immediate mode Alice Ryhl
2026-01-30 14:24 ` [PATCH v4 1/6] rust: drm: add base GPUVM immediate mode abstraction Alice Ryhl
2026-02-02 15:15 ` Boris Brezillon
2026-02-19 14:36 ` Danilo Krummrich
2026-02-19 14:41 ` Alice Ryhl
2026-02-19 14:55 ` Danilo Krummrich
2026-01-30 14:24 ` [PATCH v4 2/6] rust: helpers: Add bindings/wrappers for dma_resv_lock Alice Ryhl
2026-02-19 14:40 ` Danilo Krummrich
2026-02-19 14:45 ` Alice Ryhl
2026-01-30 14:24 ` [PATCH v4 3/6] rust: gpuvm: add GpuVm::obtain() Alice Ryhl
2026-02-19 19:22 ` Danilo Krummrich
2026-02-20 8:16 ` Alice Ryhl
2026-02-20 16:08 ` Danilo Krummrich
2026-02-21 8:46 ` Alice Ryhl
2026-02-21 15:09 ` Danilo Krummrich
2026-02-23 9:15 ` Alice Ryhl
2026-02-23 10:44 ` Danilo Krummrich [this message]
2026-02-23 11:22 ` Alice Ryhl
2026-02-25 15:46 ` Danilo Krummrich
2026-01-30 14:24 ` [PATCH v4 4/6] rust: gpuvm: add GpuVa struct Alice Ryhl
2026-01-30 14:24 ` [PATCH v4 5/6] rust: gpuvm: add GpuVmCore::sm_unmap() Alice Ryhl
2026-01-30 14:24 ` [PATCH v4 6/6] rust: gpuvm: add GpuVmCore::sm_map() Alice Ryhl
2026-02-06 20:17 ` Deborah Brouwer
2026-02-09 8:17 ` Alice Ryhl
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=DGMA3158PGED.1BQ63TEC2FC60@kernel.org \
--to=dakr@kernel.org \
--cc=aliceryhl@google.com \
--cc=boris.brezillon@collabora.com \
--cc=daniel.almeida@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=j@jannau.net \
--cc=lina+kernel@asahilina.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lyude@redhat.com \
--cc=matthew.brost@intel.com \
--cc=rust-for-linux@vger.kernel.org \
--cc=thomas.hellstrom@linux.intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.