Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sai.gowtham.ch@intel.com
To: igt-dev@lists.freedesktop.org, karolina.stolarek@intel.com,
	sai.gowtham.ch@intel.com
Subject: [igt-dev] [PATCH i-g-t 2/4] lib/intel_blt: check if blt commands are supported by the platforms
Date: Mon,  4 Sep 2023 16:34:56 +0530	[thread overview]
Message-ID: <20230904110458.24177-3-sai.gowtham.ch@intel.com> (raw)
In-Reply-To: <20230904110458.24177-1-sai.gowtham.ch@intel.com>

From: Sai Gowtham Ch <sai.gowtham.ch@intel.com>

Check if mem-copy/mem-set commands are supported by fd device.

Signed-off-by: Sai Gowtham Ch <sai.gowtham.ch@intel.com>
---
 lib/intel_blt.c | 32 ++++++++++++++++++++++++++++++++
 lib/intel_blt.h |  2 ++
 2 files changed, 34 insertions(+)

diff --git a/lib/intel_blt.c b/lib/intel_blt.c
index 429511920..b55fa9b52 100644
--- a/lib/intel_blt.c
+++ b/lib/intel_blt.c
@@ -289,6 +289,38 @@ bool blt_has_block_copy(int fd)
 	return blt_supports_command(cmds_info, XY_BLOCK_COPY);
 }
 
+/**
+ * blt_has_mem_copy
+ * @fd: drm fd
+ *
+ * Check if mem copy is supported by @fd device
+ *
+ * Returns:
+ * true if it does, false otherwise.
+ */
+bool blt_has_mem_copy(int fd)
+{
+	const struct intel_cmds_info *cmds_info = GET_CMDS_INFO(fd);
+
+	return blt_supports_command(cmds_info, MEM_COPY);
+}
+
+/**
+ * blt_has_mem_set
+ * @fd: drm fd
+ *
+ * Check if mem set is supported by @fd device
+ *
+ * Returns:
+ * true if it does, false otherwise.
+ */
+bool blt_has_mem_set(int fd)
+{
+	const struct intel_cmds_info *cmds_info = GET_CMDS_INFO(fd);
+
+	return blt_supports_command(cmds_info, MEM_SET);
+}
+
 /**
  * blt_has_fast_copy
  * @fd: drm fd
diff --git a/lib/intel_blt.h b/lib/intel_blt.h
index b8b3d724d..d9c8883c7 100644
--- a/lib/intel_blt.h
+++ b/lib/intel_blt.h
@@ -175,6 +175,8 @@ bool blt_cmd_has_property(const struct intel_cmds_info *cmds_info,
 			  uint32_t prop);
 
 bool blt_has_block_copy(int fd);
+bool blt_has_mem_copy(int fd);
+bool blt_has_mem_set(int fd);
 bool blt_has_fast_copy(int fd);
 bool blt_has_xy_src_copy(int fd);
 bool blt_has_xy_color(int fd);
-- 
2.39.1

  parent reply	other threads:[~2023-09-04 11:05 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-04 11:04 [igt-dev] [PATCH i-g-t 0/4] Add copy basic test to exercise blt commands sai.gowtham.ch
2023-09-04 11:04 ` [igt-dev] [PATCH i-g-t 1/4] intel/xe_copy_basic: " sai.gowtham.ch
2023-09-11 13:14   ` Karolina Stolarek
2023-09-12 11:05     ` Ch, Sai Gowtham
2023-09-04 11:04 ` sai.gowtham.ch [this message]
2023-09-04 12:39   ` [igt-dev] [PATCH i-g-t 2/4] lib/intel_blt: check if blt commands are supported by the platforms Zbigniew Kempczyński
2023-09-05  4:11     ` Ch, Sai Gowtham
2023-09-07  9:36       ` Zbigniew Kempczyński
2023-09-07 13:36         ` Ch, Sai Gowtham
2023-09-11 11:24           ` Karolina Stolarek
2023-09-11 12:20           ` Zbigniew Kempczyński
2023-09-11 11:09     ` Karolina Stolarek
2023-09-13  7:39       ` Zbigniew Kempczyński
2023-09-18  8:12         ` Karolina Stolarek
2023-09-04 11:04 ` [igt-dev] [PATCH i-g-t 3/4] lib/intel_cmds_info: Add copy commands to blt_cmd_type sai.gowtham.ch
2023-09-04 11:04 ` [igt-dev] [PATCH i-g-t 4/4] lib/intel_reg: Add copy commands in the lib sai.gowtham.ch
2023-09-04 12:46 ` [igt-dev] ✗ GitLab.Pipeline: warning for Add copy basic test to exercise blt commands (rev2) Patchwork
2023-09-04 13:27 ` [igt-dev] ✗ Fi.CI.BAT: failure " Patchwork
2023-09-04 13:51 ` [igt-dev] ✓ CI.xeBAT: success " 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=20230904110458.24177-3-sai.gowtham.ch@intel.com \
    --to=sai.gowtham.ch@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=karolina.stolarek@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