* [PATCH i-g-t] tests: kms_pipe_color: fix ctm tests
@ 2016-09-19 16:29 Lionel Landwerlin
2016-09-19 16:36 ` Jani Nikula
0 siblings, 1 reply; 6+ messages in thread
From: Lionel Landwerlin @ 2016-09-19 16:29 UTC (permalink / raw)
To: intel-gfx; +Cc: Daniel Vetter
Some of the Intel platforms have odd numbers of LUT entries and we
need to tests a couple of values around the expected result. Bring
back the CRC equal function we need that doesn't trigger an assert
right away, while we still assert if we can't find a correct result in
the outter loop.
bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97691
Fixes: 582ce4cd19c627606047b1a8fdd987c4dc07353c
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Christophe Prigent <christophe.prigent@intel.com>
---
tests/kms_pipe_color.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/tests/kms_pipe_color.c b/tests/kms_pipe_color.c
index b0a2f07..ebfceab 100644
--- a/tests/kms_pipe_color.c
+++ b/tests/kms_pipe_color.c
@@ -652,6 +652,16 @@ static void test_pipe_legacy_gamma_reset(data_t *data,
free(gamma_zero);
}
+static bool crc_equal(igt_crc_t *a, igt_crc_t *b)
+{
+ int i;
+
+ for (i = 0; i < a->n_words; i++)
+ if (a->crc[i] != b->crc[i])
+ return false;
+ return true;
+}
+
/*
* Draw 3 rectangles using before colors with the ctm matrix apply and verify
* the CRC is equal to using after colors with an identify ctm matrix.
@@ -724,7 +734,7 @@ static bool test_pipe_ctm(data_t *data,
/* Verify that the CRC of the software computed output is
* equal to the CRC of the CTM matrix transformation output.
*/
- igt_assert_crc_equal(&crc_software, &crc_hardware);
+ ret &= crc_equal(&crc_software, &crc_hardware);
igt_output_set_pipe(output, PIPE_ANY);
}
--
2.8.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH i-g-t] tests: kms_pipe_color: fix ctm tests
2016-09-19 16:29 [PATCH i-g-t] tests: kms_pipe_color: fix ctm tests Lionel Landwerlin
@ 2016-09-19 16:36 ` Jani Nikula
2016-09-20 8:46 ` Lionel Landwerlin
0 siblings, 1 reply; 6+ messages in thread
From: Jani Nikula @ 2016-09-19 16:36 UTC (permalink / raw)
To: Lionel Landwerlin, intel-gfx; +Cc: Daniel Vetter
On Mon, 19 Sep 2016, Lionel Landwerlin <lionel.g.landwerlin@intel.com> wrote:
> Some of the Intel platforms have odd numbers of LUT entries and we
> need to tests a couple of values around the expected result. Bring
> back the CRC equal function we need that doesn't trigger an assert
> right away, while we still assert if we can't find a correct result in
> the outter loop.
>
> bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97691
> Fixes: 582ce4cd19c627606047b1a8fdd987c4dc07353c
We might as well stick to kernel style for Fixes: tags:
Fixes: 582ce4cd19c6 ("lib/debugs: nuke igt_crc_equal again")
You can get that with:
$ git log -1 582ce4cd19c627606047b1a8fdd987c4dc07353c --pretty="format:Fixes: %h (\"%s\")"
BR,
Jani.
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH i-g-t] tests: kms_pipe_color: fix ctm tests
2016-09-19 16:36 ` Jani Nikula
@ 2016-09-20 8:46 ` Lionel Landwerlin
2016-09-20 10:21 ` Ville Syrjälä
0 siblings, 1 reply; 6+ messages in thread
From: Lionel Landwerlin @ 2016-09-20 8:46 UTC (permalink / raw)
To: intel-gfx; +Cc: Daniel Vetter
Some of the Intel platforms have odd numbers of LUT entries and we
need to tests a couple of values around the expected result. Bring
back the CRC equal function we need that doesn't trigger an assert
right away, while we still assert if we can't find a correct result in
the outter loop.
v2: update Fixes field (Jani)
bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97691
Fixes: 582ce4cd19c6 ("lib/debugs: nuke igt_crc_equal again")
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Christophe Prigent <christophe.prigent@intel.com>
---
tests/kms_pipe_color.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/tests/kms_pipe_color.c b/tests/kms_pipe_color.c
index b0a2f07..ebfceab 100644
--- a/tests/kms_pipe_color.c
+++ b/tests/kms_pipe_color.c
@@ -652,6 +652,16 @@ static void test_pipe_legacy_gamma_reset(data_t *data,
free(gamma_zero);
}
+static bool crc_equal(igt_crc_t *a, igt_crc_t *b)
+{
+ int i;
+
+ for (i = 0; i < a->n_words; i++)
+ if (a->crc[i] != b->crc[i])
+ return false;
+ return true;
+}
+
/*
* Draw 3 rectangles using before colors with the ctm matrix apply and verify
* the CRC is equal to using after colors with an identify ctm matrix.
@@ -724,7 +734,7 @@ static bool test_pipe_ctm(data_t *data,
/* Verify that the CRC of the software computed output is
* equal to the CRC of the CTM matrix transformation output.
*/
- igt_assert_crc_equal(&crc_software, &crc_hardware);
+ ret &= crc_equal(&crc_software, &crc_hardware);
igt_output_set_pipe(output, PIPE_ANY);
}
--
2.8.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH i-g-t] tests: kms_pipe_color: fix ctm tests
2016-09-20 8:46 ` Lionel Landwerlin
@ 2016-09-20 10:21 ` Ville Syrjälä
2016-09-26 16:35 ` Lionel Landwerlin
0 siblings, 1 reply; 6+ messages in thread
From: Ville Syrjälä @ 2016-09-20 10:21 UTC (permalink / raw)
To: Lionel Landwerlin; +Cc: Daniel Vetter, intel-gfx
On Tue, Sep 20, 2016 at 09:46:58AM +0100, Lionel Landwerlin wrote:
> Some of the Intel platforms have odd numbers of LUT entries and we
> need to tests a couple of values around the expected result. Bring
> back the CRC equal function we need that doesn't trigger an assert
> right away, while we still assert if we can't find a correct result in
> the outter loop.
>
> v2: update Fixes field (Jani)
>
> bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97691
> Fixes: 582ce4cd19c6 ("lib/debugs: nuke igt_crc_equal again")
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Christophe Prigent <christophe.prigent@intel.com>
> ---
> tests/kms_pipe_color.c | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/tests/kms_pipe_color.c b/tests/kms_pipe_color.c
> index b0a2f07..ebfceab 100644
> --- a/tests/kms_pipe_color.c
> +++ b/tests/kms_pipe_color.c
> @@ -652,6 +652,16 @@ static void test_pipe_legacy_gamma_reset(data_t *data,
> free(gamma_zero);
> }
>
> +static bool crc_equal(igt_crc_t *a, igt_crc_t *b)
> +{
> + int i;
> +
> + for (i = 0; i < a->n_words; i++)
> + if (a->crc[i] != b->crc[i])
> + return false;
> + return true;
> +}
memcmp()?
> +
> /*
> * Draw 3 rectangles using before colors with the ctm matrix apply and verify
> * the CRC is equal to using after colors with an identify ctm matrix.
> @@ -724,7 +734,7 @@ static bool test_pipe_ctm(data_t *data,
> /* Verify that the CRC of the software computed output is
> * equal to the CRC of the CTM matrix transformation output.
> */
> - igt_assert_crc_equal(&crc_software, &crc_hardware);
> + ret &= crc_equal(&crc_software, &crc_hardware);
>
> igt_output_set_pipe(output, PIPE_ANY);
> }
> --
> 2.8.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH i-g-t] tests: kms_pipe_color: fix ctm tests
2016-09-20 10:21 ` Ville Syrjälä
@ 2016-09-26 16:35 ` Lionel Landwerlin
2016-10-03 14:45 ` Lionel Landwerlin
0 siblings, 1 reply; 6+ messages in thread
From: Lionel Landwerlin @ 2016-09-26 16:35 UTC (permalink / raw)
To: intel-gfx; +Cc: Daniel Vetter
Some of the Intel platforms have odd numbers of LUT entries and we
need to tests a couple of values around the expected result. Bring
back the CRC equal function we need that doesn't trigger an assert
right away, while we still assert if we can't find a correct result in
the outter loop.
v2: update Fixes field (Jani)
v3: Use memcmp (Ville)
bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97691
Fixes: 582ce4cd19c6 ("lib/debugs: nuke igt_crc_equal again")
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Christophe Prigent <christophe.prigent@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
tests/kms_pipe_color.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/tests/kms_pipe_color.c b/tests/kms_pipe_color.c
index b0a2f07..f120e26 100644
--- a/tests/kms_pipe_color.c
+++ b/tests/kms_pipe_color.c
@@ -652,6 +652,13 @@ static void test_pipe_legacy_gamma_reset(data_t *data,
free(gamma_zero);
}
+static bool crc_equal(igt_crc_t *a, igt_crc_t *b)
+{
+ int i;
+
+ return memcmp(a->crc, b->crc, sizeof(a->crc[0]) * a->n_words) == 0;
+}
+
/*
* Draw 3 rectangles using before colors with the ctm matrix apply and verify
* the CRC is equal to using after colors with an identify ctm matrix.
@@ -724,7 +731,7 @@ static bool test_pipe_ctm(data_t *data,
/* Verify that the CRC of the software computed output is
* equal to the CRC of the CTM matrix transformation output.
*/
- igt_assert_crc_equal(&crc_software, &crc_hardware);
+ ret &= crc_equal(&crc_software, &crc_hardware);
igt_output_set_pipe(output, PIPE_ANY);
}
--
2.8.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH i-g-t] tests: kms_pipe_color: fix ctm tests
2016-09-26 16:35 ` Lionel Landwerlin
@ 2016-10-03 14:45 ` Lionel Landwerlin
0 siblings, 0 replies; 6+ messages in thread
From: Lionel Landwerlin @ 2016-10-03 14:45 UTC (permalink / raw)
To: intel-gfx; +Cc: Daniel Vetter
Some of the Intel platforms have odd numbers of LUT entries and we
need to tests a couple of values around the expected result. Bring
back the CRC equal function we need that doesn't trigger an assert
right away, while we still assert if we can't find a correct result in
the outter loop.
v2: update Fixes field (Jani)
v3: Use memcmp (Ville)
v4: missing signed-off
bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97691
Fixes: 582ce4cd19c6 ("lib/debugs: nuke igt_crc_equal again")
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Christophe Prigent <christophe.prigent@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
---
tests/kms_pipe_color.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/tests/kms_pipe_color.c b/tests/kms_pipe_color.c
index b0a2f07..f120e26 100644
--- a/tests/kms_pipe_color.c
+++ b/tests/kms_pipe_color.c
@@ -652,6 +652,13 @@ static void test_pipe_legacy_gamma_reset(data_t *data,
free(gamma_zero);
}
+static bool crc_equal(igt_crc_t *a, igt_crc_t *b)
+{
+ int i;
+
+ return memcmp(a->crc, b->crc, sizeof(a->crc[0]) * a->n_words) == 0;
+}
+
/*
* Draw 3 rectangles using before colors with the ctm matrix apply and verify
* the CRC is equal to using after colors with an identify ctm matrix.
@@ -724,7 +731,7 @@ static bool test_pipe_ctm(data_t *data,
/* Verify that the CRC of the software computed output is
* equal to the CRC of the CTM matrix transformation output.
*/
- igt_assert_crc_equal(&crc_software, &crc_hardware);
+ ret &= crc_equal(&crc_software, &crc_hardware);
igt_output_set_pipe(output, PIPE_ANY);
}
--
2.8.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-10-03 14:45 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-19 16:29 [PATCH i-g-t] tests: kms_pipe_color: fix ctm tests Lionel Landwerlin
2016-09-19 16:36 ` Jani Nikula
2016-09-20 8:46 ` Lionel Landwerlin
2016-09-20 10:21 ` Ville Syrjälä
2016-09-26 16:35 ` Lionel Landwerlin
2016-10-03 14:45 ` Lionel Landwerlin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).