All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH i-g-t] [RFC] tests/kms_color: Fix pipe degamma subtests
@ 2021-05-28  4:35 ` Vidya Srinivas
  0 siblings, 0 replies; 43+ 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] 43+ messages in thread
* [Intel-gfx] [PATCH i-g-t] tests/kms_color: Remove gamma code from degamma tests
@ 2021-06-03 14:55 Vidya Srinivas
  0 siblings, 0 replies; 43+ messages in thread
From: Vidya Srinivas @ 2021-06-03 14:55 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.

Change-Id: I37f957b3a95dfe95119f0f0941f20c10471f437c
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] 43+ messages in thread

end of thread, other threads:[~2021-06-08  7:46 UTC | newest]

Thread overview: 43+ 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-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     ` [Intel-gfx] " Modem, Bhanuprakash
2021-06-08  6:46       ` [igt-dev] " 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
2021-06-03 14:55 [Intel-gfx] [PATCH i-g-t] tests/kms_color: Remove gamma code from degamma tests Vidya Srinivas

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.