[PATCH i-g-t 21/23] tests/kms_ccs: Reuse igt_fb_is_gen12_rc_ccs_cc_modifier()
Ville Syrjala
ville.syrjala at linux.intel.com
Mon Sep 2 14:37:56 UTC 2024
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
Replace the hand rolled version of igt_fb_is_gen12_rc_ccs_cc_modifier()
with the real thing.
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
tests/intel/kms_ccs.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/tests/intel/kms_ccs.c b/tests/intel/kms_ccs.c
index b1a9da8dacd2..1036666de2b6 100644
--- a/tests/intel/kms_ccs.c
+++ b/tests/intel/kms_ccs.c
@@ -280,13 +280,6 @@ create_fb_prepare_add(int drm_fd, int width, int height,
addfb_init(fb, f);
}
-static bool is_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;
-}
-
/*
* The CCS planes of compressed framebuffers contain non-zero bytes if the
* engine compressed effectively the framebuffer. The actual encoding of these
@@ -754,7 +747,7 @@ static void generate_fb(data_t *data, struct igt_fb *fb,
srand(data->seed);
fill_fb_random(data->drm_fd, fb);
} else {
- bool do_fast_clear = is_ccs_cc_modifier(data->ccs_modifier);
+ bool do_fast_clear = igt_fb_is_gen12_rc_ccs_cc_modifier(data->ccs_modifier);
bool do_solid_fill = do_fast_clear || data->plane;
int c = !!data->plane;
@@ -847,7 +840,7 @@ static bool try_config(data_t *data, enum test_fb_flags fb_flags,
data->ccs_modifier))
return false;
- if (is_ccs_cc_modifier(data->ccs_modifier) &&
+ if (igt_fb_is_gen12_rc_ccs_cc_modifier(data->ccs_modifier) &&
data->format != DRM_FORMAT_XRGB8888 &&
data->format != DRM_FORMAT_XRGB2101010)
return false;
--
2.44.2
More information about the igt-dev
mailing list