Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH v2 0/2] RFC: drm-uapi/xe: add exec_queue_id member to drm_xe_wait_user_fence structure
@ 2023-12-06  6:47 Bommu Krishnaiah
  2023-12-06  6:47 ` [igt-dev] [PATCH v2 1/2] drm-uapi/xe: add exec_queue_id member to drm_xe_wait_user_fence structurei Bommu Krishnaiah
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Bommu Krishnaiah @ 2023-12-06  6:47 UTC (permalink / raw)
  To: igt-dev; +Cc: Bommu Krishnaiah

remove the num_engines/instances members from drm_xe_wait_user_fence structure
and add a exec_queue_id member

This test to excess behaviour when exec_queue reset happen

about test
Skipping the GPU mapping(vm_bind) for object, so that exec_queue
reset will happen and xe_wait_ufence will end return EIO not ETIME

I am able to see exec_queue reset was happened and xe_wait_user_fence_ioctl returned EIO

Need to modify below tests as per uapi changes, with current patch below tests will fail
xe_exec_balancer.c
xe_exec_compute_mode.c
xe_exec_fault_mode.c
xe_exec_reset.c
xe_exec_threads.c
xe_waitfence.c

test result
root@DUT7075PVC:/home/gta# LD_LIBRARY_PATH=/home/gta/ ./xe_waitfence --r invalid-exec_queue-wait
IGT-Version: 1.28-g3c0162fc4 (x86_64) (Linux: 6.6.0-rc3-xe x86_64)
Opened device: /dev/dri/card0
Starting subtest: invalid-exec_queue-wait
Subtest invalid-exec_queue-wait: SUCCESS (0.993s)

dmesg logs
[  807.680378] [IGT] xe_waitfence: executing
[  807.699796] [drm:drm_stub_open [drm]]
[  807.704536] xe 0000:51:00.0: [drm:drm_open_helper [drm]] comm="xe_waitfence", pid=2952, minor=0
[  807.715155] xe 0000:51:00.0: [drm:drm_ioctl [drm]] comm="xe_waitfence" pid=2952, dev=0xe200, auth=1, DRM_IOCTL_VERSION
[  807.727328] xe 0000:51:00.0: [drm:drm_ioctl [drm]] comm="xe_waitfence" pid=2952, dev=0xe200, auth=1, DRM_IOCTL_VERSION
[  807.739580] xe 0000:51:00.0: [drm:drm_ioctl [drm]] comm="xe_waitfence" pid=2952, dev=0xe200, auth=1, XE_DEVICE_QUERY
[  807.751518] xe 0000:51:00.0: [drm:drm_ioctl [drm]] comm="xe_waitfence" pid=2952, dev=0xe200, auth=1, XE_DEVICE_QUERY
[  807.763550] xe 0000:51:00.0: [drm:drm_ioctl [drm]] comm="xe_waitfence" pid=2952, dev=0xe200, auth=1, XE_DEVICE_QUERY
[  807.775525] xe 0000:51:00.0: [drm:drm_ioctl [drm]] comm="xe_waitfence" pid=2952, dev=0xe200, auth=1, XE_DEVICE_QUERY
[  807.787556] xe 0000:51:00.0: [drm:drm_ioctl [drm]] comm="xe_waitfence" pid=2952, dev=0xe200, auth=1, XE_DEVICE_QUERY
[  807.799494] xe 0000:51:00.0: [drm:drm_ioctl [drm]] comm="xe_waitfence" pid=2952, dev=0xe200, auth=1, XE_DEVICE_QUERY
[  807.811531] xe 0000:51:00.0: [drm:drm_ioctl [drm]] comm="xe_waitfence" pid=2952, dev=0xe200, auth=1, XE_DEVICE_QUERY
[  807.823476] xe 0000:51:00.0: [drm:drm_ioctl [drm]] comm="xe_waitfence" pid=2952, dev=0xe200, auth=1, XE_DEVICE_QUERY
[  807.835577] xe 0000:51:00.0: [drm:drm_ioctl [drm]] comm="xe_waitfence" pid=2952, dev=0xe200, auth=1, DRM_IOCTL_VERSION
[  807.847921] [IGT] xe_waitfence: starting subtest invalid-exec_queue-wait
[  807.855528] xe 0000:51:00.0: [drm:drm_ioctl [drm]] comm="xe_waitfence" pid=2952, dev=0xe200, auth=1, XE_VM_CREATE
[  807.891346] xe 0000:51:00.0: [drm:xe_reg_sr_apply_mmio [xe]] GT0: Applying GT save-restore MMIOs
[  807.901602] xe 0000:51:00.0: [drm:xe_reg_sr_apply_mmio [xe]] GT0: REG[0x9424] = 0x7ffffffc
-----------------
-----------------
[  808.560967] xe REG[0x4500-0x45ff]: deny rw access
[  808.566292] xe REG[0x1e3a8-0x1e3af]: allow read access
[  808.572161] xe 0000:51:00.0: [drm:xe_reg_sr_apply_mmio [xe]] GT0: Applying ccs3 save-restore MMIOs
[  808.582462] xe 0000:51:00.0: [drm:xe_reg_sr_apply_mmio [xe]] GT0: REG[0x260c4] = 0x3f7e0104
[  808.592096] xe 0000:51:00.0: [drm:xe_reg_sr_apply_whitelist [xe]] Whitelisting ccs3 registers
[  808.601962] xe REG[0x4400-0x45ff]: deny rw access
[  808.607281] xe REG[0x4500-0x45ff]: deny rw access
[  808.612608] xe REG[0x263a8-0x263af]: allow read access
[  808.618477] xe 0000:51:00.0: [drm] GT0: resumed
[  808.626283] xe 0000:51:00.0: [drm:drm_ioctl [drm]] comm="xe_waitfence" pid=2952, dev=0xe200, auth=1, XE_EXEC_QUEUE_CREATE
[  808.638765] krishna xe_exec_queue_create_ioctl
[  808.645592] krishna args->exec_queue_id = 1
[  808.650328] xe 0000:51:00.0: [drm:drm_ioctl [drm]] comm="xe_waitfence" pid=2952, dev=0xe200, auth=1, XE_GEM_CREATE
[  808.662621] xe 0000:51:00.0: [drm:xe_migrate_clear [xe]] Pass 0, size: 262144
[  808.672889] xe 0000:51:00.0: [drm:drm_ioctl [drm]] comm="xe_waitfence" pid=2952, dev=0xe200, auth=1, XE_GEM_MMAP_OFFSET
[  808.685733] xe 0000:51:00.0: [drm:drm_ioctl [drm]] comm="xe_waitfence" pid=2952, dev=0xe200, auth=1, XE_EXEC
[  808.696900] krishna args->exec_queue_id = 1
[  808.702700] xe 0000:51:00.0: [drm:drm_ioctl [drm]] comm="xe_waitfence" pid=2952, dev=0xe200, auth=1, XE_WAIT_USER_FENCE
[  808.704620] xe 0000:51:00.0: [drm:pf_queue_work_func [xe]]
                ASID: 1048575
                VFID: 0
                PDATA: 0x00a3
                Faulted Address: 0x00000000001a0000
                FaultType: 0
                AccessType: 0
                FaultLevel: 4
                EngineClass: 3
                EngineInstance: 0
[  808.750685] xe 0000:51:00.0: [drm:pf_queue_work_func [xe]] Fault response: Unsuccessful -22
[  808.760519] xe 0000:51:00.0: [drm:xe_guc_exec_queue_memory_cat_error_handler [xe]] Engine memory cat error: guc_id=2
[  808.773237] xe 0000:51:00.0: [drm] exec gueue reset detected
[  808.773965] xe 0000:51:00.0: [drm] Timedout job: seqno=4294967169, guc_id=2, flags=0x8
[  808.779632] xe 0000:51:00.0: [drm:xe_wait_user_fence_ioctl [xe]] Ioctl argument check failed at drivers/gpu/drm/xe/xe_wait_user_fence.c:174: err < 0
[  808.789655] xe 0000:51:00.0: [drm] Xe device coredump has been created
[  808.803796] xe 0000:51:00.0: [drm:drm_ioctl [drm]] comm="xe_waitfence", pid=2952, ret=-5
[  808.811133] xe 0000:51:00.0: [drm] Check your /sys/class/drm/card0/device/devcoredump/data
[  808.811220] xe 0000:51:00.0: [drm:drm_ioctl [drm]] comm="xe_waitfence" pid=2952, dev=0xe200, auth=1, XE_EXEC_QUEUE_DESTROY
[  808.823605] xe 0000:51:00.0: [drm] Engine reset: guc_id=2
[  808.829862] xe 0000:51:00.0: [drm:drm_ioctl [drm]] comm="xe_waitfence" pid=2952, dev=0xe200, auth=1, DRM_IOCTL_GEM_CLOSE
[  808.843312] xe 0000:51:00.0: [drm:guc_exec_queue_timedout_job [xe]] Timedout signaled job: seqno=4294967169, guc_id=2, flags=0x9
[  808.848707] [IGT] xe_waitfence: finished subtest invalid-exec_queue-wait, SUCCESS
[  808.882255] xe 0000:51:00.0: [drm:drm_ioctl [drm]] comm="xe_waitfence" pid=2952, dev=0xe200, auth=1, DRM_IOCTL_VERSION
[  808.894404] xe 0000:51:00.0: [drm:drm_file_free.part.0 [drm]] comm="xe_waitfence", pid=2952, dev=0xe200, open_count=1
[  808.907374] xe 0000:51:00.0: [drm:drm_lastclose [drm]]
[  808.913594] xe 0000:51:00.0: [drm:drm_lastclose [drm]] driver lastclose completed
[  808.922416] [IGT] xe_waitfence: exiting, ret=0




Bommu Krishnaiah (2):
  drm-uapi/xe: add exec_queue_id member to drm_xe_wait_user_fence
    structurei
  drm-uapi/xe: kill xe_wait_user_fence_ioctl  when exec_queue reset

 include/drm-uapi/xe_drm.h  | 16 ++------
 tests/intel/xe_waitfence.c | 83 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 87 insertions(+), 12 deletions(-)

-- 
2.25.1

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

* [igt-dev] [PATCH v2 1/2] drm-uapi/xe: add exec_queue_id member to drm_xe_wait_user_fence structurei
  2023-12-06  6:47 [igt-dev] [PATCH v2 0/2] RFC: drm-uapi/xe: add exec_queue_id member to drm_xe_wait_user_fence structure Bommu Krishnaiah
@ 2023-12-06  6:47 ` Bommu Krishnaiah
  2023-12-06 10:30   ` Francois Dugast
  2023-12-06  6:48 ` [igt-dev] [PATCH v2 2/2] drm-uapi/xe: kill xe_wait_user_fence_ioctl when exec_queue reset Bommu Krishnaiah
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 6+ messages in thread
From: Bommu Krishnaiah @ 2023-12-06  6:47 UTC (permalink / raw)
  To: igt-dev; +Cc: Bommu Krishnaiah, Rodrigo Vivi

