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 24862F33A61 for ; Thu, 5 Mar 2026 13:54:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 66D2510E2A6; Thu, 5 Mar 2026 13:54:52 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; secure) header.d=mailbox.org header.i=@mailbox.org header.b="hhAgUByC"; dkim-atps=neutral Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) by gabe.freedesktop.org (Postfix) with ESMTPS id 196BF10E2A6 for ; Thu, 5 Mar 2026 13:54:51 +0000 (UTC) Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4fRWHr1rqqz9tpT; Thu, 5 Mar 2026 14:54:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1772718888; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zpy/QRO8QB2S+XpSMKd1tiHDpKbO5HzSFxH/sg9Lsic=; b=hhAgUByCD4zOe1qa2uI0XwLFkRw43MXIiOa/B/IpT/A4X4TuChbTGSDRZv3/9OwZXE5NEF q1PT0dZ4R/3YAqISxfUGdmNCous/Go2MFcx5+Dmb01fjbvXQS6M1zJNMKiyiRS4oMOSs5/ fq6+bYBTrYAk+NNH7KFEhfTyoiUp8EqCoANOOLiUhjz445wFHWm87bpE39zT9/T4vck2nx hnd/iJ9DYWvm5gVxuFjeRE8Hgium7fzcnYoCNtWf3v/3e9InEtkiPWRWeEFfAt5KZL2UYO MhWAW9t7ltNV0LfjpczBHQcmlOeteYPyKqRI0scF1RP5JUsfJZzxAPrDdRT2Yw== Message-ID: <080395923c92ef758ca6062f1e01392186413015.camel@mailbox.org> Subject: dma_fence: force users to take the lock manually From: Philipp Stanner To: Christian =?ISO-8859-1?Q?K=F6nig?= Cc: dakr@kernel.org, Tvrtko Ursulin , Boris Brezillon , dri-devel Date: Thu, 05 Mar 2026 14:54:44 +0100 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MBO-RS-ID: 71e56e051e5510cc49c X-MBO-RS-META: cxi6zuyodd7eak9b1uruxuzaryw7ckbh 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: , Reply-To: phasta@kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Yo Christian, a while ago we were discussing this problem dma_fence_set_error(f, -ECANCELED); dma_fence_signal(f); // racy! I think you mentioned that you are considering to redesign the dma_fence API so that users have to take the lock themselves to touch the fence: dma_fence_lock(f); dma_fence_set_error(f, -ECANCELED); dma_fence_signal(f); dme_fence_unlock(f); Is that still up to date? Is there work in progress about that? I discovered that I might need / want that for the Rust abstractions. Regards, P.