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 09/10] drm/xe: Drop xe_hw_engine_mmio_write32()
Date: Fri, 24 Apr 2026 13:48:19 -0700 [thread overview]
Message-ID: <20260424-engine-setup-v2-9-59cc620a25f1@intel.com> (raw)
In-Reply-To: <20260424-engine-setup-v2-0-59cc620a25f1@intel.com>
xe_hw_engine_mmio_write32() is only used in a single place and is easily
replaced by a regular xe_mmio_write32() call. Register read/write
interfaces are already complicated enough with MCR vs non-MCR handling,
so we should avoid adding extra wrappers that just make it more
confusing what to use.
xe_hw_engine_mmio_write32() did have a forcewake assertion that we're
dropping here, but that assertion wasn't entirely correct anyway. It was
checking hwe->domain which is currently set to XE_FW_RENDER for the BCS
engine, even though BCS engines reside in the GT domain.
v2:
- Drop prototype in header file as well. (Shuicheng)
Cc: Shuicheng Lin <shuicheng.lin@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
drivers/gpu/drm/xe/xe_hw_engine.c | 25 ++-----------------------
drivers/gpu/drm/xe/xe_hw_engine.h | 1 -
2 files changed, 2 insertions(+), 24 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_hw_engine.c b/drivers/gpu/drm/xe/xe_hw_engine.c
index 91e644067cc4..b3da832a5414 100644
--- a/drivers/gpu/drm/xe/xe_hw_engine.c
+++ b/drivers/gpu/drm/xe/xe_hw_engine.c
@@ -282,27 +282,6 @@ static void hw_engine_fini(void *arg)
hwe->gt = NULL;
}
-/**
- * xe_hw_engine_mmio_write32() - Write engine register
- * @hwe: engine
- * @reg: register to write into
- * @val: desired 32-bit value to write
- *
- * This function will write val into an engine specific register.
- * Forcewake must be held by the caller.
- *
- */
-void xe_hw_engine_mmio_write32(struct xe_hw_engine *hwe,
- struct xe_reg reg, u32 val)
-{
- xe_gt_assert(hwe->gt, !(reg.addr & hwe->mmio_base));
- xe_force_wake_assert_held(gt_to_fw(hwe->gt), hwe->domain);
-
- reg.addr += hwe->mmio_base;
-
- xe_mmio_write32(&hwe->gt->mmio, reg, val);
-}
-
/**
* xe_hw_engine_mmio_read32() - Read engine register
* @hwe: engine
@@ -325,8 +304,8 @@ u32 xe_hw_engine_mmio_read32(struct xe_hw_engine *hwe, struct xe_reg reg)
void xe_hw_engine_enable_ring(struct xe_hw_engine *hwe)
{
- xe_hw_engine_mmio_write32(hwe, RING_HWS_PGA(0),
- xe_bo_ggtt_addr(hwe->hwsp));
+ xe_mmio_write32(&hwe->gt->mmio, RING_HWS_PGA(hwe->mmio_base),
+ xe_bo_ggtt_addr(hwe->hwsp));
}
static bool xe_hw_engine_match_fixed_cslice_mode(const struct xe_device *xe,
diff --git a/drivers/gpu/drm/xe/xe_hw_engine.h b/drivers/gpu/drm/xe/xe_hw_engine.h
index 6b5f9fa2a594..ee9218773b51 100644
--- a/drivers/gpu/drm/xe/xe_hw_engine.h
+++ b/drivers/gpu/drm/xe/xe_hw_engine.h
@@ -76,7 +76,6 @@ const char *xe_hw_engine_class_to_str(enum xe_engine_class class);
u64 xe_hw_engine_read_timestamp(struct xe_hw_engine *hwe);
enum xe_force_wake_domains xe_hw_engine_to_fw_domain(struct xe_hw_engine *hwe);
-void xe_hw_engine_mmio_write32(struct xe_hw_engine *hwe, struct xe_reg reg, u32 val);
u32 xe_hw_engine_mmio_read32(struct xe_hw_engine *hwe, struct xe_reg reg);
#endif
--
2.53.0
next prev 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 ` [PATCH v2 02/10] drm/xe/rtp: Add "always true" match function Matt Roper
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 ` Matt Roper [this message]
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-9-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