From: Peter Senna Tschudin <peter.senna@linux.intel.com>
To: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Subject: [PATCH i-g-t v4] lib/xe/xe_query: Do not require QUERY_OA_UNITS for all Xe tests
Date: Wed, 31 Jul 2024 13:17:54 +0200 [thread overview]
Message-ID: <355010f7-e6f4-4d01-a8dd-3be387b57dcf@linux.intel.com> (raw)
In-Reply-To: <78c5f531-f482-49c7-8290-38710698e4a7@linux.intel.com>
The code currently requires the driver to support DRM_XE_DEVICE_QUERY_OA_UNITS
to run all tests while the only test that needs it is xe_oa. Removes the
requirement so that all other Xe tests can run when this single requirement is
not met.
I found it when trying to run IGT Xe tests on a recent kernel
6.9.9-200.fc40.x86_64 from Fedora 40.
V4:
- Shorten the commit message
- Adds back the the path prefix to the subject
V3:
- Update comment syntax and shorten comments
- Update comment content to describe from kernel version perspective only
- Update test to make '!= 0' implicit
V2:
- Cleanup headers from message body
- Add 'lib/xe/xe_query:' to subject line
Signed-off-by: Peter Senna Tschudin <peter.senna@intel.com>
---
lib/xe/xe_query.c | 4 +++-
tests/intel/xe_oa.c | 6 +++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/lib/xe/xe_query.c b/lib/xe/xe_query.c
index 84eaaac96..8694fa3f9 100644
--- a/lib/xe/xe_query.c
+++ b/lib/xe/xe_query.c
@@ -124,7 +124,9 @@ static struct drm_xe_query_oa_units *xe_query_oa_units_new(int fd)
.data = 0,
};
- igt_assert_eq(igt_ioctl(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query), 0);
+ /* Support older kernels where this uapi is not yet available */
+ if (igt_ioctl(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query))
+ return NULL;
oa_units = malloc(query.size);
igt_assert(oa_units);
diff --git a/tests/intel/xe_oa.c b/tests/intel/xe_oa.c
index ff2218300..1f82dce06 100644
--- a/tests/intel/xe_oa.c
+++ b/tests/intel/xe_oa.c
@@ -4503,6 +4503,7 @@ static const char *xe_engine_class_name(uint32_t engine_class)
igt_main
{
struct drm_xe_engine_class_instance *hwe = NULL;
+ struct xe_device *xe_dev;
igt_fixture {
struct stat sb;
@@ -4527,7 +4528,10 @@ igt_main
igt_assert_eq(drm_fd, -1);
drm_fd = drm_open_driver(DRIVER_XE);
- xe_device_get(drm_fd);
+ xe_dev = xe_device_get(drm_fd);
+
+ /* See xe_query_oa_units_new() */
+ igt_require(xe_dev->oa_units);
devid = intel_get_drm_devid(drm_fd);
sysfs = igt_sysfs_open(drm_fd);
--
2.34.1
next prev parent reply other threads:[~2024-07-31 11:17 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-25 14:03 [PATCH i-g-t v2] lib/xe/xe_query: Do not require QUERY_OA_UNITS for all Xe tests Peter Senna Tschudin
2024-07-25 17:30 ` ✓ CI.xeBAT: success for " Patchwork
2024-07-25 17:42 ` ✓ Fi.CI.BAT: " Patchwork
2024-07-25 21:25 ` ✗ CI.xeFULL: failure " Patchwork
2024-07-26 5:07 ` ✓ CI.xeBAT: success for lib/xe/xe_query: Do not require QUERY_OA_UNITS for all Xe tests (rev2) Patchwork
2024-07-26 5:18 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-07-26 6:26 ` ✓ CI.xeBAT: success for lib/xe/xe_query: Do not require QUERY_OA_UNITS for all Xe tests (rev3) Patchwork
2024-07-26 6:36 ` ✓ Fi.CI.BAT: " Patchwork
2024-07-26 10:31 ` ✗ Fi.CI.IGT: failure for lib/xe/xe_query: Do not require QUERY_OA_UNITS for all Xe tests Patchwork
2024-07-26 14:43 ` [PATCH i-g-t v2] " Dixit, Ashutosh
2024-07-26 15:01 ` ✗ CI.xeFULL: failure for lib/xe/xe_query: Do not require QUERY_OA_UNITS for all Xe tests (rev2) Patchwork
2024-07-26 16:27 ` ✗ CI.xeFULL: failure for lib/xe/xe_query: Do not require QUERY_OA_UNITS for all Xe tests (rev3) Patchwork
2024-07-27 0:01 ` ✗ Fi.CI.IGT: " Patchwork
2024-07-29 5:25 ` [PATCH i-g-t v3] Do not require QUERY_OA_UNITS for all Xe tests Peter Senna Tschudin
2024-07-29 7:00 ` Dixit, Ashutosh
2024-07-29 17:41 ` Kamil Konieczny
2024-07-29 5:55 ` ✓ CI.xeBAT: success for lib/xe/xe_query: Do not require QUERY_OA_UNITS for all Xe tests (rev4) Patchwork
2024-07-29 6:12 ` ✓ Fi.CI.BAT: " Patchwork
2024-07-29 7:33 ` ✗ CI.xeFULL: failure " Patchwork
2024-07-29 11:24 ` ✗ Fi.CI.IGT: " Patchwork
2024-07-31 11:17 ` Peter Senna Tschudin [this message]
2024-07-31 15:24 ` [PATCH i-g-t v4] lib/xe/xe_query: Do not require QUERY_OA_UNITS for all Xe tests Kamil Konieczny
2024-08-06 19:48 ` Dixit, Ashutosh
2024-07-31 13:58 ` ✓ CI.xeBAT: success for lib/xe/xe_query: Do not require QUERY_OA_UNITS for all Xe tests (rev5) Patchwork
2024-07-31 14:11 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-07-31 15:13 ` Kamil Konieczny
2024-07-31 15:52 ` ✗ CI.xeFULL: " Patchwork
2024-08-02 9:40 ` ✓ CI.xeBAT: success for lib/xe/xe_query: Do not require QUERY_OA_UNITS for all Xe tests (rev6) Patchwork
2024-08-02 9:43 ` ✓ Fi.CI.BAT: " Patchwork
2024-08-02 10:32 ` ✗ CI.xeFULL: failure " Patchwork
2024-08-08 6:54 ` Peter Senna Tschudin
2024-08-02 20:17 ` ✗ Fi.CI.IGT: " 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=355010f7-e6f4-4d01-a8dd-3be387b57dcf@linux.intel.com \
--to=peter.senna@linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.