Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
To: "Summers, Stuart" <stuart.summers@intel.com>
Cc: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>,
	"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 17/19] tests/intel/xe_exec_multi_queue: Sanity test KEEP_ACTIVE flag
Date: Thu, 4 Dec 2025 13:20:03 -0800	[thread overview]
Message-ID: <aTH7AzT1uEGeL9He@nvishwa1-desk> (raw)
In-Reply-To: <dfa4a32b6459d404d4b06312ac502b9e72dcb020.camel@intel.com>

On Thu, Dec 04, 2025 at 01:10:38PM -0800, Summers, Stuart wrote:
>On Thu, 2025-11-20 at 19:57 -0800, Niranjana Vishwanathapura wrote:
>> Add DRM_XE_MULTI_GROUP_KEEP_ACTIVE to valid flags list.
>> Validate that KEEP_ACTIVE is not supported in preempt mode
>> unless fault mode is set.
>>
>> Signed-off-by: Niranjana Vishwanathapura
>> <niranjana.vishwanathapura@intel.com>
>> ---
>>  tests/intel/xe_exec_multi_queue.c | 31
>> +++++++++++++++++++++++++++++--
>>  1 file changed, 29 insertions(+), 2 deletions(-)
>>
>> diff --git a/tests/intel/xe_exec_multi_queue.c
>> b/tests/intel/xe_exec_multi_queue.c
>> index 9f7b3b4d7..288ef9ed8 100644
>> --- a/tests/intel/xe_exec_multi_queue.c
>> +++ b/tests/intel/xe_exec_multi_queue.c
>> @@ -37,10 +37,12 @@
>>  #define FAULT_MODE             (0x1 << 6)
>>  #define SMEM                   (0x1 << 7)
>>  #define WAIT_MODE              (0x1 << 8)
>> +#define KEEP_ACTIVE            (0x1 << 9)
>>  
>>  #define MAX_INSTANCE 9
>>  
>> -#define XE_MULTI_GROUP_VALID_FLAGS   (DRM_XE_MULTI_GROUP_CREATE)
>> +#define XE_MULTI_GROUP_VALID_FLAGS   (DRM_XE_MULTI_GROUP_CREATE
>> |        \
>> +                                     DRM_XE_MULTI_GROUP_KEEP_ACTIVE)
>>  
>>  #define BASE_ADDRESS   0x1a0000
>>  
>> @@ -81,7 +83,8 @@ __test_sanity(int fd, int gt, int class, bool
>> preempt_mode)
>>         if (!n)
>>                 return;
>>  
>> -       vm = xe_vm_create(fd, preempt_mode ?
>> DRM_XE_VM_CREATE_FLAG_LR_MODE : 0, 0);
>> +       vm = xe_vm_create(fd, preempt_mode ?
>> DRM_XE_VM_CREATE_FLAG_LR_MODE |
>> +                         DRM_XE_VM_CREATE_FLAG_FAULT_MODE : 0, 0);
>>  
>>         /* Invalid flags */
>>         while (!invalid_flag)
>> @@ -105,6 +108,15 @@ __test_sanity(int fd, int gt, int class, bool
>> preempt_mode)
>>         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);
>>  
>> +       /* KEEP_ACTIVE not supported in preempt mode without
>> fault_mode */
>> +       if (preempt_mode) {
>> +               vm2 = xe_vm_create(fd, preempt_mode ?
>> DRM_XE_VM_CREATE_FLAG_LR_MODE : 0, 0);
>
>Since we're checking preempt_mode explicitly in the if condition above,
>do we need to keep that here?
>

Yah, good catch, will remove the redundant check.

Niranjana

>Functionally all looks good though.
>
>Thanks,
>Stuart
>
>> +               multi_queue.value |= DRM_XE_MULTI_GROUP_KEEP_ACTIVE;
>> +               igt_assert_eq(__xe_exec_queue_create(fd, vm2, 1, 1,
>> eci, ext, &val), -EINVAL);
>> +               multi_queue.value &= ~DRM_XE_MULTI_GROUP_KEEP_ACTIVE;
>> +               xe_vm_destroy(fd, vm2);
>> +       }
>> +
>>         /* 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);
>> @@ -205,6 +217,21 @@ __test_sanity(int fd, int gt, int class, bool
>> preempt_mode)
>>         igt_waitchildren();
>>  
>>         xe_vm_destroy(fd, vm);
>> +
>> +       /* Validate closing FD while keeping group active */
>> +       fd = drm_open_driver(DRIVER_XE);
>> +       vm = xe_vm_create(fd, preempt_mode ?
>> DRM_XE_VM_CREATE_FLAG_LR_MODE |
>> +                         DRM_XE_VM_CREATE_FLAG_FAULT_MODE : 0, 0);
>> +
>> +       multi_queue.value = DRM_XE_MULTI_GROUP_CREATE |
>> DRM_XE_MULTI_GROUP_KEEP_ACTIVE;
>> +       multi_queue.base.next_extension = 0;
>> +       exec_queues[0] = xe_exec_queue_create(fd, vm, eci, ext);
>> +
>> +       multi_queue.value = exec_queues[0];
>> +       for (i = 1; i < MAX_N_EXEC_QUEUES; i++)
>> +               exec_queues[i] = xe_exec_queue_create(fd, vm, eci,
>> ext);
>> +
>> +       drm_close_driver(fd);
>>  }
>>  
>>  /**
>

  reply	other threads:[~2025-12-04 21:20 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
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 [this message]
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=aTH7AzT1uEGeL9He@nvishwa1-desk \
    --to=niranjana.vishwanathapura@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=kamil.konieczny@linux.intel.com \
    --cc=priyanka.dandamudi@intel.com \
    --cc=sai.gowtham.ch@intel.com \
    --cc=stuart.summers@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