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 7D358CA0EFF for ; Thu, 21 Aug 2025 11:47:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D455110E94C; Thu, 21 Aug 2025 11:46:59 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="JensetTB"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id AE77F10E94C; Thu, 21 Aug 2025 11:46:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1755776819; x=1787312819; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=iX+aI4EV6aIpB48ENfwpl4TWhZJPqVgs0W+CzzXlU1w=; b=JensetTBRP24duAayxbWJnRlj7ZQGjnu17jtS0bKAbY2Eq7NbOaBl8ZA cpCpmptVy2YBIOLjcNpveZNlbKBzWso92PITCltAPQXk4G25qyiCD2I6g I/PfK6w47i8tGtOrSoFKl82fKe978DA1/HeYpxea3xncy0eYQOwTOO3f1 fDatM7y5snmeQXZ4QuoBhjsSQYEbsC8xZlUDwOI5kvec9FqhhDqBu2Kay iuoOX5OV/92YGJMcAJqH8rz9LXUAVuahEWa294f1P8mnNmKJSKht6jh2J TAdO0lfN2UdBxXBTn7wha/AqityTOdcuAINmjqQFn/nD+T8l9cCSV3AvK w==; X-CSE-ConnectionGUID: PSG2eW/iScuCoTZdU4zDBg== X-CSE-MsgGUID: Y6894zV0QX2bcLRnBpxA8A== X-IronPort-AV: E=McAfee;i="6800,10657,11527"; a="57989477" X-IronPort-AV: E=Sophos;i="6.17,306,1747724400"; d="scan'208";a="57989477" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Aug 2025 04:46:59 -0700 X-CSE-ConnectionGUID: 2aESyLHIQ3yVR5zRt1Vzfw== X-CSE-MsgGUID: F6OSijqkS1qWmYbSMZkCTw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.17,306,1747724400"; d="scan'208";a="172613648" Received: from johunt-mobl9.ger.corp.intel.com (HELO fedora) ([10.245.245.201]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Aug 2025 04:46:56 -0700 From: =?UTF-8?q?Thomas=20Hellstr=C3=B6m?= To: intel-xe@lists.freedesktop.org Cc: Matthew Brost , =?UTF-8?q?Christian=20K=C3=B6nig?= , dri-devel@lists.freedesktop.org, Jason Gunthorpe , Andrew Morton , Simona Vetter , Dave Airlie , Alistair Popple , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/6] drm/xe: Skip waiting on unarmed fences in xe_gt_tlb_invalidation_fence_wait Date: Thu, 21 Aug 2025 13:46:24 +0200 Message-ID: <20250821114626.89818-5-thomas.hellstrom@linux.intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250821114626.89818-1-thomas.hellstrom@linux.intel.com> References: <20250821114626.89818-1-thomas.hellstrom@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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" From: Matthew Brost Avoids unnecessary waits when the TLB invalidation fence has not been armed, simplifying caller logic in cases where the fence status is uncertain. Signed-off-by: Matthew Brost --- drivers/gpu/drm/xe/xe_gt_tlb_invalidation.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.h b/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.h index f7f0f2eaf4b5..c6d4398d3429 100644 --- a/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.h +++ b/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.h @@ -34,7 +34,8 @@ void xe_gt_tlb_invalidation_fence_signal(struct xe_gt_tlb_invalidation_fence *fe static inline void xe_gt_tlb_invalidation_fence_wait(struct xe_gt_tlb_invalidation_fence *fence) { - dma_fence_wait(&fence->base, false); + if (fence->seqno) + dma_fence_wait(&fence->base, false); } #endif /* _XE_GT_TLB_INVALIDATION_ */ -- 2.50.1