From: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t] xe/xe_huc_copy: use IS_TIGERLAKE macro
Date: Tue, 28 Mar 2023 10:39:08 +0200 [thread overview]
Message-ID: <20230328083908.2476581-1-mauro.chehab@linux.intel.com> (raw)
From: Mauro Carvalho Chehab <mchehab@kernel.org>
Instead of hardcoding the PCI IDs at the test, use a macro
to check if the platform is compatible with the test.
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
---
tests/xe/xe_huc_copy.c | 38 +-------------------------------------
1 file changed, 1 insertion(+), 37 deletions(-)
diff --git a/tests/xe/xe_huc_copy.c b/tests/xe/xe_huc_copy.c
index ee3896cef8b9..cd68dbb5ac50 100644
--- a/tests/xe/xe_huc_copy.c
+++ b/tests/xe/xe_huc_copy.c
@@ -152,42 +152,6 @@ test_huc_copy(int fd)
xe_vm_destroy(fd, vm);
}
-static bool
-is_device_supported(int fd)
-{
- struct drm_xe_query_config *config;
- struct drm_xe_device_query query = {
- .extensions = 0,
- .query = DRM_XE_DEVICE_QUERY_CONFIG,
- .size = 0,
- .data = 0,
- };
- uint16_t devid;
-
- igt_assert_eq(igt_ioctl(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query), 0);
-
- config = malloc(query.size);
- igt_assert(config);
-
- query.data = to_user_pointer(config);
- igt_assert_eq(igt_ioctl(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query), 0);
-
- devid = config->info[XE_QUERY_CONFIG_REV_AND_DEVICE_ID] & 0xffff;
- return (
- devid == 0x9A60 ||
- devid == 0x9A68 ||
- devid == 0x9A70 ||
- devid == 0x9A40 ||
- devid == 0x9A49 ||
- devid == 0x9A59 ||
- devid == 0x9A78 ||
- devid == 0x9AC0 ||
- devid == 0x9AC9 ||
- devid == 0x9AD9 ||
- devid == 0x9AF8
- );
-}
-
igt_main
{
int xe;
@@ -198,7 +162,7 @@ igt_main
}
igt_subtest("huc_copy") {
- igt_skip_on(!is_device_supported(xe));
+ igt_skip_on(!IS_TIGERLAKE(intel_get_drm_devid(xe)));
test_huc_copy(xe);
}
--
2.39.2
next reply other threads:[~2023-03-28 8:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-28 8:39 Mauro Carvalho Chehab [this message]
2023-03-28 9:47 ` [igt-dev] ✓ Fi.CI.BAT: success for xe/xe_huc_copy: use IS_TIGERLAKE macro Patchwork
2023-03-28 14:14 ` [igt-dev] [PATCH i-g-t] " Kamil Konieczny
2023-03-28 18:08 ` [igt-dev] ✓ Fi.CI.IGT: success for " Patchwork
2023-04-04 6:27 ` [igt-dev] [PATCH i-g-t] " Lucas De Marchi
2023-04-04 7:52 ` Mauro Carvalho Chehab
2023-04-04 15:29 ` Lucas De Marchi
2023-04-04 15:32 ` Matt Atwood
2023-04-05 6:52 ` Mauro Carvalho Chehab
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=20230328083908.2476581-1-mauro.chehab@linux.intel.com \
--to=mauro.chehab@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox