From: Matt Roper <matthew.d.roper@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 2/2] tests/xe_query: Query and sanity-check GT ip versions
Date: Wed, 6 Dec 2023 12:49:42 -0800 [thread overview]
Message-ID: <20231206204942.1105505-3-matthew.d.roper@intel.com> (raw)
In-Reply-To: <20231206204942.1105505-1-matthew.d.roper@intel.com>
Update the query test to include the GT's IP version in the output and
to also perform some simple sanity checks on the version received. We
don't want to try to match any specific version numbers (since we expect
new versions to show up in the future), but we do know that the uapi
should never return version numbers older than 12.70 for the primary GT
or 13.00 for the media GT since those were the first IP versions to
include GMD_ID support. We also know that MTL/ARL are the only pre-Xe2
platforms to support GMD_ID, so if we're not running on MTL/ARL, the
version numbers must always be 20.00 or greater.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
tests/intel/xe_query.c | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/tests/intel/xe_query.c b/tests/intel/xe_query.c
index 338ef6151..7cf64b437 100644
--- a/tests/intel/xe_query.c
+++ b/tests/intel/xe_query.c
@@ -259,6 +259,7 @@ test_query_mem_regions(int fd)
static void
test_query_gt_list(int fd)
{
+ uint16_t dev_id = intel_get_drm_devid(fd);
struct drm_xe_query_gt_list *gt_list;
struct drm_xe_device_query query = {
.extensions = 0,
@@ -278,13 +279,40 @@ test_query_gt_list(int fd)
igt_assert_eq(igt_ioctl(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query), 0);
for (i = 0; i < gt_list->num_gt; i++) {
+ int verx100 = 100 * gt_list->gt_list[i].ip_ver_major +
+ gt_list->gt_list[i].ip_ver_minor;
+
igt_info("type: %d\n", gt_list->gt_list[i].type);
igt_info("gt_id: %d\n", gt_list->gt_list[i].gt_id);
+ igt_info("IP version: %d.%02d, stepping %d\n",
+ gt_list->gt_list[i].ip_ver_major,
+ gt_list->gt_list[i].ip_ver_minor,
+ gt_list->gt_list[i].ip_ver_revid);
igt_info("reference_clock: %u\n", gt_list->gt_list[i].reference_clock);
igt_info("near_mem_regions: 0x%016llx\n",
gt_list->gt_list[i].near_mem_regions);
igt_info("far_mem_regions: 0x%016llx\n",
gt_list->gt_list[i].far_mem_regions);
+
+ /* Sanity check IP version. */
+ if (verx100) {
+ /*
+ * First GMD_ID platforms had graphics 12.70 and media
+ * 13.00 so we should never see non-zero values lower
+ * than those.
+ */
+ if (gt_list->gt_list[i].type == DRM_XE_QUERY_GT_TYPE_MEDIA)
+ igt_assert_lte(1300, verx100);
+ else
+ igt_assert_lte(1270, verx100);
+
+ /*
+ * Aside from MTL/ARL, all version numbers should be
+ * 20.00 or higher.
+ */
+ if (!IS_METEORLAKE(dev_id))
+ igt_assert_lte(20, gt_list->gt_list[i].ip_ver_major);
+ }
}
}
--
2.43.0
next prev parent reply other threads:[~2023-12-06 20:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-06 20:49 [igt-dev] [PATCH i-g-t 0/2] Add GT IP version query support Matt Roper
2023-12-06 20:49 ` [igt-dev] [PATCH i-g-t 1/2] drm-uapi/xe: Add IP version to GT query Matt Roper
2023-12-06 20:49 ` Matt Roper [this message]
2023-12-06 23:02 ` [igt-dev] ✓ Fi.CI.BAT: success for Add GT IP version query support Patchwork
2023-12-07 0:32 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2023-12-07 0:53 ` [igt-dev] ✓ CI.xeBAT: success " 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=20231206204942.1105505-3-matthew.d.roper@intel.com \
--to=matthew.d.roper@intel.com \
--cc=igt-dev@lists.freedesktop.org \
/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