From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8511B606A322 for ; Fri, 4 Dec 2026 17:45:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Am6OQl0j Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F104810EB8B; Fri, 4 Dec 2026 17:45:46 +0000 (UTC) Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 89E511130CA for ; Fri, 4 Dec 2026 17:45:40 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 35E35405CD; Fri, 4 Dec 2026 17:45:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 71DDF1F00936; Fri, 4 Dec 2026 17:45:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796406340; bh=aQt5abgyH8WNnDVUlusZCDqKTF9fIIRMqDOH5nNhUV8=; h=Date:Subject:Cc:To:From:References:In-Reply-To; b=Am6OQl0jcH8AXDE0g9PM4SwBppPspKh9FaRGmcqtZL0O1z96LZd6zlG5i7MzZ8kDK ReCc2iVj33KHSo+KGNkWk3ZAcBLrL2C7C7475G/rtbVhDJOVk9WA6q+X1NK1sTXfND 9UXElm3AP52fXwZR1Fn185GwJmYeP5vdS1XzuLqEG6VchkqW/VJc+Rmu3M2Ki/+m71 iPl7uOG0lfCDveUt7sFMw/AXnqLBlBvtiDkvZzMFLPiIkCjQdRsF5UjsYDZqPMEJqN ER5cN8NiQVyIOPXBCUje4o6DZsWkQCDgzVM1StPUqE1p1/qGC7XP4YbDWAb71V4vwx xKMxXcJTJYYlw== X-Archived-By: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 04 Dec 2026 18:45:30 +0100 Message-Id: Subject: Re: [PATCH v6 14/34] gpu: nova-core: mm: add SharedGpuMm Cc: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , To: "Alok Kumar" From: "Danilo Krummrich" References: In-Reply-To: X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "dri-devel" X-Spam-Status: No, score=-6.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Wed Dec 2, 2026 at 9:28 AM CET, Alok Kumar wrote: > +/// A [`GpuMm`] shared between several users, serialized by a mutex. > +#[pin_data] > +pub(crate) struct SharedGpuMm<'gpu> > +where > + // Hide the mutex's invariant resource lifetime so `SharedGpuMm` rem= ains covariant. > + exists<'res>: 'gpu, > +{ > + #[pin] > + #[uses('res: invariant)] > + inner: Mutex>, > +} As mentioned previously this will eventually violated DMA fence rules. Rebasing on latest drm-rust-next, this shouldn't be needed anymore, as I ad= ded more granular locking to the inner fields of GpuMm.