* [Intel-gfx] [PATCH i-g-t] [RFC] tests/kms_color: Fix pipe degamma subtests
@ 2021-05-28 4:35 Vidya Srinivas
2021-06-03 16:54 ` [Intel-gfx] [PATCH i-g-t] tests/kms_color: Remove gamma code from degamma tests Vidya Srinivas
` (2 more replies)
0 siblings, 3 replies; 19+ messages in thread
From: Vidya Srinivas @ 2021-05-28 4:35 UTC (permalink / raw)
To: intel-gfx, igt-dev; +Cc: markyacoub, charlton.lin
We need to collect CRC with no degamma transformation
and after drawing gradient with degamma LUT.
This patch makes subtest pipe degamma code
similar to pipe gamma is written.
Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
---
tests/kms_color.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/tests/kms_color.c b/tests/kms_color.c
index 3a42532a5c27..2d55f2611e72 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -31,8 +31,7 @@ static void test_pipe_degamma(data_t *data,
{
igt_output_t *output;
igt_display_t *display = &data->display;
- gamma_lut_t *degamma_linear, *degamma_full;
- gamma_lut_t *gamma_linear;
+ gamma_lut_t *degamma_full;
color_t red_green_blue[] = {
{ 1.0, 0.0, 0.0 },
{ 0.0, 1.0, 0.0 },
@@ -42,11 +41,8 @@ static void test_pipe_degamma(data_t *data,
igt_require(igt_pipe_obj_has_prop(primary->pipe, IGT_CRTC_DEGAMMA_LUT));
igt_require(igt_pipe_obj_has_prop(primary->pipe, IGT_CRTC_GAMMA_LUT));
- degamma_linear = generate_table(data->degamma_lut_size, 1.0);
degamma_full = generate_table_max(data->degamma_lut_size);
- gamma_linear = generate_table(data->gamma_lut_size, 1.0);
-
for_each_valid_output_on_pipe(&data->display, primary->pipe->pipe, output) {
drmModeModeInfo *mode;
struct igt_fb fb_modeset, fb;
@@ -75,8 +71,7 @@ static void test_pipe_degamma(data_t *data,
igt_plane_set_fb(primary, &fb_modeset);
disable_ctm(primary->pipe);
- disable_degamma(primary->pipe);
- set_gamma(data, primary->pipe, gamma_linear);
+ set_degamma(data, primary->pipe, degamma_full);
igt_display_commit(&data->display);
/* Draw solid colors with no degamma transformation. */
@@ -92,7 +87,6 @@ static void test_pipe_degamma(data_t *data,
*/
paint_gradient_rectangles(data, mode, red_green_blue, &fb);
igt_plane_set_fb(primary, &fb);
- set_degamma(data, primary->pipe, degamma_full);
igt_display_commit(&data->display);
igt_wait_for_vblank(data->drm_fd,
display->pipes[primary->pipe->pipe].crtc_offset);
@@ -109,9 +103,7 @@ static void test_pipe_degamma(data_t *data,
igt_remove_fb(data->drm_fd, &fb_modeset);
}
- free_lut(degamma_linear);
free_lut(degamma_full);
- free_lut(gamma_linear);
}
/*
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Intel-gfx] [PATCH i-g-t] tests/kms_color: Remove gamma code from degamma tests
2021-05-28 4:35 [Intel-gfx] [PATCH i-g-t] [RFC] tests/kms_color: Fix pipe degamma subtests Vidya Srinivas
@ 2021-06-03 16:54 ` Vidya Srinivas
2021-06-04 18:28 ` Mark Yacoub
2021-06-04 13:11 ` [Intel-gfx] [PATCH] tests/kms_color: Disable gamma in " Vidya Srinivas
2021-06-04 14:01 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for tests/kms_color: " Patchwork
2 siblings, 1 reply; 19+ messages in thread
From: Vidya Srinivas @ 2021-06-03 16:54 UTC (permalink / raw)
To: intel-gfx, igt-dev; +Cc: markyacoub, charlton.lin
CRC should be collected without degamma transformation
and after drawing gradient with degamma LUT.
This patch removes things which are not related to degamma
and makes it similar to pipe gamma test.
Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
---
tests/kms_color.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/tests/kms_color.c b/tests/kms_color.c
index 3a42532a5c27..2c9821cdecce 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -31,8 +31,7 @@ static void test_pipe_degamma(data_t *data,
{
igt_output_t *output;
igt_display_t *display = &data->display;
- gamma_lut_t *degamma_linear, *degamma_full;
- gamma_lut_t *gamma_linear;
+ gamma_lut_t *degamma_full;
color_t red_green_blue[] = {
{ 1.0, 0.0, 0.0 },
{ 0.0, 1.0, 0.0 },
@@ -42,11 +41,8 @@ static void test_pipe_degamma(data_t *data,
igt_require(igt_pipe_obj_has_prop(primary->pipe, IGT_CRTC_DEGAMMA_LUT));
igt_require(igt_pipe_obj_has_prop(primary->pipe, IGT_CRTC_GAMMA_LUT));
- degamma_linear = generate_table(data->degamma_lut_size, 1.0);
degamma_full = generate_table_max(data->degamma_lut_size);
- gamma_linear = generate_table(data->gamma_lut_size, 1.0);
-
for_each_valid_output_on_pipe(&data->display, primary->pipe->pipe, output) {
drmModeModeInfo *mode;
struct igt_fb fb_modeset, fb;
@@ -75,8 +71,7 @@ static void test_pipe_degamma(data_t *data,
igt_plane_set_fb(primary, &fb_modeset);
disable_ctm(primary->pipe);
- disable_degamma(primary->pipe);
- set_gamma(data, primary->pipe, gamma_linear);
+ set_degamma(data, primary->pipe, degamma_full);
igt_display_commit(&data->display);
/* Draw solid colors with no degamma transformation. */
@@ -92,7 +87,6 @@ static void test_pipe_degamma(data_t *data,
*/
paint_gradient_rectangles(data, mode, red_green_blue, &fb);
igt_plane_set_fb(primary, &fb);
- set_degamma(data, primary->pipe, degamma_full);
igt_display_commit(&data->display);
igt_wait_for_vblank(data->drm_fd,
display->pipes[primary->pipe->pipe].crtc_offset);
@@ -105,13 +99,13 @@ static void test_pipe_degamma(data_t *data,
igt_plane_set_fb(primary, NULL);
igt_output_set_pipe(output, PIPE_NONE);
+ igt_display_commit2(&data->display, data->display.is_atomic ?
+ COMMIT_ATOMIC : COMMIT_LEGACY);
igt_remove_fb(data->drm_fd, &fb);
igt_remove_fb(data->drm_fd, &fb_modeset);
}
- free_lut(degamma_linear);
free_lut(degamma_full);
- free_lut(gamma_linear);
}
/*
@@ -191,6 +185,8 @@ static void test_pipe_gamma(data_t *data,
igt_plane_set_fb(primary, NULL);
igt_output_set_pipe(output, PIPE_NONE);
+ igt_display_commit2(&data->display, data->display.is_atomic ?
+ COMMIT_ATOMIC : COMMIT_LEGACY);
igt_remove_fb(data->drm_fd, &fb);
igt_remove_fb(data->drm_fd, &fb_modeset);
}
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Intel-gfx] [PATCH] tests/kms_color: Disable gamma in degamma tests
2021-05-28 4:35 [Intel-gfx] [PATCH i-g-t] [RFC] tests/kms_color: Fix pipe degamma subtests Vidya Srinivas
2021-06-03 16:54 ` [Intel-gfx] [PATCH i-g-t] tests/kms_color: Remove gamma code from degamma tests Vidya Srinivas
@ 2021-06-04 13:11 ` Vidya Srinivas
2021-06-06 9:09 ` Modem, Bhanuprakash
` (4 more replies)
2021-06-04 14:01 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for tests/kms_color: " Patchwork
2 siblings, 5 replies; 19+ messages in thread
From: Vidya Srinivas @ 2021-06-04 13:11 UTC (permalink / raw)
To: intel-gfx, igt-dev; +Cc: markyacoub, charlton.lin
This patch disables gamma in degamma subtest which is missing.
It compares CRC between (linear degamma + solid colors) and (max
degamma + gradient colors).
v2 - Addressed review comments from Bhanuprakash Modem
Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
Change-Id: Ibdb91b603e2e4024d170727d24c6a5425441e2e1
---
tests/kms_color.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/tests/kms_color.c b/tests/kms_color.c
index 3a42532a5c27..41720dcdd90f 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -32,7 +32,6 @@ static void test_pipe_degamma(data_t *data,
igt_output_t *output;
igt_display_t *display = &data->display;
gamma_lut_t *degamma_linear, *degamma_full;
- gamma_lut_t *gamma_linear;
color_t red_green_blue[] = {
{ 1.0, 0.0, 0.0 },
{ 0.0, 1.0, 0.0 },
@@ -45,8 +44,6 @@ static void test_pipe_degamma(data_t *data,
degamma_linear = generate_table(data->degamma_lut_size, 1.0);
degamma_full = generate_table_max(data->degamma_lut_size);
- gamma_linear = generate_table(data->gamma_lut_size, 1.0);
-
for_each_valid_output_on_pipe(&data->display, primary->pipe->pipe, output) {
drmModeModeInfo *mode;
struct igt_fb fb_modeset, fb;
@@ -75,8 +72,8 @@ static void test_pipe_degamma(data_t *data,
igt_plane_set_fb(primary, &fb_modeset);
disable_ctm(primary->pipe);
- disable_degamma(primary->pipe);
- set_gamma(data, primary->pipe, gamma_linear);
+ disable_gamma(primary->pipe);
+ set_degamma(data, primary->pipe, degamma_linear);
igt_display_commit(&data->display);
/* Draw solid colors with no degamma transformation. */
@@ -103,15 +100,17 @@ static void test_pipe_degamma(data_t *data,
*/
igt_assert_crc_equal(&crc_fullgamma, &crc_fullcolors);
+ disable_degamma(primary->pipe);
igt_plane_set_fb(primary, NULL);
igt_output_set_pipe(output, PIPE_NONE);
+ igt_display_commit2(&data->display, data->display.is_atomic ?
+ COMMIT_ATOMIC : COMMIT_LEGACY);
igt_remove_fb(data->drm_fd, &fb);
igt_remove_fb(data->drm_fd, &fb_modeset);
}
free_lut(degamma_linear);
free_lut(degamma_full);
- free_lut(gamma_linear);
}
/*
@@ -189,8 +188,11 @@ static void test_pipe_gamma(data_t *data,
*/
igt_assert_crc_equal(&crc_fullgamma, &crc_fullcolors);
+ disable_gamma(primary->pipe);
igt_plane_set_fb(primary, NULL);
igt_output_set_pipe(output, PIPE_NONE);
+ igt_display_commit2(&data->display, data->display.is_atomic ?
+ COMMIT_ATOMIC : COMMIT_LEGACY);
igt_remove_fb(data->drm_fd, &fb);
igt_remove_fb(data->drm_fd, &fb_modeset);
}
--
2.26.2
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Intel-gfx] ✗ Fi.CI.BUILD: failure for tests/kms_color: Disable gamma in degamma tests
2021-05-28 4:35 [Intel-gfx] [PATCH i-g-t] [RFC] tests/kms_color: Fix pipe degamma subtests Vidya Srinivas
2021-06-03 16:54 ` [Intel-gfx] [PATCH i-g-t] tests/kms_color: Remove gamma code from degamma tests Vidya Srinivas
2021-06-04 13:11 ` [Intel-gfx] [PATCH] tests/kms_color: Disable gamma in " Vidya Srinivas
@ 2021-06-04 14:01 ` Patchwork
2 siblings, 0 replies; 19+ messages in thread
From: Patchwork @ 2021-06-04 14:01 UTC (permalink / raw)
To: Srinivas, Vidya; +Cc: intel-gfx
== Series Details ==
Series: tests/kms_color: Disable gamma in degamma tests
URL : https://patchwork.freedesktop.org/series/91013/
State : failure
== Summary ==
Applying: tests/kms_color: Disable gamma in degamma tests
error: sha1 information is lacking or useless (tests/kms_color.c).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 tests/kms_color: Disable gamma in degamma tests
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [Intel-gfx] [PATCH i-g-t] tests/kms_color: Remove gamma code from degamma tests
2021-06-03 16:54 ` [Intel-gfx] [PATCH i-g-t] tests/kms_color: Remove gamma code from degamma tests Vidya Srinivas
@ 2021-06-04 18:28 ` Mark Yacoub
2021-06-05 5:41 ` Srinivas, Vidya
0 siblings, 1 reply; 19+ messages in thread
From: Mark Yacoub @ 2021-06-04 18:28 UTC (permalink / raw)
To: Vidya Srinivas; +Cc: igt-dev, intel-gfx, charlton.lin
On Thu, Jun 3, 2021 at 1:04 PM Vidya Srinivas <vidya.srinivas@intel.com> wrote:
>
> CRC should be collected without degamma transformation
> and after drawing gradient with degamma LUT.
> This patch removes things which are not related to degamma
> and makes it similar to pipe gamma test.
>
Tested on ChromeOS on TGL (Delbin) and JSL (Drawlat)
Tested-by: Mark Yacoub <markyacoub@chromium.org>
> Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
> ---
> tests/kms_color.c | 16 ++++++----------
> 1 file changed, 6 insertions(+), 10 deletions(-)
>
> diff --git a/tests/kms_color.c b/tests/kms_color.c
> index 3a42532a5c27..2c9821cdecce 100644
> --- a/tests/kms_color.c
> +++ b/tests/kms_color.c
> @@ -31,8 +31,7 @@ static void test_pipe_degamma(data_t *data,
> {
> igt_output_t *output;
> igt_display_t *display = &data->display;
> - gamma_lut_t *degamma_linear, *degamma_full;
> - gamma_lut_t *gamma_linear;
> + gamma_lut_t *degamma_full;
> color_t red_green_blue[] = {
> { 1.0, 0.0, 0.0 },
> { 0.0, 1.0, 0.0 },
> @@ -42,11 +41,8 @@ static void test_pipe_degamma(data_t *data,
> igt_require(igt_pipe_obj_has_prop(primary->pipe, IGT_CRTC_DEGAMMA_LUT));
> igt_require(igt_pipe_obj_has_prop(primary->pipe, IGT_CRTC_GAMMA_LUT));
>
> - degamma_linear = generate_table(data->degamma_lut_size, 1.0);
> degamma_full = generate_table_max(data->degamma_lut_size);
>
> - gamma_linear = generate_table(data->gamma_lut_size, 1.0);
> -
> for_each_valid_output_on_pipe(&data->display, primary->pipe->pipe, output) {
> drmModeModeInfo *mode;
> struct igt_fb fb_modeset, fb;
> @@ -75,8 +71,7 @@ static void test_pipe_degamma(data_t *data,
>
> igt_plane_set_fb(primary, &fb_modeset);
> disable_ctm(primary->pipe);
> - disable_degamma(primary->pipe);
> - set_gamma(data, primary->pipe, gamma_linear);
> + set_degamma(data, primary->pipe, degamma_full);
> igt_display_commit(&data->display);
>
> /* Draw solid colors with no degamma transformation. */
> @@ -92,7 +87,6 @@ static void test_pipe_degamma(data_t *data,
> */
> paint_gradient_rectangles(data, mode, red_green_blue, &fb);
> igt_plane_set_fb(primary, &fb);
> - set_degamma(data, primary->pipe, degamma_full);
> igt_display_commit(&data->display);
> igt_wait_for_vblank(data->drm_fd,
> display->pipes[primary->pipe->pipe].crtc_offset);
> @@ -105,13 +99,13 @@ static void test_pipe_degamma(data_t *data,
>
> igt_plane_set_fb(primary, NULL);
> igt_output_set_pipe(output, PIPE_NONE);
> + igt_display_commit2(&data->display, data->display.is_atomic ?
> + COMMIT_ATOMIC : COMMIT_LEGACY);
> igt_remove_fb(data->drm_fd, &fb);
> igt_remove_fb(data->drm_fd, &fb_modeset);
> }
>
> - free_lut(degamma_linear);
> free_lut(degamma_full);
> - free_lut(gamma_linear);
> }
>
> /*
> @@ -191,6 +185,8 @@ static void test_pipe_gamma(data_t *data,
>
> igt_plane_set_fb(primary, NULL);
> igt_output_set_pipe(output, PIPE_NONE);
> + igt_display_commit2(&data->display, data->display.is_atomic ?
> + COMMIT_ATOMIC : COMMIT_LEGACY);
> igt_remove_fb(data->drm_fd, &fb);
> igt_remove_fb(data->drm_fd, &fb_modeset);
> }
> --
> 2.7.4
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [Intel-gfx] [PATCH i-g-t] tests/kms_color: Remove gamma code from degamma tests
2021-06-04 18:28 ` Mark Yacoub
@ 2021-06-05 5:41 ` Srinivas, Vidya
0 siblings, 0 replies; 19+ messages in thread
From: Srinivas, Vidya @ 2021-06-05 5:41 UTC (permalink / raw)
To: Mark Yacoub
Cc: igt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
Lin, Charlton
Thank you very much Mark, for testing the patch and providing the "Tested-by" tag.
Regards
Vidya
-----Original Message-----
From: Mark Yacoub <markyacoub@chromium.org>
Sent: Friday, June 4, 2021 11:58 PM
To: Srinivas, Vidya <vidya.srinivas@intel.com>
Cc: intel-gfx@lists.freedesktop.org; igt-dev@lists.freedesktop.org; Almahallawy, Khaled <khaled.almahallawy@intel.com>; Lin, Charlton <charlton.lin@intel.com>; Latvala, Petri <petri.latvala@intel.com>
Subject: Re: [PATCH i-g-t] tests/kms_color: Remove gamma code from degamma tests
On Thu, Jun 3, 2021 at 1:04 PM Vidya Srinivas <vidya.srinivas@intel.com> wrote:
>
> CRC should be collected without degamma transformation and after
> drawing gradient with degamma LUT.
> This patch removes things which are not related to degamma and makes
> it similar to pipe gamma test.
>
Tested on ChromeOS on TGL (Delbin) and JSL (Drawlat)
Tested-by: Mark Yacoub <markyacoub@chromium.org>
> Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
> ---
> tests/kms_color.c | 16 ++++++----------
> 1 file changed, 6 insertions(+), 10 deletions(-)
>
> diff --git a/tests/kms_color.c b/tests/kms_color.c index
> 3a42532a5c27..2c9821cdecce 100644
> --- a/tests/kms_color.c
> +++ b/tests/kms_color.c
> @@ -31,8 +31,7 @@ static void test_pipe_degamma(data_t *data, {
> igt_output_t *output;
> igt_display_t *display = &data->display;
> - gamma_lut_t *degamma_linear, *degamma_full;
> - gamma_lut_t *gamma_linear;
> + gamma_lut_t *degamma_full;
> color_t red_green_blue[] = {
> { 1.0, 0.0, 0.0 },
> { 0.0, 1.0, 0.0 },
> @@ -42,11 +41,8 @@ static void test_pipe_degamma(data_t *data,
> igt_require(igt_pipe_obj_has_prop(primary->pipe, IGT_CRTC_DEGAMMA_LUT));
> igt_require(igt_pipe_obj_has_prop(primary->pipe,
> IGT_CRTC_GAMMA_LUT));
>
> - degamma_linear = generate_table(data->degamma_lut_size, 1.0);
> degamma_full = generate_table_max(data->degamma_lut_size);
>
> - gamma_linear = generate_table(data->gamma_lut_size, 1.0);
> -
> for_each_valid_output_on_pipe(&data->display, primary->pipe->pipe, output) {
> drmModeModeInfo *mode;
> struct igt_fb fb_modeset, fb; @@ -75,8 +71,7 @@ static
> void test_pipe_degamma(data_t *data,
>
> igt_plane_set_fb(primary, &fb_modeset);
> disable_ctm(primary->pipe);
> - disable_degamma(primary->pipe);
> - set_gamma(data, primary->pipe, gamma_linear);
> + set_degamma(data, primary->pipe, degamma_full);
> igt_display_commit(&data->display);
>
> /* Draw solid colors with no degamma transformation.
> */ @@ -92,7 +87,6 @@ static void test_pipe_degamma(data_t *data,
> */
> paint_gradient_rectangles(data, mode, red_green_blue, &fb);
> igt_plane_set_fb(primary, &fb);
> - set_degamma(data, primary->pipe, degamma_full);
> igt_display_commit(&data->display);
> igt_wait_for_vblank(data->drm_fd,
>
> display->pipes[primary->pipe->pipe].crtc_offset);
> @@ -105,13 +99,13 @@ static void test_pipe_degamma(data_t *data,
>
> igt_plane_set_fb(primary, NULL);
> igt_output_set_pipe(output, PIPE_NONE);
> + igt_display_commit2(&data->display, data->display.is_atomic ?
> + COMMIT_ATOMIC
> + : COMMIT_LEGACY);
> igt_remove_fb(data->drm_fd, &fb);
> igt_remove_fb(data->drm_fd, &fb_modeset);
> }
>
> - free_lut(degamma_linear);
> free_lut(degamma_full);
> - free_lut(gamma_linear);
> }
>
> /*
> @@ -191,6 +185,8 @@ static void test_pipe_gamma(data_t *data,
>
> igt_plane_set_fb(primary, NULL);
> igt_output_set_pipe(output, PIPE_NONE);
> + igt_display_commit2(&data->display, data->display.is_atomic ?
> + COMMIT_ATOMIC
> + : COMMIT_LEGACY);
> igt_remove_fb(data->drm_fd, &fb);
> igt_remove_fb(data->drm_fd, &fb_modeset);
> }
> --
> 2.7.4
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [Intel-gfx] [PATCH] tests/kms_color: Disable gamma in degamma tests
2021-06-04 13:11 ` [Intel-gfx] [PATCH] tests/kms_color: Disable gamma in " Vidya Srinivas
@ 2021-06-06 9:09 ` Modem, Bhanuprakash
2021-06-07 3:59 ` Srinivas, Vidya
2021-06-07 3:47 ` [Intel-gfx] [PATCH i-g-t] " Vidya Srinivas
` (3 subsequent siblings)
4 siblings, 1 reply; 19+ messages in thread
From: Modem, Bhanuprakash @ 2021-06-06 9:09 UTC (permalink / raw)
To: Srinivas, Vidya, intel-gfx@lists.freedesktop.org,
igt-dev@lists.freedesktop.org
Cc: markyacoub@chromium.org, Lin, Charlton
> From: Srinivas, Vidya <vidya.srinivas@intel.com>
> Sent: Friday, June 4, 2021 6:41 PM
> To: intel-gfx@lists.freedesktop.org; igt-dev@lists.freedesktop.org
> Cc: markyacoub@chromium.org; Almahallawy, Khaled
> <khaled.almahallawy@intel.com>; Lin, Charlton <charlton.lin@intel.com>;
> Latvala, Petri <petri.latvala@intel.com>; Modem, Bhanuprakash
> <bhanuprakash.modem@intel.com>; Shankar, Uma <uma.shankar@intel.com>;
> Srinivas, Vidya <vidya.srinivas@intel.com>
> Subject: [PATCH] tests/kms_color: Disable gamma in degamma tests
>
> This patch disables gamma in degamma subtest which is missing.
> It compares CRC between (linear degamma + solid colors) and (max
> degamma + gradient colors).
>
> v2 - Addressed review comments from Bhanuprakash Modem
>
> Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
> Change-Id: Ibdb91b603e2e4024d170727d24c6a5425441e2e1
> ---
> tests/kms_color.c | 14 ++++++++------
> 1 file changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/tests/kms_color.c b/tests/kms_color.c
> index 3a42532a5c27..41720dcdd90f 100644
> --- a/tests/kms_color.c
> +++ b/tests/kms_color.c
> @@ -32,7 +32,6 @@ static void test_pipe_degamma(data_t *data,
> igt_output_t *output;
> igt_display_t *display = &data->display;
> gamma_lut_t *degamma_linear, *degamma_full;
> - gamma_lut_t *gamma_linear;
> color_t red_green_blue[] = {
> { 1.0, 0.0, 0.0 },
> { 0.0, 1.0, 0.0 },
> @@ -45,8 +44,6 @@ static void test_pipe_degamma(data_t *data,
> degamma_linear = generate_table(data->degamma_lut_size, 1.0);
> degamma_full = generate_table_max(data->degamma_lut_size);
>
> - gamma_linear = generate_table(data->gamma_lut_size, 1.0);
> -
> for_each_valid_output_on_pipe(&data->display, primary->pipe->pipe,
> output) {
> drmModeModeInfo *mode;
> struct igt_fb fb_modeset, fb;
> @@ -75,8 +72,8 @@ static void test_pipe_degamma(data_t *data,
>
> igt_plane_set_fb(primary, &fb_modeset);
> disable_ctm(primary->pipe);
> - disable_degamma(primary->pipe);
> - set_gamma(data, primary->pipe, gamma_linear);
> + disable_gamma(primary->pipe);
> + set_degamma(data, primary->pipe, degamma_linear);
> igt_display_commit(&data->display);
>
> /* Draw solid colors with no degamma transformation. */
Please fix the comment s/"no degamma"/"linear degamma"/.
Also, we need to port this patch on "kms_color_chamelium".
> @@ -103,15 +100,17 @@ static void test_pipe_degamma(data_t *data,
> */
> igt_assert_crc_equal(&crc_fullgamma, &crc_fullcolors);
>
> + disable_degamma(primary->pipe);
> igt_plane_set_fb(primary, NULL);
> igt_output_set_pipe(output, PIPE_NONE);
> + igt_display_commit2(&data->display, data->display.is_atomic ?
> + COMMIT_ATOMIC : COMMIT_LEGACY);
> igt_remove_fb(data->drm_fd, &fb);
> igt_remove_fb(data->drm_fd, &fb_modeset);
> }
>
> free_lut(degamma_linear);
> free_lut(degamma_full);
> - free_lut(gamma_linear);
> }
>
> /*
> @@ -189,8 +188,11 @@ static void test_pipe_gamma(data_t *data,
> */
> igt_assert_crc_equal(&crc_fullgamma, &crc_fullcolors);
>
> + disable_gamma(primary->pipe);
> igt_plane_set_fb(primary, NULL);
> igt_output_set_pipe(output, PIPE_NONE);
> + igt_display_commit2(&data->display, data->display.is_atomic ?
> + COMMIT_ATOMIC : COMMIT_LEGACY);
These changes are not relevant to the degamma, but still we need these changes.
It would be good if we mention this in commit message.
With above changes, this patch is
Reviewed-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
- Bhanu
> igt_remove_fb(data->drm_fd, &fb);
> igt_remove_fb(data->drm_fd, &fb_modeset);
> }
> --
> 2.26.2
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Intel-gfx] [PATCH i-g-t] tests/kms_color: Disable gamma in degamma tests
2021-06-04 13:11 ` [Intel-gfx] [PATCH] tests/kms_color: Disable gamma in " Vidya Srinivas
2021-06-06 9:09 ` Modem, Bhanuprakash
@ 2021-06-07 3:47 ` Vidya Srinivas
2021-06-08 6:46 ` Modem, Bhanuprakash
2021-06-08 6:54 ` [Intel-gfx] [PATCH i-g-t 1/2] " Vidya Srinivas
` (2 subsequent siblings)
4 siblings, 1 reply; 19+ messages in thread
From: Vidya Srinivas @ 2021-06-07 3:47 UTC (permalink / raw)
To: intel-gfx, igt-dev; +Cc: markyacoub, charlton.lin
This patch disables gamma in degamma subtest which is missing.
It compares CRC between (linear degamma + solid colors) and (max
degamma + gradient colors). Patch also cleans up degamma before
exiting degamma test and cleans up gamma before exiting gamma
test.
v2 - Addressed review comments from Bhanuprakash Modem
Changed full degamma for reference CRC to linear degamma
Added clean up of degamma end of degamma test.
v3 - Addressed review comments from Bhanuprakash Modem
Ported changes to kms_color_chamelium
Change-Id: Ibdb91b603e2e4024d170727d24c6a5425441e2e1
Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
---
tests/kms_color.c | 14 +++++++-------
tests/kms_color_chamelium.c | 12 ++++++------
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/tests/kms_color.c b/tests/kms_color.c
index 3a42532a5c27..1b021ac3ce0c 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -32,7 +32,6 @@ static void test_pipe_degamma(data_t *data,
igt_output_t *output;
igt_display_t *display = &data->display;
gamma_lut_t *degamma_linear, *degamma_full;
- gamma_lut_t *gamma_linear;
color_t red_green_blue[] = {
{ 1.0, 0.0, 0.0 },
{ 0.0, 1.0, 0.0 },
@@ -45,8 +44,6 @@ static void test_pipe_degamma(data_t *data,
degamma_linear = generate_table(data->degamma_lut_size, 1.0);
degamma_full = generate_table_max(data->degamma_lut_size);
- gamma_linear = generate_table(data->gamma_lut_size, 1.0);
-
for_each_valid_output_on_pipe(&data->display, primary->pipe->pipe, output) {
drmModeModeInfo *mode;
struct igt_fb fb_modeset, fb;
@@ -75,11 +72,11 @@ static void test_pipe_degamma(data_t *data,
igt_plane_set_fb(primary, &fb_modeset);
disable_ctm(primary->pipe);
- disable_degamma(primary->pipe);
- set_gamma(data, primary->pipe, gamma_linear);
+ disable_gamma(primary->pipe);
+ set_degamma(data, primary->pipe, degamma_linear);
igt_display_commit(&data->display);
- /* Draw solid colors with no degamma transformation. */
+ /* Draw solid colors with linear degamma transformation. */
paint_rectangles(data, mode, red_green_blue, &fb);
igt_plane_set_fb(primary, &fb);
igt_display_commit(&data->display);
@@ -103,15 +100,16 @@ static void test_pipe_degamma(data_t *data,
*/
igt_assert_crc_equal(&crc_fullgamma, &crc_fullcolors);
+ disable_degamma(primary->pipe);
igt_plane_set_fb(primary, NULL);
igt_output_set_pipe(output, PIPE_NONE);
+ igt_display_commit(&data->display);
igt_remove_fb(data->drm_fd, &fb);
igt_remove_fb(data->drm_fd, &fb_modeset);
}
free_lut(degamma_linear);
free_lut(degamma_full);
- free_lut(gamma_linear);
}
/*
@@ -189,8 +187,10 @@ static void test_pipe_gamma(data_t *data,
*/
igt_assert_crc_equal(&crc_fullgamma, &crc_fullcolors);
+ disable_gamma(primary->pipe);
igt_plane_set_fb(primary, NULL);
igt_output_set_pipe(output, PIPE_NONE);
+ igt_display_commit(&data->display);
igt_remove_fb(data->drm_fd, &fb);
igt_remove_fb(data->drm_fd, &fb_modeset);
}
diff --git a/tests/kms_color_chamelium.c b/tests/kms_color_chamelium.c
index 30b38b82e306..c21d64e9cc9a 100644
--- a/tests/kms_color_chamelium.c
+++ b/tests/kms_color_chamelium.c
@@ -36,7 +36,6 @@ static void test_pipe_degamma(data_t *data,
{
igt_output_t *output;
gamma_lut_t *degamma_linear, *degamma_full;
- gamma_lut_t *gamma_linear;
color_t red_green_blue[] = {
{ 1.0, 0.0, 0.0 },
{ 0.0, 1.0, 0.0 },
@@ -57,8 +56,6 @@ static void test_pipe_degamma(data_t *data,
degamma_linear = generate_table(data->degamma_lut_size, 1.0);
degamma_full = generate_table_max(data->degamma_lut_size);
- gamma_linear = generate_table(data->gamma_lut_size, 1.0);
-
for_each_valid_output_on_pipe(&data->display,
primary->pipe->pipe,
output) {
@@ -110,10 +107,10 @@ static void test_pipe_degamma(data_t *data,
igt_plane_set_fb(primary, &fb_modeset);
disable_ctm(primary->pipe);
disable_degamma(primary->pipe);
- set_gamma(data, primary->pipe, gamma_linear);
+ set_degamma(data, primary->pipe, degamma_linear);
igt_display_commit(&data->display);
- /* Draw solid colors with no degamma transformation. */
+ /* Draw solid colors with linear degamma transformation. */
paint_rectangles(data, mode, red_green_blue, &fbref);
/* Draw a gradient with degamma LUT to remap all
@@ -135,13 +132,14 @@ static void test_pipe_degamma(data_t *data,
frame_fullcolors, &fbref,
CHAMELIUM_CHECK_ANALOG);
+ disable_degamma(primary->pipe);
igt_plane_set_fb(primary, NULL);
igt_output_set_pipe(output, PIPE_NONE);
+ igt_display_commit(&data->display);
}
free_lut(degamma_linear);
free_lut(degamma_full);
- free_lut(gamma_linear);
}
/*
@@ -247,8 +245,10 @@ static void test_pipe_gamma(data_t *data,
frame_fullcolors, &fbref,
CHAMELIUM_CHECK_ANALOG);
+ disable_gamma(primary->pipe);
igt_plane_set_fb(primary, NULL);
igt_output_set_pipe(output, PIPE_NONE);
+ igt_display_commit(&data->display);
}
free_lut(gamma_full);
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [Intel-gfx] [PATCH] tests/kms_color: Disable gamma in degamma tests
2021-06-06 9:09 ` Modem, Bhanuprakash
@ 2021-06-07 3:59 ` Srinivas, Vidya
0 siblings, 0 replies; 19+ messages in thread
From: Srinivas, Vidya @ 2021-06-07 3:59 UTC (permalink / raw)
To: Modem, Bhanuprakash, intel-gfx@lists.freedesktop.org,
igt-dev@lists.freedesktop.org
Cc: markyacoub@chromium.org, Lin, Charlton
Thank you very much Bhanu for the review comments. I have addressed the review comments and resubmitted the patch.
Have also ported the changed to chamelium. Kindly have a check.
Regards
Vidya
-----Original Message-----
From: Modem, Bhanuprakash <bhanuprakash.modem@intel.com>
Sent: Sunday, June 6, 2021 2:39 PM
To: Srinivas, Vidya <vidya.srinivas@intel.com>; intel-gfx@lists.freedesktop.org; igt-dev@lists.freedesktop.org
Cc: markyacoub@chromium.org; Almahallawy, Khaled <khaled.almahallawy@intel.com>; Lin, Charlton <charlton.lin@intel.com>; Latvala, Petri <petri.latvala@intel.com>; Shankar, Uma <uma.shankar@intel.com>
Subject: RE: [PATCH] tests/kms_color: Disable gamma in degamma tests
> From: Srinivas, Vidya <vidya.srinivas@intel.com>
> Sent: Friday, June 4, 2021 6:41 PM
> To: intel-gfx@lists.freedesktop.org; igt-dev@lists.freedesktop.org
> Cc: markyacoub@chromium.org; Almahallawy, Khaled
> <khaled.almahallawy@intel.com>; Lin, Charlton
> <charlton.lin@intel.com>; Latvala, Petri <petri.latvala@intel.com>;
> Modem, Bhanuprakash <bhanuprakash.modem@intel.com>; Shankar, Uma
> <uma.shankar@intel.com>; Srinivas, Vidya <vidya.srinivas@intel.com>
> Subject: [PATCH] tests/kms_color: Disable gamma in degamma tests
>
> This patch disables gamma in degamma subtest which is missing.
> It compares CRC between (linear degamma + solid colors) and (max
> degamma + gradient colors).
>
> v2 - Addressed review comments from Bhanuprakash Modem
>
> Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
> Change-Id: Ibdb91b603e2e4024d170727d24c6a5425441e2e1
> ---
> tests/kms_color.c | 14 ++++++++------
> 1 file changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/tests/kms_color.c b/tests/kms_color.c index
> 3a42532a5c27..41720dcdd90f 100644
> --- a/tests/kms_color.c
> +++ b/tests/kms_color.c
> @@ -32,7 +32,6 @@ static void test_pipe_degamma(data_t *data,
> igt_output_t *output;
> igt_display_t *display = &data->display;
> gamma_lut_t *degamma_linear, *degamma_full;
> - gamma_lut_t *gamma_linear;
> color_t red_green_blue[] = {
> { 1.0, 0.0, 0.0 },
> { 0.0, 1.0, 0.0 },
> @@ -45,8 +44,6 @@ static void test_pipe_degamma(data_t *data,
> degamma_linear = generate_table(data->degamma_lut_size, 1.0);
> degamma_full = generate_table_max(data->degamma_lut_size);
>
> - gamma_linear = generate_table(data->gamma_lut_size, 1.0);
> -
> for_each_valid_output_on_pipe(&data->display, primary->pipe->pipe,
> output) {
> drmModeModeInfo *mode;
> struct igt_fb fb_modeset, fb;
> @@ -75,8 +72,8 @@ static void test_pipe_degamma(data_t *data,
>
> igt_plane_set_fb(primary, &fb_modeset);
> disable_ctm(primary->pipe);
> - disable_degamma(primary->pipe);
> - set_gamma(data, primary->pipe, gamma_linear);
> + disable_gamma(primary->pipe);
> + set_degamma(data, primary->pipe, degamma_linear);
> igt_display_commit(&data->display);
>
> /* Draw solid colors with no degamma transformation. */
Please fix the comment s/"no degamma"/"linear degamma"/.
Also, we need to port this patch on "kms_color_chamelium".
> @@ -103,15 +100,17 @@ static void test_pipe_degamma(data_t *data,
> */
> igt_assert_crc_equal(&crc_fullgamma, &crc_fullcolors);
>
> + disable_degamma(primary->pipe);
> igt_plane_set_fb(primary, NULL);
> igt_output_set_pipe(output, PIPE_NONE);
> + igt_display_commit2(&data->display, data->display.is_atomic ?
> + COMMIT_ATOMIC : COMMIT_LEGACY);
> igt_remove_fb(data->drm_fd, &fb);
> igt_remove_fb(data->drm_fd, &fb_modeset);
> }
>
> free_lut(degamma_linear);
> free_lut(degamma_full);
> - free_lut(gamma_linear);
> }
>
> /*
> @@ -189,8 +188,11 @@ static void test_pipe_gamma(data_t *data,
> */
> igt_assert_crc_equal(&crc_fullgamma, &crc_fullcolors);
>
> + disable_gamma(primary->pipe);
> igt_plane_set_fb(primary, NULL);
> igt_output_set_pipe(output, PIPE_NONE);
> + igt_display_commit2(&data->display, data->display.is_atomic ?
> + COMMIT_ATOMIC : COMMIT_LEGACY);
These changes are not relevant to the degamma, but still we need these changes.
It would be good if we mention this in commit message.
With above changes, this patch is
Reviewed-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
- Bhanu
> igt_remove_fb(data->drm_fd, &fb);
> igt_remove_fb(data->drm_fd, &fb_modeset);
> }
> --
> 2.26.2
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [Intel-gfx] [PATCH i-g-t] tests/kms_color: Disable gamma in degamma tests
2021-06-07 3:47 ` [Intel-gfx] [PATCH i-g-t] " Vidya Srinivas
@ 2021-06-08 6:46 ` Modem, Bhanuprakash
2021-06-08 7:46 ` Srinivas, Vidya
0 siblings, 1 reply; 19+ messages in thread
From: Modem, Bhanuprakash @ 2021-06-08 6:46 UTC (permalink / raw)
To: Srinivas, Vidya, intel-gfx@lists.freedesktop.org,
igt-dev@lists.freedesktop.org
Cc: markyacoub@chromium.org, Lin, Charlton
> From: Srinivas, Vidya <vidya.srinivas@intel.com>
> Sent: Monday, June 7, 2021 9:18 AM
> To: intel-gfx@lists.freedesktop.org; igt-dev@lists.freedesktop.org
> Cc: markyacoub@chromium.org; Almahallawy, Khaled
> <khaled.almahallawy@intel.com>; Lin, Charlton <charlton.lin@intel.com>;
> Latvala, Petri <petri.latvala@intel.com>; Modem, Bhanuprakash
> <bhanuprakash.modem@intel.com>; Shankar, Uma <uma.shankar@intel.com>;
> Srinivas, Vidya <vidya.srinivas@intel.com>
> Subject: [PATCH i-g-t] tests/kms_color: Disable gamma in degamma tests
>
> This patch disables gamma in degamma subtest which is missing.
> It compares CRC between (linear degamma + solid colors) and (max
> degamma + gradient colors). Patch also cleans up degamma before
> exiting degamma test and cleans up gamma before exiting gamma
> test.
>
> v2 - Addressed review comments from Bhanuprakash Modem
> Changed full degamma for reference CRC to linear degamma
> Added clean up of degamma end of degamma test.
>
> v3 - Addressed review comments from Bhanuprakash Modem
> Ported changes to kms_color_chamelium
>
> Change-Id: Ibdb91b603e2e4024d170727d24c6a5425441e2e1
> Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
> ---
> tests/kms_color.c | 14 +++++++-------
> tests/kms_color_chamelium.c | 12 ++++++------
> 2 files changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/tests/kms_color.c b/tests/kms_color.c
> index 3a42532a5c27..1b021ac3ce0c 100644
> --- a/tests/kms_color.c
> +++ b/tests/kms_color.c
> @@ -32,7 +32,6 @@ static void test_pipe_degamma(data_t *data,
> igt_output_t *output;
> igt_display_t *display = &data->display;
> gamma_lut_t *degamma_linear, *degamma_full;
> - gamma_lut_t *gamma_linear;
> color_t red_green_blue[] = {
> { 1.0, 0.0, 0.0 },
> { 0.0, 1.0, 0.0 },
> @@ -45,8 +44,6 @@ static void test_pipe_degamma(data_t *data,
> degamma_linear = generate_table(data->degamma_lut_size, 1.0);
> degamma_full = generate_table_max(data->degamma_lut_size);
>
> - gamma_linear = generate_table(data->gamma_lut_size, 1.0);
> -
> for_each_valid_output_on_pipe(&data->display, primary->pipe->pipe,
> output) {
> drmModeModeInfo *mode;
> struct igt_fb fb_modeset, fb;
> @@ -75,11 +72,11 @@ static void test_pipe_degamma(data_t *data,
>
> igt_plane_set_fb(primary, &fb_modeset);
> disable_ctm(primary->pipe);
> - disable_degamma(primary->pipe);
> - set_gamma(data, primary->pipe, gamma_linear);
> + disable_gamma(primary->pipe);
> + set_degamma(data, primary->pipe, degamma_linear);
> igt_display_commit(&data->display);
>
> - /* Draw solid colors with no degamma transformation. */
> + /* Draw solid colors with linear degamma transformation. */
> paint_rectangles(data, mode, red_green_blue, &fb);
> igt_plane_set_fb(primary, &fb);
> igt_display_commit(&data->display);
> @@ -103,15 +100,16 @@ static void test_pipe_degamma(data_t *data,
> */
> igt_assert_crc_equal(&crc_fullgamma, &crc_fullcolors);
>
> + disable_degamma(primary->pipe);
> igt_plane_set_fb(primary, NULL);
> igt_output_set_pipe(output, PIPE_NONE);
> + igt_display_commit(&data->display);
> igt_remove_fb(data->drm_fd, &fb);
> igt_remove_fb(data->drm_fd, &fb_modeset);
> }
>
> free_lut(degamma_linear);
> free_lut(degamma_full);
> - free_lut(gamma_linear);
> }
>
> /*
> @@ -189,8 +187,10 @@ static void test_pipe_gamma(data_t *data,
> */
> igt_assert_crc_equal(&crc_fullgamma, &crc_fullcolors);
>
> + disable_gamma(primary->pipe);
> igt_plane_set_fb(primary, NULL);
> igt_output_set_pipe(output, PIPE_NONE);
> + igt_display_commit(&data->display);
> igt_remove_fb(data->drm_fd, &fb);
> igt_remove_fb(data->drm_fd, &fb_modeset);
> }
> diff --git a/tests/kms_color_chamelium.c b/tests/kms_color_chamelium.c
> index 30b38b82e306..c21d64e9cc9a 100644
> --- a/tests/kms_color_chamelium.c
> +++ b/tests/kms_color_chamelium.c
> @@ -36,7 +36,6 @@ static void test_pipe_degamma(data_t *data,
> {
> igt_output_t *output;
> gamma_lut_t *degamma_linear, *degamma_full;
> - gamma_lut_t *gamma_linear;
> color_t red_green_blue[] = {
> { 1.0, 0.0, 0.0 },
> { 0.0, 1.0, 0.0 },
> @@ -57,8 +56,6 @@ static void test_pipe_degamma(data_t *data,
> degamma_linear = generate_table(data->degamma_lut_size, 1.0);
> degamma_full = generate_table_max(data->degamma_lut_size);
>
> - gamma_linear = generate_table(data->gamma_lut_size, 1.0);
> -
> for_each_valid_output_on_pipe(&data->display,
> primary->pipe->pipe,
> output) {
> @@ -110,10 +107,10 @@ static void test_pipe_degamma(data_t *data,
> igt_plane_set_fb(primary, &fb_modeset);
> disable_ctm(primary->pipe);
> disable_degamma(primary->pipe);
This can be disable_gamma(), right?
Also, please create separate patches for kms_color & kms_color_chamelium
under the same series.
With above changes:
Reviewed-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
- Bhanu
> - set_gamma(data, primary->pipe, gamma_linear);
> + set_degamma(data, primary->pipe, degamma_linear);
> igt_display_commit(&data->display);
>
> - /* Draw solid colors with no degamma transformation. */
> + /* Draw solid colors with linear degamma transformation. */
> paint_rectangles(data, mode, red_green_blue, &fbref);
>
> /* Draw a gradient with degamma LUT to remap all
> @@ -135,13 +132,14 @@ static void test_pipe_degamma(data_t *data,
> frame_fullcolors, &fbref,
> CHAMELIUM_CHECK_ANALOG);
>
> + disable_degamma(primary->pipe);
> igt_plane_set_fb(primary, NULL);
> igt_output_set_pipe(output, PIPE_NONE);
> + igt_display_commit(&data->display);
> }
>
> free_lut(degamma_linear);
> free_lut(degamma_full);
> - free_lut(gamma_linear);
> }
>
> /*
> @@ -247,8 +245,10 @@ static void test_pipe_gamma(data_t *data,
> frame_fullcolors, &fbref,
> CHAMELIUM_CHECK_ANALOG);
>
> + disable_gamma(primary->pipe);
> igt_plane_set_fb(primary, NULL);
> igt_output_set_pipe(output, PIPE_NONE);
> + igt_display_commit(&data->display);
> }
>
> free_lut(gamma_full);
> --
> 2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Intel-gfx] [PATCH i-g-t 1/2] tests/kms_color: Disable gamma in degamma tests
2021-06-04 13:11 ` [Intel-gfx] [PATCH] tests/kms_color: Disable gamma in " Vidya Srinivas
2021-06-06 9:09 ` Modem, Bhanuprakash
2021-06-07 3:47 ` [Intel-gfx] [PATCH i-g-t] " Vidya Srinivas
@ 2021-06-08 6:54 ` Vidya Srinivas
2021-06-08 6:54 ` [Intel-gfx] [PATCH i-g-t 2/2] tests/kms_color_chamelium: " Vidya Srinivas
2021-06-08 6:58 ` [Intel-gfx] [PATCH i-g-t 1/2] tests/kms_color: " Vidya Srinivas
2021-06-08 7:11 ` [Intel-gfx] [PATCH i-g-t 0/2] Disable gamma in degamma subtests Vidya Srinivas
4 siblings, 1 reply; 19+ messages in thread
From: Vidya Srinivas @ 2021-06-08 6:54 UTC (permalink / raw)
To: intel-gfx, igt-dev; +Cc: markyacoub, charlton.lin
This patch disables gamma in degamma subtest which is missing.
It compares CRC between (linear degamma + solid colors) and (max
degamma + gradient colors). Patch also cleans up degamma before
exiting degamma test and cleans up gamma before exiting gamma
test.
v2 - Addressed review comments from Bhanuprakash Modem
Changed full degamma for reference CRC to linear degamma
Added clean up of degamma end of degamma test.
v3 - Addressed review comments from Bhanuprakash Modem
Fixed comments
Change-Id: Ibdb91b603e2e4024d170727d24c6a5425441e2e1
Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
---
tests/kms_color.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/tests/kms_color.c b/tests/kms_color.c
index 3a42532a5c27..1b021ac3ce0c 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -32,7 +32,6 @@ static void test_pipe_degamma(data_t *data,
igt_output_t *output;
igt_display_t *display = &data->display;
gamma_lut_t *degamma_linear, *degamma_full;
- gamma_lut_t *gamma_linear;
color_t red_green_blue[] = {
{ 1.0, 0.0, 0.0 },
{ 0.0, 1.0, 0.0 },
@@ -45,8 +44,6 @@ static void test_pipe_degamma(data_t *data,
degamma_linear = generate_table(data->degamma_lut_size, 1.0);
degamma_full = generate_table_max(data->degamma_lut_size);
- gamma_linear = generate_table(data->gamma_lut_size, 1.0);
-
for_each_valid_output_on_pipe(&data->display, primary->pipe->pipe, output) {
drmModeModeInfo *mode;
struct igt_fb fb_modeset, fb;
@@ -75,11 +72,11 @@ static void test_pipe_degamma(data_t *data,
igt_plane_set_fb(primary, &fb_modeset);
disable_ctm(primary->pipe);
- disable_degamma(primary->pipe);
- set_gamma(data, primary->pipe, gamma_linear);
+ disable_gamma(primary->pipe);
+ set_degamma(data, primary->pipe, degamma_linear);
igt_display_commit(&data->display);
- /* Draw solid colors with no degamma transformation. */
+ /* Draw solid colors with linear degamma transformation. */
paint_rectangles(data, mode, red_green_blue, &fb);
igt_plane_set_fb(primary, &fb);
igt_display_commit(&data->display);
@@ -103,15 +100,16 @@ static void test_pipe_degamma(data_t *data,
*/
igt_assert_crc_equal(&crc_fullgamma, &crc_fullcolors);
+ disable_degamma(primary->pipe);
igt_plane_set_fb(primary, NULL);
igt_output_set_pipe(output, PIPE_NONE);
+ igt_display_commit(&data->display);
igt_remove_fb(data->drm_fd, &fb);
igt_remove_fb(data->drm_fd, &fb_modeset);
}
free_lut(degamma_linear);
free_lut(degamma_full);
- free_lut(gamma_linear);
}
/*
@@ -189,8 +187,10 @@ static void test_pipe_gamma(data_t *data,
*/
igt_assert_crc_equal(&crc_fullgamma, &crc_fullcolors);
+ disable_gamma(primary->pipe);
igt_plane_set_fb(primary, NULL);
igt_output_set_pipe(output, PIPE_NONE);
+ igt_display_commit(&data->display);
igt_remove_fb(data->drm_fd, &fb);
igt_remove_fb(data->drm_fd, &fb_modeset);
}
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Intel-gfx] [PATCH i-g-t 2/2] tests/kms_color_chamelium: Disable gamma in degamma tests
2021-06-08 6:54 ` [Intel-gfx] [PATCH i-g-t 1/2] " Vidya Srinivas
@ 2021-06-08 6:54 ` Vidya Srinivas
0 siblings, 0 replies; 19+ messages in thread
From: Vidya Srinivas @ 2021-06-08 6:54 UTC (permalink / raw)
To: intel-gfx, igt-dev; +Cc: markyacoub, charlton.lin
This patch disables gamma in degamma subtest which is missing.
It compares CRC between (linear degamma + solid colors) and (max
degamma + gradient colors). Patch also cleans up degamma before
exiting degamma test and cleans up gamma before exiting gamma
test.
Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
---
tests/kms_color_chamelium.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/tests/kms_color_chamelium.c b/tests/kms_color_chamelium.c
index 30b38b82e306..11e5286912d7 100644
--- a/tests/kms_color_chamelium.c
+++ b/tests/kms_color_chamelium.c
@@ -36,7 +36,6 @@ static void test_pipe_degamma(data_t *data,
{
igt_output_t *output;
gamma_lut_t *degamma_linear, *degamma_full;
- gamma_lut_t *gamma_linear;
color_t red_green_blue[] = {
{ 1.0, 0.0, 0.0 },
{ 0.0, 1.0, 0.0 },
@@ -57,8 +56,6 @@ static void test_pipe_degamma(data_t *data,
degamma_linear = generate_table(data->degamma_lut_size, 1.0);
degamma_full = generate_table_max(data->degamma_lut_size);
- gamma_linear = generate_table(data->gamma_lut_size, 1.0);
-
for_each_valid_output_on_pipe(&data->display,
primary->pipe->pipe,
output) {
@@ -109,11 +106,11 @@ static void test_pipe_degamma(data_t *data,
igt_plane_set_fb(primary, &fb_modeset);
disable_ctm(primary->pipe);
- disable_degamma(primary->pipe);
- set_gamma(data, primary->pipe, gamma_linear);
+ disable_gamma(primary->pipe);
+ set_degamma(data, primary->pipe, degamma_linear);
igt_display_commit(&data->display);
- /* Draw solid colors with no degamma transformation. */
+ /* Draw solid colors with linear degamma transformation. */
paint_rectangles(data, mode, red_green_blue, &fbref);
/* Draw a gradient with degamma LUT to remap all
@@ -135,13 +132,14 @@ static void test_pipe_degamma(data_t *data,
frame_fullcolors, &fbref,
CHAMELIUM_CHECK_ANALOG);
+ disable_degamma(primary->pipe);
igt_plane_set_fb(primary, NULL);
igt_output_set_pipe(output, PIPE_NONE);
+ igt_display_commit(&data->display);
}
free_lut(degamma_linear);
free_lut(degamma_full);
- free_lut(gamma_linear);
}
/*
@@ -247,8 +245,10 @@ static void test_pipe_gamma(data_t *data,
frame_fullcolors, &fbref,
CHAMELIUM_CHECK_ANALOG);
+ disable_gamma(primary->pipe);
igt_plane_set_fb(primary, NULL);
igt_output_set_pipe(output, PIPE_NONE);
+ igt_display_commit(&data->display);
}
free_lut(gamma_full);
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Intel-gfx] [PATCH i-g-t 1/2] tests/kms_color: Disable gamma in degamma tests
2021-06-04 13:11 ` [Intel-gfx] [PATCH] tests/kms_color: Disable gamma in " Vidya Srinivas
` (2 preceding siblings ...)
2021-06-08 6:54 ` [Intel-gfx] [PATCH i-g-t 1/2] " Vidya Srinivas
@ 2021-06-08 6:58 ` Vidya Srinivas
2021-06-08 6:58 ` [Intel-gfx] [PATCH i-g-t] tests/kms_color_chamelium: " Vidya Srinivas
2021-06-08 7:11 ` [Intel-gfx] [PATCH i-g-t 0/2] Disable gamma in degamma subtests Vidya Srinivas
4 siblings, 1 reply; 19+ messages in thread
From: Vidya Srinivas @ 2021-06-08 6:58 UTC (permalink / raw)
To: intel-gfx, igt-dev; +Cc: markyacoub, charlton.lin
This patch disables gamma in degamma subtest which is missing.
It compares CRC between (linear degamma + solid colors) and (max
degamma + gradient colors). Patch also cleans up degamma before
exiting degamma test and cleans up gamma before exiting gamma
test.
v2 - Addressed review comments from Bhanuprakash Modem
Changed full degamma for reference CRC to linear degamma
Added clean up of degamma end of degamma test.
v3 - Addressed review comments from Bhanuprakash Modem
Fixed comments
Change-Id: Ibdb91b603e2e4024d170727d24c6a5425441e2e1
Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
---
tests/kms_color.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/tests/kms_color.c b/tests/kms_color.c
index 3a42532a5c27..1b021ac3ce0c 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -32,7 +32,6 @@ static void test_pipe_degamma(data_t *data,
igt_output_t *output;
igt_display_t *display = &data->display;
gamma_lut_t *degamma_linear, *degamma_full;
- gamma_lut_t *gamma_linear;
color_t red_green_blue[] = {
{ 1.0, 0.0, 0.0 },
{ 0.0, 1.0, 0.0 },
@@ -45,8 +44,6 @@ static void test_pipe_degamma(data_t *data,
degamma_linear = generate_table(data->degamma_lut_size, 1.0);
degamma_full = generate_table_max(data->degamma_lut_size);
- gamma_linear = generate_table(data->gamma_lut_size, 1.0);
-
for_each_valid_output_on_pipe(&data->display, primary->pipe->pipe, output) {
drmModeModeInfo *mode;
struct igt_fb fb_modeset, fb;
@@ -75,11 +72,11 @@ static void test_pipe_degamma(data_t *data,
igt_plane_set_fb(primary, &fb_modeset);
disable_ctm(primary->pipe);
- disable_degamma(primary->pipe);
- set_gamma(data, primary->pipe, gamma_linear);
+ disable_gamma(primary->pipe);
+ set_degamma(data, primary->pipe, degamma_linear);
igt_display_commit(&data->display);
- /* Draw solid colors with no degamma transformation. */
+ /* Draw solid colors with linear degamma transformation. */
paint_rectangles(data, mode, red_green_blue, &fb);
igt_plane_set_fb(primary, &fb);
igt_display_commit(&data->display);
@@ -103,15 +100,16 @@ static void test_pipe_degamma(data_t *data,
*/
igt_assert_crc_equal(&crc_fullgamma, &crc_fullcolors);
+ disable_degamma(primary->pipe);
igt_plane_set_fb(primary, NULL);
igt_output_set_pipe(output, PIPE_NONE);
+ igt_display_commit(&data->display);
igt_remove_fb(data->drm_fd, &fb);
igt_remove_fb(data->drm_fd, &fb_modeset);
}
free_lut(degamma_linear);
free_lut(degamma_full);
- free_lut(gamma_linear);
}
/*
@@ -189,8 +187,10 @@ static void test_pipe_gamma(data_t *data,
*/
igt_assert_crc_equal(&crc_fullgamma, &crc_fullcolors);
+ disable_gamma(primary->pipe);
igt_plane_set_fb(primary, NULL);
igt_output_set_pipe(output, PIPE_NONE);
+ igt_display_commit(&data->display);
igt_remove_fb(data->drm_fd, &fb);
igt_remove_fb(data->drm_fd, &fb_modeset);
}
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Intel-gfx] [PATCH i-g-t] tests/kms_color_chamelium: Disable gamma in degamma tests
2021-06-08 6:58 ` [Intel-gfx] [PATCH i-g-t 1/2] tests/kms_color: " Vidya Srinivas
@ 2021-06-08 6:58 ` Vidya Srinivas
0 siblings, 0 replies; 19+ messages in thread
From: Vidya Srinivas @ 2021-06-08 6:58 UTC (permalink / raw)
To: intel-gfx, igt-dev; +Cc: markyacoub, charlton.lin
This patch disables gamma in degamma subtest which is missing.
It compares CRC between (linear degamma + solid colors) and (max
degamma + gradient colors). Patch also cleans up degamma before
exiting degamma test and cleans up gamma before exiting gamma
test.
Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
---
tests/kms_color_chamelium.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/tests/kms_color_chamelium.c b/tests/kms_color_chamelium.c
index 30b38b82e306..11e5286912d7 100644
--- a/tests/kms_color_chamelium.c
+++ b/tests/kms_color_chamelium.c
@@ -36,7 +36,6 @@ static void test_pipe_degamma(data_t *data,
{
igt_output_t *output;
gamma_lut_t *degamma_linear, *degamma_full;
- gamma_lut_t *gamma_linear;
color_t red_green_blue[] = {
{ 1.0, 0.0, 0.0 },
{ 0.0, 1.0, 0.0 },
@@ -57,8 +56,6 @@ static void test_pipe_degamma(data_t *data,
degamma_linear = generate_table(data->degamma_lut_size, 1.0);
degamma_full = generate_table_max(data->degamma_lut_size);
- gamma_linear = generate_table(data->gamma_lut_size, 1.0);
-
for_each_valid_output_on_pipe(&data->display,
primary->pipe->pipe,
output) {
@@ -109,11 +106,11 @@ static void test_pipe_degamma(data_t *data,
igt_plane_set_fb(primary, &fb_modeset);
disable_ctm(primary->pipe);
- disable_degamma(primary->pipe);
- set_gamma(data, primary->pipe, gamma_linear);
+ disable_gamma(primary->pipe);
+ set_degamma(data, primary->pipe, degamma_linear);
igt_display_commit(&data->display);
- /* Draw solid colors with no degamma transformation. */
+ /* Draw solid colors with linear degamma transformation. */
paint_rectangles(data, mode, red_green_blue, &fbref);
/* Draw a gradient with degamma LUT to remap all
@@ -135,13 +132,14 @@ static void test_pipe_degamma(data_t *data,
frame_fullcolors, &fbref,
CHAMELIUM_CHECK_ANALOG);
+ disable_degamma(primary->pipe);
igt_plane_set_fb(primary, NULL);
igt_output_set_pipe(output, PIPE_NONE);
+ igt_display_commit(&data->display);
}
free_lut(degamma_linear);
free_lut(degamma_full);
- free_lut(gamma_linear);
}
/*
@@ -247,8 +245,10 @@ static void test_pipe_gamma(data_t *data,
frame_fullcolors, &fbref,
CHAMELIUM_CHECK_ANALOG);
+ disable_gamma(primary->pipe);
igt_plane_set_fb(primary, NULL);
igt_output_set_pipe(output, PIPE_NONE);
+ igt_display_commit(&data->display);
}
free_lut(gamma_full);
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Intel-gfx] [PATCH i-g-t] tests/kms_color_chamelium: Disable gamma in degamma tests
2021-06-08 7:06 [Intel-gfx] [PATCH i-g-t 1/2] " Vidya Srinivas
@ 2021-06-08 7:06 ` Vidya Srinivas
0 siblings, 0 replies; 19+ messages in thread
From: Vidya Srinivas @ 2021-06-08 7:06 UTC (permalink / raw)
To: intel-gfx, igt-dev; +Cc: markyacoub, charlton.lin
This patch disables gamma in degamma subtest which is missing.
It compares CRC between (linear degamma + solid colors) and (max
degamma + gradient colors). Patch also cleans up degamma before
exiting degamma test and cleans up gamma before exiting gamma
test.
Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
---
tests/kms_color_chamelium.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/tests/kms_color_chamelium.c b/tests/kms_color_chamelium.c
index 30b38b82e306..11e5286912d7 100644
--- a/tests/kms_color_chamelium.c
+++ b/tests/kms_color_chamelium.c
@@ -36,7 +36,6 @@ static void test_pipe_degamma(data_t *data,
{
igt_output_t *output;
gamma_lut_t *degamma_linear, *degamma_full;
- gamma_lut_t *gamma_linear;
color_t red_green_blue[] = {
{ 1.0, 0.0, 0.0 },
{ 0.0, 1.0, 0.0 },
@@ -57,8 +56,6 @@ static void test_pipe_degamma(data_t *data,
degamma_linear = generate_table(data->degamma_lut_size, 1.0);
degamma_full = generate_table_max(data->degamma_lut_size);
- gamma_linear = generate_table(data->gamma_lut_size, 1.0);
-
for_each_valid_output_on_pipe(&data->display,
primary->pipe->pipe,
output) {
@@ -109,11 +106,11 @@ static void test_pipe_degamma(data_t *data,
igt_plane_set_fb(primary, &fb_modeset);
disable_ctm(primary->pipe);
- disable_degamma(primary->pipe);
- set_gamma(data, primary->pipe, gamma_linear);
+ disable_gamma(primary->pipe);
+ set_degamma(data, primary->pipe, degamma_linear);
igt_display_commit(&data->display);
- /* Draw solid colors with no degamma transformation. */
+ /* Draw solid colors with linear degamma transformation. */
paint_rectangles(data, mode, red_green_blue, &fbref);
/* Draw a gradient with degamma LUT to remap all
@@ -135,13 +132,14 @@ static void test_pipe_degamma(data_t *data,
frame_fullcolors, &fbref,
CHAMELIUM_CHECK_ANALOG);
+ disable_degamma(primary->pipe);
igt_plane_set_fb(primary, NULL);
igt_output_set_pipe(output, PIPE_NONE);
+ igt_display_commit(&data->display);
}
free_lut(degamma_linear);
free_lut(degamma_full);
- free_lut(gamma_linear);
}
/*
@@ -247,8 +245,10 @@ static void test_pipe_gamma(data_t *data,
frame_fullcolors, &fbref,
CHAMELIUM_CHECK_ANALOG);
+ disable_gamma(primary->pipe);
igt_plane_set_fb(primary, NULL);
igt_output_set_pipe(output, PIPE_NONE);
+ igt_display_commit(&data->display);
}
free_lut(gamma_full);
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Intel-gfx] [PATCH i-g-t 0/2] Disable gamma in degamma subtests
2021-06-04 13:11 ` [Intel-gfx] [PATCH] tests/kms_color: Disable gamma in " Vidya Srinivas
` (3 preceding siblings ...)
2021-06-08 6:58 ` [Intel-gfx] [PATCH i-g-t 1/2] tests/kms_color: " Vidya Srinivas
@ 2021-06-08 7:11 ` Vidya Srinivas
2021-06-08 7:12 ` [Intel-gfx] [PATCH i-g-t 1/2] tests/kms_color: Disable gamma in degamma tests Vidya Srinivas
2021-06-08 7:12 ` [Intel-gfx] [PATCH i-g-t 2/2] tests/kms_color_chamelium: " Vidya Srinivas
4 siblings, 2 replies; 19+ messages in thread
From: Vidya Srinivas @ 2021-06-08 7:11 UTC (permalink / raw)
To: intel-gfx, igt-dev; +Cc: markyacoub, charlton.lin
This patch series disables gamma in degamma subtest which is missing.
It compares CRC between (linear degamma + solid colors) and (max
degamma + gradient colors). Patch also cleans up degamma before
exiting degamma test and cleans up gamma before exiting gamma
test. Changes are done for both kms_color and kms_color_chamelium.
Vidya Srinivas (2):
tests/kms_color: Disable gamma in degamma tests
tests/kms_color_chamelium: Disable gamma in degamma tests
tests/kms_color.c | 14 +++++++-------
tests/kms_color_chamelium.c | 14 +++++++-------
2 files changed, 14 insertions(+), 14 deletions(-)
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Intel-gfx] [PATCH i-g-t 1/2] tests/kms_color: Disable gamma in degamma tests
2021-06-08 7:11 ` [Intel-gfx] [PATCH i-g-t 0/2] Disable gamma in degamma subtests Vidya Srinivas
@ 2021-06-08 7:12 ` Vidya Srinivas
2021-06-08 7:12 ` [Intel-gfx] [PATCH i-g-t 2/2] tests/kms_color_chamelium: " Vidya Srinivas
1 sibling, 0 replies; 19+ messages in thread
From: Vidya Srinivas @ 2021-06-08 7:12 UTC (permalink / raw)
To: intel-gfx, igt-dev; +Cc: markyacoub, charlton.lin
This patch disables gamma in degamma subtest which is missing.
It compares CRC between (linear degamma + solid colors) and (max
degamma + gradient colors). Patch also cleans up degamma before
exiting degamma test and cleans up gamma before exiting gamma
test.
v2 - Addressed review comments from Bhanuprakash Modem
Changed full degamma for reference CRC to linear degamma
Added clean up of degamma end of degamma test.
v3 - Addressed review comments from Bhanuprakash Modem
Fixed comments
Change-Id: Ibdb91b603e2e4024d170727d24c6a5425441e2e1
Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
---
tests/kms_color.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/tests/kms_color.c b/tests/kms_color.c
index 3a42532a5c27..1b021ac3ce0c 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -32,7 +32,6 @@ static void test_pipe_degamma(data_t *data,
igt_output_t *output;
igt_display_t *display = &data->display;
gamma_lut_t *degamma_linear, *degamma_full;
- gamma_lut_t *gamma_linear;
color_t red_green_blue[] = {
{ 1.0, 0.0, 0.0 },
{ 0.0, 1.0, 0.0 },
@@ -45,8 +44,6 @@ static void test_pipe_degamma(data_t *data,
degamma_linear = generate_table(data->degamma_lut_size, 1.0);
degamma_full = generate_table_max(data->degamma_lut_size);
- gamma_linear = generate_table(data->gamma_lut_size, 1.0);
-
for_each_valid_output_on_pipe(&data->display, primary->pipe->pipe, output) {
drmModeModeInfo *mode;
struct igt_fb fb_modeset, fb;
@@ -75,11 +72,11 @@ static void test_pipe_degamma(data_t *data,
igt_plane_set_fb(primary, &fb_modeset);
disable_ctm(primary->pipe);
- disable_degamma(primary->pipe);
- set_gamma(data, primary->pipe, gamma_linear);
+ disable_gamma(primary->pipe);
+ set_degamma(data, primary->pipe, degamma_linear);
igt_display_commit(&data->display);
- /* Draw solid colors with no degamma transformation. */
+ /* Draw solid colors with linear degamma transformation. */
paint_rectangles(data, mode, red_green_blue, &fb);
igt_plane_set_fb(primary, &fb);
igt_display_commit(&data->display);
@@ -103,15 +100,16 @@ static void test_pipe_degamma(data_t *data,
*/
igt_assert_crc_equal(&crc_fullgamma, &crc_fullcolors);
+ disable_degamma(primary->pipe);
igt_plane_set_fb(primary, NULL);
igt_output_set_pipe(output, PIPE_NONE);
+ igt_display_commit(&data->display);
igt_remove_fb(data->drm_fd, &fb);
igt_remove_fb(data->drm_fd, &fb_modeset);
}
free_lut(degamma_linear);
free_lut(degamma_full);
- free_lut(gamma_linear);
}
/*
@@ -189,8 +187,10 @@ static void test_pipe_gamma(data_t *data,
*/
igt_assert_crc_equal(&crc_fullgamma, &crc_fullcolors);
+ disable_gamma(primary->pipe);
igt_plane_set_fb(primary, NULL);
igt_output_set_pipe(output, PIPE_NONE);
+ igt_display_commit(&data->display);
igt_remove_fb(data->drm_fd, &fb);
igt_remove_fb(data->drm_fd, &fb_modeset);
}
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Intel-gfx] [PATCH i-g-t 2/2] tests/kms_color_chamelium: Disable gamma in degamma tests
2021-06-08 7:11 ` [Intel-gfx] [PATCH i-g-t 0/2] Disable gamma in degamma subtests Vidya Srinivas
2021-06-08 7:12 ` [Intel-gfx] [PATCH i-g-t 1/2] tests/kms_color: Disable gamma in degamma tests Vidya Srinivas
@ 2021-06-08 7:12 ` Vidya Srinivas
1 sibling, 0 replies; 19+ messages in thread
From: Vidya Srinivas @ 2021-06-08 7:12 UTC (permalink / raw)
To: intel-gfx, igt-dev; +Cc: markyacoub, charlton.lin
This patch disables gamma in degamma subtest which is missing.
It compares CRC between (linear degamma + solid colors) and (max
degamma + gradient colors). Patch also cleans up degamma before
exiting degamma test and cleans up gamma before exiting gamma
test.
Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
---
tests/kms_color_chamelium.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/tests/kms_color_chamelium.c b/tests/kms_color_chamelium.c
index 30b38b82e306..11e5286912d7 100644
--- a/tests/kms_color_chamelium.c
+++ b/tests/kms_color_chamelium.c
@@ -36,7 +36,6 @@ static void test_pipe_degamma(data_t *data,
{
igt_output_t *output;
gamma_lut_t *degamma_linear, *degamma_full;
- gamma_lut_t *gamma_linear;
color_t red_green_blue[] = {
{ 1.0, 0.0, 0.0 },
{ 0.0, 1.0, 0.0 },
@@ -57,8 +56,6 @@ static void test_pipe_degamma(data_t *data,
degamma_linear = generate_table(data->degamma_lut_size, 1.0);
degamma_full = generate_table_max(data->degamma_lut_size);
- gamma_linear = generate_table(data->gamma_lut_size, 1.0);
-
for_each_valid_output_on_pipe(&data->display,
primary->pipe->pipe,
output) {
@@ -109,11 +106,11 @@ static void test_pipe_degamma(data_t *data,
igt_plane_set_fb(primary, &fb_modeset);
disable_ctm(primary->pipe);
- disable_degamma(primary->pipe);
- set_gamma(data, primary->pipe, gamma_linear);
+ disable_gamma(primary->pipe);
+ set_degamma(data, primary->pipe, degamma_linear);
igt_display_commit(&data->display);
- /* Draw solid colors with no degamma transformation. */
+ /* Draw solid colors with linear degamma transformation. */
paint_rectangles(data, mode, red_green_blue, &fbref);
/* Draw a gradient with degamma LUT to remap all
@@ -135,13 +132,14 @@ static void test_pipe_degamma(data_t *data,
frame_fullcolors, &fbref,
CHAMELIUM_CHECK_ANALOG);
+ disable_degamma(primary->pipe);
igt_plane_set_fb(primary, NULL);
igt_output_set_pipe(output, PIPE_NONE);
+ igt_display_commit(&data->display);
}
free_lut(degamma_linear);
free_lut(degamma_full);
- free_lut(gamma_linear);
}
/*
@@ -247,8 +245,10 @@ static void test_pipe_gamma(data_t *data,
frame_fullcolors, &fbref,
CHAMELIUM_CHECK_ANALOG);
+ disable_gamma(primary->pipe);
igt_plane_set_fb(primary, NULL);
igt_output_set_pipe(output, PIPE_NONE);
+ igt_display_commit(&data->display);
}
free_lut(gamma_full);
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [Intel-gfx] [PATCH i-g-t] tests/kms_color: Disable gamma in degamma tests
2021-06-08 6:46 ` Modem, Bhanuprakash
@ 2021-06-08 7:46 ` Srinivas, Vidya
0 siblings, 0 replies; 19+ messages in thread
From: Srinivas, Vidya @ 2021-06-08 7:46 UTC (permalink / raw)
To: Modem, Bhanuprakash, intel-gfx@lists.freedesktop.org,
igt-dev@lists.freedesktop.org
Cc: markyacoub@chromium.org, Lin, Charlton
Thank you very much Bhanu for the review.
I have fixed all the comments, added your RB and submitted series https://patchwork.freedesktop.org/series/91145/
Regards
Vidya
-----Original Message-----
From: Modem, Bhanuprakash <bhanuprakash.modem@intel.com>
Sent: Tuesday, June 8, 2021 12:17 PM
To: Srinivas, Vidya <vidya.srinivas@intel.com>; intel-gfx@lists.freedesktop.org; igt-dev@lists.freedesktop.org
Cc: markyacoub@chromium.org; Almahallawy, Khaled <khaled.almahallawy@intel.com>; Lin, Charlton <charlton.lin@intel.com>; Latvala, Petri <petri.latvala@intel.com>; Shankar, Uma <uma.shankar@intel.com>
Subject: RE: [PATCH i-g-t] tests/kms_color: Disable gamma in degamma tests
> From: Srinivas, Vidya <vidya.srinivas@intel.com>
> Sent: Monday, June 7, 2021 9:18 AM
> To: intel-gfx@lists.freedesktop.org; igt-dev@lists.freedesktop.org
> Cc: markyacoub@chromium.org; Almahallawy, Khaled
> <khaled.almahallawy@intel.com>; Lin, Charlton
> <charlton.lin@intel.com>; Latvala, Petri <petri.latvala@intel.com>;
> Modem, Bhanuprakash <bhanuprakash.modem@intel.com>; Shankar, Uma
> <uma.shankar@intel.com>; Srinivas, Vidya <vidya.srinivas@intel.com>
> Subject: [PATCH i-g-t] tests/kms_color: Disable gamma in degamma tests
>
> This patch disables gamma in degamma subtest which is missing.
> It compares CRC between (linear degamma + solid colors) and (max
> degamma + gradient colors). Patch also cleans up degamma before
> exiting degamma test and cleans up gamma before exiting gamma test.
>
> v2 - Addressed review comments from Bhanuprakash Modem Changed full
> degamma for reference CRC to linear degamma Added clean up of degamma
> end of degamma test.
>
> v3 - Addressed review comments from Bhanuprakash Modem Ported changes
> to kms_color_chamelium
>
> Change-Id: Ibdb91b603e2e4024d170727d24c6a5425441e2e1
> Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
> ---
> tests/kms_color.c | 14 +++++++-------
> tests/kms_color_chamelium.c | 12 ++++++------
> 2 files changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/tests/kms_color.c b/tests/kms_color.c index
> 3a42532a5c27..1b021ac3ce0c 100644
> --- a/tests/kms_color.c
> +++ b/tests/kms_color.c
> @@ -32,7 +32,6 @@ static void test_pipe_degamma(data_t *data,
> igt_output_t *output;
> igt_display_t *display = &data->display;
> gamma_lut_t *degamma_linear, *degamma_full;
> - gamma_lut_t *gamma_linear;
> color_t red_green_blue[] = {
> { 1.0, 0.0, 0.0 },
> { 0.0, 1.0, 0.0 },
> @@ -45,8 +44,6 @@ static void test_pipe_degamma(data_t *data,
> degamma_linear = generate_table(data->degamma_lut_size, 1.0);
> degamma_full = generate_table_max(data->degamma_lut_size);
>
> - gamma_linear = generate_table(data->gamma_lut_size, 1.0);
> -
> for_each_valid_output_on_pipe(&data->display, primary->pipe->pipe,
> output) {
> drmModeModeInfo *mode;
> struct igt_fb fb_modeset, fb;
> @@ -75,11 +72,11 @@ static void test_pipe_degamma(data_t *data,
>
> igt_plane_set_fb(primary, &fb_modeset);
> disable_ctm(primary->pipe);
> - disable_degamma(primary->pipe);
> - set_gamma(data, primary->pipe, gamma_linear);
> + disable_gamma(primary->pipe);
> + set_degamma(data, primary->pipe, degamma_linear);
> igt_display_commit(&data->display);
>
> - /* Draw solid colors with no degamma transformation. */
> + /* Draw solid colors with linear degamma transformation. */
> paint_rectangles(data, mode, red_green_blue, &fb);
> igt_plane_set_fb(primary, &fb);
> igt_display_commit(&data->display);
> @@ -103,15 +100,16 @@ static void test_pipe_degamma(data_t *data,
> */
> igt_assert_crc_equal(&crc_fullgamma, &crc_fullcolors);
>
> + disable_degamma(primary->pipe);
> igt_plane_set_fb(primary, NULL);
> igt_output_set_pipe(output, PIPE_NONE);
> + igt_display_commit(&data->display);
> igt_remove_fb(data->drm_fd, &fb);
> igt_remove_fb(data->drm_fd, &fb_modeset);
> }
>
> free_lut(degamma_linear);
> free_lut(degamma_full);
> - free_lut(gamma_linear);
> }
>
> /*
> @@ -189,8 +187,10 @@ static void test_pipe_gamma(data_t *data,
> */
> igt_assert_crc_equal(&crc_fullgamma, &crc_fullcolors);
>
> + disable_gamma(primary->pipe);
> igt_plane_set_fb(primary, NULL);
> igt_output_set_pipe(output, PIPE_NONE);
> + igt_display_commit(&data->display);
> igt_remove_fb(data->drm_fd, &fb);
> igt_remove_fb(data->drm_fd, &fb_modeset);
> }
> diff --git a/tests/kms_color_chamelium.c b/tests/kms_color_chamelium.c
> index 30b38b82e306..c21d64e9cc9a 100644
> --- a/tests/kms_color_chamelium.c
> +++ b/tests/kms_color_chamelium.c
> @@ -36,7 +36,6 @@ static void test_pipe_degamma(data_t *data, {
> igt_output_t *output;
> gamma_lut_t *degamma_linear, *degamma_full;
> - gamma_lut_t *gamma_linear;
> color_t red_green_blue[] = {
> { 1.0, 0.0, 0.0 },
> { 0.0, 1.0, 0.0 },
> @@ -57,8 +56,6 @@ static void test_pipe_degamma(data_t *data,
> degamma_linear = generate_table(data->degamma_lut_size, 1.0);
> degamma_full = generate_table_max(data->degamma_lut_size);
>
> - gamma_linear = generate_table(data->gamma_lut_size, 1.0);
> -
> for_each_valid_output_on_pipe(&data->display,
> primary->pipe->pipe,
> output) {
> @@ -110,10 +107,10 @@ static void test_pipe_degamma(data_t *data,
> igt_plane_set_fb(primary, &fb_modeset);
> disable_ctm(primary->pipe);
> disable_degamma(primary->pipe);
This can be disable_gamma(), right?
Also, please create separate patches for kms_color & kms_color_chamelium under the same series.
With above changes:
Reviewed-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
- Bhanu
> - set_gamma(data, primary->pipe, gamma_linear);
> + set_degamma(data, primary->pipe, degamma_linear);
> igt_display_commit(&data->display);
>
> - /* Draw solid colors with no degamma transformation. */
> + /* Draw solid colors with linear degamma transformation. */
> paint_rectangles(data, mode, red_green_blue, &fbref);
>
> /* Draw a gradient with degamma LUT to remap all @@ -135,13 +132,14
> @@ static void test_pipe_degamma(data_t *data,
> frame_fullcolors, &fbref,
> CHAMELIUM_CHECK_ANALOG);
>
> + disable_degamma(primary->pipe);
> igt_plane_set_fb(primary, NULL);
> igt_output_set_pipe(output, PIPE_NONE);
> + igt_display_commit(&data->display);
> }
>
> free_lut(degamma_linear);
> free_lut(degamma_full);
> - free_lut(gamma_linear);
> }
>
> /*
> @@ -247,8 +245,10 @@ static void test_pipe_gamma(data_t *data,
> frame_fullcolors, &fbref,
> CHAMELIUM_CHECK_ANALOG);
>
> + disable_gamma(primary->pipe);
> igt_plane_set_fb(primary, NULL);
> igt_output_set_pipe(output, PIPE_NONE);
> + igt_display_commit(&data->display);
> }
>
> free_lut(gamma_full);
> --
> 2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2021-06-08 7:46 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-28 4:35 [Intel-gfx] [PATCH i-g-t] [RFC] tests/kms_color: Fix pipe degamma subtests Vidya Srinivas
2021-06-03 16:54 ` [Intel-gfx] [PATCH i-g-t] tests/kms_color: Remove gamma code from degamma tests Vidya Srinivas
2021-06-04 18:28 ` Mark Yacoub
2021-06-05 5:41 ` Srinivas, Vidya
2021-06-04 13:11 ` [Intel-gfx] [PATCH] tests/kms_color: Disable gamma in " Vidya Srinivas
2021-06-06 9:09 ` Modem, Bhanuprakash
2021-06-07 3:59 ` Srinivas, Vidya
2021-06-07 3:47 ` [Intel-gfx] [PATCH i-g-t] " Vidya Srinivas
2021-06-08 6:46 ` Modem, Bhanuprakash
2021-06-08 7:46 ` Srinivas, Vidya
2021-06-08 6:54 ` [Intel-gfx] [PATCH i-g-t 1/2] " Vidya Srinivas
2021-06-08 6:54 ` [Intel-gfx] [PATCH i-g-t 2/2] tests/kms_color_chamelium: " Vidya Srinivas
2021-06-08 6:58 ` [Intel-gfx] [PATCH i-g-t 1/2] tests/kms_color: " Vidya Srinivas
2021-06-08 6:58 ` [Intel-gfx] [PATCH i-g-t] tests/kms_color_chamelium: " Vidya Srinivas
2021-06-08 7:11 ` [Intel-gfx] [PATCH i-g-t 0/2] Disable gamma in degamma subtests Vidya Srinivas
2021-06-08 7:12 ` [Intel-gfx] [PATCH i-g-t 1/2] tests/kms_color: Disable gamma in degamma tests Vidya Srinivas
2021-06-08 7:12 ` [Intel-gfx] [PATCH i-g-t 2/2] tests/kms_color_chamelium: " Vidya Srinivas
2021-06-04 14:01 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for tests/kms_color: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2021-06-08 7:06 [Intel-gfx] [PATCH i-g-t 1/2] " Vidya Srinivas
2021-06-08 7:06 ` [Intel-gfx] [PATCH i-g-t] tests/kms_color_chamelium: " Vidya Srinivas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox