[PATCH i-g-t 18/37] lib/igt_fb: Expose igt_fb_is_gen12_rc_ccs_cc_modifier()
Juha-Pekka Heikkila
juhapekka.heikkila at gmail.com
Tue Aug 27 16:45:10 UTC 2024
On 3.7.2024 2.27, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> I'm going to need is_gen12_rc_ccs_cc_modifier() outside of
> igt_fb.c. Rename it to igt_fb_is_gen12_rc_ccs_cc_modifier()
> and expose it to everyone.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
> lib/igt_fb.c | 10 ++++------
> lib/igt_fb.h | 1 +
> 2 files changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> index bcb418e0f7be..b95dc3278f23 100644
> --- a/lib/igt_fb.c
> +++ b/lib/igt_fb.c
> @@ -594,7 +594,7 @@ static bool is_gen12_mc_ccs_modifier(uint64_t modifier)
> modifier == I915_FORMAT_MOD_4_TILED_MTL_MC_CCS;
> }
>
> -static bool is_gen12_rc_ccs_cc_modifier(uint64_t modifier)
> +bool igt_fb_is_gen12_rc_ccs_cc_modifier(uint64_t modifier)
As with patch 17, with small comment block added
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
> {
> return modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC ||
> modifier == I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC ||
> @@ -604,7 +604,7 @@ static bool is_gen12_rc_ccs_cc_modifier(uint64_t modifier)
> static bool is_gen12_ccs_modifier(uint64_t modifier)
> {
> return is_gen12_mc_ccs_modifier(modifier) ||
> - is_gen12_rc_ccs_cc_modifier(modifier) ||
> + igt_fb_is_gen12_rc_ccs_cc_modifier(modifier) ||
> modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS ||
> modifier == I915_FORMAT_MOD_4_TILED_DG2_RC_CCS ||
> modifier == I915_FORMAT_MOD_4_TILED_MTL_RC_CCS;
> @@ -734,9 +734,7 @@ static int fb_num_planes(const struct igt_fb *fb)
> !HAS_FLATCCS(intel_get_drm_devid(fb->fd)))
> num_planes *= 2;
>
> - if (fb->modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC ||
> - fb->modifier == I915_FORMAT_MOD_4_TILED_MTL_RC_CCS_CC ||
> - fb->modifier == I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC)
> + if (igt_fb_is_gen12_rc_ccs_cc_modifier(fb->modifier))
> num_planes++;
>
> return num_planes;
> @@ -2498,7 +2496,7 @@ static bool block_copy_ok(const struct igt_fb *fb)
>
> static bool ccs_needs_enginecopy(const struct igt_fb *fb)
> {
> - if (is_gen12_rc_ccs_cc_modifier(fb->modifier))
> + if (igt_fb_is_gen12_rc_ccs_cc_modifier(fb->modifier))
> return true;
>
> if (is_gen12_mc_ccs_modifier(fb->modifier))
> diff --git a/lib/igt_fb.h b/lib/igt_fb.h
> index b1b40b858610..12c9574827f2 100644
> --- a/lib/igt_fb.h
> +++ b/lib/igt_fb.h
> @@ -182,6 +182,7 @@ uint64_t igt_fb_mod_to_tiling(uint64_t modifier);
> uint64_t igt_fb_tiling_to_mod(uint64_t tiling);
>
> bool igt_fb_is_ccs_modifier(uint64_t modifier);
> +bool igt_fb_is_gen12_rc_ccs_cc_modifier(uint64_t modifier);
> bool igt_fb_is_ccs_plane(const struct igt_fb *fb, int plane);
> bool igt_fb_is_gen12_ccs_cc_plane(const struct igt_fb *fb, int plane);
> int igt_fb_ccs_to_main_plane(const struct igt_fb *fb, int ccs_plane);
More information about the igt-dev
mailing list