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 BE541C61DD3 for ; Tue, 1 Sep 2026 07:14:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2E59E10EB68; Tue, 1 Sep 2026 07:14:48 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="SkotNaaa"; dkim-atps=neutral Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 65EC910EB68 for ; Tue, 1 Sep 2026 07:14:47 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 23FB240F14; Tue, 1 Sep 2026 07:14:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 751661F000E9; Tue, 1 Sep 2026 07:14:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1788246887; bh=csvN5GSqwoccEzKPLJkQqPjKtkOmR9U06eZT6ErQyno=; h=Date:Subject:Cc:To:From:References:In-Reply-To; b=SkotNaaaR58M5GRfj8W3joxlrYWoUOec3KjnFycxmTzbeH0IzA/8+4YSw4Fr/vlaN j8I51KXUrLjCNXGgqGUTdjVlScFozM5/06gzTGtCGspWqHRHIVGyRY3vs54KmjzEiE LJsRkGsX+fYp854p7fbuGS6RtO9b3p3HO51PQvSywttTkV6QQAds8VdtThP9AylczH 5n/gluFvhwLVydSSVGePyQjGzFXTpFfZzBaE/G3vYizze5aN7qxZbFPOGuKWBtfZ9r TG4eeCVQhnR71k2YI7IpAFIvAA7u41MzHBBXmc067qBrqGb5uHi1nkg1L+3BQSt3Yh nfXU8Cc0k0BBg== Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 01 Sep 2026 09:14:42 +0200 Message-Id: Subject: Re: [PATCH v5 01/11] gpu: nova-core: Add public driver API to nova-core Cc: "Gary Guo" , "nova-gpu" , "M Henning" , "Alice Ryhl" , "David Airlie" , "Alexandre Courbot" , "Benno Lossin" , "Eliot Courtney" , "John Hubbard" , , , To: "Alistair Popple" From: "Danilo Krummrich" References: <20260828033531.1117754-1-apopple@nvidia.com> <20260828033531.1117754-2-apopple@nvidia.com> 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-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Tue Sep 1, 2026 at 9:07 AM CEST, Alistair Popple wrote: > On 2026-09-01 at 06:42 +1000, Gary Guo wrote... >> On Mon Aug 31, 2026 at 9:08 PM BST, Danilo Krummrich wrote: >> > On Fri Aug 28, 2026 at 5:35 AM CEST, Alistair Popple wrote: >> >> +/// API handle for the auxiliary bus child drivers to interact with = nova-core. >> >> +pub struct NovaCoreApi<'bound> { >> >> + #[expect(unused)] >> >> + pub(crate) gpu: Pin<&'bound Gpu<'bound>>, >> >> +} >> >> + >> >> +impl NovaCoreApi<'_> { >> >> + /// Obtain a [`NovaCoreApi`] handle from an auxiliary device reg= istered >> >> + /// by nova-core. >> >> + pub fn of(adev: &auxiliary::Device) -> Result>> { >> >> + adev.registration_data::)>() >> >> + } >> >> +} >> > >> > CovariantForLt does not hold anymore on latest drm-rust-next, as Cmdq = has a >> > Mutex. So, this needs ForLt now and therefore the approach that I shar= ed in [1] >> > a while ago. I applied the changes in [2] to fix it up. > > I can see why the mutex means covariance no longer holds, but I would kin= d > of also expect it to not compile given it surely can't be safe here to tr= eat > an invariant type as covariant. Is this just a limitation of the current > CovariantForLt implementation not being able to prove covariance or am I = missing > something else? Thanks. Well, it did not compile (as expected) on my end, which is how I caught it. What's your base revision?