From: Nirmoy Das <nirmoy.das@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Nirmoy Das <nirmoy.das@intel.com>,
Kamil Konieczny <kamil.konieczny@linux.intel.com>
Subject: [PATCH i-g-t 1/4] lib/igt_gt: Add gem_engine_can_block_ggtt_binder
Date: Fri, 12 Apr 2024 10:57:38 +0200 [thread overview]
Message-ID: <20240412085744.21196-3-nirmoy.das@intel.com> (raw)
In-Reply-To: <20240412085744.21196-1-nirmoy.das@intel.com>
On MTL GGTT updates happens through MI_UPDATE_GGTT command.
Add a method to detect if a engine can block ggtt binder.
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
---
lib/igt_gt.c | 15 +++++++++++++++
lib/igt_gt.h | 2 ++
2 files changed, 17 insertions(+)
diff --git a/lib/igt_gt.c b/lib/igt_gt.c
index a24a566c7..aa5e75b07 100644
--- a/lib/igt_gt.c
+++ b/lib/igt_gt.c
@@ -659,3 +659,18 @@ int gem_execbuf_flags_to_engine_class(unsigned int flags)
igt_assert(0);
}
}
+
+/**
+ * gem_engine_can_block_ggtt_binder:
+ * @fd: open i915 drm file descriptor
+ * @engine: engine to be assessed
+ *
+ * Detect if the platform needs blitter based GGTT
+ * updates.
+ */
+bool gem_engine_can_block_ggtt_binder(int fd,
+ const struct intel_execution_engine2 *engine)
+{
+ return IS_METEORLAKE(intel_get_drm_devid(fd)) &&
+ engine->class == I915_ENGINE_CLASS_COPY;
+}
diff --git a/lib/igt_gt.h b/lib/igt_gt.h
index 3d10349e4..d0c5510b1 100644
--- a/lib/igt_gt.h
+++ b/lib/igt_gt.h
@@ -83,5 +83,7 @@ extern const struct intel_execution_engine2 {
} intel_execution_engines2[];
int gem_execbuf_flags_to_engine_class(unsigned int flags);
+bool gem_engine_can_block_ggtt_binder(int fd,
+ const struct intel_execution_engine2 *engine);
#endif /* IGT_GT_H */
--
2.41.0
next prev parent reply other threads:[~2024-04-12 9:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-12 8:57 [PATCH i-g-t 0/4] Tes update for atomics related uAPI changes Nirmoy Das
2024-04-12 8:57 ` [PATCH i-g-t 1/4] drm-uapi/xe: Add device atomics vm bind flags Nirmoy Das
2024-04-12 8:57 ` Nirmoy Das [this message]
2024-04-12 8:57 ` [PATCH i-g-t 2/4] drm-uapi/xe: Add query flag for dev atomics on SMEM Nirmoy Das
2024-04-12 8:57 ` [PATCH i-g-t 2/4] tests/intel/gem_ctx_shared: Skip some test on MTL Nirmoy Das
2024-04-12 8:57 ` [PATCH i-g-t 3/4] tests/intel/gem_ctx_schedule: " Nirmoy Das
2024-04-12 8:57 ` [PATCH i-g-t 3/4] tests/intel/xe_exec_atomic: Use new vm bind flag Nirmoy Das
2024-04-12 8:57 ` [PATCH i-g-t 4/4] test/intel/xe_query: Print DRM_XE_QUERY_CONFIG_SUPP_DEV_ATOMIC_ON_SMEM Nirmoy Das
2024-04-12 8:57 ` [PATCH i-g-t 4/4] tests/intel/gem_spin_batch: Skip some test on MTL Nirmoy Das
2024-04-12 9:13 ` [PATCH i-g-t 0/4] Tes update for atomics related uAPI changes Nirmoy Das
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=20240412085744.21196-3-nirmoy.das@intel.com \
--to=nirmoy.das@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@linux.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