remove the num_engines/instances members from drm_xe_wait_user_fence structure
and add a exec_queue_id member

Right now this is only checking if the engine list is sane and nothing
else. In the end every operation with this IOCTL is a soft check.
So, let's formalize that and only use this IOCTL to wait on the fence.

exec_queue_id member will help to user space to get proper error code
from kernel while in exec_queue reset

Signed-off-by: Bommu Krishnaiah <krishnaiah.bommu@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Francois Dugast <francois.dugast@intel.com>
---
 include/drm-uapi/xe_drm.h | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/include/drm-uapi/xe_drm.h b/include/drm-uapi/xe_drm.h
index 590f7b7af..a1c6d8932 100644
--- a/include/drm-uapi/xe_drm.h
+++ b/include/drm-uapi/xe_drm.h
@@ -1024,8 +1024,7 @@ struct drm_xe_wait_user_fence {
 	/** @op: wait operation (type of comparison) */
 	__u16 op;
 
-#define DRM_XE_UFENCE_WAIT_FLAG_SOFT_OP	(1 << 0)	/* e.g. Wait on VM bind */
-#define DRM_XE_UFENCE_WAIT_FLAG_ABSTIME	(1 << 1)
+#define DRM_XE_UFENCE_WAIT_FLAG_ABSTIME	(1 << 0)
 	/** @flags: wait flags */
 	__u16 flags;
 
@@ -1058,17 +1057,10 @@ struct drm_xe_wait_user_fence {
 	 */
 	__s64 timeout;
 
-	/**
-	 * @num_engines: number of engine instances to wait on, must be zero
-	 * when DRM_XE_UFENCE_WAIT_FLAG_SOFT_OP set
-	 */
-	__u64 num_engines;
-
-	/**
-	 * @instances: user pointer to array of drm_xe_engine_class_instance to
-	 * wait on, must be NULL when DRM_XE_UFENCE_WAIT_FLAG_SOFT_OP set
+	/** @exec_queue_id: exec_queue_id returned from xe_exec_queue_create_ioctl
+	  * exec_queue_id is help to find exec_queue reset status
 	 */
-	__u64 instances;
+	__u32 exec_queue_id;
 
 	/** @reserved: Reserved */
 	__u64 reserved[2];
-- 
2.25.1

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

* [igt-dev] [PATCH v2 2/2] drm-uapi/xe: kill xe_wait_user_fence_ioctl when exec_queue reset
  2023-12-06  6:47 [igt-dev] [PATCH v2 0/2] RFC: drm-uapi/xe: add exec_queue_id member to drm_xe_wait_user_fence structure Bommu Krishnaiah
  2023-12-06  6:47 ` [igt-dev] [PATCH v2 1/2] drm-uapi/xe: add exec_queue_id member to drm_xe_wait_user_fence structurei Bommu Krishnaiah
@ 2023-12-06  6:48 ` Bommu Krishnaiah
  2023-12-06  7:15 ` [igt-dev] ✗ Fi.CI.BUILD: failure for RFC: drm-uapi/xe: add exec_queue_id member to drm_xe_wait_user_fence structure (rev2) Patchwork
  2023-12-06  7:22 ` [igt-dev] ✗ GitLab.Pipeline: warning " Patchwork
  3 siblings, 0 replies; 6+ messages in thread
From: Bommu Krishnaiah @ 2023-12-06  6:48 UTC (permalink / raw)
  To: igt-dev; +Cc: Bommu Krishnaiah, Rodrigo Vivi

Skipping the GPU mapping(vm_bind) for object, so that exec_queue
reset will happen and xe_wait_ufence will end return EIO not ETIME

Signed-off-by: Bommu Krishnaiah <krishnaiah.bommu@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Francois Dugast <francois.dugast@intel.com>
---
 tests/intel/xe_waitfence.c | 83 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 83 insertions(+)

diff --git a/tests/intel/xe_waitfence.c b/tests/intel/xe_waitfence.c
index 3be987954..ac3c64652 100644
--- a/tests/intel/xe_waitfence.c
+++ b/tests/intel/xe_waitfence.c
@@ -152,6 +152,9 @@ waitfence(int fd, enum waittype wt)
  *
  * SUBTEST: invalid-engine
  * Description: Check query with invalid engine info returns expected error code
+ *
+ * SUBTEST: invalid-exec_queue-wait
+ * Description: Check xe_wait_ufence will return expected error code while exec_queue reset happen
  */
 
 static void
@@ -229,6 +232,83 @@ invalid_engine(int fd)
 	do_ioctl_err(fd, DRM_IOCTL_XE_WAIT_USER_FENCE, &wait, EFAULT);
 }
 
+static void
+invalid_exec_queue_wait(int fd)
+{
+	uint32_t bo, b;
+	uint64_t batch_offset;
+	uint64_t batch_addr;
+	uint64_t sdi_offset;
+	uint64_t sdi_addr;
+	uint64_t addr = 0x1a0000;
+
+	struct {
+		uint32_t batch[16];
+		uint64_t pad;
+		uint64_t vm_sync;
+		uint64_t exec_sync;
+		uint32_t data;
+	} *data;
+
+#define USER_FENCE_VALUE        0xdeadbeefdeadbeefull
+	struct drm_xe_sync sync[1] = {
+		{ .flags = DRM_XE_SYNC_FLAG_USER_FENCE | DRM_XE_SYNC_FLAG_SIGNAL,
+			.timeline_value = USER_FENCE_VALUE },
+	};
+
+	struct drm_xe_exec exec = {
+		.num_batch_buffer = 1,
+		.num_syncs = 1,
+		.syncs = to_user_pointer(sync),
+	};
+
+	uint32_t vm = xe_vm_create(fd, DRM_XE_VM_CREATE_FLAG_ASYNC_DEFAULT, 0);
+	uint32_t exec_queue = xe_exec_queue_create_class(fd, vm, DRM_XE_ENGINE_CLASS_COPY);
+	struct drm_xe_wait_user_fence1 wait = {
+		.op = DRM_XE_UFENCE_WAIT_OP_EQ,
+		.flags = 0,
+		.value = 0xaabbaa,
+		.mask = DRM_XE_UFENCE_WAIT_MASK_U64,
+		.timeout = -1,
+		.exec_queue_id = exec_queue,
+	};
+
+	bo = xe_bo_create_flags(fd, vm, 0x40000, MY_FLAG);
+	data = xe_bo_map(fd, bo, 0x40000);
+
+	batch_offset = (char *)&data[0].batch - (char *)data;
+	batch_addr = addr + batch_offset;
+	sdi_offset = (char *)&data[0].data - (char *)data;
+	sdi_addr = addr + sdi_offset;
+
+	b = 0;
+	data[0].batch[b++] = MI_STORE_DWORD_IMM_GEN4;
+	data[0].batch[b++] = sdi_addr;
+	data[0].batch[b++] = sdi_addr >> 32;
+	data[0].batch[b++] = 0xaabbcc;
+	data[0].batch[b++] = MI_BATCH_BUFFER_END;
+	igt_assert(b <= ARRAY_SIZE(data[0].batch));
+
+	wait.addr = to_user_pointer(&data[0].exec_sync);
+	exec.exec_queue_id = exec_queue;
+	exec.address = batch_addr;
+
+	xe_exec(fd, &exec);
+
+	/**
+	 * Skipping the GPU mapping(vm_bind) for object, so that exec_queue
+	 * reset will happen and xe_wait_ufence will end return EIO not ETIME
+	 */
+	do_ioctl_err(fd, DRM_IOCTL_XE_WAIT_USER_FENCE, &wait, EIO);
+
+	xe_exec_queue_destroy(fd, exec_queue);
+
+	if (bo) {
+		munmap(data, 0x40000);
+		gem_close(fd, bo);
+	}
+}
+
 
 igt_main
 {
@@ -255,6 +335,9 @@ igt_main
 	igt_subtest("invalid-engine")
 		invalid_engine(fd);
 
+	igt_subtest("invalid-exec_queue-wait")
+		invalid_exec_queue_wait(fd);
+
 	igt_fixture
 		drm_close_driver(fd);
 }
-- 
2.25.1

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

* [igt-dev] ✗ Fi.CI.BUILD: failure for RFC: drm-uapi/xe: add exec_queue_id member to drm_xe_wait_user_fence structure (rev2)
  2023-12-06  6:47 [igt-dev] [PATCH v2 0/2] RFC: drm-uapi/xe: add exec_queue_id member to drm_xe_wait_user_fence structure Bommu Krishnaiah
  2023-12-06  6:47 ` [igt-dev] [PATCH v2 1/2] drm-uapi/xe: add exec_queue_id member to drm_xe_wait_user_fence structurei Bommu Krishnaiah
  2023-12-06  6:48 ` [igt-dev] [PATCH v2 2/2] drm-uapi/xe: kill xe_wait_user_fence_ioctl when exec_queue reset Bommu Krishnaiah
@ 2023-12-06  7:15 ` Patchwork
  2023-12-06  7:22 ` [igt-dev] ✗ GitLab.Pipeline: warning " Patchwork
  3 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2023-12-06  7:15 UTC (permalink / raw)
  To: Bommu Krishnaiah; +Cc: igt-dev

== Series Details ==

Series: RFC: drm-uapi/xe: add exec_queue_id member to drm_xe_wait_user_fence structure (rev2)
URL   : https://patchwork.freedesktop.org/series/127364/
State : failure

== Summary ==

IGT patchset build failed on latest successful build
48a47d91b7727215b965690c69d84159c8fb1aa2 Revert "test/xe_spin_batch: Add spin-fixed-duration-with-preempter"

Tail of build.log:
[314/1662] Compiling C object 'lib/76b5a35@@igt-intel_allocator_c@sta/intel_allocator.c.o'.
[315/1662] Compiling C object 'lib/76b5a35@@igt-xe_xe_spin_c@sta/xe_xe_spin.c.o'.
[316/1662] Compiling C object 'lib/76b5a35@@igt-xe_xe_query_c@sta/xe_xe_query.c.o'.
[317/1662] Compiling C object 'tests/59830eb@@kms_tv_load_detect@exe/kms_tv_load_detect.c.o'.
[318/1662] Compiling C object 'lib/76b5a35@@igt-igt_dummyload_c@sta/igt_dummyload.c.o'.
[319/1662] Compiling C object 'lib/76b5a35@@igt-igt_frame_c@sta/igt_frame.c.o'.
[320/1662] Compiling C object 'lib/76b5a35@@igt-rendercopy_gen7_c@sta/rendercopy_gen7.c.o'.
[321/1662] Compiling C object 'tests/59830eb@@meta_test@exe/meta_test.c.o'.
[322/1662] Compiling C object 'lib/76b5a35@@igt-igt_alsa_c@sta/igt_alsa.c.o'.
[323/1662] Compiling C object 'lib/76b5a35@@igt-igt_v3d_c@sta/igt_v3d.c.o'.
[324/1662] Compiling C object 'tests/59830eb@@kms_sysfs_edid_timing@exe/kms_sysfs_edid_timing.c.o'.
[325/1662] Compiling C object 'lib/76b5a35@@igt-igt_device_scan_c@sta/igt_device_scan.c.o'.
[326/1662] Compiling C object 'tests/59830eb@@panfrost_get_param@exe/panfrost_get_param.c.o'.
[327/1662] Compiling C object 'lib/76b5a35@@igt-xe_xe_util_c@sta/xe_xe_util.c.o'.
[328/1662] Compiling C object 'tests/59830eb@@panfrost_prime@exe/panfrost_prime.c.o'.
[329/1662] Compiling C object 'lib/76b5a35@@igt-igt_audio_c@sta/igt_audio.c.o'.
[330/1662] Compiling C object 'tests/59830eb@@kms_scaling_modes@exe/kms_scaling_modes.c.o'.
[331/1662] Compiling C object 'lib/76b5a35@@igt-gpu_cmds_c@sta/gpu_cmds.c.o'.
[332/1662] Compiling C object 'lib/76b5a35@@igt-rendercopy_gen6_c@sta/rendercopy_gen6.c.o'.
[333/1662] Compiling C object 'lib/76b5a35@@igt-igt_pm_c@sta/igt_pm.c.o'.
[334/1662] Compiling C object 'lib/76b5a35@@igt-igt_draw_c@sta/igt_draw.c.o'.
[335/1662] Compiling C object 'lib/76b5a35@@igt-igt_aux_c@sta/igt_aux.c.o'.
[336/1662] Compiling C object 'tests/59830eb@@kms_plane_scaling@exe/kms_plane_scaling.c.o'.
[337/1662] Compiling C object 'lib/76b5a35@@igt-igt_amd_c@sta/igt_amd.c.o'.
[338/1662] Compiling C object 'lib/76b5a35@@igt-intel_bufops_c@sta/intel_bufops.c.o'.
[339/1662] Compiling C object 'tests/59830eb@@kms_flip@exe/kms_flip.c.o'.
[340/1662] Compiling C object 'tests/59830eb@@kms_vrr@exe/kms_vrr.c.o'.
[341/1662] Compiling C object 'lib/76b5a35@@igt-igt_vmwgfx_c@sta/igt_vmwgfx.c.o'.
[342/1662] Compiling C object 'tests/59830eb@@kms_tiled_display@exe/kms_tiled_display.c.o'.
[343/1662] Compiling C object 'lib/76b5a35@@igt-intel_blt_c@sta/intel_blt.c.o'.
[344/1662] Compiling C object 'tests/59830eb@@kms_vblank@exe/kms_vblank.c.o'.
[345/1662] Compiling C object 'tests/59830eb@@kms_writeback@exe/kms_writeback.c.o'.
[346/1662] Generating i915-perf-registers-acmgt3 with a custom command.
[347/1662] Compiling C object 'tests/59830eb@@kms_universal_plane@exe/kms_universal_plane.c.o'.
[348/1662] Compiling C object 'lib/76b5a35@@igt-igt_kmod_c@sta/igt_kmod.c.o'.
[349/1662] Compiling C object 'tests/59830eb@@kms_setmode@exe/kms_setmode.c.o'.
[350/1662] Compiling C object 'tests/59830eb@@kms_atomic@exe/kms_atomic.c.o'.
[351/1662] Generating i915-perf-metrics-acmgt3 with a custom command.
[352/1662] Compiling C object 'lib/76b5a35@@igt-rendercopy_gen8_c@sta/rendercopy_gen8.c.o'.
[353/1662] Compiling C object 'lib/76b5a35@@igt-intel_batchbuffer_c@sta/intel_batchbuffer.c.o'.
[354/1662] Compiling C object 'lib/76b5a35@@igt-igt_core_c@sta/igt_core.c.o'.
[355/1662] Compiling C object 'tests/59830eb@@kms_cursor_legacy@exe/kms_cursor_legacy.c.o'.
[356/1662] Compiling C object 'lib/76b5a35@@igt-igt_chamelium_c@sta/igt_chamelium.c.o'.
[357/1662] Compiling C object 'lib/76b5a35@@igt-rendercopy_gen9_c@sta/rendercopy_gen9.c.o'.
[358/1662] Compiling C object 'tests/59830eb@@gem_userptr_blits@exe/intel_gem_userptr_blits.c.o'.
[359/1662] Compiling C object 'lib/76b5a35@@igt-i915_intel_decode_c@sta/i915_intel_decode.c.o'.
[360/1662] Compiling C object 'lib/76b5a35@@igt-igt_kms_c@sta/igt_kms.c.o'.
[361/1662] Compiling C object 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o'.
[362/1662] Generating i915-perf-equations with a custom command.
ninja: build stopped: subcommand failed.


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

* [igt-dev] ✗ GitLab.Pipeline: warning for RFC: drm-uapi/xe: add exec_queue_id member to drm_xe_wait_user_fence structure (rev2)
  2023-12-06  6:47 [igt-dev] [PATCH v2 0/2] RFC: drm-uapi/xe: add exec_queue_id member to drm_xe_wait_user_fence structure Bommu Krishnaiah
                   ` (2 preceding siblings ...)
  2023-12-06  7:15 ` [igt-dev] ✗ Fi.CI.BUILD: failure for RFC: drm-uapi/xe: add exec_queue_id member to drm_xe_wait_user_fence structure (rev2) Patchwork
@ 2023-12-06  7:22 ` Patchwork
  3 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2023-12-06  7:22 UTC (permalink / raw)
  To: Bommu Krishnaiah; +Cc: igt-dev

== Series Details ==

Series: RFC: drm-uapi/xe: add exec_queue_id member to drm_xe_wait_user_fence structure (rev2)
URL   : https://patchwork.freedesktop.org/series/127364/
State : warning

== Summary ==

Pipeline status: FAILED.

see https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/1050547 for the overview.

build:tests-debian-meson has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/52421309):
      ^~~~~~~~~~~
  ../lib/xe/xe_ioctl.c:504:4: error: ‘struct drm_xe_wait_user_fence’ has no member named ‘instances’
     .instances = eci ? to_user_pointer(eci) : 0,
      ^~~~~~~~~
  ../lib/xe/xe_ioctl.c:496:39: error: missing braces around initializer [-Werror=missing-braces]
    struct drm_xe_wait_user_fence wait = {
                                         ^
  ../lib/xe/xe_ioctl.c:504:16:
     .instances = eci ? to_user_pointer(eci) : 0,
                  {
    };
    }
  cc1: some warnings being treated as errors
  ninja: build stopped: subcommand failed.
  section_end:1701847016:step_script
  section_start:1701847016:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1701847017:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

build:tests-debian-meson-arm64 has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/52421312):
      ^~~~~~~~~~~
  ../lib/xe/xe_ioctl.c:504:4: error: ‘struct drm_xe_wait_user_fence’ has no member named ‘instances’
     .instances = eci ? to_user_pointer(eci) : 0,
      ^~~~~~~~~
  ../lib/xe/xe_ioctl.c:496:39: error: missing braces around initializer [-Werror=missing-braces]
    struct drm_xe_wait_user_fence wait = {
                                         ^
  ../lib/xe/xe_ioctl.c:504:16:
     .instances = eci ? to_user_pointer(eci) : 0,
                  {
    };
    }
  cc1: some warnings being treated as errors
  ninja: build stopped: subcommand failed.
  section_end:1701847039:step_script
  section_start:1701847039:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1701847040:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

build:tests-debian-meson-armhf has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/52421311):
      ^~~~~~~~~~~
  ../lib/xe/xe_ioctl.c:504:4: error: ‘struct drm_xe_wait_user_fence’ has no member named ‘instances’
     .instances = eci ? to_user_pointer(eci) : 0,
      ^~~~~~~~~
  ../lib/xe/xe_ioctl.c:496:39: error: missing braces around initializer [-Werror=missing-braces]
    struct drm_xe_wait_user_fence wait = {
                                         ^
  ../lib/xe/xe_ioctl.c:504:16:
     .instances = eci ? to_user_pointer(eci) : 0,
                  {
    };
    }
  cc1: some warnings being treated as errors
  ninja: build stopped: subcommand failed.
  section_end:1701847039:step_script
  section_start:1701847039:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1701847040:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

build:tests-debian-meson-mips has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/52421313):
      ^~~~~~~~~~~
  ../lib/xe/xe_ioctl.c:504:4: error: ‘struct drm_xe_wait_user_fence’ has no member named ‘instances’
     .instances = eci ? to_user_pointer(eci) : 0,
      ^~~~~~~~~
  ../lib/xe/xe_ioctl.c:496:39: error: missing braces around initializer [-Werror=missing-braces]
    struct drm_xe_wait_user_fence wait = {
                                         ^
  ../lib/xe/xe_ioctl.c:504:16:
     .instances = eci ? to_user_pointer(eci) : 0,
                  {
    };
    }
  cc1: some warnings being treated as errors
  ninja: build stopped: subcommand failed.
  section_end:1701847039:step_script
  section_start:1701847039:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1701847040:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

build:tests-debian-minimal has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/52421310):
      ^~~~~~~~~~~
  ../lib/xe/xe_ioctl.c:504:4: error: ‘struct drm_xe_wait_user_fence’ has no member named ‘instances’
     .instances = eci ? to_user_pointer(eci) : 0,
      ^~~~~~~~~
  ../lib/xe/xe_ioctl.c:496:39: error: missing braces around initializer [-Werror=missing-braces]
    struct drm_xe_wait_user_fence wait = {
                                         ^
  ../lib/xe/xe_ioctl.c:504:16:
     .instances = eci ? to_user_pointer(eci) : 0,
                  {
    };
    }
  cc1: some warnings being treated as errors
  ninja: build stopped: subcommand failed.
  section_end:1701847008:step_script
  section_start:1701847008:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1701847009:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

build:tests-fedora has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/52421304):
        |    ^~~~~~~~~~~
  ../lib/xe/xe_ioctl.c:504:4: error: ‘struct drm_xe_wait_user_fence’ has no member named ‘instances’
    504 |   .instances = eci ? to_user_pointer(eci) : 0,
        |    ^~~~~~~~~
  ../lib/xe/xe_ioctl.c:496:39: error: missing braces around initializer [-Werror=missing-braces]
    496 |  struct drm_xe_wait_user_fence wait = {
        |                                       ^
  ......
    504 |   .instances = eci ? to_user_pointer(eci) : 0,
        |                {
    505 |  };
        |  }
  cc1: some warnings being treated as errors
  ninja: build stopped: subcommand failed.
  section_end:1701847018:step_script
  section_start:1701847018:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1701847019:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

build:tests-fedora-clang has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/52421308):
  [5/1437] Linking static target lib/libigt-igt_amd_c.a.
  [6/1437] Linking static target lib/libigt-veboxcopy_gen12_c.a.
  [7/1437] Linking static target lib/libigt-igt_msm_c.a.
  [8/1437] Compiling C object 'lib/76b5a35@@igt-xe_xe_ioctl_c@sta/xe_xe_ioctl.c.o'.
  FAILED: lib/76b5a35@@igt-xe_xe_ioctl_c@sta/xe_xe_ioctl.c.o 
  clang -Ilib/76b5a35@@igt-xe_xe_ioctl_c@sta -Ilib -I../lib -I../include -I../include/drm-uapi -I../include/linux-uapi -I../lib/stubs/syscalls -I. -I../ -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libdrm -I/usr/include/libdrm/nouveau -I/usr/include/valgrind -Xclang -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -O2 -g -D_GNU_SOURCE -include config.h -D_FORTIFY_SOURCE=2 -Wbad-function-cast -Wdeclaration-after-statement -Wformat=2 -Wmissing-declarations -Wmissing-format-attribute -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wuninitialized -Wunused -Wno-missing-field-initializers -Wno-pointer-arith -Wno-address-of-packed-member -Wno-sign-compare -Wno-type-limits -Wno-unused-parameter -Wno-unused-result -Werror=address -Werror=array-bounds -Werror=implicit -Werror=init-self -Werror=int-to-pointer-cast -Werror=main -Werror=missing-braces -Werror=nonnull -Werror=pointer-to-int-cast -Werror=return-type -Werror=sequence-point -Werror=trigraphs -Werror=write-strings -fno-builtin-malloc -fno-builtin-calloc -fPIC -pthread '-DIGT_DATADIR="/usr/local/share/igt-gpu-tools"' '-DIGT_SRCDIR="/builds/gfx-ci/igt-ci-tags/tests"' '-DIGT_LOG_DOMAIN="xe/xe_ioctl"' -MD -MQ 'lib/76b5a35@@igt-xe_xe_ioctl_c@sta/xe_xe_ioctl.c.o' -MF 'lib/76b5a35@@igt-xe_xe_ioctl_c@sta/xe_xe_ioctl.c.o.d' -o 'lib/76b5a35@@igt-xe_xe_ioctl_c@sta/xe_xe_ioctl.c.o' -c ../lib/xe/xe_ioctl.c
  ../lib/xe/xe_ioctl.c:467:19: error: use of undeclared identifier 'DRM_XE_UFENCE_WAIT_FLAG_SOFT_OP'
                  .flags = !eci ? DRM_XE_UFENCE_WAIT_FLAG_SOFT_OP : 0,
                                  ^
  ../lib/xe/xe_ioctl.c:499:19: error: use of undeclared identifier 'DRM_XE_UFENCE_WAIT_FLAG_SOFT_OP'
                  .flags = !eci ? DRM_XE_UFENCE_WAIT_FLAG_SOFT_OP | DRM_XE_UFENCE_WAIT_FLAG_ABSTIME : 0,
                                  ^
  2 errors generated.
  ninja: build stopped: subcommand failed.
  section_end:1701847043:step_script
  section_start:1701847043:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1701847044:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

build:tests-fedora-no-libdrm-nouveau has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/52421307):
        |    ^~~~~~~~~~~
  ../lib/xe/xe_ioctl.c:504:4: error: ‘struct drm_xe_wait_user_fence’ has no member named ‘instances’
    504 |   .instances = eci ? to_user_pointer(eci) : 0,
        |    ^~~~~~~~~
  ../lib/xe/xe_ioctl.c:496:39: error: missing braces around initializer [-Werror=missing-braces]
    496 |  struct drm_xe_wait_user_fence wait = {
        |                                       ^
  ......
    504 |   .instances = eci ? to_user_pointer(eci) : 0,
        |                {
    505 |  };
        |  }
  cc1: some warnings being treated as errors
  ninja: build stopped: subcommand failed.
  section_end:1701847018:step_script
  section_start:1701847018:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1701847019:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

build:tests-fedora-no-libunwind has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/52421305):
        |    ^~~~~~~~~~~
  ../lib/xe/xe_ioctl.c:504:4: error: ‘struct drm_xe_wait_user_fence’ has no member named ‘instances’
    504 |   .instances = eci ? to_user_pointer(eci) : 0,
        |    ^~~~~~~~~
  ../lib/xe/xe_ioctl.c:496:39: error: missing braces around initializer [-Werror=missing-braces]
    496 |  struct drm_xe_wait_user_fence wait = {
        |                                       ^
  ......
    504 |   .instances = eci ? to_user_pointer(eci) : 0,
        |                {
    505 |  };
        |  }
  cc1: some warnings being treated as errors
  ninja: build stopped: subcommand failed.
  section_end:1701847019:step_script
  section_start:1701847019:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1701847019:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

build:tests-fedora-oldest-meson has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/52421306):
        |    ^~~~~~~~~~~
  ../lib/xe/xe_ioctl.c:504:4: error: ‘struct drm_xe_wait_user_fence’ has no member named ‘instances’
    504 |   .instances = eci ? to_user_pointer(eci) : 0,
        |    ^~~~~~~~~
  ../lib/xe/xe_ioctl.c:496:39: error: missing braces around initializer [-Werror=missing-braces]
    496 |  struct drm_xe_wait_user_fence wait = {
        |                                       ^
  ......
    504 |   .instances = eci ? to_user_pointer(eci) : 0,
        |                {
    505 |  };
        |  }
  cc1: some warnings being treated as errors
  ninja: build stopped: subcommand failed.
  section_end:1701847016:step_script
  section_start:1701847016:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1701847017:cleanup_file_variables
  ERROR: Job failed: exit code 1

== Logs ==

For more details see: https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/1050547

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

* Re: [igt-dev] [PATCH v2 1/2] drm-uapi/xe: add exec_queue_id member to drm_xe_wait_user_fence structurei
  2023-12-06  6:47 ` [igt-dev] [PATCH v2 1/2] drm-uapi/xe: add exec_queue_id member to drm_xe_wait_user_fence structurei Bommu Krishnaiah
@ 2023-12-06 10:30   ` Francois Dugast
  0 siblings, 0 replies; 6+ messages in thread
From: Francois Dugast @ 2023-12-06 10:30 UTC (permalink / raw)
  To: Bommu Krishnaiah; +Cc: igt-dev, Rodrigo Vivi

Hi Bommu,

Existing IGT code must be updated as the same time as xe_drm.h, otherwise
applying only this patch breaks IGT build as num_engines and instances have
been removed from the header but not from xe_ioctl.c (for example).

Overlapping work had been proposed by Rodrigo, maybe some of it can be
reused:
https://patchwork.freedesktop.org/patch/566918/?series=126204&rev=1

Nit: there is an extra 'i' at the end of the commit message.

Please update xe_drm.h again after the alignment fix in kernel.

Thanks,
Francois

On Wed, Dec 06, 2023 at 12:17:59PM +0530, Bommu Krishnaiah wrote:
> remove the num_engines/instances members from drm_xe_wait_user_fence structure
> and add a exec_queue_id member
> 
> Right now this is only checking if the engine list is sane and nothing
> else. In the end every operation with this IOCTL is a soft check.
> So, let's formalize that and only use this IOCTL to wait on the fence.
> 
> exec_queue_id member will help to user space to get proper error code
> from kernel while in exec_queue reset
> 
> Signed-off-by: Bommu Krishnaiah <krishnaiah.bommu@intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: Francois Dugast <francois.dugast@intel.com>
> ---
>  include/drm-uapi/xe_drm.h | 16 ++++------------
>  1 file changed, 4 insertions(+), 12 deletions(-)
> 
> diff --git a/include/drm-uapi/xe_drm.h b/include/drm-uapi/xe_drm.h
> index 590f7b7af..a1c6d8932 100644
> --- a/include/drm-uapi/xe_drm.h
> +++ b/include/drm-uapi/xe_drm.h
> @@ -1024,8 +1024,7 @@ struct drm_xe_wait_user_fence {
>  	/** @op: wait operation (type of comparison) */
>  	__u16 op;
>  
> -#define DRM_XE_UFENCE_WAIT_FLAG_SOFT_OP	(1 << 0)	/* e.g. Wait on VM bind */
> -#define DRM_XE_UFENCE_WAIT_FLAG_ABSTIME	(1 << 1)
> +#define DRM_XE_UFENCE_WAIT_FLAG_ABSTIME	(1 << 0)
>  	/** @flags: wait flags */
>  	__u16 flags;
>  
> @@ -1058,17 +1057,10 @@ struct drm_xe_wait_user_fence {
>  	 */
>  	__s64 timeout;
>  
> -	/**
> -	 * @num_engines: number of engine instances to wait on, must be zero
> -	 * when DRM_XE_UFENCE_WAIT_FLAG_SOFT_OP set
> -	 */
> -	__u64 num_engines;
> -
> -	/**
> -	 * @instances: user pointer to array of drm_xe_engine_class_instance to
> -	 * wait on, must be NULL when DRM_XE_UFENCE_WAIT_FLAG_SOFT_OP set
> +	/** @exec_queue_id: exec_queue_id returned from xe_exec_queue_create_ioctl
> +	  * exec_queue_id is help to find exec_queue reset status
>  	 */
> -	__u64 instances;
> +	__u32 exec_queue_id;
>  
>  	/** @reserved: Reserved */
>  	__u64 reserved[2];
> -- 
> 2.25.1
> 

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

end of thread, other threads:[~2023-12-06 10:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-06  6:47 [igt-dev] [PATCH v2 0/2] RFC: drm-uapi/xe: add exec_queue_id member to drm_xe_wait_user_fence structure Bommu Krishnaiah
2023-12-06  6:47 ` [igt-dev] [PATCH v2 1/2] drm-uapi/xe: add exec_queue_id member to drm_xe_wait_user_fence structurei Bommu Krishnaiah
2023-12-06 10:30   ` Francois Dugast
2023-12-06  6:48 ` [igt-dev] [PATCH v2 2/2] drm-uapi/xe: kill xe_wait_user_fence_ioctl when exec_queue reset Bommu Krishnaiah
2023-12-06  7:15 ` [igt-dev] ✗ Fi.CI.BUILD: failure for RFC: drm-uapi/xe: add exec_queue_id member to drm_xe_wait_user_fence structure (rev2) Patchwork
2023-12-06  7:22 ` [igt-dev] ✗ GitLab.Pipeline: warning " Patchwork

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