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.

Alice

Reply via email to