Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Summers, Stuart" <stuart.summers@intel.com>
To: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>,
	"Vishwanathapura,
	Niranjana" <niranjana.vishwanathapura@intel.com>
Cc: "Ch, Sai Gowtham" <sai.gowtham.ch@intel.com>,
	"Dandamudi, Priyanka" <priyanka.dandamudi@intel.com>,
	"kamil.konieczny@linux.intel.com"
	<kamil.konieczny@linux.intel.com>
Subject: Re: [PATCH v2 05/19] tests/intel/xe_exec_multi_queue: Validate queue priority setting
Date: Thu, 4 Dec 2025 20:45:56 +0000	[thread overview]
Message-ID: <be58876f8e297c0aa41705828f3605f8ed17f00a.camel@intel.com> (raw)
In-Reply-To: <20251121035715.767226-26-niranjana.vishwanathapura@intel.com>

On Thu, 2025-11-20 at 19:57 -0800, Niranjana Vishwanathapura wrote:
> Validate setting priority of queues within the multi queue
> group.
> 
> v2: Add and use XE_EXEC_QUEUE_NUM_PRIORITIES (priyanka)
> 
> Signed-off-by: Niranjana Vishwanathapura
> <niranjana.vishwanathapura@intel.com>

Reviewed-by: Stuart Summers <stuart.summers@intel.com>

