[igt-dev] [PATCH i-g-t] tests/kms_color_chamelium: Fix limited range ctm

Bhanuprakash Modem bhanuprakash.modem at intel.com
Thu Mar 25 20:20:13 UTC 2021


Verify that the framebuffer reference with RGB_FULL & limited
colors should match with the frame dump with RGB_16_235 & full
colors.

Cc: Kunal Joshi <kunal1.joshi at intel.com>
Cc: Petri Latvala <petri.latvala at intel.com>
Cc: Uma Shankar <uma.shankar at intel.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
---
 tests/kms_color_chamelium.c | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/tests/kms_color_chamelium.c b/tests/kms_color_chamelium.c
index 30b38b82e..0bc2b9c27 100644
--- a/tests/kms_color_chamelium.c
+++ b/tests/kms_color_chamelium.c
@@ -464,29 +464,28 @@ static void test_pipe_limited_range_ctm(data_t *data,
 		set_gamma(data, primary->pipe, gamma_linear);
 		set_ctm(primary->pipe, ctm);
 
-		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);
-
 		/* Set the output into limited range. */
 		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);
+
+		chamelium_capture(data->chamelium, port, 0, 0, 0, 0, 1);
+		frame_limited =
+			chamelium_read_captured_frame(data->chamelium, 0);
+
 		/* And reset.. */
 		igt_output_set_prop_value(output,
 					  IGT_CONNECTOR_BROADCAST_RGB,
 					  BROADCAST_RGB_FULL);
+
+		paint_rectangles(data, mode, red_green_blue_limited, &fbref);
 		igt_plane_set_fb(primary, NULL);
 		igt_output_set_pipe(output, PIPE_NONE);
-		chamelium_capture(data->chamelium, port, 0, 0, 0, 0, 1);
-		frame_limited =
-			chamelium_read_captured_frame(data->chamelium, 0);
-
+		igt_display_commit(&data->display);
 
 		/* Verify that the framebuffer reference of the software
 		 * computed output is equal to the frame dump of the CTM
-- 
2.20.1



More information about the igt-dev mailing list