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 2E01EEFCD99 for ; Mon, 9 Mar 2026 11:07:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 82D0910E4D4; Mon, 9 Mar 2026 11:07:03 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=collabora.com header.i=@collabora.com header.b="Q5SYe+lw"; dkim-atps=neutral Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3728710E4D3 for ; Mon, 9 Mar 2026 11:07:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1773054420; bh=6qSBAgBZLKbkJx6qoZHtP98jrFNMgxjkOVsGUm65f4Y=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Q5SYe+lwO747SpISzNopS8QyceTS1Uvm9HosP5SKaiOHUWi5DMILYfvKM1gxGH4lU zABALNpLi9qG1+7Wcx3jnnXxzifIqXqsuFsJfgmh1MQaNUlHRrkVWVhYJuCKtvEk18 Rc3dT8JC5WtPVRKv4lyqRAbrENgoGHVULdV97rdE3zZRhfkSOY7Pt7prA/6Tlsx8u/ tqa+smbQEZD0DWvDQyd0yC0ehYjcMfNINgUDGQpDEQA76ljaRQlrhqpBReYNwhv2uA S6KYkuBcTvb5LamEIxPmNHWJdsUAQ+i5v3UMbtK7o4yHUlihNqoF5uwuHe6pGOPeog 2NtGKH4QVvIPw== 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 4B82317E0EFE; Mon, 9 Mar 2026 12:07:00 +0100 (CET) Date: Mon, 9 Mar 2026 12:06:56 +0100 From: Boris Brezillon To: Christian =?UTF-8?B?S8O2bmln?= Cc: Steven Price , Liviu Dudau , =?UTF-8?B?QWRyacOhbg==?= Larumbe , dri-devel@lists.freedesktop.org, kernel@collabora.com, Nicolas Frattaroli , Tvrtko Ursulin , Philipp Stanner Subject: Re: [PATCH] drm/panthor: Fix the "done_fence is initialized" detection logic Message-ID: <20260309120656.5821431e@fedora> In-Reply-To: References: <20260309103053.211415-1-boris.brezillon@collabora.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=UTF-8 Content-Transfer-Encoding: quoted-printable 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 Mon, 9 Mar 2026 11:50:16 +0100 Christian K=C3=B6nig wrote: > On 3/9/26 11:30, Boris Brezillon wrote: > > After commit 541c8f2468b9 ("dma-buf: detach fence ops on signal > > v3"), dma_fence::ops =3D=3D NULL can't be used to check if the fence is > > initialized or not. We could turn this into an "is_signaled() || > > ops =3D=3D NULL" test, but that's fragile, since it's still subject to > > dma_fence internal changes. So let's have the "is_initialized" > > state encoded directly in the pointer through the lowest bit which > > is guaranteed to be unused because of the dma_fence alignment > > constraint. =20 >=20 > We added the dma_fence_was_initialized() function exactly for this > use case and fixed all callers. Oh, I somehow missed that helper. Will respin. Thanks!