All of 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>
Subject: [PATCH i-g-t v2 08/10] lib/intel_cmds_info: Introduce render tilings
Date: Fri, 26 Apr 2024 11:01:15 +0200	[thread overview]
Message-ID: <20240426090117.78060-9-zbigniew.kempczynski@intel.com> (raw)
In-Reply-To: <20240426090117.78060-1-zbigniew.kempczynski@intel.com>

Due to hardware differences between blitter and render regarding
supported tilings and compression add new fields in cmds-info
to identify available tilings via render engine.

Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
---
 lib/intel_cmds_info.c | 29 +++++++++++++++++++++++++----
 lib/intel_cmds_info.h |  6 ++++++
 2 files changed, 31 insertions(+), 4 deletions(-)

diff --git a/lib/intel_cmds_info.c b/lib/intel_cmds_info.c
index 2baac54c28..0e95cc226d 100644
--- a/lib/intel_cmds_info.c
+++ b/lib/intel_cmds_info.c
@@ -90,6 +90,23 @@ static const struct blt_cmd_info
 						 BLT_CMD_EXTENDED);
 
 
+#define RENDER_TILING(_tiling, _compress_tiling)  { \
+		.supported_tiling = _tiling, \
+		.supported_compressed_tiling = _compress_tiling, \
+	}
+
+static const struct render_tiling_info
+		render_tiling_gen12 = RENDER_TILING(TILE_L_X_4, TILE_4);
+
+static const struct render_tiling_info
+		render_tiling_mtl = RENDER_TILING(TILE_L_X_4_64, TILE_4);
+
+static const struct render_tiling_info
+		render_tiling_dg2 = RENDER_TILING(TILE_L_X_4_64, TILE_4_64);
+
+static const struct render_tiling_info
+		render_tiling_xe2 = RENDER_TILING(TILE_L_X_4_64, TILE_L_X_4_64);
+
 const struct intel_cmds_info pre_gen6_cmds_info = {
 	.blt_cmds = {
 		[SRC_COPY] = &src_copy,
@@ -127,7 +144,8 @@ const struct intel_cmds_info gen12_cmds_info = {
 		[XY_FAST_COPY] = &gen12_xy_fast_copy,
 		[XY_BLOCK_COPY] = &gen12_xy_block_copy,
 		[XY_COLOR_BLT] = &gen6_xy_color_blt,
-	}
+	},
+	.render_tilings = &render_tiling_gen12,
 };
 
 const struct intel_cmds_info gen12_dg2_cmds_info = {
@@ -136,14 +154,16 @@ const struct intel_cmds_info gen12_dg2_cmds_info = {
 		[XY_FAST_COPY] = &dg2_xy_fast_copy,
 		[XY_BLOCK_COPY] = &dg2_xy_block_copy,
 		[XY_COLOR_BLT] = &gen6_xy_color_blt,
-	}
+	},
+	.render_tilings = &render_tiling_dg2,
 };
 
 const struct intel_cmds_info gen12_mtl_cmds_info = {
 	.blt_cmds = {
 		[XY_FAST_COPY] = &dg2_xy_fast_copy,
 		[XY_BLOCK_COPY] = &mtl_xy_block_copy,
-	}
+	},
+	.render_tilings = &render_tiling_mtl,
 };
 
 const struct intel_cmds_info gen12_pvc_cmds_info = {
@@ -161,7 +181,8 @@ const struct intel_cmds_info xe2_cmds_info  = {
 		[XY_BLOCK_COPY] = &xe2_xy_block_copy,
 		[MEM_COPY] = &pvc_mem_copy,
 		[MEM_SET] = &pvc_mem_set,
-	}
+	},
+	.render_tilings = &render_tiling_xe2,
 };
 
 const struct blt_cmd_info *blt_get_cmd_info(const struct intel_cmds_info *cmds_info,
diff --git a/lib/intel_cmds_info.h b/lib/intel_cmds_info.h
index 0a83b6a446..6f7d655083 100644
--- a/lib/intel_cmds_info.h
+++ b/lib/intel_cmds_info.h
@@ -43,8 +43,14 @@ struct blt_cmd_info {
 #define BLT_CMD_SUPPORTS_COMPRESSION   (1 << 1)
 };
 
+struct render_tiling_info {
+	uint32_t supported_tiling;
+	uint32_t supported_compressed_tiling;
+};
+
 struct intel_cmds_info {
 	struct blt_cmd_info const *blt_cmds[__BLT_MAX_CMD];
+	struct render_tiling_info const *render_tilings;
 };
 
 extern const struct intel_cmds_info pre_gen6_cmds_info;
-- 
2.34.1


  parent reply	other threads:[~2024-04-26  9:02 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-26  9:01 [PATCH i-g-t v2 00/10] Add render-copy compression on Xe+ Zbigniew Kempczyński
2024-04-26  9:01 ` [PATCH i-g-t v2 01/10] lib/intel_bufops: Store devid on buffer ops creation Zbigniew Kempczyński
2024-04-26  9:01 ` [PATCH i-g-t v2 02/10] lib/intel_blt: Rename confusing fb tile to i915 tile Zbigniew Kempczyński
2024-04-26 11:11   ` Karolina Stolarek
2024-04-26 11:27     ` Zbigniew Kempczyński
2024-04-26 11:46       ` Karolina Stolarek
2024-04-26  9:01 ` [PATCH i-g-t v2 03/10] lib/intel_blt: Add i915 -> blt tile helper converter Zbigniew Kempczyński
2024-04-26 11:04   ` Karolina Stolarek
2024-04-26  9:01 ` [PATCH i-g-t v2 04/10] lib/intel_bufops: Drop tilings restrictions Zbigniew Kempczyński
2024-04-26  9:01 ` [PATCH i-g-t v2 05/10] lib/intel_bufops: Start supporting compression on Xe2+ Zbigniew Kempczyński
2024-04-26  9:01 ` [PATCH i-g-t v2 06/10] lib/rendercopy_gen9: Allow to use all tilings on flatccs platforms Zbigniew Kempczyński
2024-04-26 13:23   ` Karolina Stolarek
2024-04-26  9:01 ` [PATCH i-g-t v2 07/10] lib/intel_cmds_info: Define tiling macros Zbigniew Kempczyński
2024-04-26 13:14   ` Karolina Stolarek
2024-05-07  5:46     ` Zbigniew Kempczyński
2024-04-26  9:01 ` Zbigniew Kempczyński [this message]
2024-04-26 13:18   ` [PATCH i-g-t v2 08/10] lib/intel_cmds_info: Introduce render tilings Karolina Stolarek
2024-05-07  5:49     ` Zbigniew Kempczyński
2024-04-26  9:01 ` [PATCH i-g-t v2 09/10] lib/intel_blt: Add render tilings and compression support helper Zbigniew Kempczyński
2024-04-26 11:16   ` Karolina Stolarek
2024-04-26 13:19   ` Karolina Stolarek
2024-04-26  9:01 ` [PATCH i-g-t v2 10/10] tests/xe_render_copy: Add subtest which exercises compression Zbigniew Kempczyński
2024-04-26 10:03 ` ✓ Fi.CI.BAT: success for Add render-copy compression on Xe+ (rev2) Patchwork
2024-04-26 10:20 ` ✓ CI.xeBAT: " Patchwork
2024-04-26 12:12 ` ✗ CI.xeFULL: failure " Patchwork
2024-04-26 14:00 ` ✗ Fi.CI.IGT: " 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=20240426090117.78060-9-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.