From: Nirmoy Das <nirmoy.das@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: matthew.d.roper@intel.com, joonas.lahtinen@linux.intel.com,
Nirmoy Das <nirmoy.das@intel.com>
Subject: [RFC PATCH 1/2] drm/xe: Add has_wmpt GT info
Date: Sat, 3 Feb 2024 07:05:33 +0100 [thread overview]
Message-ID: <20240203060534.6839-1-nirmoy.das@intel.com> (raw)
Add a GT info member to reflect wmtp feature status.
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
---
drivers/gpu/drm/xe/xe_gt_types.h | 2 ++
drivers/gpu/drm/xe/xe_hw_engine.c | 15 +++++++++++----
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_gt_types.h b/drivers/gpu/drm/xe/xe_gt_types.h
index 70c615dd1498..2f2fa00c1a04 100644
--- a/drivers/gpu/drm/xe/xe_gt_types.h
+++ b/drivers/gpu/drm/xe/xe_gt_types.h
@@ -119,6 +119,8 @@ struct xe_gt {
u64 __engine_mask;
/** @info.gmdid: raw GMD_ID value from hardware */
u32 gmdid;
+ /** @has_wmtp: gt supports mid-thread preemption */
+ bool has_wmtp;
} info;
/**
diff --git a/drivers/gpu/drm/xe/xe_hw_engine.c b/drivers/gpu/drm/xe/xe_hw_engine.c
index 0d17e32d70c8..82424e5d6033 100644
--- a/drivers/gpu/drm/xe/xe_hw_engine.c
+++ b/drivers/gpu/drm/xe/xe_hw_engine.c
@@ -319,14 +319,11 @@ static bool xe_hw_engine_match_fixed_cslice_mode(const struct xe_gt *gt,
static bool xe_rtp_cfeg_wmtp_disabled(const struct xe_gt *gt,
const struct xe_hw_engine *hwe)
{
- if (GRAPHICS_VER(gt_to_xe(gt)) < 20)
- return false;
-
if (hwe->class != XE_ENGINE_CLASS_COMPUTE &&
hwe->class != XE_ENGINE_CLASS_RENDER)
return false;
- return xe_mmio_read32(hwe->gt, XEHP_FUSE4) & CFEG_WMTP_DISABLE;
+ return !gt->info.has_wmtp;
}
void
@@ -671,6 +668,15 @@ static void read_compute_fuses(struct xe_gt *gt)
read_compute_fuses_from_dss(gt);
}
+static void read_wmpt_fuses(struct xe_gt *gt)
+{
+ if (GRAPHICS_VER(gt_to_xe(gt)) < 20)
+ return;
+
+ gt->info.has_wmtp = !(xe_mmio_read32(gt, XEHP_FUSE4) &
+ CFEG_WMTP_DISABLE);
+}
+
static void check_gsc_availability(struct xe_gt *gt)
{
struct xe_device *xe = gt_to_xe(gt);
@@ -696,6 +702,7 @@ int xe_hw_engines_init_early(struct xe_gt *gt)
read_media_fuses(gt);
read_copy_fuses(gt);
read_compute_fuses(gt);
+ read_wmpt_fuses(gt);
check_gsc_availability(gt);
BUILD_BUG_ON(XE_HW_ENGINE_PREEMPT_TIMEOUT < XE_HW_ENGINE_PREEMPT_TIMEOUT_MIN);
--
2.42.0
next reply other threads:[~2024-02-03 6:19 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-03 6:05 Nirmoy Das [this message]
2024-02-03 6:05 ` [RFC PATCH 2/2] drm/xe/uapi: Expose wmtp as engine capability Nirmoy Das
2024-02-16 19:52 ` Matt Roper
2024-02-19 10:09 ` Nirmoy Das
2024-07-12 16:10 ` Francois Dugast
2024-07-15 8:21 ` Nirmoy Das
2024-07-13 13:55 ` Lucas De Marchi
2024-07-15 8:29 ` Nirmoy Das
2024-02-03 6:22 ` ✓ CI.Patch_applied: success for series starting with [RFC,1/2] drm/xe: Add has_wmpt GT info Patchwork
2024-02-03 6:22 ` ✓ CI.checkpatch: " Patchwork
2024-02-03 6:23 ` ✓ CI.KUnit: " Patchwork
2024-02-03 6:30 ` ✓ CI.Build: " Patchwork
2024-02-03 6:31 ` ✗ CI.Hooks: failure " Patchwork
2024-02-03 6:32 ` ✓ CI.checksparse: success " Patchwork
2024-02-03 6:56 ` ✗ CI.BAT: failure " Patchwork
2024-02-16 18:47 ` [RFC PATCH 1/2] " Matt Roper
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=20240203060534.6839-1-nirmoy.das@intel.com \
--to=nirmoy.das@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=joonas.lahtinen@linux.intel.com \
--cc=matthew.d.roper@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