From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0CBBDE98E10 for ; Mon, 23 Feb 2026 09:15:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 216FF10E2A8; Mon, 23 Feb 2026 09:15:07 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="Zxavyl+L"; dkim-atps=neutral Received: from mail-wm1-f74.google.com (mail-wm1-f74.google.com [209.85.128.74]) by gabe.freedesktop.org (Postfix) with ESMTPS id 69ABA10E29C for ; Mon, 23 Feb 2026 09:15:05 +0000 (UTC) Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-482d8e6e13aso34579235e9.3 for ; Mon, 23 Feb 2026 01:15:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1771838104; x=1772442904; darn=lists.freedesktop.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=vOcHT801aqXoK3tA38lkJBGJrXjsRTU5HQwu+hWqDEo=; b=Zxavyl+LUAZzRXbj3lZaIqvnZSNSYZw7/W+4JSenoqCfqZ8gDEcMhsNVxVV39+h23V 3IeEBINtClu4fhYSSi5O1BrS5pSsBQJoHRmjf343mFmTLMww8ORU9ZlVKhraZnC1GoJy zEu1lgXLiUaPnzZ/2c+9dq4D1ZKN1BSyN2NziTRaZDvOq7YAyJrkplI91UMEIwuSlx4u M3WI16tsqk1l1T3+G9RtJ1ah2vsbpfCdDCN4mRHjRZPIo/x6r58u596UJuoexjN2wsuk VKykWhc5rSSfOSD2TUa5gWhSqmO615ZLYFFO774zQjnv9ZJXCBhM/uwmEFmOjSuEFpkT 95MA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771838104; x=1772442904; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=vOcHT801aqXoK3tA38lkJBGJrXjsRTU5HQwu+hWqDEo=; b=e3RA5rt/e7zlXIA1vLNyigIwuUKqmr/WqQ30i5YEEoxMa42vsqRXP9LyR8BpZvX619 llWiOiKiUJNyjy4jyhKFXFf7MpIavitBw0LqNVYuFK7uS37yG0t7DpDsCRDF2ycbwwpw x9SiEvQBlB9XPd2Lq/0gundlhadCPw0FAQlLwYS0KTh20MVkl+AtCGOpIu9rZBmEF4kv Vvm2d54Du7Yh3qfmK1M3FqZvA3l49jDyc9zz8lgHi2bhFpeyFka0VPui357AJz8LmLWb 6Xxq+D0HDhmRT35oLo8Y0F/Mktict2I8K0oToX7q1Cp8HN9w4q/LivreFtH1mRll14M4 TmpQ== X-Forwarded-Encrypted: i=1; AJvYcCXiC1PmezkXVbAYlkyDcopPEUqkpqq3gaJOgOk17Xl7yRKbAOqxwXNBD7XZzu88l0juL1iYLF3QYuc=@lists.freedesktop.org X-Gm-Message-State: AOJu0YwZ70ES/b7scNXCXTJAY4ghCgBWeM7+FbWHahugfN/wc0UMjrWI sJQfoDudC2UYe5UXLHUmH+iKzQrX+tkITGaXRiFkINI6pzwrJnESbUkiWbB2yNxbJX2G0MHqVgy 0bbNmXK/SaW0rHsz3xQ== X-Received: from wmqa20.prod.google.com ([2002:a05:600c:3494:b0:483:1069:2eb4]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:8206:b0:483:75f1:54f with SMTP id 5b1f17b1804b1-483a95f8a84mr142893835e9.31.1771838103699; Mon, 23 Feb 2026 01:15:03 -0800 (PST) Date: Mon, 23 Feb 2026 09:15:02 +0000 In-Reply-To: Mime-Version: 1.0 References: <20260130-gpuvm-rust-v4-0-8364d104ff40@google.com> <20260130-gpuvm-rust-v4-3-8364d104ff40@google.com> Message-ID: Subject: Re: [PATCH v4 3/6] rust: gpuvm: add GpuVm::obtain() From: Alice Ryhl To: Danilo Krummrich Cc: Daniel Almeida , Boris Brezillon , Janne Grunau , Matthew Brost , "Thomas =?utf-8?Q?Hellstr=C3=B6m?=" , Lyude Paul , Asahi Lina , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org Content-Type: text/plain; charset="utf-8" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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>? > > 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(ARef>), where > GpuVmBoInner 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> or > GpuVmBo(ARef>). I don't think GpuVmBo(ARef>) works because we need to be able to talk about both ARef> and &GpuVmBoInner. The reference type is returned by several different APIs, so the Inner type can't be private. Alice