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 0D964E7DEEE for ; Mon, 2 Feb 2026 15:30:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 65A4210E4F8; Mon, 2 Feb 2026 15:30:13 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=collabora.com header.i=@collabora.com header.b="qh+AvGco"; dkim-atps=neutral Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) by gabe.freedesktop.org (Postfix) with ESMTPS id AD7DC10E4F8 for ; Mon, 2 Feb 2026 15:30:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1770046210; bh=NhgHDfuOdnhZ8vjAEapUw39dYzKBpvAT7v6UDxWFAn0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=qh+AvGco/f9rLQHbiNF7UQcW7NqsHLSI6VMBW771EKwBaBvLvNjTipWPEo/SxDSan 1QobQMP9e5IlbN85C9cUbmS85pQsM+h2KvkgY7m7Lp5rOO81jFL8o6Kq0wgAF0/ihI BWQwUY7wDL1YpBkCSMc0XUWDbF4BHRKJ+HdbgyF7MzJvqwDGO4I7MMws+LRyyhtr5t zjPe5uuE4XPcGRNcbgG2aB7tor5+SeCOiIZLV7JbDwdEsgCglvoewI9W8ZaY3Izw1w mQW3VMU4sA9iPKJmjxISYJmQAtHG+5+NgK7+9trwI+R+dCcA7rM7eoJasq2OrqfSk9 +X4pFInywX/0g== Received: from fedora (unknown [IPv6:2a01:e0a:2c:6930:d919:a6e:5ea1:8a9f]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bbrezillon) by bali.collaboradmins.com (Postfix) with ESMTPSA id 4040017E0E4C; Mon, 2 Feb 2026 16:30:09 +0100 (CET) Date: Mon, 2 Feb 2026 16:30:06 +0100 From: Boris Brezillon To: Lyude Paul Cc: dri-devel@lists.freedesktop.org, rust-for-linux@vger.kernel.org, Alice Ryhl , Daniel Almeida , Danilo Krummrich , linux-kernel@vger.kernel.org, Asahi Lina , Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?UTF-8?B?QmrDtnJu?= Roy Baron , Benno Lossin , Andreas Hindborg , Trevor Gross , David Airlie , Simona Vetter , Greg Kroah-Hartman , Asahi Lina , Viresh Kumar , Tamir Duberstein , Shankari Anand Subject: Re: [PATCH v6 5/8] rust: drm: gem: shmem: Add DRM shmem helper abstraction Message-ID: <20260202163006.6f83f44c@fedora> In-Reply-To: <20251202220924.520644-6-lyude@redhat.com> References: <20251202220924.520644-1-lyude@redhat.com> <20251202220924.520644-6-lyude@redhat.com> Organization: Collabora X-Mailer: Claws Mail 4.3.1 (GTK 3.24.51; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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" Hello Lyude, On Tue, 2 Dec 2025 17:03:31 -0500 Lyude Paul wrote: > +#[pin_data] > +pub struct Object { > + #[pin] > + obj: Opaque, > + // Parent object that owns this object's DMA reservation object > + parent_resv_obj: Option>>, > + #[pin] > + inner: T, > +} > + > +super::impl_aref_for_gem_obj!(impl for Object where T: DriverObject); As part of our integration in Tyr, we noticed we'll need Object to be Sync+Send. Given T already has to be Sync+Send (part of the DriverObject trait constraints), it shouldn't be a problem to have Object implement Sync+Send too, since, AFAICT, all the functions in the Object are thread-safe (resv lock held when acting on the underlying BO, either explicitly, or implicitly through the C API). Regards, Boris