> ---
>  tests/intel/xe_exec_multi_queue.c | 67
> +++++++++++++++++++++++++++++++
>  1 file changed, 67 insertions(+)
> 
> diff --git a/tests/intel/xe_exec_multi_queue.c
> b/tests/intel/xe_exec_multi_queue.c
> index 977b4e7a0..3bbcf7975 100644
> --- a/tests/intel/xe_exec_multi_queue.c
> +++ b/tests/intel/xe_exec_multi_queue.c
> @@ -18,9 +18,15 @@
>  #include "xe/xe_ioctl.h"
>  #include "xe/xe_query.h"
>  
> +#define XE_EXEC_QUEUE_PRIORITY_LOW     0
> +#define XE_EXEC_QUEUE_PRIORITY_NORMAL  1
> +#define XE_EXEC_QUEUE_PRIORITY_HIGH    2
> +#define XE_EXEC_QUEUE_NUM_PRIORITIES   3
> +
>  #define MAX_N_EXEC_QUEUES      64
>  
>  #define USERPTR                        (0x1 << 0)
> +#define PRIORITY               (0x1 << 1)
>  
>  #define MAX_INSTANCE 9
>  
> @@ -37,6 +43,15 @@ __test_sanity(int fd, int gt, int class)
>                 .property =
> DRM_XE_EXEC_QUEUE_SET_PROPERTY_MULTI_GROUP,
>                 .value = DRM_XE_MULTI_GROUP_CREATE,
>         };
> +       struct drm_xe_ext_set_property mq_priority = {
> +               .base.name =
> DRM_XE_EXEC_QUEUE_EXTENSION_SET_PROPERTY,
> +               .property =
> DRM_XE_EXEC_QUEUE_SET_PROPERTY_MULTI_QUEUE_PRIORITY,
> +       };
> +       struct drm_xe_ext_set_property priority = {
> +               .base.name =
> DRM_XE_EXEC_QUEUE_EXTENSION_SET_PROPERTY,
> +               .property = DRM_XE_EXEC_QUEUE_SET_PROPERTY_PRIORITY,
> +               .value = XE_EXEC_QUEUE_PRIORITY_NORMAL,
> +       };
>         uint64_t invalid_flag = 0, ext =
> to_user_pointer(&multi_queue);
>         struct drm_xe_engine_class_instance eci[MAX_INSTANCE];
>         struct drm_xe_engine_class_instance *hwe;
> @@ -77,6 +92,11 @@ __test_sanity(int fd, int gt, int class)
>         multi_queue.base.next_extension =
> to_user_pointer(&multi_queue);
>         igt_assert_eq(__xe_exec_queue_create(fd, vm, 1, 1, eci, ext,
> &val), -EINVAL);
>  
> +       /* Setting other queue properties are valid for Q0 */
> +       multi_queue.base.next_extension = to_user_pointer(&priority);
> +       exec_queues[0] = xe_exec_queue_create(fd, vm, eci, ext);
> +       xe_exec_queue_destroy(fd, exec_queues[0]);
> +
>         /* Adding queues to group after primary is destroyed is
> invalid */
>         multi_queue.base.next_extension = 0;
>         exec_queues[0] = xe_exec_queue_create(fd, vm, eci, ext);
> @@ -105,6 +125,11 @@ __test_sanity(int fd, int gt, int class)
>         if (n > 1)
>                 igt_assert_eq(__xe_exec_queue_create(fd, vm, 1, n,
> eci, ext, &val), -EINVAL);
>  
> +       /* Setting properties (other than MULTI_QUEUE_PRIORITY) is
> invalid for secondary queues */
> +       multi_queue.base.next_extension = to_user_pointer(&priority);
> +       igt_assert_eq(__xe_exec_queue_create(fd, vm, 1, 1, eci, ext,
> &val), -EINVAL);
> +
> +       multi_queue.base.next_extension = 0;
>         for (i = 1; i < MAX_N_EXEC_QUEUES; i++)
>                 exec_queues[i] = xe_exec_queue_create(fd, vm, eci,
> ext);
>  
> @@ -135,6 +160,37 @@ __test_sanity(int fd, int gt, int class)
>                         xe_exec_queue_destroy(fd, exec_queues[i]);
>         }
>  
> +       /* MQ priority is not valid for regular queues */
> +       igt_assert_eq(__xe_exec_queue_create(fd, vm, 1, 1, eci,
> +                                           
> to_user_pointer(&mq_priority), &val), -EINVAL);
> +
> +       /* MQ priority validation */
> +       multi_queue.value = DRM_XE_MULTI_GROUP_CREATE;
> +       multi_queue.base.next_extension =
> to_user_pointer(&mq_priority);
> +       mq_priority.value = XE_EXEC_QUEUE_NUM_PRIORITIES;
> +       igt_assert_eq(__xe_exec_queue_create(fd, vm, 1, 1, eci, ext,
> &val), -EINVAL);
> +
> +       mq_priority.value = XE_EXEC_QUEUE_PRIORITY_HIGH;
> +       exec_queues[0] = xe_exec_queue_create(fd, vm, eci, ext);
> +       multi_queue.value = exec_queues[0];
> +       exec_queues[1] = xe_exec_queue_create(fd, vm, eci, ext);
> +       xe_exec_queue_destroy(fd, exec_queues[1]);
> +       xe_exec_queue_destroy(fd, exec_queues[0]);
> +
> +       igt_fork(child, 1) {
> +               igt_drop_root();
> +
> +               /* Tests MULTI_QUEUE_PRIORITY property by dropping
> root permissions */
> +               multi_queue.value = DRM_XE_MULTI_GROUP_CREATE;
> +               mq_priority.value = XE_EXEC_QUEUE_PRIORITY_HIGH;
> +               exec_queues[0] = xe_exec_queue_create(fd, vm, eci,
> ext);
> +               multi_queue.value = exec_queues[0];
> +               exec_queues[1] = xe_exec_queue_create(fd, vm, eci,
> ext);
> +               xe_exec_queue_destroy(fd, exec_queues[1]);
> +               xe_exec_queue_destroy(fd, exec_queues[0]);
> +       }
> +       igt_waitchildren();
> +
>         xe_vm_destroy(fd, vm);
>  }
>  
> @@ -197,8 +253,17 @@ test_legacy_mode(int fd, struct
> drm_xe_engine_class_instance *eci, int num_place
>                         .base.name =
> DRM_XE_EXEC_QUEUE_EXTENSION_SET_PROPERTY,
>                         .property =
> DRM_XE_EXEC_QUEUE_SET_PROPERTY_MULTI_GROUP,
>                 };
> +               struct drm_xe_ext_set_property mq_priority = {
> +                       .base.name =
> DRM_XE_EXEC_QUEUE_EXTENSION_SET_PROPERTY,
> +                       .property =
> DRM_XE_EXEC_QUEUE_SET_PROPERTY_MULTI_QUEUE_PRIORITY,
> +               };
>                 uint64_t ext = to_user_pointer(&multi_queue);
>  
> +               if (flags & PRIORITY) {
> +                       multi_queue.base.next_extension =
> to_user_pointer(&mq_priority);
> +                       mq_priority.value =
> XE_EXEC_QUEUE_PRIORITY_NORMAL + (rand() % 2);
> +               }
> +
>                 multi_queue.value = i ? exec_queues[0] :
> DRM_XE_MULTI_GROUP_CREATE;
>                 igt_assert_eq(__xe_exec_queue_create(fd, vm, 1,
> num_placement, eci,
>                                                      ext,
> &exec_queues[i]), 0);
> @@ -299,6 +364,7 @@ test_legacy_mode(int fd, struct
> drm_xe_engine_class_instance *eci, int num_place
>   *
>   * @basic:                                     basic
>   * @userptr:                                   userptr
> + * @priority:                                  priority
>   */
>  static void
>  test_exec(int fd, struct drm_xe_engine_class_instance *eci, int
> num_placement,
> @@ -316,6 +382,7 @@ igt_main
>         } sections[] = {
>                 { "basic", 0 },
>                 { "userptr", USERPTR },
> +               { "priority", PRIORITY },
>                 { NULL },
>         };
>         int fd, gt, class;


  parent reply	other threads:[~2025-12-04 20:46 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-21  3:57 [PATCH v2 00/19] Multi Queue feature validation support Niranjana Vishwanathapura
2025-11-21  3:57 ` [PATCH v2 01/19] drm-uapi/xe: Sync with Multi-Queue uapi Niranjana Vishwanathapura
2025-12-04 19:19   ` Summers, Stuart
2025-12-04 20:58     ` Niranjana Vishwanathapura
2025-12-05 18:07       ` Summers, Stuart
2025-11-21  3:57 ` [PATCH v2 02/19] lib/xe: Add multi-queue helper routines Niranjana Vishwanathapura
2025-12-04 19:20   ` Summers, Stuart
2025-11-21  3:57 ` [PATCH v2 03/19] tests/intel/xe_exec_multi_queue: Add xe_exec_multi_queue test Niranjana Vishwanathapura
2025-12-04 20:02   ` Summers, Stuart
2025-12-05  1:34     ` Niranjana Vishwanathapura
2025-12-05 18:09       ` Summers, Stuart
2025-11-21  3:57 ` [PATCH v2 04/19] tests/intel/xe_exec_multi_queue: Validate exec submissions Niranjana Vishwanathapura
2025-12-02  5:27   ` Ch, Sai Gowtham
2025-12-04 20:42   ` Summers, Stuart
2025-11-21  3:57 ` [PATCH v2 05/19] tests/intel/xe_exec_multi_queue: Validate queue priority setting Niranjana Vishwanathapura
2025-12-02  5:29   ` Dandamudi, Priyanka
2025-12-04 20:45   ` Summers, Stuart [this message]
2025-11-21  3:57 ` [PATCH v2 06/19] tests/intel/xe_exec_multi_queue: Add close-fd tests Niranjana Vishwanathapura
2025-11-24  8:18   ` Goyal, Nakshtra
2025-12-04 20:46   ` Summers, Stuart
2025-11-21  3:57 ` [PATCH v2 07/19] tests/intel/xe_exec_multi_queue: Add multiple placement test Niranjana Vishwanathapura
2025-12-02  5:32   ` Dandamudi, Priyanka
2025-12-05 18:10   ` Summers, Stuart
2025-11-21  3:57 ` [PATCH v2 08/19] tests/intel/xe_exec_multi_queue: Add preempt mode test Niranjana Vishwanathapura
2025-12-04 20:52   ` Summers, Stuart
2025-12-05 19:12     ` Niranjana Vishwanathapura
2025-12-08 19:40       ` Summers, Stuart
2025-11-21  3:57 ` [PATCH v2 09/19] lib/xe: Add exec_queue set_property ioctl support Niranjana Vishwanathapura
2025-12-04 19:24   ` Summers, Stuart
2025-12-05  1:58     ` Niranjana Vishwanathapura
2025-12-05 18:11       ` Summers, Stuart
2025-11-21  3:57 ` [PATCH v2 10/19] tests/intel/xe_exec_multi_queue: Add dynamic priority test Niranjana Vishwanathapura
2025-12-04 20:53   ` Summers, Stuart
2025-11-21  3:57 ` [PATCH v2 11/19] tests/intel/xe_exec_multi_queue: Add userptr invalidation tests Niranjana Vishwanathapura
2025-12-04 20:56   ` Summers, Stuart
2025-11-21  3:57 ` [PATCH v2 12/19] tests/intel/xe_exec_multi_queue: Add fault mode test Niranjana Vishwanathapura
2025-11-21  5:04   ` Goyal, Nakshtra
2025-12-04 20:59   ` Summers, Stuart
2025-12-04 23:25     ` Niranjana Vishwanathapura
2025-12-05 18:13       ` Summers, Stuart
2025-11-21  3:57 ` [PATCH v2 13/19] tests/intel/xe_exec_multi_queue: Add multi queues with SMEM Niranjana Vishwanathapura
2025-12-04 19:56   ` Goyal, Nakshtra
2025-12-04 20:59   ` Summers, Stuart
2025-11-21  3:57 ` [PATCH v2 14/19] lib/xe/xe_spin: Add switch point for preemptible spinner Niranjana Vishwanathapura
2025-12-04 21:03   ` Summers, Stuart
2025-12-04 21:42     ` Niranjana Vishwanathapura
2025-12-05 18:45       ` Summers, Stuart
2025-11-21  3:57 ` [PATCH v2 15/19] tests/intel/xe_exec_multi_queue: Add priority test Niranjana Vishwanathapura
2025-12-02  5:28   ` Dandamudi, Priyanka
2025-12-04 21:53   ` Summers, Stuart
2025-12-05 18:23     ` Niranjana Vishwanathapura
2025-12-08 19:38       ` Summers, Stuart
2025-11-21  3:57 ` [PATCH v2 16/19] tests/intel/xe_exec_multi_queue: Add submission sanity test Niranjana Vishwanathapura
2025-12-02 11:46   ` Ch, Sai Gowtham
2025-12-04 21:08   ` Summers, Stuart
2025-12-04 21:28     ` Niranjana Vishwanathapura
2025-11-21  3:57 ` [PATCH v2 17/19] tests/intel/xe_exec_multi_queue: Sanity test KEEP_ACTIVE flag Niranjana Vishwanathapura
2025-12-04 21:10   ` Summers, Stuart
2025-12-04 21:20     ` Niranjana Vishwanathapura
2025-11-21  3:57 ` [PATCH v2 18/19] tests/intel/xe_exec_multi_queue: Keep group active in exec-sanity Niranjana Vishwanathapura
2025-12-02 11:51   ` Ch, Sai Gowtham
2025-12-04 21:12   ` Summers, Stuart
2025-11-21  3:57 ` [PATCH v2 19/19] tests/intel/xe_exec_queue_property: Update invalid-property test Niranjana Vishwanathapura
2025-12-04 19:25   ` Summers, Stuart
2025-12-04 21:11     ` Niranjana Vishwanathapura
2025-11-21  4:32 ` ✓ Xe.CI.BAT: success for Multi Queue feature validation support (rev2) Patchwork
2025-11-21  6:47 ` ✓ i915.CI.BAT: " Patchwork
2025-11-21  7:20 ` ✗ Xe.CI.Full: failure " Patchwork
2025-11-21  9:42 ` ✗ 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=be58876f8e297c0aa41705828f3605f8ed17f00a.camel@intel.com \
    --to=stuart.summers@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=kamil.konieczny@linux.intel.com \
    --cc=niranjana.vishwanathapura@intel.com \
    --cc=priyanka.dandamudi@intel.com \
    --cc=sai.gowtham.ch@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