From: "Sharma, Swati2" <swati2.sharma@intel.com>
To: Karthik B S <karthik.b.s@intel.com>,
Bhanuprakash Modem <bhanuprakash.modem@intel.com>,
igt-dev@lists.freedesktop.org
Cc: Petri Latvala <petri.latvala@intel.com>
Subject: Re: [igt-dev] [PATCH] tests/kms_pipe_crc_basic: Sanity check for CRC mismatches
Date: Wed, 5 Aug 2020 18:02:37 +0530 [thread overview]
Message-ID: <43d3e094-11f4-fdb0-aa7e-bfa5b00544c9@intel.com> (raw)
In-Reply-To: <681e622e-cf37-0be7-c480-0f48e9d92f8e@intel.com>
Hi,
PFI my review comments.
Agree with Karthik's comments except IMO dynamic subtest is not
required if we are testing one o/p per pipe its more than sufficient to
test CRC.
CI is not green for this patch. Please make sure there are no
regressions. If these are false positive; report to Lakshmi.
On 05-Aug-20 5:13 PM, Karthik B S wrote:
>
>
> On 7/30/2020 3:59 AM, Bhanuprakash Modem wrote:
>> We’ve seen multiple CRC related issues on older platforms and
>> pre-silicon environment, most of the time we end up with debugging.
>>
>> This patch works as a crc-sanity test, which can verify that the
>> CRC mechanism is clean from the platform side before debugging the
>> actual CRC mismatches or other CRC related issues.
>>
>
> Please add the test details as well in the commit message.
>> Cc: Swati Sharma <swati2.sharma@intel.com>
>> Cc: Karthik B S <karthik.b.s@intel.com>
>> Cc: Jeevan B <jeevan.b@intel.com>
>> Cc: Petri Latvala <petri.latvala@intel.com>
>> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
>> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
>> ---
>> tests/kms_pipe_crc_basic.c | 77 ++++++++++++++++++++++++++++++++++++++
>> 1 file changed, 77 insertions(+)
>>
>> diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c
>> index cb93c1ad..a59c6bf1 100644
>> --- a/tests/kms_pipe_crc_basic.c
>> +++ b/tests/kms_pipe_crc_basic.c
>> @@ -154,6 +154,80 @@ static void test_read_crc(data_t *data, enum pipe
>> pipe, unsigned flags)
>> }
>> }
>> +/*
>> + * 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, collect CRC & compare with the ref CRC
> Nitpick, but its better if both sentences are consistent.
> In the first, primary plane is mentioned, but in the second
> nothing is mentioned. Little ambiguous for me.
>> + *
>> + * No CRC mismatch should happen
>> + */
>> +static void test_check_crc(data_t *data)
>> +{
>> + igt_display_t *display = &data->display;
>> + igt_output_t *output;
>> + enum pipe pipe;
>> + drmModeModeInfo *mode;
>> + struct igt_fb fb0, fb1;
>> + igt_crc_t ref_crc, crc;
>> + igt_pipe_crc_t *pipe_crc;
>> + igt_plane_t *primary;
>> +
>> + for_each_pipe_with_valid_output(display, pipe, output) {
>
> Can we use 'igt_get_single_output_for_pipe' for the intended pipe
> instead of using loop when we're only using it for one iteration always.
>> + igt_output_set_pipe(output, pipe);
>> + 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,
>> + LOCAL_DRM_FORMAT_MOD_NONE,
>> + 1.0, 1.0, 1.0,
>> + &fb0);
>> + igt_create_color_fb(data->drm_fd,
>> + mode->hdisplay, mode->vdisplay,
>> + DRM_FORMAT_XRGB8888,
>> + LOCAL_DRM_FORMAT_MOD_NONE,
>> + 1.0, 1.0, 1.0,
>> + &fb1);
Alignment is off.
>> +
>> + /* 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);
>> +
>> + if (pipe_crc)
>> + igt_pipe_crc_free(pipe_crc);
>
> Is this check required?
>> +
>> + pipe_crc = igt_pipe_crc_new(data->drm_fd, pipe,
>> + INTEL_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. */
>> + igt_plane_set_fb(primary, &fb1);
>> + igt_display_commit(display);
>> +
>> + igt_pipe_crc_collect_crc(pipe_crc, &crc);
>> + igt_assert_crc_equal(&crc, &ref_crc);
>> +
>> + /* Clean-up */
>> + igt_pipe_crc_free(pipe_crc);
>> + pipe_crc = NULL;
>> + igt_plane_set_fb(primary, NULL);
>> + igt_output_set_pipe(output, PIPE_NONE);
>> + igt_display_commit(display);
>> +
>> + igt_remove_fb(data->drm_fd, &fb0);
>> + igt_remove_fb(data->drm_fd, &fb1);
>> +
>> + /* once is enough */
>> + return;
>> + }
>> +
>> + igt_skip("no valid crtc/connector combinations found\n");
>
> Based on the comments above, we can remove the return and igt_skip();
>> +}
>> +'
>> data_t data = {0, };
>> igt_main
>> @@ -211,6 +285,9 @@ igt_main
>> }
>> }
>> + igt_subtest("compare-crc-basic")
>> + test_check_crc(&data);
Can this be renamed to something more meaningful maybe test_compare_crc
or test_crc_sanity?
Also igt_describe() is missing.
>
> Should we have this at a per pipe level like the other subtests?
> May be dynamic-subtests, but not sure because other tests in this IGT
> are not dynamic.
>
> Thanks,
> Karthik.B.S
>> +
>> igt_fixture {
>> igt_display_fini(&data.display);
>> }
>>
--
~Swati Sharma
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2020-08-05 12:32 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-29 22:29 [igt-dev] [PATCH] tests/kms_pipe_crc_basic: Sanity check for CRC mismatches Bhanuprakash Modem
2020-07-29 15:03 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
2020-07-30 11:27 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_pipe_crc_basic: Sanity check for CRC mismatches (rev2) Patchwork
2020-07-30 13:26 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2020-08-05 11:43 ` [igt-dev] [PATCH] tests/kms_pipe_crc_basic: Sanity check for CRC mismatches Karthik B S
2020-08-05 12:32 ` Sharma, Swati2 [this message]
2020-08-06 5:16 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_pipe_crc_basic: Sanity check for CRC mismatches (rev3) Patchwork
2020-08-06 6:19 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2020-08-06 12:44 ` [igt-dev] [PATCH v2] tests/kms_pipe_crc_basic: Sanity check for CRC mismatches Bhanuprakash Modem
2020-08-06 8:16 ` Petri Latvala
2020-08-06 8:30 ` Modem, Bhanuprakash
2020-08-06 18:04 ` [igt-dev] [PATCH v3 1/2] " Bhanuprakash Modem
2020-08-06 18:04 ` [igt-dev] [PATCH v1 2/2] intel-ci: Add compare CRC sanity test to BAT Bhanuprakash Modem
2020-08-06 10:20 ` Petri Latvala
2020-08-06 18:04 ` [igt-dev] [PATCH v3 0/2] tests/kms_pipe_crc_basic: Sanity check for CRC mismatches Bhanuprakash Modem
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43d3e094-11f4-fdb0-aa7e-bfa5b00544c9@intel.com \
--to=swati2.sharma@intel.com \
--cc=bhanuprakash.modem@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=karthik.b.s@intel.com \
--cc=petri.latvala@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox