Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t] lib/intel_ctx|fb: Rename engine to exec_queue in xe lib for completion
Date: Thu, 10 Aug 2023 08:01:47 +0200	[thread overview]
Message-ID: <20230810060147.398558-1-zbigniew.kempczynski@intel.com> (raw)

To avoid confusion in the future lets align to current naming
nomenclature.

Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Francois Dugast <francois.dugast@intel.com>
Reviewed-by: Karolina Stolarek <karolina.stolarek@intel.com>
---
 lib/igt_fb.c    | 8 ++++----
 lib/intel_ctx.c | 8 ++++----
 lib/intel_ctx.h | 4 ++--
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 8f5e3db9f5..af3b4588a2 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -2852,7 +2852,7 @@ static void blitcopy(const struct igt_fb *dst_fb,
 	uint32_t src_cc = src_fb->modifier == I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC ? 1 : 0;
 	uint32_t dst_cc = dst_fb->modifier == I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC ? 1 : 0;
 	intel_ctx_t *xe_ctx;
-	uint32_t vm, engine;
+	uint32_t vm, exec_queue;
 	bool is_xe = is_xe_device(dst_fb->fd);
 	bool is_i915 = is_i915_device(dst_fb->fd);
 
@@ -2881,8 +2881,8 @@ static void blitcopy(const struct igt_fb *dst_fb,
 							  mem_region) == 0);
 	} else if (is_xe) {
 		vm = xe_vm_create(dst_fb->fd, DRM_XE_VM_CREATE_ASYNC_BIND_OPS, 0);
-		engine = xe_exec_queue_create(dst_fb->fd, vm, &inst, 0);
-		xe_ctx = intel_ctx_xe(dst_fb->fd, vm, engine, 0, 0, 0);
+		exec_queue = xe_exec_queue_create(dst_fb->fd, vm, &inst, 0);
+		xe_ctx = intel_ctx_xe(dst_fb->fd, vm, exec_queue, 0, 0, 0);
 		mem_region = vram_if_possible(dst_fb->fd, 0);
 
 		ahnd = intel_allocator_open_full(dst_fb->fd, xe_ctx->vm, 0, 0,
@@ -3007,7 +3007,7 @@ static void blitcopy(const struct igt_fb *dst_fb,
 
 	if(is_xe) {
 		gem_close(dst_fb->fd, xe_bb);
-		xe_exec_queue_destroy(dst_fb->fd, engine);
+		xe_exec_queue_destroy(dst_fb->fd, exec_queue);
 		xe_vm_destroy(dst_fb->fd, vm);
 		free(xe_ctx);
 	}
diff --git a/lib/intel_ctx.c b/lib/intel_ctx.c
index 364ede76f5..f927b7df86 100644
--- a/lib/intel_ctx.c
+++ b/lib/intel_ctx.c
@@ -398,11 +398,11 @@ unsigned int intel_ctx_engine_class(const intel_ctx_t *ctx, unsigned int engine)
  * intel_ctx_xe:
  * @fd: open i915 drm file descriptor
  * @vm: vm
- * @engine: engine
+ * @exec_queue: exec queue
  *
  * Returns an intel_ctx_t representing the xe context.
  */
-intel_ctx_t *intel_ctx_xe(int fd, uint32_t vm, uint32_t engine,
+intel_ctx_t *intel_ctx_xe(int fd, uint32_t vm, uint32_t exec_queue,
 			  uint32_t sync_in, uint32_t sync_bind, uint32_t sync_out)
 {
 	intel_ctx_t *ctx;
@@ -412,7 +412,7 @@ intel_ctx_t *intel_ctx_xe(int fd, uint32_t vm, uint32_t engine,
 
 	ctx->fd = fd;
 	ctx->vm = vm;
-	ctx->engine = engine;
+	ctx->exec_queue = exec_queue;
 	ctx->sync_in = sync_in;
 	ctx->sync_bind = sync_bind;
 	ctx->sync_out = sync_out;
@@ -427,7 +427,7 @@ int __intel_ctx_xe_exec(const intel_ctx_t *ctx, uint64_t ahnd, uint64_t bb_offse
 		{ .flags = DRM_XE_SYNC_SYNCOBJ | DRM_XE_SYNC_SIGNAL, },
 	};
 	struct drm_xe_exec exec = {
-		.exec_queue_id = ctx->engine,
+		.exec_queue_id = ctx->exec_queue,
 		.syncs = (uintptr_t)syncs,
 		.num_syncs = 2,
 		.address = bb_offset,
diff --git a/lib/intel_ctx.h b/lib/intel_ctx.h
index 59d0360ada..cefc2c2208 100644
--- a/lib/intel_ctx.h
+++ b/lib/intel_ctx.h
@@ -71,7 +71,7 @@ typedef struct intel_ctx {
 	/* Xe */
 	int fd;
 	uint32_t vm;
-	uint32_t engine;
+	uint32_t exec_queue;
 	uint32_t sync_in;
 	uint32_t sync_bind;
 	uint32_t sync_out;
@@ -89,7 +89,7 @@ void intel_ctx_destroy(int fd, const intel_ctx_t *ctx);
 
 unsigned int intel_ctx_engine_class(const intel_ctx_t *ctx, unsigned int engine);
 
-intel_ctx_t *intel_ctx_xe(int fd, uint32_t vm, uint32_t engine,
+intel_ctx_t *intel_ctx_xe(int fd, uint32_t vm, uint32_t exec_queue,
 			  uint32_t sync_in, uint32_t sync_bind, uint32_t sync_out);
 int __intel_ctx_xe_exec(const intel_ctx_t *ctx, uint64_t ahnd, uint64_t bb_offset);
 void intel_ctx_xe_exec(const intel_ctx_t *ctx, uint64_t ahnd, uint64_t bb_offset);
-- 
2.34.1

             reply	other threads:[~2023-08-10  6:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-10  6:01 Zbigniew Kempczyński [this message]
2023-08-10  7:06 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/intel_ctx|fb: Rename engine to exec_queue in xe lib for completion (rev2) Patchwork
2023-08-10  7:14 ` [igt-dev] ○ CI.xeBAT: info " Patchwork
2023-08-11  0:14 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2023-08-11  8:19   ` Zbigniew Kempczyński
2023-08-11 10:03     ` Yedireswarapu, SaiX Nandan
2023-08-11  9:47 ` Patchwork
2023-08-11 10:00 ` [igt-dev] ✓ Fi.CI.IGT: success " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2023-08-07  3:34 [igt-dev] [PATCH i-g-t] lib/intel_ctx|fb: Rename engine to exec_queue in xe lib for completion Zbigniew Kempczyński
2023-08-09 12:27 ` Karolina Stolarek

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=20230810060147.398558-1-zbigniew.kempczynski@intel.com \
    --to=zbigniew.kempczynski@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