From: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
To: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>,
igt-dev@lists.freedesktop.org
Subject: Re: [PATCH i-g-t v5 08/11] lib/intel_cmds_info: Introduce render tilings
Date: Tue, 14 May 2024 20:26:15 +0300 [thread overview]
Message-ID: <bc4cf013-9e90-4834-92ad-96aac9f3c548@gmail.com> (raw)
In-Reply-To: <20240509053359.449885-9-zbigniew.kempczynski@intel.com>
On 9.5.2024 8.33, Zbigniew Kempczyński wrote:
> 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 | 31 +++++++++++++++++++++++++++----
> lib/intel_cmds_info.h | 6 ++++++
> 2 files changed, 33 insertions(+), 4 deletions(-)
>
> diff --git a/lib/intel_cmds_info.c b/lib/intel_cmds_info.c
> index e7aabf6bfb..3f04f24f3c 100644
> --- a/lib/intel_cmds_info.c
> +++ b/lib/intel_cmds_info.c
> @@ -27,8 +27,10 @@
> #define TILE_Y BIT(T_YMAJOR)
> #define TILE_Yf BIT(T_YFMAJOR)
>
> +#define TILE_4_64 (TILE_4 | TILE_64)
> #define TILE_L_4_64 (TILE_L | TILE_4 | TILE_64)
> #define TILE_L_X (TILE_L | TILE_X)
> +#define TILE_L_X_4 (TILE_L | TILE_X | TILE_4)
> #define TILE_L_X_Y (TILE_L | TILE_X | TILE_Y)
> #define TILE_L_X_4_64 (TILE_L | TILE_X | TILE_4 | TILE_64)
> #define TILE_L_Y (TILE_L | TILE_Y)
> @@ -93,6 +95,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);
Is this correct? I'm thinking for gen12 here would say
RENDER_TILING(TILE_L_X_Y, TILE_Y); ?
> +
> +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,
> @@ -130,7 +149,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 = {
> @@ -139,14 +159,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 = {
> @@ -164,7 +186,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;
next prev parent reply other threads:[~2024-05-14 17:26 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-09 5:33 [PATCH i-g-t v5 00/11] Add render-copy compression on Xe+ Zbigniew Kempczyński
2024-05-09 5:33 ` [PATCH i-g-t v5 01/11] lib/intel_bufops: Store devid on buffer ops creation Zbigniew Kempczyński
2024-05-09 5:33 ` [PATCH i-g-t v5 02/11] lib/intel_blt: Rename confusing fb tile to i915 tile Zbigniew Kempczyński
2024-05-09 5:33 ` [PATCH i-g-t v5 03/11] lib/intel_blt: Add i915 -> blt tile helper converter Zbigniew Kempczyński
2024-05-14 11:37 ` Zbigniew Kempczyński
2024-05-09 5:33 ` [PATCH i-g-t v5 04/11] lib/intel_bufops: Restrict tilings on non-flatccs platforms Zbigniew Kempczyński
2024-05-09 5:33 ` [PATCH i-g-t v5 05/11] lib/intel_bufops: Start supporting compression on Xe2+ Zbigniew Kempczyński
2024-05-14 17:23 ` Juha-Pekka Heikkila
2024-05-09 5:33 ` [PATCH i-g-t v5 06/11] lib/rendercopy_gen9: Separate xe and xe2 compression format Zbigniew Kempczyński
2024-05-14 17:25 ` Juha-Pekka Heikkila
2024-05-09 5:33 ` [PATCH i-g-t v5 07/11] lib/intel_cmds_info: Define tiling macros Zbigniew Kempczyński
2024-05-09 5:33 ` [PATCH i-g-t v5 08/11] lib/intel_cmds_info: Introduce render tilings Zbigniew Kempczyński
2024-05-14 17:26 ` Juha-Pekka Heikkila [this message]
2024-05-15 12:04 ` Zbigniew Kempczyński
2024-05-09 5:33 ` [PATCH i-g-t v5 09/11] lib/intel_blt: Add render tilings and compression support helper Zbigniew Kempczyński
2024-05-09 5:33 ` [PATCH i-g-t v5 10/11] tests/xe_render_copy: Add subtest which exercises compression Zbigniew Kempczyński
2024-05-14 17:26 ` Juha-Pekka Heikkila
2024-05-09 5:33 ` [PATCH i-g-t v5 11/11] tests/xe_intel_bb: Use supported tilings instead hardcoded ones Zbigniew Kempczyński
2024-05-14 17:26 ` Juha-Pekka Heikkila
2024-05-09 7:34 ` ✓ CI.xeBAT: success for Add render-copy compression on Xe+ (rev5) Patchwork
2024-05-09 7:43 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-05-10 6:17 ` Zbigniew Kempczyński
2024-05-09 16:20 ` ✗ CI.xeFULL: " 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=bc4cf013-9e90-4834-92ad-96aac9f3c548@gmail.com \
--to=juhapekka.heikkila@gmail.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=zbigniew.kempczynski@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