[PATCH i-g-t 2/3] lib/igt_fb: add Xe2 ccs modifier support
Zbigniew Kempczyński
zbigniew.kempczynski at intel.com
Wed Aug 14 06:49:40 UTC 2024
On Mon, Aug 12, 2024 at 11:11:23PM +0300, Juha-Pekka Heikkila wrote:
> Here is added support for I915_FORMAT_MOD_4_TILED_BMG_CCS and
> I915_FORMAT_MOD_4_TILED_LNL_CCS modifiers for Intel Xe2 hardware.
>
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
LGTM:
Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
--
Zbigniew
> ---
> lib/igt_fb.c | 15 +++++++++++++--
> 1 file changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> index ab162a5b7..50b4ee5a3 100644
> --- a/lib/igt_fb.c
> +++ b/lib/igt_fb.c
> @@ -481,6 +481,8 @@ void igt_get_fb_tile_size(int fd, uint64_t modifier, int fb_bpp,
> case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS:
> case I915_FORMAT_MOD_4_TILED_DG2_MC_CCS:
> case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC:
> + case I915_FORMAT_MOD_4_TILED_BMG_CCS:
> + case I915_FORMAT_MOD_4_TILED_LNL_CCS:
> igt_require_intel(fd);
> if (intel_display_ver(intel_get_drm_devid(fd)) == 2) {
> *width_ret = 128;
> @@ -955,8 +957,11 @@ static uint64_t calc_fb_size(struct igt_fb *fb)
> size += calc_plane_size(fb, plane);
> }
>
> - if (is_xe_device(fb->fd))
> + if (is_xe_device(fb->fd)) {
> size = ALIGN(size, xe_get_default_alignment(fb->fd));
> + if (fb->modifier == I915_FORMAT_MOD_4_TILED_BMG_CCS)
> + size = ALIGN(size, SZ_64K);
> + }
>
> return size;
> }
> @@ -1020,6 +1025,8 @@ uint64_t igt_fb_mod_to_tiling(uint64_t modifier)
> case I915_FORMAT_MOD_4_TILED_MTL_RC_CCS:
> case I915_FORMAT_MOD_4_TILED_MTL_MC_CCS:
> case I915_FORMAT_MOD_4_TILED_MTL_RC_CCS_CC:
> + case I915_FORMAT_MOD_4_TILED_BMG_CCS:
> + case I915_FORMAT_MOD_4_TILED_LNL_CCS:
> return I915_TILING_4;
> case I915_FORMAT_MOD_Yf_TILED:
> case I915_FORMAT_MOD_Yf_TILED_CCS:
> @@ -2564,7 +2571,9 @@ static bool use_blitter(const struct igt_fb *fb)
> if (!blitter_ok(fb))
> return false;
>
> - return fb->modifier == I915_FORMAT_MOD_4_TILED ||
> + return fb->modifier == I915_FORMAT_MOD_4_TILED_BMG_CCS ||
> + fb->modifier == I915_FORMAT_MOD_4_TILED_LNL_CCS ||
> + fb->modifier == I915_FORMAT_MOD_4_TILED ||
> fb->modifier == I915_FORMAT_MOD_Y_TILED ||
> fb->modifier == I915_FORMAT_MOD_Yf_TILED ||
> (is_i915_device(fb->fd) && !gem_has_mappable_ggtt(fb->fd)) ||
> @@ -5000,6 +5009,8 @@ const char *igt_fb_modifier_name(uint64_t modifier)
> return "4";
> case I915_FORMAT_MOD_4_TILED_MTL_RC_CCS:
> case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS:
> + case I915_FORMAT_MOD_4_TILED_BMG_CCS:
> + case I915_FORMAT_MOD_4_TILED_LNL_CCS:
> return "4-rc-ccs";
> case I915_FORMAT_MOD_4_TILED_MTL_MC_CCS:
> case I915_FORMAT_MOD_4_TILED_DG2_MC_CCS:
> --
> 2.45.2
>
More information about the igt-dev
mailing list