public inbox for intel-xe@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Matt Roper <matthew.d.roper@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Matt Roper <matthew.d.roper@intel.com>,
	 Shuicheng Lin <shuicheng.lin@intel.com>
Subject: [PATCH v2 02/10] drm/xe/rtp: Add "always true" match function
Date: Fri, 24 Apr 2026 13:48:12 -0700	[thread overview]
Message-ID: <20260424-engine-setup-v2-2-59cc620a25f1@intel.com> (raw)
In-Reply-To: <20260424-engine-setup-v2-0-59cc620a25f1@intel.com>

All RTP table entries are required to have at least one rule.  In cases
where an entry should apply unconditionally across all platforms we've
been using a graphics version range of 12.00 - forever since this covers
all platforms supported by the driver.  However if the primary GT is
disabled via configfs (not actually possible today, but probably
possible in the future) or if we have a future platform that lacks a
primary GT and only supports media/display, this rule would cause
important programming to fail to apply on the media GT.

Add a simple match function that just always returns true
unconditionally.  This solves the worries above while also being more
immediately human-readable.

Reviewed-by: Shuicheng Lin <shuicheng.lin@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
 drivers/gpu/drm/xe/xe_hw_engine.c |  2 +-
 drivers/gpu/drm/xe/xe_rtp.c       |  7 +++++++
 drivers/gpu/drm/xe/xe_rtp.h       | 12 ++++++++++++
 3 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_hw_engine.c b/drivers/gpu/drm/xe/xe_hw_engine.c
index 74f29025dd6c..c7d211178300 100644
--- a/drivers/gpu/drm/xe/xe_hw_engine.c
+++ b/drivers/gpu/drm/xe/xe_hw_engine.c
@@ -430,7 +430,7 @@ hw_engine_setup_default_state(struct xe_hw_engine *hwe)
 	struct xe_rtp_process_ctx ctx = XE_RTP_PROCESS_CTX_INITIALIZER(hwe);
 	const struct xe_rtp_entry_sr engine_entries[] = {
 		{ XE_RTP_NAME("RING_CMD_CCTL_default_MOCS"),
-		  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(1200, XE_RTP_END_VERSION_UNDEFINED)),
+		  XE_RTP_RULES(FUNC(xe_rtp_match_always)),
 		  XE_RTP_ACTIONS(FIELD_SET(RING_CMD_CCTL(0),
 					   CMD_CCTL_WRITE_OVERRIDE_MASK |
 					   CMD_CCTL_READ_OVERRIDE_MASK,
diff --git a/drivers/gpu/drm/xe/xe_rtp.c b/drivers/gpu/drm/xe/xe_rtp.c
index 991f218f1cc3..728933a1c34f 100644
--- a/drivers/gpu/drm/xe/xe_rtp.c
+++ b/drivers/gpu/drm/xe/xe_rtp.c
@@ -352,6 +352,13 @@ void xe_rtp_process(struct xe_rtp_process_ctx *ctx,
 }
 EXPORT_SYMBOL_IF_KUNIT(xe_rtp_process);
 
+bool xe_rtp_match_always(const struct xe_device *xe,
+			 const struct xe_gt *gt,
+			 const struct xe_hw_engine *hwe)
+{
+	return true;
+}
+
 bool xe_rtp_match_even_instance(const struct xe_device *xe,
 				const struct xe_gt *gt,
 				const struct xe_hw_engine *hwe)
diff --git a/drivers/gpu/drm/xe/xe_rtp.h b/drivers/gpu/drm/xe/xe_rtp.h
index 4537ff46a17f..d058a629cd3e 100644
--- a/drivers/gpu/drm/xe/xe_rtp.h
+++ b/drivers/gpu/drm/xe/xe_rtp.h
@@ -459,6 +459,18 @@ void xe_rtp_process(struct xe_rtp_process_ctx *ctx,
 
 /* Match functions to be used with XE_RTP_MATCH_FUNC */
 
+/**
+ * xe_rtp_match_always - Match RTP entry unconditionally
+ * @xe: Device structure
+ * @gt: GT structure
+ * @hwe: Engine instance
+ *
+ * Returns: true, regardless of inputs
+ */
+bool xe_rtp_match_always(const struct xe_device *xe,
+			 const struct xe_gt *gt,
+			 const struct xe_hw_engine *hwe);
+
 /**
  * xe_rtp_match_even_instance - Match if engine instance is even
  * @xe: Device structure

-- 
2.53.0


  parent reply	other threads:[~2026-04-24 20:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-24 20:48 [PATCH v2 00/10] Engine initialization cleanup Matt Roper
2026-04-24 20:48 ` [PATCH v2 01/10] drm/xe: Move CCS enablement to engine setup RTP Matt Roper
2026-04-24 20:48 ` Matt Roper [this message]
2026-04-24 20:48 ` [PATCH v2 03/10] drm/xe: Stop programming BLIT_CCTL on Xe2 and later platforms Matt Roper
2026-04-24 20:48 ` [PATCH v2 04/10] drm/xe: Move HWSTAM programming to RTP Matt Roper
2026-04-24 20:48 ` [PATCH v2 05/10] drm/xe: Fix name and definition of GFX_MODE register Matt Roper
2026-04-24 20:48 ` [PATCH v2 06/10] drm/xe: Const-ify parameters to xe_device_has_* functions Matt Roper
2026-04-24 20:48 ` [PATCH v2 07/10] drm/xe: Move GFX_MODE programming to RTP Matt Roper
2026-04-24 20:48 ` [PATCH v2 08/10] drm/xe: Drop unnecessary STOP_RING clearing Matt Roper
2026-04-24 20:48 ` [PATCH v2 09/10] drm/xe: Drop xe_hw_engine_mmio_write32() Matt Roper
2026-04-24 20:48 ` [PATCH v2 10/10] drm/xe: Mark BCS engines as belonging to the GT forcewake domain Matt Roper
2026-04-24 21:27 ` ✓ CI.KUnit: success for Engine initialization cleanup (rev2) Patchwork
2026-04-24 22:30 ` ✓ Xe.CI.BAT: " Patchwork
2026-04-24 23:15 ` ✗ Xe.CI.FULL: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260424-engine-setup-v2-2-59cc620a25f1@intel.com \
    --to=matthew.d.roper@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=shuicheng.lin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox