Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Teres Alexis, Alan Previn" <alan.previn.teres.alexis@intel.com>
To: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>,
	"Ceraolo Spurio, Daniele" <daniele.ceraolospurio@intel.com>
Subject: Re: [PATCH i-g-t v2 2/9] tests/intel/xe_vm: Update invalid flag subtest
Date: Thu, 16 Jan 2025 21:55:26 +0000	[thread overview]
Message-ID: <10debaf4405cf45996a80cbd18a6064123958634.camel@intel.com> (raw)
In-Reply-To: <20250116001951.4159243-3-daniele.ceraolospurio@intel.com>

Reviewed-by: Alan Previn <alan.previn.teres.alexis@intel.com>

On Wed, 2025-01-15 at 16:19 -0800, Daniele Ceraolo Spurio wrote:
> PXP introduced a new valid flag, so we need to add it to the test and
> shift the first invalid bit left by one.
> 
> v2: only test the new flag if the kernel supports it.
> 
> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> ---
>  tests/intel/xe_vm.c | 25 ++++++++++++++++++++++++-
>  1 file changed, 24 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/intel/xe_vm.c b/tests/intel/xe_vm.c
> index 6ee3f4634..40e92d805 100644
> --- a/tests/intel/xe_vm.c
> +++ b/tests/intel/xe_vm.c
> @@ -2173,6 +2173,22 @@ test_mmap_style_bind(int fd, struct drm_xe_engine_class_instance *eci,
>         xe_vm_destroy(fd, vm);
>  }
>  
> +static bool pxp_interface_supported(int fd)
> +{
> +       struct drm_xe_device_query query = {
> +               .extensions = 0,
> +               .query = DRM_XE_DEVICE_QUERY_PXP_STATUS,
> +               .size = 0,
> +               .data = 0,
> +       };
> +       int ret = 0;
> +
> +       if (igt_ioctl(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query))
> +               ret = -errno;
> +
> +       return ret != -EINVAL;
> +}
> +
>  /**
>   * SUBTEST: bind-flag-invalid
>   * Description:
> @@ -2221,6 +2237,13 @@ static void bind_flag_invalid(int fd)
>         igt_assert(syncobj_wait(fd, &sync[0].handle, 1, INT64_MAX, 0, NULL));
>         syncobj_reset(fd, &sync[0].handle, 1);
>  
> +       if (pxp_interface_supported(fd)) {
> +               bind.bind.flags = DRM_XE_VM_BIND_FLAG_CHECK_PXP;
> +               igt_ioctl(fd, DRM_IOCTL_XE_VM_BIND, &bind);
> +               igt_assert(syncobj_wait(fd, &sync[0].handle, 1, INT64_MAX, 0, NULL));
> +               syncobj_reset(fd, &sync[0].handle, 1);
> +       }
> +
>         bind.bind.flags = DRM_XE_VM_BIND_FLAG_NULL;
>         bind.bind.obj = 0;
>         igt_ioctl(fd, DRM_IOCTL_XE_VM_BIND, &bind);
> @@ -2234,7 +2257,7 @@ static void bind_flag_invalid(int fd)
>         syncobj_reset(fd, &sync[0].handle, 1);
>  
>         /* Using invalid flags should not work */
> -       bind.bind.flags = 1 << 4;
> +       bind.bind.flags = 1 << 5;
>         igt_ioctl(fd, DRM_IOCTL_XE_VM_BIND, &bind);
>         do_ioctl_err(fd, DRM_IOCTL_XE_VM_BIND, &bind, EINVAL);
>  


  reply	other threads:[~2025-01-16 21:55 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-16  0:19 [PATCH i-g-t v2 0/9] Xe: Add tests for PXP Daniele Ceraolo Spurio
2025-01-16  0:19 ` [PATCH i-g-t v2 1/9] drm-uapi/xe: Sync PXP uapi updates Daniele Ceraolo Spurio
2025-01-16  0:19 ` [PATCH i-g-t v2 2/9] tests/intel/xe_vm: Update invalid flag subtest Daniele Ceraolo Spurio
2025-01-16 21:55   ` Teres Alexis, Alan Previn [this message]
2025-01-16  0:19 ` [PATCH i-g-t v2 3/9] tests/intel/xe_query: Add test for PXP status query Daniele Ceraolo Spurio
2025-01-16  0:19 ` [PATCH i-g-t v2 4/9] tests/intel/xe_create: Stop treating the extension field as MBZ Daniele Ceraolo Spurio
2025-01-16 22:02   ` Teres Alexis, Alan Previn
2025-01-16  0:19 ` [PATCH i-g-t v2 5/9] tests/intel/xe_exec_queue_property: Update first invalid property value Daniele Ceraolo Spurio
2025-01-16 22:06   ` Teres Alexis, Alan Previn
2025-01-16  0:19 ` [PATCH i-g-t v2 6/9] tests/intel/xe_pxp: Add PXP object and queue creation tests Daniele Ceraolo Spurio
2025-01-16 22:16   ` Teres Alexis, Alan Previn
2025-01-16  0:19 ` [PATCH i-g-t v2 7/9] tests/intel/xe_pxp: Test PXP submissions Daniele Ceraolo Spurio
2025-01-28  2:44   ` Teres Alexis, Alan Previn
2025-01-16  0:19 ` [PATCH i-g-t v2 8/9] tests/intel/xe_pxp: Termination tests Daniele Ceraolo Spurio
2025-01-28  5:13   ` Teres Alexis, Alan Previn
2025-01-16  0:19 ` [PATCH i-g-t v2 9/9] tests/intel/xe_pxp: Test encrypted FBs Daniele Ceraolo Spurio
2025-01-31  1:47   ` Teres Alexis, Alan Previn
2025-01-16  4:55 ` ✓ Xe.CI.BAT: success for Xe: Add tests for PXP (rev2) Patchwork
2025-01-16  4:56 ` ✓ i915.CI.BAT: " Patchwork
2025-01-16  9:38 ` ✗ Xe.CI.Full: failure " Patchwork
2025-01-17 10:03 ` ✗ i915.CI.Full: " 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=10debaf4405cf45996a80cbd18a6064123958634.camel@intel.com \
    --to=alan.previn.teres.alexis@intel.com \
    --cc=daniele.ceraolospurio@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