[igt-dev] [PATCH i-g-t] tests/kms_big_fb: Fix hw stride length tests

Vidya Srinivas vidya.srinivas at intel.com
Tue Jul 27 14:57:14 UTC 2021


We see the HW stride length tests are crashing
when run in sequence. Individually, they PASS.
This is happening due to missing data.ibb creation
before the test_scanout. Patch fixes the same.
Patch also fixes CRC failures seen.

Signed-off-by: Lin Charlton <lin.charlton at intel.com>
Signed-off-by: Vidya Srinivas <vidya.srinivas at intel.com>
---
 tests/kms_big_fb.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/tests/kms_big_fb.c b/tests/kms_big_fb.c
index c6f374bdd073..89934ad3b5aa 100644
--- a/tests/kms_big_fb.c
+++ b/tests/kms_big_fb.c
@@ -462,6 +462,7 @@ static bool test_pipe(data_t *data)
 	igt_display_commit2(&data->display, data->display.is_atomic ?
 			    COMMIT_ATOMIC : COMMIT_UNIVERSAL);
 
+	igt_pipe_crc_free(data->pipe_crc);
 	data->pipe_crc = igt_pipe_crc_new(data->drm_fd, data->pipe,
 					  INTEL_PIPE_CRC_SOURCE_AUTO);
 
@@ -474,8 +475,6 @@ static bool test_pipe(data_t *data)
 	if (data->format == DRM_FORMAT_C8)
 		unset_lut(data);
 
-	igt_pipe_crc_free(data->pipe_crc);
-
 	igt_output_set_pipe(data->output, PIPE_ANY);
 
 	igt_remove_fb(data->drm_fd, &data->small_fb);
@@ -519,6 +518,7 @@ max_hw_stride_async_flip_test(data_t *data)
 		 data->hw_stride);
 	generate_pattern(data, &data->big_fb_flip[1], 640, 480);
 
+	igt_pipe_crc_free(data->pipe_crc);
 	data->pipe_crc = igt_pipe_crc_new(data->drm_fd, data->pipe,
 					  INTEL_PIPE_CRC_SOURCE_AUTO);
 	igt_pipe_crc_start(data->pipe_crc);
@@ -564,7 +564,7 @@ max_hw_stride_async_flip_test(data_t *data)
 	}
 	igt_reset_timeout();
 
-	igt_pipe_crc_free(data->pipe_crc);
+	igt_pipe_crc_stop(data->pipe_crc);
 	igt_output_set_pipe(data->output, PIPE_NONE);
 	igt_remove_fb(data->drm_fd, &data->big_fb);
 	igt_remove_fb(data->drm_fd, &data->big_fb_flip[0]);
@@ -852,7 +852,6 @@ igt_main
 			data.render_copy = igt_get_render_copyfunc(data.devid);
 
 		data.bops = buf_ops_create(data.drm_fd);
-		data.ibb = intel_bb_create(data.drm_fd, 4096);
 
 		data.planeclearrgb[0] = 0.0;
 		data.planeclearrgb[1] = 0.0;
@@ -978,7 +977,9 @@ igt_main
 						igt_require(data.format == DRM_FORMAT_C8 ||
 							igt_fb_supported_format(data.format));
 						igt_require(igt_display_has_format_mod(&data.display, data.format, data.modifier));
+						data.ibb = intel_bb_create(data.drm_fd, 4096);
 						test_scanout(&data);
+						intel_bb_destroy(data.ibb);
 					}
 
 					// async flip doesn't support linear fbs.
@@ -994,7 +995,9 @@ igt_main
 							igt_require(igt_display_has_format_mod(&data.display, data.format, data.modifier));
 							igt_require_f(data.async_flip_support, "Async Flip is not supported\n");
 							data.max_hw_fb_width = min(data.hw_stride / (formats[j].bpp >> 3), data.max_fb_width);
+							data.ibb = intel_bb_create(data.drm_fd, 4096);
 							test_scanout(&data);
+							intel_bb_destroy(data.ibb);
 					}
 					data.async_flip_test = false;
 				}
-- 
2.32.0



More information about the igt-dev mailing list