All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev]  [RFC] tests/kms_color: Change in commit style
@ 2018-10-04  8:25 swati2.sharma
  2018-10-04  9:35 ` Daniel Vetter
  2018-10-04 12:14 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
  0 siblings, 2 replies; 3+ messages in thread
From: swati2.sharma @ 2018-10-04  8:25 UTC (permalink / raw)
  To: igt-dev

From: Swati Sharma <swati2.sharma@intel.com>

Existing kms_color i-g-t, commit style by default is legacy for
all the ctm/gamma/degamma subtests.

In this patch, provision for both legacy and atomic commit is
provided. Patch is floated as RFC to gather feedback on the idea
and infrastructure proposed.

Other approach could be getting the value of is_atomic as done in
kms_available_modes_crc like
data.commit = data.display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY
However with this approach we won't be able to test both the paths.

Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
---
 lib/igt_kms.c     |  14 ++++++++
 lib/igt_kms.h     |   1 +
 tests/kms_color.c | 102 ++++++++++++++++++++++++++++++++++--------------------
 3 files changed, 80 insertions(+), 37 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 4563bfd..fd1f4dc 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -4229,3 +4229,17 @@ bool igt_display_has_format_mod(igt_display_t *display, uint32_t format,
 
 	return false;
 }
+
+/**
+ * kmstest_commit_style_name:
+ * @commit: commit style LEGACY/ATOMIC
+ *
+ * Returns: String representing @commit, e.g. "commit-legacy".
+ */
+const char *kmstest_commit_style_name(enum igt_commit_style commit)
+{
+	if (commit == COMMIT_LEGACY)
+		return "commit-legacy";
+	else if (commit == COMMIT_ATOMIC)
+		return "commit-atomic";
+}
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 3862efa..50bb965 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -243,6 +243,7 @@ enum igt_commit_style {
 	COMMIT_UNIVERSAL,
 	COMMIT_ATOMIC,
 };
+const char *kmstest_commit_style_name(enum igt_commit_style commit);
 
 enum igt_atomic_plane_properties {
        IGT_PLANE_SRC_X = 0,
diff --git a/tests/kms_color.c b/tests/kms_color.c
index bb106dd..581361e 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -61,9 +61,9 @@ typedef struct {
 	uint32_t color_depth;
 	uint64_t degamma_lut_size;
 	uint64_t gamma_lut_size;
+	enum igt_commit_style commit;
 } data_t;
 
-
 static void paint_gradient_rectangles(data_t *data,
 				      drmModeModeInfo *mode,
 				      color_t *colors,
@@ -304,12 +304,12 @@ static void test_pipe_degamma(data_t *data,
 		disable_ctm(primary->pipe);
 		disable_degamma(primary->pipe);
 		set_gamma(data, primary->pipe, gamma_linear);
-		igt_display_commit(&data->display);
+		igt_display_commit2(&data->display, data->commit);
 
 		/* Draw solid colors with no degamma transformation. */
 		paint_rectangles(data, mode, red_green_blue, &fb);
 		igt_plane_set_fb(primary, &fb);
-		igt_display_commit(&data->display);
+		igt_display_commit2(&data->display, data->commit);
 		igt_wait_for_vblank(data->drm_fd, primary->pipe->pipe);
 		igt_pipe_crc_collect_crc(data->pipe_crc, &crc_fullcolors);
 
@@ -319,7 +319,7 @@ 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_display_commit2(&data->display, data->commit);
 		igt_wait_for_vblank(data->drm_fd, primary->pipe->pipe);
 		igt_pipe_crc_collect_crc(data->pipe_crc, &crc_fullgamma);
 
@@ -384,12 +384,12 @@ static void test_pipe_gamma(data_t *data,
 		disable_ctm(primary->pipe);
 		disable_degamma(primary->pipe);
 		set_gamma(data, primary->pipe, gamma_full);
-		igt_display_commit(&data->display);
+		igt_display_commit2(&data->display, data->commit);
 
 		/* Draw solid colors with no gamma transformation. */
 		paint_rectangles(data, mode, red_green_blue, &fb);
 		igt_plane_set_fb(primary, &fb);
-		igt_display_commit(&data->display);
+		igt_display_commit2(&data->display, data->commit);
 		igt_wait_for_vblank(data->drm_fd, primary->pipe->pipe);
 		igt_pipe_crc_collect_crc(data->pipe_crc, &crc_fullcolors);
 
@@ -398,7 +398,7 @@ static void test_pipe_gamma(data_t *data,
 		 */
 		paint_gradient_rectangles(data, mode, red_green_blue, &fb);
 		igt_plane_set_fb(primary, &fb);
-		igt_display_commit(&data->display);
+		igt_display_commit2(&data->display, data->commit);
 		igt_wait_for_vblank(data->drm_fd, primary->pipe->pipe);
 		igt_pipe_crc_collect_crc(data->pipe_crc, &crc_fullgamma);
 
@@ -470,12 +470,12 @@ static void test_pipe_legacy_gamma(data_t *data,
 		disable_degamma(primary->pipe);
 		disable_gamma(primary->pipe);
 		disable_ctm(primary->pipe);
-		igt_display_commit(&data->display);
+		igt_display_commit2(&data->display, data->commit);
 
 		/* Draw solid colors with no gamma transformation. */
 		paint_rectangles(data, mode, red_green_blue, &fb);
 		igt_plane_set_fb(primary, &fb);
-		igt_display_commit(&data->display);
+		igt_display_commit2(&data->display, data->commit);
 		igt_wait_for_vblank(data->drm_fd, primary->pipe->pipe);
 		igt_pipe_crc_collect_crc(data->pipe_crc, &crc_fullcolors);
 
@@ -490,7 +490,7 @@ static void test_pipe_legacy_gamma(data_t *data,
 			red_lut[i] = green_lut[i] = blue_lut[i] = 0xffff;
 		igt_assert_eq(drmModeCrtcSetGamma(data->drm_fd, primary->pipe->crtc_id,
 						  legacy_lut_size, red_lut, green_lut, blue_lut), 0);
-		igt_display_commit(&data->display);
+		igt_display_commit2(&data->display, data->commit);
 		igt_wait_for_vblank(data->drm_fd, primary->pipe->pipe);
 		igt_pipe_crc_collect_crc(data->pipe_crc, &crc_fullgamma);
 
@@ -505,7 +505,7 @@ static void test_pipe_legacy_gamma(data_t *data,
 
 		igt_assert_eq(drmModeCrtcSetGamma(data->drm_fd, primary->pipe->crtc_id,
 						  legacy_lut_size, red_lut, green_lut, blue_lut), 0);
-		igt_display_commit(&data->display);
+		igt_display_commit2(&data->display, data->commit);
 
 		igt_plane_set_fb(primary, NULL);
 		igt_output_set_pipe(output, PIPE_NONE);
@@ -559,7 +559,7 @@ static void test_pipe_legacy_gamma_reset(data_t *data,
 		disable_degamma(primary->pipe);
 		disable_ctm(primary->pipe);
 		disable_gamma(primary->pipe);
-		igt_display_commit(&data->display);
+		igt_display_commit2(&data->display, data->commit);
 
 		/* Set a degama & gamma LUT and a CTM using the
 		 * properties and verify the content of the
@@ -567,7 +567,7 @@ static void test_pipe_legacy_gamma_reset(data_t *data,
 		set_degamma(data, primary->pipe, degamma_linear);
 		set_ctm(primary->pipe, ctm_identity);
 		set_gamma(data, primary->pipe, gamma_zero);
-		igt_display_commit(&data->display);
+		igt_display_commit2(&data->display, data->commit);
 
 		blob = get_blob(data, primary->pipe, IGT_CRTC_DEGAMMA_LUT);
 		igt_assert(blob &&
@@ -610,7 +610,7 @@ static void test_pipe_legacy_gamma_reset(data_t *data,
 						  legacy_lut_size,
 						  red_lut, green_lut, blue_lut),
 			      0);
-		igt_display_commit(&data->display);
+		igt_display_commit2(&data->display, data->commit);
 
 		igt_assert(get_blob(data, primary->pipe,
 				    IGT_CRTC_DEGAMMA_LUT) == NULL);
@@ -692,12 +692,12 @@ static bool test_pipe_ctm(data_t *data,
 		set_degamma(data, primary->pipe, degamma_linear);
 		set_gamma(data, primary->pipe, gamma_linear);
 		disable_ctm(primary->pipe);
-		igt_display_commit(&data->display);
+		igt_display_commit2(&data->display, data->commit);
 
 		paint_rectangles(data, mode, after, &fb);
 		igt_plane_set_fb(primary, &fb);
 		set_ctm(primary->pipe, ctm_identity);
-		igt_display_commit(&data->display);
+		igt_display_commit2(&data->display, data->commit);
 		igt_wait_for_vblank(data->drm_fd, primary->pipe->pipe);
 		igt_pipe_crc_collect_crc(data->pipe_crc, &crc_software);
 
@@ -705,7 +705,7 @@ static bool test_pipe_ctm(data_t *data,
 		paint_rectangles(data, mode, before, &fb);
 		igt_plane_set_fb(primary, &fb);
 		set_ctm(primary->pipe, ctm_matrix);
-		igt_display_commit(&data->display);
+		igt_display_commit2(&data->display, data->commit);
 		igt_wait_for_vblank(data->drm_fd, primary->pipe->pipe);
 		igt_pipe_crc_collect_crc(data->pipe_crc, &crc_hardware);
 
@@ -800,7 +800,7 @@ static void test_pipe_limited_range_ctm(data_t *data,
 		igt_output_set_prop_value(output, IGT_CONNECTOR_BROADCAST_RGB, BROADCAST_RGB_FULL);
 		paint_rectangles(data, mode, red_green_blue_limited, &fb);
 		igt_plane_set_fb(primary, &fb);
-		igt_display_commit(&data->display);
+		igt_display_commit2(&data->display, data->commit);
 		igt_wait_for_vblank(data->drm_fd, primary->pipe->pipe);
 		igt_pipe_crc_collect_crc(data->pipe_crc, &crc_full);
 
@@ -808,7 +808,7 @@ static void test_pipe_limited_range_ctm(data_t *data,
 		igt_output_set_prop_value(output, IGT_CONNECTOR_BROADCAST_RGB, BROADCAST_RGB_16_235);
 		paint_rectangles(data, mode, red_green_blue_full, &fb);
 		igt_plane_set_fb(primary, &fb);
-		igt_display_commit(&data->display);
+		igt_display_commit2(&data->display, data->commit);
 		igt_wait_for_vblank(data->drm_fd, primary->pipe->pipe);
 		igt_pipe_crc_collect_crc(data->pipe_crc, &crc_limited);
 
@@ -876,7 +876,8 @@ run_tests_for_pipe(data_t *data, enum pipe p)
 	data->color_depth = 8;
 	delta = 1.0 / (1 << data->color_depth);
 
-	igt_subtest_f("pipe-%s-ctm-red-to-blue", kmstest_pipe_name(p)) {
+	igt_subtest_f("pipe-%s-ctm-red-to-blue-%s", kmstest_pipe_name(p),
+		       kmstest_commit_style_name(data->commit)) {
 		color_t blue_green_blue[] = {
 			{ 0.0, 0.0, 1.0 },
 			{ 0.0, 1.0, 0.0 },
@@ -889,7 +890,8 @@ run_tests_for_pipe(data_t *data, enum pipe p)
 					 blue_green_blue, ctm));
 	}
 
-	igt_subtest_f("pipe-%s-ctm-green-to-red", kmstest_pipe_name(p)) {
+	igt_subtest_f("pipe-%s-ctm-green-to-red-%s", kmstest_pipe_name(p),
+		       kmstest_commit_style_name(data->commit)) {
 		color_t red_red_blue[] = {
 			{ 1.0, 0.0, 0.0 },
 			{ 1.0, 0.0, 0.0 },
@@ -902,7 +904,8 @@ run_tests_for_pipe(data_t *data, enum pipe p)
 					 red_red_blue, ctm));
 	}
 
-	igt_subtest_f("pipe-%s-ctm-blue-to-red", kmstest_pipe_name(p)) {
+	igt_subtest_f("pipe-%s-ctm-blue-to-red-%s", kmstest_pipe_name(p),
+		       kmstest_commit_style_name(data->commit)) {
 		color_t red_green_red[] = {
 			{ 1.0, 0.0, 0.0 },
 			{ 0.0, 1.0, 0.0 },
@@ -919,7 +922,8 @@ run_tests_for_pipe(data_t *data, enum pipe p)
 	 * the it depends on the hardware we're dealing with, we can
 	 * either get clamped or rounded values and we also need to
 	 * account for odd number of items in the LUTs. */
-	igt_subtest_f("pipe-%s-ctm-0-25", kmstest_pipe_name(p)) {
+	igt_subtest_f("pipe-%s-ctm-0-25-%s", kmstest_pipe_name(p),
+		       kmstest_commit_style_name(data->commit)) {
 		color_t expected_colors[] = {
 			{ 0.0, }, { 0.0, }, { 0.0, }
 		};
@@ -940,7 +944,8 @@ run_tests_for_pipe(data_t *data, enum pipe p)
 		igt_assert(success);
 	}
 
-	igt_subtest_f("pipe-%s-ctm-0-5", kmstest_pipe_name(p)) {
+	igt_subtest_f("pipe-%s-ctm-0-5-%s", kmstest_pipe_name(p),
+		       kmstest_commit_style_name(data->commit)) {
 		color_t expected_colors[] = {
 			{ 0.0, }, { 0.0, }, { 0.0, }
 		};
@@ -961,7 +966,8 @@ run_tests_for_pipe(data_t *data, enum pipe p)
 		igt_assert(success);
 	}
 
-	igt_subtest_f("pipe-%s-ctm-0-75", kmstest_pipe_name(p)) {
+	igt_subtest_f("pipe-%s-ctm-0-75-%s", kmstest_pipe_name(p),
+		       kmstest_commit_style_name(data->commit)) {
 		color_t expected_colors[] = {
 			{ 0.0, }, { 0.0, }, { 0.0, }
 		};
@@ -982,7 +988,8 @@ run_tests_for_pipe(data_t *data, enum pipe p)
 		igt_assert(success);
 	}
 
-	igt_subtest_f("pipe-%s-ctm-max", kmstest_pipe_name(p)) {
+	igt_subtest_f("pipe-%s-ctm-max-%s", kmstest_pipe_name(p),
+		       kmstest_commit_style_name(data->commit)) {
 		color_t full_rgb[] = {
 			{ 1.0, 0.0, 0.0 },
 			{ 0.0, 1.0, 0.0 },
@@ -1000,7 +1007,8 @@ run_tests_for_pipe(data_t *data, enum pipe p)
 					 full_rgb, ctm));
 	}
 
-	igt_subtest_f("pipe-%s-ctm-negative", kmstest_pipe_name(p)) {
+	igt_subtest_f("pipe-%s-ctm-negative-%s", kmstest_pipe_name(p),
+		       kmstest_commit_style_name(data->commit)) {
 		color_t all_black[] = {
 			{ 0.0, 0.0, 0.0 },
 			{ 0.0, 0.0, 0.0 },
@@ -1014,27 +1022,32 @@ run_tests_for_pipe(data_t *data, enum pipe p)
 	}
 
 #if 0
-	igt_subtest_f("pipe-%s-ctm-limited-range", kmstest_pipe_name(p))
+	igt_subtest_f("pipe-%s-ctm-limited-range-%s", kmstest_pipe_name(p),
+		       kmstest_commit_style_name(data->commit))
 		test_pipe_limited_range_ctm(data, primary);
 #endif
 
-	igt_subtest_f("pipe-%s-degamma", kmstest_pipe_name(p))
+	igt_subtest_f("pipe-%s-degamma-%s", kmstest_pipe_name(p),
+		       kmstest_commit_style_name(data->commit))
 		test_pipe_degamma(data, primary);
 
-	igt_subtest_f("pipe-%s-gamma", kmstest_pipe_name(p))
+	igt_subtest_f("pipe-%s-gamma-%s", kmstest_pipe_name(p),
+		       kmstest_commit_style_name(data->commit))
 		test_pipe_gamma(data, primary);
 
-	igt_subtest_f("pipe-%s-legacy-gamma", kmstest_pipe_name(p))
+	igt_subtest_f("pipe-%s-legacy-gamma-%s", kmstest_pipe_name(p),
+		       kmstest_commit_style_name(data->commit))
 		test_pipe_legacy_gamma(data, primary);
 
-	igt_subtest_f("pipe-%s-legacy-gamma-reset", kmstest_pipe_name(p))
+	igt_subtest_f("pipe-%s-legacy-gamma-reset-%s", kmstest_pipe_name(p),
+		       kmstest_commit_style_name(data->commit))
 		test_pipe_legacy_gamma_reset(data, primary);
 
 	igt_fixture {
 		disable_degamma(primary->pipe);
 		disable_gamma(primary->pipe);
 		disable_ctm(primary->pipe);
-		igt_display_commit(&data->display);
+		igt_display_commit2(&data->display, data->commit);
 
 		igt_pipe_crc_free(data->pipe_crc);
 		data->pipe_crc = NULL;
@@ -1076,7 +1089,7 @@ invalid_lut_sizes(data_t *data)
 	struct _drm_color_lut *degamma_lut = malloc(data->degamma_lut_size * sizeof(struct _drm_color_lut) * 2);
 	struct _drm_color_lut *gamma_lut = malloc(data->gamma_lut_size * sizeof(struct _drm_color_lut) * 2);
 
-	igt_display_commit2(display, display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
+	igt_display_commit2(&data->display, data->commit);
 
 	if (igt_pipe_obj_has_prop(pipe, IGT_CRTC_DEGAMMA_LUT)) {
 		igt_assert_eq(pipe_set_property_blob(pipe, IGT_CRTC_DEGAMMA_LUT,
@@ -1166,15 +1179,30 @@ igt_main
 		igt_display_init(&data.display, data.drm_fd);
 	}
 
+	igt_subtest_f("pipe-invalid-ctm-matrix-sizes")
+		invalid_ctm_matrix_sizes(&data);
+
+	data.commit = COMMIT_LEGACY;
+
 	for_each_pipe_static(pipe)
 		igt_subtest_group
 			run_tests_for_pipe(&data, pipe);
 
-	igt_subtest_f("pipe-invalid-lut-sizes")
+	igt_subtest_f("pipe-invalid-lut-sizes-%s",
+		       kmstest_commit_style_name(data.commit))
 		invalid_lut_sizes(&data);
 
-	igt_subtest_f("pipe-invalid-ctm-matrix-sizes")
-		invalid_ctm_matrix_sizes(&data);
+	if (data.is_atomic == 1) {
+		data.commit =  COMMIT_ATOMIC;
+
+		for_each_pipe_static(pipe)
+			igt_subtest_group
+				run_tests_for_pipe(&data, pipe);
+
+		igt_subtest_f("pipe-invalid-lut-sizes-%s",
+		    	       kmstest_commit_style_name(data.commit))
+			invalid_lut_sizes(&data);
+	}
 
 	igt_fixture {
 		igt_display_fini(&data.display);
-- 
1.9.1

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [igt-dev] [RFC] tests/kms_color: Change in commit style
  2018-10-04  8:25 [igt-dev] [RFC] tests/kms_color: Change in commit style swati2.sharma
@ 2018-10-04  9:35 ` Daniel Vetter
  2018-10-04 12:14 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2018-10-04  9:35 UTC (permalink / raw)
  To: Sharma, Swati2; +Cc: IGT development

