From: Andi Shyti <andi.shyti@linux.intel.com>
To: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Cc: IGT dev <igt-dev@lists.freedesktop.org>,
Andi Shyti <andi.shyti@intel.com>,
Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Subject: [igt-dev] [PATCH v1 1/1] test/gem_create: limit set_pat to GEN12+ platforms
Date: Tue, 6 Jun 2023 11:08:01 +0200 [thread overview]
Message-ID: <20230606090801.461782-2-andi.shyti@linux.intel.com> (raw)
In-Reply-To: <20230606090801.461782-1-andi.shyti@linux.intel.com>
From: Fei Yang <fei.yang@intel.com>
For platforms prior to GEN12 the set_pat extension should
return -ENODEV.
Signed-off-by: Fei Yang <fei.yang@intel.com>
Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
---
tests/i915/gem_create.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tests/i915/gem_create.c b/tests/i915/gem_create.c
index e9e8216d..1553512f 100644
--- a/tests/i915/gem_create.c
+++ b/tests/i915/gem_create.c
@@ -657,6 +657,7 @@ static void create_ext_set_pat(int fd)
.base = { .name = I915_GEM_CREATE_EXT_SET_PAT },
.pat_index = 65,
};
+ uint32_t devid = intel_get_drm_devid(fd);
struct drm_i915_gem_caching arg;
uint64_t size;
uint32_t handle;
@@ -670,7 +671,11 @@ static void create_ext_set_pat(int fd)
* With a valid PAT index specified, returning -EINVAL here
* indicates set_pat extension is not supported
*/
- if (ret == -EINVAL)
+ if (intel_graphics_ver(devid) < IP_VER(12, 0)) {
+ igt_assert(ret == -ENODEV);
+ return;
+ }
+ else if (ret == -EINVAL)
igt_skip("I915_GEM_CREATE_EXT_SET_PAT is not supported\n");
igt_assert(ret == 0);
--
2.25.1
prev parent reply other threads:[~2023-06-06 9:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-06 9:08 [igt-dev] [PATCH v1 0/1] test/gem_create: limit set_pat to GEN12+ platforms Andi Shyti
2023-06-06 9:08 ` Andi Shyti [this message]
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=20230606090801.461782-2-andi.shyti@linux.intel.com \
--to=andi.shyti@linux.intel.com \
--cc=andi.shyti@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@linux.intel.com \
--cc=tvrtko.ursulin@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