From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4059410E038 for ; Mon, 29 May 2023 05:52:34 +0000 (UTC) Message-ID: <4407ed87-8fdf-7647-cbfa-0dbe94d10ff6@intel.com> Date: Mon, 29 May 2023 11:22:05 +0530 Content-Language: en-US To: Swati Sharma , References: <20230526174305.319725-1-swati2.sharma@intel.com> <20230526174305.319725-2-swati2.sharma@intel.com> From: "Modem, Bhanuprakash" In-Reply-To: <20230526174305.319725-2-swati2.sharma@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Subject: Re: [igt-dev] [PATCH i-g-t 2/3] tests/kms_pipe_crc_basic: add nv12 crc sanity check List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: Hi Swati, On Fri-26-05-2023 11:13 pm, Swati Sharma wrote: > New CRC sanitycheck test case is added with NV12 format. > kms_plane@pixel-format test is validating all formats. > To improve BAT coverage we can have one planar format crc > sanity test. > > Signed-off-by: Swati Sharma > Signed-off-by: Jeevan B > --- > tests/kms_pipe_crc_basic.c | 49 +++++++++++++++++++++++++++----------- > 1 file changed, 35 insertions(+), 14 deletions(-) > > diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c > index 84c73fd7..a280a5c2 100644 > --- a/tests/kms_pipe_crc_basic.c > +++ b/tests/kms_pipe_crc_basic.c > @@ -227,25 +227,34 @@ static void test_read_crc(data_t *data, enum pipe pipe, > } > > /** > - * SUBTEST: compare-crc-sanitycheck > - * Description: Basic sanity check for CRC mismatches > + * SUBTEST: compare-crc-sanitycheck-xr24 > + * Description: Basic sanity check for CRC mismatches with XR24 format > * Test category: functionality test > * Run type: BAT > * Functionality: crc > * Mega feature: General Display Features > + * > + * SUBTEST: compare-crc-sanitycheck-nv12 > + * Description: Basic sanity check for CRC mismatches with NV12 format > + * Test category: functionality test > + * Run type: BAT > + * Functionality: crc > + * Mega feature: General Display Features You may update this documentation as below: /** * SUBTEST: compare-crc-sanitycheck-%s * Description: Basic sanity check for CRC mismatches with %arg[1]. * Test category: functionality test * Run type: BAT * Functionality: crc * Mega feature: General Display Features * * arg[1]: * * @xr24 : XR24 format * @nv12 : NV12 format */ See https://gfx-linux.intel.com/igt-doc.html#igt-test-documentation - Bhanu > + > */ > > /* > * CRC-sanity test, to make sure there would be no CRC mismatches > * > - * - Create two framebuffers (FB0 & FB1) with same color info > - * - Flip FB0 with the Primary plane & collect the CRC as ref CRC. > - * - Flip FB1 with the Primary plane, collect the CRC & compare with > + * - Create two framebuffers (FB0 & FB1) > + * - Flip FB0 with the primary plane & collect the CRC as ref CRC. > + * - Flip FB1 with the primary plane, collect the CRC & compare with > * the ref CRC. > * > * No CRC mismatch should happen > */ > -static void test_compare_crc(data_t *data, enum pipe pipe, igt_output_t *output) > +static void test_compare_crc(data_t *data, enum pipe pipe, igt_output_t *output, > + uint32_t format) > { > igt_display_t *display = &data->display; > igt_plane_t *primary; > @@ -259,7 +268,6 @@ static void test_compare_crc(data_t *data, enum pipe pipe, igt_output_t *output) > > mode = igt_output_get_mode(output); > > - /* Create two framebuffers with the same color info. */ > igt_create_color_fb(data->drm_fd, > mode->hdisplay, mode->vdisplay, > DRM_FORMAT_XRGB8888, > @@ -267,13 +275,12 @@ static void test_compare_crc(data_t *data, enum pipe pipe, igt_output_t *output) > 1.0, 1.0, 1.0, > &fb0); > igt_create_color_fb(data->drm_fd, > - mode->hdisplay, mode->vdisplay, > - DRM_FORMAT_XRGB8888, > + mode->hdisplay, mode->vdisplay, format, > DRM_FORMAT_MOD_LINEAR, > 1.0, 1.0, 1.0, > &fb1); > > - /* Flip FB0 with the Primary plane & collect the CRC as ref CRC. */ > + /* Flip FB0 with the primary plane & collect the CRC as ref CRC. */ > primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY); > igt_plane_set_fb(primary, &fb0); > igt_display_commit(display); > @@ -282,7 +289,7 @@ static void test_compare_crc(data_t *data, enum pipe pipe, igt_output_t *output) > IGT_PIPE_CRC_SOURCE_AUTO); > igt_pipe_crc_collect_crc(pipe_crc, &ref_crc); > > - /* Flip FB1 with the Primary plane & compare the CRC with ref CRC. */ > + /* Flip FB1 with the primary plane & compare the CRC with ref CRC. */ > igt_plane_set_fb(primary, &fb1); > igt_display_commit(display); > > @@ -475,8 +482,22 @@ igt_main_args("e", NULL, help_str, opt_handler, NULL) > } > } > > - igt_describe("Basic sanity check for CRC mismatches"); > - igt_subtest_with_dynamic("compare-crc-sanitycheck") { > + igt_describe("Basic sanity check for CRC mismatches with XR24 format"); > + igt_subtest_with_dynamic("compare-crc-sanitycheck-xr24") { > + for_each_pipe_with_single_output(&data.display, pipe, output) { > + if (simulation_constraint(pipe)) > + continue; > + > + if(!pipe_output_combo_valid(&data.display, pipe, output)) > + continue; > + > + igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), output->name) > + test_compare_crc(&data, pipe, output, DRM_FORMAT_XRGB8888); > + } > + } > + > + igt_describe("Basic sanity check for CRC mismatches with NV12 format"); > + igt_subtest_with_dynamic("compare-crc-sanitycheck-nv12") { > for_each_pipe_with_single_output(&data.display, pipe, output) { > if (simulation_constraint(pipe)) > continue; > @@ -485,7 +506,7 @@ igt_main_args("e", NULL, help_str, opt_handler, NULL) > continue; > > igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), output->name) > - test_compare_crc(&data, pipe, output); > + test_compare_crc(&data, pipe, output, DRM_FORMAT_NV12); > } > } >