Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] test/xe_spin_batch: Fix compilation failures
@ 2023-12-05 12:44 Nirmoy Das
  2023-12-05 13:03 ` [igt-dev] ✗ Fi.CI.BUILD: failure for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Nirmoy Das @ 2023-12-05 12:44 UTC (permalink / raw)
  To: igt-dev; +Cc: Nirmoy Das

Fix compilation failures with recent uAPI changes.

Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
---
 tests/intel/xe_spin_batch.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/intel/xe_spin_batch.c b/tests/intel/xe_spin_batch.c
index 87e1a86a2..a392c3c96 100644
--- a/tests/intel/xe_spin_batch.c
+++ b/tests/intel/xe_spin_batch.c
@@ -165,7 +165,7 @@ static void store_dword_batch(struct data *data, uint64_t addr, int value)
 static void preempter(int fd, struct drm_xe_engine_class_instance *hwe)
 {
 	struct drm_xe_sync sync = {
-		.flags = DRM_XE_SYNC_FLAG_SYNCOBJ | DRM_XE_SYNC_FLAG_SIGNAL
+		.flags = DRM_XE_SYNC_TYPE_SYNCOBJ | DRM_XE_SYNC_FLAG_SIGNAL
 	};
 	struct drm_xe_exec exec = {
 		.num_batch_buffer = 1,
@@ -195,8 +195,8 @@ static void preempter(int fd, struct drm_xe_engine_class_instance *hwe)
 	bo_size = ALIGN(bo_size + xe_cs_prefetch_size(fd),
 			xe_get_default_alignment(fd));
 
-	bo = xe_bo_create_flags(fd, vm, bo_size,
-				visible_vram_if_possible(fd, hwe->gt_id));
+	bo = xe_bo_create(fd, vm, bo_size,
+			  vram_if_possible(fd, hwe->gt_id), 0);
 
 	xe_vm_bind_async(fd, vm, hwe->gt_id, bo, 0, addr, bo_size, &sync, 1);
 	data = xe_bo_map(fd, bo, bo_size);
@@ -267,7 +267,7 @@ static void xe_spin_fixed_duration(int fd, int gt, int class, int flags)
 	if (flags & SPIN_FIX_DURATION_PREEMPT)
 		ext = to_user_pointer(&ext_prio);
 
-	xe_for_each_hw_engine(fd, _hwe)
+	xe_for_each_engine(fd, _hwe)
 		if (_hwe->engine_class == class && _hwe->gt_id == gt)
 			hwe = _hwe;
 
@@ -348,7 +348,7 @@ igt_main
 
 	igt_subtest("spin-fixed-duration-with-preempter")
 		xe_for_each_gt(fd, gt)
-			xe_for_each_hw_engine_class(class)
+			xe_for_each_engine_class(class)
 				xe_spin_fixed_duration(fd, gt, class, SPIN_FIX_DURATION_PREEMPT);
 
 	igt_fixture
-- 
2.42.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [igt-dev] ✗ Fi.CI.BUILD: failure for test/xe_spin_batch: Fix compilation failures
  2023-12-05 12:44 [igt-dev] [PATCH i-g-t] test/xe_spin_batch: Fix compilation failures Nirmoy Das
@ 2023-12-05 13:03 ` Patchwork
  2023-12-05 13:23 ` [igt-dev] [PATCH i-g-t] " Matthew Auld
  2023-12-05 13:40 ` [igt-dev] ✗ Fi.CI.BUILD: failure for test/xe_spin_batch: Fix compilation failures (rev2) Patchwork
  2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2023-12-05 13:03 UTC (permalink / raw)
  To: Nirmoy Das; +Cc: igt-dev

== Series Details ==

Series: test/xe_spin_batch: Fix compilation failures
URL   : https://patchwork.freedesktop.org/series/127355/
State : failure

== Summary ==

Applying: test/xe_spin_batch: Fix compilation failures
Using index info to reconstruct a base tree...
M	tests/intel/xe_spin_batch.c
Falling back to patching base and 3-way merge...
Auto-merging tests/intel/xe_spin_batch.c
CONFLICT (content): Merge conflict in tests/intel/xe_spin_batch.c
Patch failed at 0001 test/xe_spin_batch: Fix compilation failures
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] test/xe_spin_batch: Fix compilation failures
  2023-12-05 12:44 [igt-dev] [PATCH i-g-t] test/xe_spin_batch: Fix compilation failures Nirmoy Das
  2023-12-05 13:03 ` [igt-dev] ✗ Fi.CI.BUILD: failure for " Patchwork
@ 2023-12-05 13:23 ` Matthew Auld
  2023-12-05 13:31   ` Nirmoy Das
  2023-12-05 13:40 ` [igt-dev] ✗ Fi.CI.BUILD: failure for test/xe_spin_batch: Fix compilation failures (rev2) Patchwork
  2 siblings, 1 reply; 5+ messages in thread
