All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Modem, Bhanuprakash" <bhanuprakash.modem@intel.com>
To: "Srinivas, Vidya" <vidya.srinivas@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Cc: "markyacoub@chromium.org" <markyacoub@chromium.org>,
	"Lin, Charlton" <charlton.lin@intel.com>
Subject: Re: [Intel-gfx] [PATCH i-g-t] tests/kms_color: Disable gamma in degamma tests
Date: Tue, 8 Jun 2021 06:46:33 +0000	[thread overview]
Message-ID: <CO6PR11MB556903B29EDB88A1EC2EB3898D379@CO6PR11MB5569.namprd11.prod.outlook.com> (raw)
In-Reply-To: <1623037661-2087-1-git-send-email-vidya.srinivas@intel.com>

> 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

WARNING: multiple messages have this Message-ID (diff)
From: "Modem, Bhanuprakash" <bhanuprakash.modem@intel.com>
To: "Srinivas, Vidya" <vidya.srinivas@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Cc: "Lin, Charlton" <charlton.lin@intel.com>,
	"Latvala, Petri" <petri.latvala@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t] tests/kms_color: Disable gamma in degamma tests
Date: Tue, 8 Jun 2021 06:46:33 +0000	[thread overview]
Message-ID: <CO6PR11MB556903B29EDB88A1EC2EB3898D379@CO6PR11MB5569.namprd11.prod.outlook.com> (raw)
In-Reply-To: <1623037661-2087-1-git-send-email-vidya.srinivas@intel.com>

> 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

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2021-06-08  6:46 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-28  4:35 [Intel-gfx] [PATCH i-g-t] [RFC] tests/kms_color: Fix pipe degamma subtests Vidya Srinivas
2021-05-28  4:35 ` [igt-dev] " Vidya Srinivas
2021-05-28 15:27 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2021-05-29  3:01 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
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 11:12   ` [igt-dev] " Modem, Bhanuprakash
2021-06-04 13:23     ` Srinivas, Vidya
2021-06-04 18:28   ` [Intel-gfx] " Mark Yacoub
2021-06-04 18:28     ` [igt-dev] " Mark Yacoub
2021-06-05  5:41     ` [Intel-gfx] " Srinivas, Vidya
2021-06-05  5:41       ` [igt-dev] " Srinivas, Vidya
2021-06-03 19:15 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_color: Fix pipe degamma subtests (rev2) Patchwork
2021-06-03 21:22 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2021-06-04 13:11 ` [Intel-gfx] [PATCH] tests/kms_color: Disable gamma in degamma tests Vidya Srinivas
2021-06-04 13:11   ` [igt-dev] " Vidya Srinivas
2021-06-06  9:09   ` [Intel-gfx] " Modem, Bhanuprakash
2021-06-06  9:09     ` [igt-dev] " Modem, Bhanuprakash
2021-06-07  3:59     ` [Intel-gfx] " Srinivas, Vidya
2021-06-07  3:59       ` [igt-dev] " Srinivas, Vidya
2021-06-07  3:47   ` [Intel-gfx] [PATCH i-g-t] " Vidya Srinivas
2021-06-07  3:47     ` [igt-dev] " Vidya Srinivas
2021-06-08  6:46     ` Modem, Bhanuprakash [this message]
2021-06-08  6:46       ` Modem, Bhanuprakash
2021-06-08  7:46       ` [Intel-gfx] " Srinivas, Vidya
2021-06-08  7:46         ` [igt-dev] " 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     ` [igt-dev] " Vidya Srinivas
2021-06-08  6:58     ` [Intel-gfx] [PATCH i-g-t] tests/kms_color_chamelium: " Vidya Srinivas
2021-06-08  6:58       ` [igt-dev] " 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:11     ` [igt-dev] " 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       ` [igt-dev] " Vidya Srinivas
2021-06-08  7:12     ` [Intel-gfx] [PATCH i-g-t 2/2] tests/kms_color_chamelium: " Vidya Srinivas
2021-06-08  7:12       ` [igt-dev] " Vidya Srinivas
2021-06-04 14:00 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_color: Fix pipe degamma subtests (rev3) Patchwork
2021-06-04 14:01 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for tests/kms_color: Disable gamma in degamma tests Patchwork
2021-06-04 14:59 ` [igt-dev] ✗ Fi.CI.IGT: failure for tests/kms_color: Fix pipe degamma subtests (rev3) Patchwork
2021-06-07  5:46 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_color: Fix pipe degamma subtests (rev4) Patchwork
2021-06-07  6:58 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork

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=CO6PR11MB556903B29EDB88A1EC2EB3898D379@CO6PR11MB5569.namprd11.prod.outlook.com \
    --to=bhanuprakash.modem@intel.com \
    --cc=charlton.lin@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=markyacoub@chromium.org \
    --cc=vidya.srinivas@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.