[PATCH i-g-t 14/37] lib/igt_fb: Extract is_gen12_rc_ccs_cc_modifier()

Ville Syrjala ville.syrjala at linux.intel.com
Tue Jul 2 23:27:54 UTC 2024


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

Extract a helper to identify the clear color compressed modifiers.

Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 lib/igt_fb.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 857ffb6547a3..c48a61b5f148 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -594,15 +594,20 @@ 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)
+{
+	return modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC ||
+		modifier == I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC ||
+		modifier == I915_FORMAT_MOD_4_TILED_MTL_RC_CCS_CC;
+}
+
 static bool is_gen12_ccs_modifier(uint64_t modifier)
 {
 	return is_gen12_mc_ccs_modifier(modifier) ||
+		is_gen12_rc_ccs_cc_modifier(modifier) ||
 		modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS ||
-		modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC ||
 		modifier == I915_FORMAT_MOD_4_TILED_DG2_RC_CCS ||
-		modifier == I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC ||
-		modifier == I915_FORMAT_MOD_4_TILED_MTL_RC_CCS ||
-		modifier == I915_FORMAT_MOD_4_TILED_MTL_RC_CCS_CC;
+		modifier == I915_FORMAT_MOD_4_TILED_MTL_RC_CCS;
 }
 
 static bool is_ccs_modifier(uint64_t modifier)
-- 
2.44.2



More information about the igt-dev mailing list