From: Matthew Auld @ 2023-12-05 13:23 UTC (permalink / raw)
  To: Nirmoy Das; +Cc: igt-dev

On Tue, 5 Dec 2023 at 12:57, Nirmoy Das <nirmoy.das@intel.com> wrote:
>
> Fix compilation failures with recent uAPI changes.

s/test/tests/

>
> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
> ---
>  tests/intel/xe_spin_batch.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/tests/intel/xe_spin_batch.c b/tests/intel/xe_spin_batch.c
> index 87e1a86a2..a392c3c96 100644
> --- a/tests/intel/xe_spin_batch.c
> +++ b/tests/intel/xe_spin_batch.c
> @@ -165,7 +165,7 @@ static void store_dword_batch(struct data *data, uint64_t addr, int value)
>  static void preempter(int fd, struct drm_xe_engine_class_instance *hwe)
>  {
>         struct drm_xe_sync sync = {
> -               .flags = DRM_XE_SYNC_FLAG_SYNCOBJ | DRM_XE_SYNC_FLAG_SIGNAL
> +               .flags = DRM_XE_SYNC_TYPE_SYNCOBJ | DRM_XE_SYNC_FLAG_SIGNAL
>         };
>         struct drm_xe_exec exec = {
>                 .num_batch_buffer = 1,
> @@ -195,8 +195,8 @@ static void preempter(int fd, struct drm_xe_engine_class_instance *hwe)
>         bo_size = ALIGN(bo_size + xe_cs_prefetch_size(fd),
>                         xe_get_default_alignment(fd));
>
> -       bo = xe_bo_create_flags(fd, vm, bo_size,
> -                               visible_vram_if_possible(fd, hwe->gt_id));
> +       bo = xe_bo_create(fd, vm, bo_size,
> +                         vram_if_possible(fd, hwe->gt_id), 0);

Seems to need DRM_XE_GEM_CREATE_FLAG_NEEDS_VISIBLE_VRAM to keep the
same behaviour, I think.

Acked-by: Matthew Auld <matthew.auld@intel.com>

>
>         xe_vm_bind_async(fd, vm, hwe->gt_id, bo, 0, addr, bo_size, &sync, 1);
>         data = xe_bo_map(fd, bo, bo_size);
> @@ -267,7 +267,7 @@ static void xe_spin_fixed_duration(int fd, int gt, int class, int flags)
>         if (flags & SPIN_FIX_DURATION_PREEMPT)
>                 ext = to_user_pointer(&ext_prio);
>
> -       xe_for_each_hw_engine(fd, _hwe)
> +       xe_for_each_engine(fd, _hwe)
>                 if (_hwe->engine_class == class && _hwe->gt_id == gt)
>                         hwe = _hwe;
>
> @@ -348,7 +348,7 @@ igt_main
>
>         igt_subtest("spin-fixed-duration-with-preempter")
>                 xe_for_each_gt(fd, gt)
> -                       xe_for_each_hw_engine_class(class)
> +                       xe_for_each_engine_class(class)
>                                 xe_spin_fixed_duration(fd, gt, class, SPIN_FIX_DURATION_PREEMPT);
>
>         igt_fixture
> --
> 2.42.0
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] test/xe_spin_batch: Fix compilation failures
  2023-12-05 13:23 ` [igt-dev] [PATCH i-g-t] " Matthew Auld
@ 2023-12-05 13:31   ` Nirmoy Das
  0 siblings, 0 replies; 5+ messages in thread
From: Nirmoy Das @ 2023-12-05 13:31 UTC (permalink / raw)
  To: Matthew Auld; +Cc: igt-dev


On 12/5/2023 2:23 PM, Matthew Auld wrote:
> On Tue, 5 Dec 2023 at 12:57, Nirmoy Das <nirmoy.das@intel.com> wrote:
>> Fix compilation failures with recent uAPI changes.
> s/test/tests/
>
>> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
>> ---
>>   tests/intel/xe_spin_batch.c | 10 +++++-----
>>   1 file changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/tests/intel/xe_spin_batch.c b/tests/intel/xe_spin_batch.c
>> index 87e1a86a2..a392c3c96 100644
>> --- a/tests/intel/xe_spin_batch.c
>> +++ b/tests/intel/xe_spin_batch.c
>> @@ -165,7 +165,7 @@ static void store_dword_batch(struct data *data, uint64_t addr, int value)
>>   static void preempter(int fd, struct drm_xe_engine_class_instance *hwe)
>>   {
>>          struct drm_xe_sync sync = {
>> -               .flags = DRM_XE_SYNC_FLAG_SYNCOBJ | DRM_XE_SYNC_FLAG_SIGNAL
>> +               .flags = DRM_XE_SYNC_TYPE_SYNCOBJ | DRM_XE_SYNC_FLAG_SIGNAL
>>          };
>>          struct drm_xe_exec exec = {
>>                  .num_batch_buffer = 1,
>> @@ -195,8 +195,8 @@ static void preempter(int fd, struct drm_xe_engine_class_instance *hwe)
>>          bo_size = ALIGN(bo_size + xe_cs_prefetch_size(fd),
>>                          xe_get_default_alignment(fd));
>>
>> -       bo = xe_bo_create_flags(fd, vm, bo_size,
>> -                               visible_vram_if_possible(fd, hwe->gt_id));
>> +       bo = xe_bo_create(fd, vm, bo_size,
>> +                         vram_if_possible(fd, hwe->gt_id), 0);
> Seems to need DRM_XE_GEM_CREATE_FLAG_NEEDS_VISIBLE_VRAM to keep the
> same behaviour, I think.
>
> Acked-by: Matthew Auld <matthew.auld@intel.com>

Thanks Matt. Sent a v2 with the missing flag.


Nirmoy

>
>>          xe_vm_bind_async(fd, vm, hwe->gt_id, bo, 0, addr, bo_size, &sync, 1);
>>          data = xe_bo_map(fd, bo, bo_size);
>> @@ -267,7 +267,7 @@ static void xe_spin_fixed_duration(int fd, int gt, int class, int flags)
>>          if (flags & SPIN_FIX_DURATION_PREEMPT)
>>                  ext = to_user_pointer(&ext_prio);
>>
>> -       xe_for_each_hw_engine(fd, _hwe)
>> +       xe_for_each_engine(fd, _hwe)
>>                  if (_hwe->engine_class == class && _hwe->gt_id == gt)
>>                          hwe = _hwe;
>>
>> @@ -348,7 +348,7 @@ igt_main
>>
>>          igt_subtest("spin-fixed-duration-with-preempter")
>>                  xe_for_each_gt(fd, gt)
>> -                       xe_for_each_hw_engine_class(class)
>> +                       xe_for_each_engine_class(class)
>>                                  xe_spin_fixed_duration(fd, gt, class, SPIN_FIX_DURATION_PREEMPT);
>>
>>          igt_fixture
>> --
>> 2.42.0
>>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [igt-dev] ✗ Fi.CI.BUILD: failure for test/xe_spin_batch: Fix compilation failures (rev2)
  2023-12-05 12:44 [igt-dev] [PATCH i-g-t] test/xe_spin_batch: Fix compilation failures Nirmoy Das
  2023-12-05 13:03 ` [igt-dev] ✗ Fi.CI.BUILD: failure for " Patchwork
  2023-12-05 13:23 ` [igt-dev] [PATCH i-g-t] " Matthew Auld
@ 2023-12-05 13:40 ` Patchwork
  2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2023-12-05 13:40 UTC (permalink / raw)
  To: Nirmoy Das; +Cc: igt-dev

== Series Details ==

Series: test/xe_spin_batch: Fix compilation failures (rev2)
URL   : https://patchwork.freedesktop.org/series/127355/
State : failure

== Summary ==

Applying: test/xe_spin_batch: Fix compilation failures
Using index info to reconstruct a base tree...
M	tests/intel/xe_spin_batch.c
Falling back to patching base and 3-way merge...
Auto-merging tests/intel/xe_spin_batch.c
CONFLICT (content): Merge conflict in tests/intel/xe_spin_batch.c
Patch failed at 0001 test/xe_spin_batch: Fix compilation failures
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-12-05 13:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-05 12:44 [igt-dev] [PATCH i-g-t] test/xe_spin_batch: Fix compilation failures Nirmoy Das
2023-12-05 13:03 ` [igt-dev] ✗ Fi.CI.BUILD: failure for " Patchwork
2023-12-05 13:23 ` [igt-dev] [PATCH i-g-t] " Matthew Auld
2023-12-05 13:31   ` Nirmoy Das
2023-12-05 13:40 ` [igt-dev] ✗ Fi.CI.BUILD: failure for test/xe_spin_batch: Fix compilation failures (rev2) Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox