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 B4FFCCCF9E3 for ; Thu, 23 Oct 2025 04:08:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5448110E86B; Thu, 23 Oct 2025 04:08:07 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="CrXwoi6V"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id EC6C610E862; Thu, 23 Oct 2025 04:08:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1761192487; x=1792728487; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=qaT/VNQxudExoPscMa23VNSVGHqIjN1AVKwRGyRdHTQ=; b=CrXwoi6VRTyKg/TK4BrlBaxdl1vyENoIqeriRpVYaucYlutXvQaKuLbu 5aEbtGR9wp16mM3YENE3PEuerujcEvVgDAWTq+TRNJUe6iAXqNz7GxUyO PMQ1DtNcaCMPQxT1buFLfgNp3juSHdJS87r3Q6N2yWcSemup/76jWpkP1 cn3GNjEDJcYljXcV9HbwwwS+hvUl2Fg7ILUW21glK0K+v+1KUhqWT7FZZ IpnwMtNwLjWiCmLRZ7VdMGPWeuALZGjZFwYA+Lzz+vP3HG7pjpu7k+UTZ xebqIL4Zh2gGOSheXfg9hq0FNcZ7snIFUcysdW13MRFwdZpULRWD5QqNi A==; X-CSE-ConnectionGUID: wKDyABw+QLqr5hfujfjSAA== X-CSE-MsgGUID: 3uMQNzCkTqm/3TpRnjceqg== X-IronPort-AV: E=McAfee;i="6800,10657,11586"; a="63391285" X-IronPort-AV: E=Sophos;i="6.19,248,1754982000"; d="scan'208";a="63391285" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Oct 2025 21:08:05 -0700 X-CSE-ConnectionGUID: RdcfLzJ7RHaBY1DHKoriAg== X-CSE-MsgGUID: 2Mp+bvjqSTSKtTx3BpN7JA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.19,248,1754982000"; d="scan'208";a="189175756" Received: from lstrano-desk.jf.intel.com ([10.54.39.91]) by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Oct 2025 21:08:05 -0700 From: Matthew Brost To: intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org Cc: christian.koenig@amd.com Subject: [RFC PATCH 08/14] dma-buf: use inline lock for the dma-fence-chain Date: Wed, 22 Oct 2025 21:07:54 -0700 Message-Id: <20251023040800.970283-9-matthew.brost@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20251023040800.970283-1-matthew.brost@intel.com> References: <20251023040800.970283-1-matthew.brost@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" From: Christian König Just as proof of concept and minor cleanup. Signed-off-by: Christian König --- drivers/dma-buf/dma-fence-chain.c | 3 +-- include/linux/dma-fence-chain.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/dma-buf/dma-fence-chain.c b/drivers/dma-buf/dma-fence-chain.c index a8a90acf4f34..a707792b6025 100644 --- a/drivers/dma-buf/dma-fence-chain.c +++ b/drivers/dma-buf/dma-fence-chain.c @@ -245,7 +245,6 @@ void dma_fence_chain_init(struct dma_fence_chain *chain, struct dma_fence_chain *prev_chain = to_dma_fence_chain(prev); uint64_t context; - spin_lock_init(&chain->lock); rcu_assign_pointer(chain->prev, prev); chain->fence = fence; chain->prev_seqno = 0; @@ -261,7 +260,7 @@ void dma_fence_chain_init(struct dma_fence_chain *chain, seqno = max(prev->seqno, seqno); } - dma_fence_init64(&chain->base, &dma_fence_chain_ops, &chain->lock, + dma_fence_init64(&chain->base, &dma_fence_chain_ops, NULL, context, seqno); /* diff --git a/include/linux/dma-fence-chain.h b/include/linux/dma-fence-chain.h index 68c3c1e41014..d39ce7a2e599 100644 --- a/include/linux/dma-fence-chain.h +++ b/include/linux/dma-fence-chain.h @@ -46,7 +46,6 @@ struct dma_fence_chain { */ struct irq_work work; }; - spinlock_t lock; }; -- 2.34.1