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
Cc: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>,
	"Francois Dugast" <francois.dugast@intel.com>
Subject: [PATCH i-g-t 07/15] lib/intel_cmds_info: add blt_memop_mode (byte/page)
Date: Tue, 13 May 2025 20:58:02 +0200	[thread overview]
Message-ID: <20250513185811.897232-8-zbigniew.kempczynski@intel.com> (raw)
In-Reply-To: <20250513185811.897232-1-zbigniew.kempczynski@intel.com>

Add 'mode' field for further extending in tests.

Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Francois Dugast <francois.dugast@intel.com>
---
 lib/intel_blt.c             | 3 +++
 lib/intel_blt.h             | 2 ++
 lib/intel_cmds_info.h       | 5 +++++
 tests/intel/xe_copy_basic.c | 2 +-
 4 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/lib/intel_blt.c b/lib/intel_blt.c
index 4c90d157c9..6bfaf09a2b 100644
--- a/lib/intel_blt.c
+++ b/lib/intel_blt.c
@@ -1802,18 +1802,21 @@ int blt_fast_copy(int fd,
  * blt_mem_copy_init:
  * @fd: drm fd
  * @mem: structure for initialization
+ * @mode: copy mode - byte or page (256B)
  * @copy_type: linear or matrix
  *
  * Function is zeroing @mem and sets fd and driver fields (INTEL_DRIVER_I915 or
  * INTEL_DRIVER_XE).
  */
 void blt_mem_copy_init(int fd, struct blt_mem_copy_data *mem,
+		       enum blt_memop_mode mode,
 		       enum blt_memop_type copy_type)
 {
 	memset(mem, 0, sizeof(*mem));
 
 	mem->fd = fd;
 	mem->driver = get_intel_driver(fd);
+	mem->mode = mode;
 	mem->copy_type = copy_type;
 }
 
diff --git a/lib/intel_blt.h b/lib/intel_blt.h
index 9efa799881..f2509ab175 100644
--- a/lib/intel_blt.h
+++ b/lib/intel_blt.h
@@ -130,6 +130,7 @@ struct blt_copy_data {
 struct blt_mem_copy_data {
 	int fd;
 	enum intel_driver driver;
+	enum blt_memop_mode mode;
 	enum blt_memop_type copy_type;
 	struct blt_mem_object src;
 	struct blt_mem_object dst;
@@ -274,6 +275,7 @@ int blt_fast_copy(int fd,
 		  const struct blt_copy_data *blt);
 
 void blt_mem_copy_init(int fd, struct blt_mem_copy_data *mem,
+		       enum blt_memop_mode mode,
 		       enum blt_memop_type copy_type);
 
 void blt_mem_set_init(int fd, struct blt_mem_set_data *mem,
diff --git a/lib/intel_cmds_info.h b/lib/intel_cmds_info.h
index 66f63d7e72..bcaad6053a 100644
--- a/lib/intel_cmds_info.h
+++ b/lib/intel_cmds_info.h
@@ -24,6 +24,11 @@ enum blt_memop_type {
 	TYPE_MATRIX,
 };
 
+enum blt_memop_mode {
+	MODE_BYTE,
+	MODE_PAGE,
+};
+
 enum blt_cmd_type {
 	SRC_COPY,
 	MEM_SET,
diff --git a/tests/intel/xe_copy_basic.c b/tests/intel/xe_copy_basic.c
index 5681d4d6ab..f252d29fd4 100644
--- a/tests/intel/xe_copy_basic.c
+++ b/tests/intel/xe_copy_basic.c
@@ -56,7 +56,7 @@ mem_copy(int fd, uint32_t src_handle, uint32_t dst_handle, const intel_ctx_t *ct
 
 	bb = xe_bo_create(fd, 0, bb_size, region, 0);
 
-	blt_mem_copy_init(fd, &mem, TYPE_LINEAR);
+	blt_mem_copy_init(fd, &mem, MODE_BYTE, TYPE_LINEAR);
 	blt_set_mem_object(&mem.src, src_handle, size, width, width, height,
 			   region, src_mocs, DEFAULT_PAT_INDEX, COMPRESSION_DISABLED);
 	blt_set_mem_object(&mem.dst, dst_handle, size, width, width, height,
-- 
2.43.0


  parent reply	other threads:[~2025-05-13 18:58 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-13 18:57 [PATCH i-g-t 00/15] Improve mem-copy/mem-set lib and tests Zbigniew Kempczyński
2025-05-13 18:57 ` [PATCH i-g-t 01/15] lib/xe_spin: limit width/pitch for mem-copy Zbigniew Kempczyński
2025-05-19  7:56   ` Francois Dugast
2025-05-13 18:57 ` [PATCH i-g-t 02/15] tests/xe_render_copy: change width and pitch to be in valid range Zbigniew Kempczyński
2025-05-19  7:56   ` Francois Dugast
2025-05-13 18:57 ` [PATCH i-g-t 03/15] tests/xe_spin_batch: " Zbigniew Kempczyński
2025-05-19  7:57   ` Francois Dugast
2025-05-13 18:57 ` [PATCH i-g-t 04/15] tests/xe_copy_basic: use non-zero pitch Zbigniew Kempczyński
2025-05-19  7:57   ` Francois Dugast
2025-05-13 18:58 ` [PATCH i-g-t 05/15] lib/intel_cmds_info: rename M to TYPE in blt_memop_type Zbigniew Kempczyński
2025-05-19  8:03   ` Francois Dugast
2025-05-19 11:17     ` Zbigniew Kempczyński
2025-05-22 11:31       ` Francois Dugast
2025-05-13 18:58 ` [PATCH i-g-t 06/15] lib/intel_blt: separate mem-copy and mem-set Zbigniew Kempczyński
2025-05-19  8:35   ` Francois Dugast
2025-05-13 18:58 ` Zbigniew Kempczyński [this message]
2025-05-19  8:54   ` [PATCH i-g-t 07/15] lib/intel_cmds_info: add blt_memop_mode (byte/page) Francois Dugast
2025-05-13 18:58 ` [PATCH i-g-t 08/15] lib/intel_blt: add emit batchbuffer end Zbigniew Kempczyński
2025-05-19  8:55   ` Francois Dugast
2025-05-13 18:58 ` [PATCH i-g-t 09/15] lib/intel_blt: use struct instead of inline coding Zbigniew Kempczyński
2025-05-22 11:50   ` Francois Dugast
2025-05-22 11:52   ` Francois Dugast
2025-05-13 18:58 ` [PATCH i-g-t 10/15] tests/xe_copy_basic: replace size to rect which keeps objects geometry Zbigniew Kempczyński
2025-05-22 12:05   ` Francois Dugast
2025-05-22 14:15     ` Zbigniew Kempczyński
2025-05-13 18:58 ` [PATCH i-g-t 11/15] tests/xe_copy_basic: add testcase with large buffer size Zbigniew Kempczyński
2025-05-13 18:58 ` [PATCH i-g-t 12/15] tests/xe_copy_basic: add subtest to verify mem-copy in pages Zbigniew Kempczyński
2025-05-13 18:58 ` [PATCH i-g-t 13/15] lib/intel_blt: add support for matrix mem-copy Zbigniew Kempczyński
2025-05-13 18:58 ` [PATCH i-g-t 14/15] tests/xe_copy_basic: add mem-copy matrix subtests Zbigniew Kempczyński
2025-05-13 18:58 ` [PATCH i-g-t 15/15] lib/intel_blt: add mem-copy debug facility Zbigniew Kempczyński
2025-05-13 20:26 ` ✓ Xe.CI.BAT: success for Improve mem-copy/mem-set lib and tests Patchwork
2025-05-13 20:44 ` ✓ i915.CI.BAT: " Patchwork
2025-05-13 22:01 ` ✗ Xe.CI.Full: failure " Patchwork
2025-05-14  5:04   ` Zbigniew Kempczyński
2025-05-13 23:12 ` ✗ i915.CI.Full: " Patchwork
2025-05-14  5:05   ` Zbigniew Kempczyński

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=20250513185811.897232-8-zbigniew.kempczynski@intel.com \
    --to=zbigniew.kempczynski@intel.com \
    --cc=francois.dugast@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