[igt-dev] [PATCH v3 1/2] tests/kms_pipe_crc_basic: Sanity check for CRC mismatches
Petri Latvala
petri.latvala at intel.com
Thu Aug 6 13:28:58 UTC 2020
On Thu, Aug 06, 2020 at 04:33:01PM +0530, Karthik B S wrote:
>
>
> On 8/7/2020 12:03 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.
> >
> > This patch will create two framebuffers (fb0 & fb1) with the same
> > color info, flip fb0 with primary plane & collect CRC as reference.
> > Then flip fb1 with primary plane, collect the CRC and compare with
> > the reference CRC. There should be no CRC mismatch.
> >
> > v2:
> > * Run subtest to all pipes (Karthik & Swati)
> > * Fix commit message & few comments (Karthik)
> > * Use meaningful name for functions (Swati)
> > * Remove unwanted checks (Karthik)
> > v3:
> > * Rename subtest to compare-crc-sanitycheck-pipe- (Petri)
> >
> > Cc: Swati Sharma <swati2.sharma at intel.com>
> > Cc: Karthik B S <karthik.b.s at intel.com>
> > Cc: Jeevan B <jeevan.b at intel.com>
> > Cc: Petri Latvala <petri.latvala at intel.com>
> > Cc: Arkadiusz Hiler <arek at hiler.eu>
> > Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
> > ---
> > tests/kms_pipe_crc_basic.c | 73 ++++++++++++++++++++++++++++++++++++++
> > 1 file changed, 73 insertions(+)
> >
> > diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c
> > index cb93c1ad..c3c4cdd8 100644
> > --- a/tests/kms_pipe_crc_basic.c
> > +++ b/tests/kms_pipe_crc_basic.c
> > @@ -154,6 +154,75 @@ 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 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_display_t *display = &data->display;
> > + igt_plane_t *primary;
> > + drmModeModeInfo *mode;
> > + igt_crc_t ref_crc, crc;
> > + igt_pipe_crc_t *pipe_crc = NULL;
> > + struct igt_fb fb0, fb1;
> > + igt_output_t *output = igt_get_single_output_for_pipe(display, pipe);
> > +
> > + igt_require_f(output, "No connector found for pipe %s\n",
> > + kmstest_pipe_name(pipe));
> > +
> > + igt_require_pipe(display, pipe);
>
> This check is redundant as you are already calling
> 'igt_get_single_output_for_pipe' before this.
>
> With this removed, LGTM.
> Reviewed-by: Karthik B S <karthik.b.s at intel.com>
I was planning to remove this while merging but forgot =(
--
Petri Latvala
More information about the igt-dev
mailing list