From nobody Sun Oct 5 05:26:32 2025 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6F4D02BCF41 for ; Sat, 9 Aug 2025 13:52:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.13 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754747542; cv=none; b=WEm44OXro2R/3TPQCR/uRWGnxRfT+MIK+ijINznFTmT48XXECT5R6kvcaFGZE3fmc7Vv+wM4EpWNjECrSbpPhX+y1ybqh8yBtz5olaL+mbPBHg9QlQTn/Klv8IFh6oYSGqqjQW4HbnAzhp6BcdMp4gSOwOhbT1RqttL7BxrpGTI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754747542; c=relaxed/simple; bh=iX+aI4EV6aIpB48ENfwpl4TWhZJPqVgs0W+CzzXlU1w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=S5y3ssdwVfGm6FR1FsjD9x+o6263FR9T5SzwasQls2aym+Cx/g4CeOl0nNPiu8opEZh0wGjUsWC9/izeH5hj1zZrj5n5wbwp5puriq7s/GElfTUr0PoHbLb2iLp/PzhQ5/7uxqoAm0ZAVjJV3puKyWu5kQbsed2/lCWETtVwoyU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=kax2AiaM; arc=none smtp.client-ip=198.175.65.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="kax2AiaM" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1754747541; x=1786283541; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=iX+aI4EV6aIpB48ENfwpl4TWhZJPqVgs0W+CzzXlU1w=; b=kax2AiaMp09Abvbp8lxeJVf4phD/yBZ/+qQ8Il2ipjfAVYAymqBqujM4 c4VGkOSi9G+sCM35h80sZ2w7Si5MCMhlO2oIn9d79EwH3NMFVpw0Girq8 EPIGyzLljvtf5cHQuXSU85X+BPidX1EDbK5d9iOHZkZeCEVkWXfR52TVj oHb8xBU0rCR8I6UA5Qo929N8H8O4effvsaMseOy/cNK9SEkV1VXqvzmOn gG4KyEkKTwHAMYGuHKea9zcH4A8CBtMSBIMxg/mjx1ziABvXM2pFDeNVf wmQ7tAhPmtmsafvlspoPlaAs5+yjza/2ZIrZY9kP4xqFbU0FhuX2NHg4f Q==; X-CSE-ConnectionGUID: C79Lb2IKStafP23fDtkbWA== X-CSE-MsgGUID: uvZUah4VRFu6CpPBo5sW6A== X-IronPort-AV: E=McAfee;i="6800,10657,11515"; a="68153572" X-IronPort-AV: E=Sophos;i="6.17,278,1747724400"; d="scan'208";a="68153572" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Aug 2025 06:52:21 -0700 X-CSE-ConnectionGUID: gVHvHxq3SzW2byWIN5LLcw== X-CSE-MsgGUID: 7NQBfY0hQGygQt3TnI1X/g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.17,278,1747724400"; d="scan'208";a="165903763" Received: from smoticic-mobl1.ger.corp.intel.com (HELO fedora) ([10.245.244.28]) by fmviesa009-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Aug 2025 06:52:19 -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 , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 4/6] drm/xe: Skip waiting on unarmed fences in xe_gt_tlb_invalidation_fence_wait Date: Sat, 9 Aug 2025 15:51:35 +0200 Message-ID: <20250809135137.259427-5-thomas.hellstrom@linux.intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250809135137.259427-1-thomas.hellstrom@linux.intel.com> References: <20250809135137.259427-1-thomas.hellstrom@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 *fen= ce) { - dma_fence_wait(&fence->base, false); + if (fence->seqno) + dma_fence_wait(&fence->base, false); } =20 #endif /* _XE_GT_TLB_INVALIDATION_ */ --=20 2.50.1