[igt-dev] [PATCH i-g-t 1/3] tests/kms_ccs: Skip CCS color clear value check for randomizing subtests

Imre Deak imre.deak at intel.com
Thu Apr 29 19:26:26 UTC 2021


When filling the color planes with randomized content, the color clear
values won't match what the HW actually wrote there, so skip the clear
value check in this case.

Cc: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
Cc: Mika Kahola <mika.kahola at intel.com>
Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
Signed-off-by: Imre Deak <imre.deak at intel.com>
---
 tests/kms_ccs.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/kms_ccs.c b/tests/kms_ccs.c
index 30e0fdb54..61c9b2277 100644
--- a/tests/kms_ccs.c
+++ b/tests/kms_ccs.c
@@ -195,7 +195,7 @@ static void check_ccs_cc_plane(int drm_fd, igt_fb_t *fb, int plane, const float
 	munmap(map, fb->size);
 };
 
-static void check_all_ccs_planes(int drm_fd, igt_fb_t *fb, const float *cc_color)
+static void check_all_ccs_planes(int drm_fd, igt_fb_t *fb, const float *cc_color, bool check_cc_plane)
 {
 	int i;
 
@@ -203,7 +203,7 @@ static void check_all_ccs_planes(int drm_fd, igt_fb_t *fb, const float *cc_color
 		if (igt_fb_is_ccs_plane(fb, i) &&
 		    !igt_fb_is_gen12_ccs_cc_plane(fb, i))
 			check_ccs_plane(drm_fd, fb, i);
-		else if (igt_fb_is_gen12_ccs_cc_plane(fb, i))
+		else if (igt_fb_is_gen12_ccs_cc_plane(fb, i) && check_cc_plane)
 			check_ccs_cc_plane(drm_fd, fb, i, cc_color);
 	}
 }
@@ -348,7 +348,7 @@ static void generate_fb(data_t *data, struct igt_fb *fb,
 		igt_assert_eq(ret, 0);
 
 	if (check_ccs_planes)
-		check_all_ccs_planes(data->drm_fd, fb, cc_color);
+		check_all_ccs_planes(data->drm_fd, fb, cc_color, !(data->flags & TEST_RANDOM));
 
 	fb->fb_id = f.fb_id;
 }
-- 
2.27.0



More information about the igt-dev mailing list