On Thu, Oct 4, 2018 at 10:35 AM <swati2.sharma@intel.com> wrote:
>
> From: Swati Sharma <swati2.sharma@intel.com>
>
> Existing kms_color i-g-t, commit style by default is legacy for
> all the ctm/gamma/degamma subtests.
>
> In this patch, provision for both legacy and atomic commit is
> provided. Patch is floated as RFC to gather feedback on the idea
> and infrastructure proposed.
>
> Other approach could be getting the value of is_atomic as done in
> kms_available_modes_crc like
> data.commit = data.display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY
> However with this approach we won't be able to test both the paths.
>
> Signed-off-by: Swati Sharma <swati2.sharma@intel.com>

Imo just switch over to atomic. There's no upstream driver supporting
color management props that doesn't support atomic.
-Daniel

> ---
>  lib/igt_kms.c     |  14 ++++++++
>  lib/igt_kms.h     |   1 +
>  tests/kms_color.c | 102 ++++++++++++++++++++++++++++++++++--------------------
>  3 files changed, 80 insertions(+), 37 deletions(-)
>
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index 4563bfd..fd1f4dc 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -4229,3 +4229,17 @@ bool igt_display_has_format_mod(igt_display_t *display, uint32_t format,
>
>         return false;
>  }
> +
> +/**
> + * kmstest_commit_style_name:
> + * @commit: commit style LEGACY/ATOMIC
> + *
> + * Returns: String representing @commit, e.g. "commit-legacy".
> + */
> +const char *kmstest_commit_style_name(enum igt_commit_style commit)
> +{
> +       if (commit == COMMIT_LEGACY)
> +               return "commit-legacy";
> +       else if (commit == COMMIT_ATOMIC)
> +               return "commit-atomic";
> +}
> diff --git a/lib/igt_kms.h b/lib/igt_kms.h
> index 3862efa..50bb965 100644
> --- a/lib/igt_kms.h
> +++ b/lib/igt_kms.h
> @@ -243,6 +243,7 @@ enum igt_commit_style {
>         COMMIT_UNIVERSAL,
>         COMMIT_ATOMIC,
>  };
> +const char *kmstest_commit_style_name(enum igt_commit_style commit);
>
>  enum igt_atomic_plane_properties {
>         IGT_PLANE_SRC_X = 0,
> diff --git a/tests/kms_color.c b/tests/kms_color.c
> index bb106dd..581361e 100644
> --- a/tests/kms_color.c
> +++ b/tests/kms_color.c
> @@ -61,9 +61,9 @@ typedef struct {
>         uint32_t color_depth;
>         uint64_t degamma_lut_size;
>         uint64_t gamma_lut_size;
> +       enum igt_commit_style commit;
>  } data_t;
>
> -
>  static void paint_gradient_rectangles(data_t *data,
>                                       drmModeModeInfo *mode,
>                                       color_t *colors,
> @@ -304,12 +304,12 @@ static void test_pipe_degamma(data_t *data,
>                 disable_ctm(primary->pipe);
>                 disable_degamma(primary->pipe);
>                 set_gamma(data, primary->pipe, gamma_linear);
> -               igt_display_commit(&data->display);
> +               igt_display_commit2(&data->display, data->commit);
>
>                 /* Draw solid colors with no degamma transformation. */
>                 paint_rectangles(data, mode, red_green_blue, &fb);
>                 igt_plane_set_fb(primary, &fb);
> -               igt_display_commit(&data->display);
> +               igt_display_commit2(&data->display, data->commit);
>                 igt_wait_for_vblank(data->drm_fd, primary->pipe->pipe);
>                 igt_pipe_crc_collect_crc(data->pipe_crc, &crc_fullcolors);
>
> @@ -319,7 +319,7 @@ 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_display_commit2(&data->display, data->commit);
>                 igt_wait_for_vblank(data->drm_fd, primary->pipe->pipe);
>                 igt_pipe_crc_collect_crc(data->pipe_crc, &crc_fullgamma);
>
> @@ -384,12 +384,12 @@ static void test_pipe_gamma(data_t *data,
>                 disable_ctm(primary->pipe);
>                 disable_degamma(primary->pipe);
>                 set_gamma(data, primary->pipe, gamma_full);
> -               igt_display_commit(&data->display);
> +               igt_display_commit2(&data->display, data->commit);
>
>                 /* Draw solid colors with no gamma transformation. */
>                 paint_rectangles(data, mode, red_green_blue, &fb);
>                 igt_plane_set_fb(primary, &fb);
> -               igt_display_commit(&data->display);
> +               igt_display_commit2(&data->display, data->commit);
>                 igt_wait_for_vblank(data->drm_fd, primary->pipe->pipe);
>                 igt_pipe_crc_collect_crc(data->pipe_crc, &crc_fullcolors);
>
> @@ -398,7 +398,7 @@ static void test_pipe_gamma(data_t *data,
>                  */
>                 paint_gradient_rectangles(data, mode, red_green_blue, &fb);
>                 igt_plane_set_fb(primary, &fb);
> -               igt_display_commit(&data->display);
> +               igt_display_commit2(&data->display, data->commit);
>                 igt_wait_for_vblank(data->drm_fd, primary->pipe->pipe);
>                 igt_pipe_crc_collect_crc(data->pipe_crc, &crc_fullgamma);
>
> @@ -470,12 +470,12 @@ static void test_pipe_legacy_gamma(data_t *data,
>                 disable_degamma(primary->pipe);
>                 disable_gamma(primary->pipe);
>                 disable_ctm(primary->pipe);
> -               igt_display_commit(&data->display);
> +               igt_display_commit2(&data->display, data->commit);
>
>                 /* Draw solid colors with no gamma transformation. */
>                 paint_rectangles(data, mode, red_green_blue, &fb);
>                 igt_plane_set_fb(primary, &fb);
> -               igt_display_commit(&data->display);
> +               igt_display_commit2(&data->display, data->commit);
>                 igt_wait_for_vblank(data->drm_fd, primary->pipe->pipe);
>                 igt_pipe_crc_collect_crc(data->pipe_crc, &crc_fullcolors);
>
> @@ -490,7 +490,7 @@ static void test_pipe_legacy_gamma(data_t *data,
>                         red_lut[i] = green_lut[i] = blue_lut[i] = 0xffff;
>                 igt_assert_eq(drmModeCrtcSetGamma(data->drm_fd, primary->pipe->crtc_id,
>                                                   legacy_lut_size, red_lut, green_lut, blue_lut), 0);
> -               igt_display_commit(&data->display);
> +               igt_display_commit2(&data->display, data->commit);
>                 igt_wait_for_vblank(data->drm_fd, primary->pipe->pipe);
>                 igt_pipe_crc_collect_crc(data->pipe_crc, &crc_fullgamma);
>
> @@ -505,7 +505,7 @@ static void test_pipe_legacy_gamma(data_t *data,
>
>                 igt_assert_eq(drmModeCrtcSetGamma(data->drm_fd, primary->pipe->crtc_id,
>                                                   legacy_lut_size, red_lut, green_lut, blue_lut), 0);
> -               igt_display_commit(&data->display);
> +               igt_display_commit2(&data->display, data->commit);
>
>                 igt_plane_set_fb(primary, NULL);
>                 igt_output_set_pipe(output, PIPE_NONE);
> @@ -559,7 +559,7 @@ static void test_pipe_legacy_gamma_reset(data_t *data,
>                 disable_degamma(primary->pipe);
>                 disable_ctm(primary->pipe);
>                 disable_gamma(primary->pipe);
> -               igt_display_commit(&data->display);
> +               igt_display_commit2(&data->display, data->commit);
>
>                 /* Set a degama & gamma LUT and a CTM using the
>                  * properties and verify the content of the
> @@ -567,7 +567,7 @@ static void test_pipe_legacy_gamma_reset(data_t *data,
>                 set_degamma(data, primary->pipe, degamma_linear);
>                 set_ctm(primary->pipe, ctm_identity);
>                 set_gamma(data, primary->pipe, gamma_zero);
> -               igt_display_commit(&data->display);
> +               igt_display_commit2(&data->display, data->commit);
>
>                 blob = get_blob(data, primary->pipe, IGT_CRTC_DEGAMMA_LUT);
>                 igt_assert(blob &&
> @@ -610,7 +610,7 @@ static void test_pipe_legacy_gamma_reset(data_t *data,
>                                                   legacy_lut_size,
>                                                   red_lut, green_lut, blue_lut),
>                               0);
> -               igt_display_commit(&data->display);
> +               igt_display_commit2(&data->display, data->commit);
>
>                 igt_assert(get_blob(data, primary->pipe,
>                                     IGT_CRTC_DEGAMMA_LUT) == NULL);
> @@ -692,12 +692,12 @@ static bool test_pipe_ctm(data_t *data,
>                 set_degamma(data, primary->pipe, degamma_linear);
>                 set_gamma(data, primary->pipe, gamma_linear);
>                 disable_ctm(primary->pipe);
> -               igt_display_commit(&data->display);
> +               igt_display_commit2(&data->display, data->commit);
>
>                 paint_rectangles(data, mode, after, &fb);
>                 igt_plane_set_fb(primary, &fb);
>                 set_ctm(primary->pipe, ctm_identity);
> -               igt_display_commit(&data->display);
> +               igt_display_commit2(&data->display, data->commit);
>                 igt_wait_for_vblank(data->drm_fd, primary->pipe->pipe);
>                 igt_pipe_crc_collect_crc(data->pipe_crc, &crc_software);
>
> @@ -705,7 +705,7 @@ static bool test_pipe_ctm(data_t *data,
>                 paint_rectangles(data, mode, before, &fb);
>                 igt_plane_set_fb(primary, &fb);
>                 set_ctm(primary->pipe, ctm_matrix);
> -               igt_display_commit(&data->display);
> +               igt_display_commit2(&data->display, data->commit);
>                 igt_wait_for_vblank(data->drm_fd, primary->pipe->pipe);
>                 igt_pipe_crc_collect_crc(data->pipe_crc, &crc_hardware);
>
> @@ -800,7 +800,7 @@ static void test_pipe_limited_range_ctm(data_t *data,
>                 igt_output_set_prop_value(output, IGT_CONNECTOR_BROADCAST_RGB, BROADCAST_RGB_FULL);
>                 paint_rectangles(data, mode, red_green_blue_limited, &fb);
>                 igt_plane_set_fb(primary, &fb);
> -               igt_display_commit(&data->display);
> +               igt_display_commit2(&data->display, data->commit);
>                 igt_wait_for_vblank(data->drm_fd, primary->pipe->pipe);
>                 igt_pipe_crc_collect_crc(data->pipe_crc, &crc_full);
>
> @@ -808,7 +808,7 @@ static void test_pipe_limited_range_ctm(data_t *data,
>                 igt_output_set_prop_value(output, IGT_CONNECTOR_BROADCAST_RGB, BROADCAST_RGB_16_235);
>                 paint_rectangles(data, mode, red_green_blue_full, &fb);
>                 igt_plane_set_fb(primary, &fb);
> -               igt_display_commit(&data->display);
> +               igt_display_commit2(&data->display, data->commit);
>                 igt_wait_for_vblank(data->drm_fd, primary->pipe->pipe);
>                 igt_pipe_crc_collect_crc(data->pipe_crc, &crc_limited);
>
> @@ -876,7 +876,8 @@ run_tests_for_pipe(data_t *data, enum pipe p)
>         data->color_depth = 8;
>         delta = 1.0 / (1 << data->color_depth);
>
> -       igt_subtest_f("pipe-%s-ctm-red-to-blue", kmstest_pipe_name(p)) {
> +       igt_subtest_f("pipe-%s-ctm-red-to-blue-%s", kmstest_pipe_name(p),
> +                      kmstest_commit_style_name(data->commit)) {
>                 color_t blue_green_blue[] = {
>                         { 0.0, 0.0, 1.0 },
>                         { 0.0, 1.0, 0.0 },
> @@ -889,7 +890,8 @@ run_tests_for_pipe(data_t *data, enum pipe p)
>                                          blue_green_blue, ctm));
>         }
>
> -       igt_subtest_f("pipe-%s-ctm-green-to-red", kmstest_pipe_name(p)) {
> +       igt_subtest_f("pipe-%s-ctm-green-to-red-%s", kmstest_pipe_name(p),
> +                      kmstest_commit_style_name(data->commit)) {
>                 color_t red_red_blue[] = {
>                         { 1.0, 0.0, 0.0 },
>                         { 1.0, 0.0, 0.0 },
> @@ -902,7 +904,8 @@ run_tests_for_pipe(data_t *data, enum pipe p)
>                                          red_red_blue, ctm));
>         }
>
> -       igt_subtest_f("pipe-%s-ctm-blue-to-red", kmstest_pipe_name(p)) {
> +       igt_subtest_f("pipe-%s-ctm-blue-to-red-%s", kmstest_pipe_name(p),
> +                      kmstest_commit_style_name(data->commit)) {
>                 color_t red_green_red[] = {
>                         { 1.0, 0.0, 0.0 },
>                         { 0.0, 1.0, 0.0 },
> @@ -919,7 +922,8 @@ run_tests_for_pipe(data_t *data, enum pipe p)
>          * the it depends on the hardware we're dealing with, we can
>          * either get clamped or rounded values and we also need to
>          * account for odd number of items in the LUTs. */
> -       igt_subtest_f("pipe-%s-ctm-0-25", kmstest_pipe_name(p)) {
> +       igt_subtest_f("pipe-%s-ctm-0-25-%s", kmstest_pipe_name(p),
> +                      kmstest_commit_style_name(data->commit)) {
>                 color_t expected_colors[] = {
>                         { 0.0, }, { 0.0, }, { 0.0, }
>                 };
> @@ -940,7 +944,8 @@ run_tests_for_pipe(data_t *data, enum pipe p)
>                 igt_assert(success);
>         }
>
> -       igt_subtest_f("pipe-%s-ctm-0-5", kmstest_pipe_name(p)) {
> +       igt_subtest_f("pipe-%s-ctm-0-5-%s", kmstest_pipe_name(p),
> +                      kmstest_commit_style_name(data->commit)) {
>                 color_t expected_colors[] = {
>                         { 0.0, }, { 0.0, }, { 0.0, }
>                 };
> @@ -961,7 +966,8 @@ run_tests_for_pipe(data_t *data, enum pipe p)
>                 igt_assert(success);
>         }
>
> -       igt_subtest_f("pipe-%s-ctm-0-75", kmstest_pipe_name(p)) {
> +       igt_subtest_f("pipe-%s-ctm-0-75-%s", kmstest_pipe_name(p),
> +                      kmstest_commit_style_name(data->commit)) {
>                 color_t expected_colors[] = {
>                         { 0.0, }, { 0.0, }, { 0.0, }
>                 };
> @@ -982,7 +988,8 @@ run_tests_for_pipe(data_t *data, enum pipe p)
>                 igt_assert(success);
>         }
>
> -       igt_subtest_f("pipe-%s-ctm-max", kmstest_pipe_name(p)) {
> +       igt_subtest_f("pipe-%s-ctm-max-%s", kmstest_pipe_name(p),
> +                      kmstest_commit_style_name(data->commit)) {
>                 color_t full_rgb[] = {
>                         { 1.0, 0.0, 0.0 },
>                         { 0.0, 1.0, 0.0 },
> @@ -1000,7 +1007,8 @@ run_tests_for_pipe(data_t *data, enum pipe p)
>                                          full_rgb, ctm));
>         }
>
> -       igt_subtest_f("pipe-%s-ctm-negative", kmstest_pipe_name(p)) {
> +       igt_subtest_f("pipe-%s-ctm-negative-%s", kmstest_pipe_name(p),
> +                      kmstest_commit_style_name(data->commit)) {
>                 color_t all_black[] = {
>                         { 0.0, 0.0, 0.0 },
>                         { 0.0, 0.0, 0.0 },
> @@ -1014,27 +1022,32 @@ run_tests_for_pipe(data_t *data, enum pipe p)
>         }
>
>  #if 0
> -       igt_subtest_f("pipe-%s-ctm-limited-range", kmstest_pipe_name(p))
> +       igt_subtest_f("pipe-%s-ctm-limited-range-%s", kmstest_pipe_name(p),
> +                      kmstest_commit_style_name(data->commit))
>                 test_pipe_limited_range_ctm(data, primary);
>  #endif
>
> -       igt_subtest_f("pipe-%s-degamma", kmstest_pipe_name(p))
> +       igt_subtest_f("pipe-%s-degamma-%s", kmstest_pipe_name(p),
> +                      kmstest_commit_style_name(data->commit))
>                 test_pipe_degamma(data, primary);
>
> -       igt_subtest_f("pipe-%s-gamma", kmstest_pipe_name(p))
> +       igt_subtest_f("pipe-%s-gamma-%s", kmstest_pipe_name(p),
> +                      kmstest_commit_style_name(data->commit))
>                 test_pipe_gamma(data, primary);
>
> -       igt_subtest_f("pipe-%s-legacy-gamma", kmstest_pipe_name(p))
> +       igt_subtest_f("pipe-%s-legacy-gamma-%s", kmstest_pipe_name(p),
> +                      kmstest_commit_style_name(data->commit))
>                 test_pipe_legacy_gamma(data, primary);
>
> -       igt_subtest_f("pipe-%s-legacy-gamma-reset", kmstest_pipe_name(p))
> +       igt_subtest_f("pipe-%s-legacy-gamma-reset-%s", kmstest_pipe_name(p),
> +                      kmstest_commit_style_name(data->commit))
>                 test_pipe_legacy_gamma_reset(data, primary);
>
>         igt_fixture {
>                 disable_degamma(primary->pipe);
>                 disable_gamma(primary->pipe);
>                 disable_ctm(primary->pipe);
> -               igt_display_commit(&data->display);
> +               igt_display_commit2(&data->display, data->commit);
>
>                 igt_pipe_crc_free(data->pipe_crc);
>                 data->pipe_crc = NULL;
> @@ -1076,7 +1089,7 @@ invalid_lut_sizes(data_t *data)
>         struct _drm_color_lut *degamma_lut = malloc(data->degamma_lut_size * sizeof(struct _drm_color_lut) * 2);
>         struct _drm_color_lut *gamma_lut = malloc(data->gamma_lut_size * sizeof(struct _drm_color_lut) * 2);
>
> -       igt_display_commit2(display, display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
> +       igt_display_commit2(&data->display, data->commit);
>
>         if (igt_pipe_obj_has_prop(pipe, IGT_CRTC_DEGAMMA_LUT)) {
>                 igt_assert_eq(pipe_set_property_blob(pipe, IGT_CRTC_DEGAMMA_LUT,
> @@ -1166,15 +1179,30 @@ igt_main
>                 igt_display_init(&data.display, data.drm_fd);
>         }
>
> +       igt_subtest_f("pipe-invalid-ctm-matrix-sizes")
> +               invalid_ctm_matrix_sizes(&data);
> +
> +       data.commit = COMMIT_LEGACY;
> +
>         for_each_pipe_static(pipe)
>                 igt_subtest_group
>                         run_tests_for_pipe(&data, pipe);
>
> -       igt_subtest_f("pipe-invalid-lut-sizes")
> +       igt_subtest_f("pipe-invalid-lut-sizes-%s",
> +                      kmstest_commit_style_name(data.commit))
>                 invalid_lut_sizes(&data);
>
> -       igt_subtest_f("pipe-invalid-ctm-matrix-sizes")
> -               invalid_ctm_matrix_sizes(&data);
> +       if (data.is_atomic == 1) {
> +               data.commit =  COMMIT_ATOMIC;
> +
> +               for_each_pipe_static(pipe)
> +                       igt_subtest_group
> +                               run_tests_for_pipe(&data, pipe);
> +
> +               igt_subtest_f("pipe-invalid-lut-sizes-%s",
> +                              kmstest_commit_style_name(data.commit))
> +                       invalid_lut_sizes(&data);
> +       }
>
>         igt_fixture {
>                 igt_display_fini(&data.display);
> --
> 1.9.1
>


-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [igt-dev] ✗ Fi.CI.BAT: failure for tests/kms_color: Change in commit style
  2018-10-04  8:25 [igt-dev] [RFC] tests/kms_color: Change in commit style swati2.sharma
  2018-10-04  9:35 ` Daniel Vetter
@ 2018-10-04 12:14 ` Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2018-10-04 12:14 UTC (permalink / raw)
  To: swati2.sharma; +Cc: igt-dev

== Series Details ==

Series: tests/kms_color: Change in commit style
URL   : https://patchwork.freedesktop.org/series/50539/
State : failure

== Summary ==

IGT patchset build failed on latest successful build
596f48dcd59fd2f8c16671514f3e69d4a2891374 runner: Add unit test for resume when enough subtests are already run

[131/533] Linking target tests/gem_set_tiling_vs_blt.
[132/533] Linking target tests/gem_set_tiling_vs_gtt.
[133/533] Linking target tests/gem_set_tiling_vs_pwrite.
[134/533] Linking target tests/gem_shrink.
[135/533] Linking target tests/gem_softpin.
[136/533] Linking target tests/gem_spin_batch.
[137/533] Linking target tests/gem_stolen.
[138/533] Linking target tests/gem_storedw_batches_loop.
[139/533] Linking target tests/gem_storedw_loop.
[140/533] Linking target tests/gem_streaming_writes.
[141/533] Linking target tests/gem_sync.
[142/533] Linking target tests/gem_threaded_access_tiled.
[143/533] Linking target tests/gem_tiled_blits.
[144/533] Linking target tests/gem_tiled_fence_blits.
[145/533] Linking target tests/gem_tiled_partial_pwrite_pread.
[146/533] Linking target tests/gem_tiled_pread_basic.
[147/533] Linking target tests/gem_tiled_pread_pwrite.
[148/533] Linking target tests/gem_tiled_swapping.
[149/533] Linking target tests/gem_tiled_wb.
[150/533] Linking target tests/gem_tiled_wc.
[151/533] Linking target tests/gem_tiling_max_stride.
[152/533] Linking target tests/gem_unfence_active_buffers.
[153/533] Linking target tests/gem_unref_active_buffers.
[154/533] Linking target tests/gem_userptr_blits.
[155/533] Linking target tests/gem_wait.
[156/533] Linking target tests/gem_workarounds.
[157/533] Linking target tests/gem_write_read_ring_switch.
[158/533] Linking target tests/gen3_mixed_blits.
[159/533] Linking target tests/gen3_render_linear_blits.
[160/533] Linking target tests/gen3_render_mixed_blits.
[161/533] Linking target tests/gen3_render_tiledx_blits.
[162/533] Linking target tests/gen3_render_tiledy_blits.
[163/533] Linking target tests/i915_query.
[164/533] Linking target tests/kms_3d.
[165/533] Linking target tests/kms_addfb_basic.
[166/533] Linking target tests/kms_atomic.
[167/533] Linking target tests/kms_atomic_interruptible.
[168/533] Linking target tests/kms_atomic_transition.
[169/533] Linking target tests/kms_available_modes_crc.
[170/533] Linking target tests/kms_busy.
[171/533] Linking target tests/kms_ccs.
[172/533] Linking target tests/kms_chv_cursor_fail.
[173/533] Compiling C object 'tests/kms_color@exe/kms_color.c.o'.
FAILED: tests/kms_color@exe/kms_color.c.o 
ccache cc  -Itests/kms_color@exe -Itests -I../tests -I. -I../ -I../lib/stubs/syscalls -Ilib -I../lib -I../include/drm-uapi -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/opt/igt/include -I/opt/igt/include/libdrm -I/usr/include/x86_64-linux-gnu -I/usr/include -I/usr/include/libdrm -I/usr/include/libdrm/nouveau -I/home/cidrm/kernel_headers/include -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -O0 -g -D_GNU_SOURCE -include config.h -Wno-unused-parameter -Wno-sign-compare -Wno-missing-field-initializers -Wno-clobbered -Wno-type-limits -Wimplicit-fallthrough=0 -pthread -MD -MQ 'tests/kms_color@exe/kms_color.c.o' -MF 'tests/kms_color@exe/kms_color.c.o.d' -o 'tests/kms_color@exe/kms_color.c.o' -c ../tests/kms_color.c
../tests/kms_color.c: In function ‘__real_main1166’:
../tests/kms_color.c:1195:10: error: ‘data_t {aka struct <anonymous>}’ has no member named ‘is_atomic’
  if (data.is_atomic == 1) {
          ^
ninja: build stopped: subcommand failed.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-10-04 12:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-04  8:25 [igt-dev] [RFC] tests/kms_color: Change in commit style swati2.sharma
2018-10-04  9:35 ` Daniel Vetter
2018-10-04 12:14 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork

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.