[igt-dev] [PATCH v3 1/1] test/gem_create: limit set_pat only to Meteor Lake
Kamil Konieczny
kamil.konieczny at linux.intel.com
Wed Jun 7 08:57:37 UTC 2023
On 2023-06-06 at 19:52:26 +0200, Andi Shyti wrote:
> From: Fei Yang <fei.yang at intel.com>
>
> For platforms other than Meteor Lake the set_pat extension should
> return -ENODEV.
>
> Signed-off-by: Fei Yang <fei.yang at intel.com>
> Signed-off-by: Andi Shyti <andi.shyti at linux.intel.com>
> ---
> tests/i915/gem_create.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/tests/i915/gem_create.c b/tests/i915/gem_create.c
> index e9e8216d2b..b7961d9ef2 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;
> @@ -672,6 +673,9 @@ static void create_ext_set_pat(int fd)
> */
> if (ret == -EINVAL)
> igt_skip("I915_GEM_CREATE_EXT_SET_PAT is not supported\n");
> + else if (!IS_METEORLAKE(devid))
> + igt_assert_eq(ret, -ENODEV);
> +
lgtm,
Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
> igt_assert(ret == 0);
>
> /*
> --
> 2.40.1
>
More information about the igt-dev
mailing list