[igt-dev] [PATCH i-g-t v3 5/9] lib/intel_tiling_info: Rename blt_tiling_info to blt_cmd_info

Karolina Stolarek karolina.stolarek at intel.com
Thu Feb 9 14:12:08 UTC 2023


This struct will store other information on the copy command,
not just what tiling formats it supports. Change the struct name
to be more generic.

Signed-off-by: Karolina Stolarek <karolina.stolarek at intel.com>
---
 lib/i915/i915_blt.c          |  8 ++++----
 lib/i915/intel_tiling_info.c | 16 ++++++++--------
 lib/i915/intel_tiling_info.h |  4 ++--
 3 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/lib/i915/i915_blt.c b/lib/i915/i915_blt.c
index efc280f9..0ea25d2f 100644
--- a/lib/i915/i915_blt.c
+++ b/lib/i915/i915_blt.c
@@ -240,18 +240,18 @@ bool blt_cmd_supports_tiling(const struct intel_cmds_info *cmds_info,
 			     enum blt_cmd_type cmd,
 			     enum blt_tiling_type tiling)
 {
-	struct blt_tiling_info const *tile_config;
+	struct blt_cmd_info const *cmd_info;
 
 	if (!cmds_info)
 		return false;
 
-	tile_config = cmds_info->blt_cmds[cmd];
+	cmd_info = cmds_info->blt_cmds[cmd];
 
 	/* no config means no support for that tiling */
-	if (!tile_config)
+	if (!cmd_info)
 		return false;
 
-	return tile_config->supported_tiling & BIT(tiling);
+	return cmd_info->supported_tiling & BIT(tiling);
 }
 
 /**
diff --git a/lib/i915/intel_tiling_info.c b/lib/i915/intel_tiling_info.c
index 78e1ce16..e869acb3 100644
--- a/lib/i915/intel_tiling_info.c
+++ b/lib/i915/intel_tiling_info.c
@@ -12,39 +12,39 @@
 		.supported_tiling = _tiling \
 	}
 
-static const struct blt_tiling_info src_copy = BLT_INFO(SRC_COPY, BIT(T_LINEAR));
-static const struct blt_tiling_info
+static const struct blt_cmd_info src_copy = BLT_INFO(SRC_COPY, BIT(T_LINEAR));
+static const struct blt_cmd_info
 		pre_gen8_xy_src_copy = BLT_INFO(XY_SRC_COPY,
 						BIT(T_LINEAR) |
 						BIT(T_XMAJOR));
-static const struct blt_tiling_info
+static const struct blt_cmd_info
 		gen8_xy_src_copy = BLT_INFO(XY_SRC_COPY,
 					    BIT(T_LINEAR) |
 					    BIT(T_XMAJOR) |
 					    BIT(T_YMAJOR));
-static const struct blt_tiling_info
+static const struct blt_cmd_info
 		gen11_xy_fast_copy = BLT_INFO(XY_FAST_COPY,
 					      BIT(T_LINEAR)  |
 					      BIT(T_YMAJOR)  |
 					      BIT(T_YFMAJOR) |
 					      BIT(T_TILE64));
-static const struct blt_tiling_info
+static const struct blt_cmd_info
 		gen12_xy_fast_copy = BLT_INFO(XY_FAST_COPY,
 					      BIT(T_LINEAR) |
 					      BIT(T_YMAJOR) |
 					      BIT(T_TILE4)  |
 					      BIT(T_TILE64));
-static const struct blt_tiling_info
+static const struct blt_cmd_info
 		dg2_xy_fast_copy = BLT_INFO(XY_FAST_COPY,
 					    BIT(T_LINEAR) |
 					    BIT(T_XMAJOR) |
 					    BIT(T_TILE4)  |
 					    BIT(T_TILE64));
-static const struct blt_tiling_info
+static const struct blt_cmd_info
 		gen12_xy_block_copy = BLT_INFO(XY_BLOCK_COPY,
 					       BIT(T_LINEAR) |
 					       BIT(T_YMAJOR));
-static const struct blt_tiling_info
+static const struct blt_cmd_info
 		dg2_xy_block_copy = BLT_INFO(XY_BLOCK_COPY,
 					     BIT(T_LINEAR) |
 					     BIT(T_XMAJOR) |
diff --git a/lib/i915/intel_tiling_info.h b/lib/i915/intel_tiling_info.h
index fa8a9b9d..c7128a43 100644
--- a/lib/i915/intel_tiling_info.h
+++ b/lib/i915/intel_tiling_info.h
@@ -26,13 +26,13 @@ enum blt_cmd_type {
 	__BLT_MAX_CMD
 };
 
-struct blt_tiling_info {
+struct blt_cmd_info {
 	enum blt_cmd_type blt_cmd_type;
 	uint32_t supported_tiling;
 };
 
 struct intel_cmds_info {
-	struct blt_tiling_info const *blt_cmds[__BLT_MAX_CMD];
+	struct blt_cmd_info const *blt_cmds[__BLT_MAX_CMD];
 };
 
 extern const struct intel_cmds_info pre_gen8_cmds_info;
-- 
2.25.1



More information about the igt-dev mailing list