[igt-dev] [i-g-t V2 38/81] tests/kms_color: Document each subtest for testplan

Bhanuprakash Modem bhanuprakash.modem at intel.com
Wed May 17 06:32:40 UTC 2023


Add documentation for all kms tests which is used by IGT testplan
documentation.

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
---
 tests/kms_color.c | 90 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 90 insertions(+)

diff --git a/tests/kms_color.c b/tests/kms_color.c
index cd2d38329..8beccb296 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -22,10 +22,24 @@
  *
  */
 
+/**
+ * TEST: kms color
+ * Category: Display
+ * Description: Test Color Features at Pipe level
+ */
 #include "igt_color_helper.h"
 
 IGT_TEST_DESCRIPTION("Test Color Features at Pipe level");
 
+/**
+ * SUBTEST: degamma
+ * Description: Verify that degamma LUT transformation works correctly
+ * Driver requirement: any
+ * Functionality: colorspace
+ * Mega feature: Color mgmt
+ * Run type: FULL
+ * Test category: functionality test
+ */
 static bool test_pipe_degamma(data_t *data,
 			      igt_plane_t *primary)
 {
@@ -114,6 +128,16 @@ static bool test_pipe_degamma(data_t *data,
 	return ret;
 }
 
+/**
+ * SUBTEST: gamma
+ * Description: Verify that gamma LUT transformation works correctly
+ * Driver requirement: any
+ * Functionality: colorspace, colorspace_gamma
+ * Mega feature: Color mgmt
+ * Run type: FULL
+ * Test category: functionality test
+ */
+
 /*
  * Draw 3 gradient rectangles in red, green and blue, with a maxed out gamma
  * LUT and verify we have the same CRC as drawing solid color rectangles.
@@ -202,6 +226,16 @@ static bool test_pipe_gamma(data_t *data,
 	return ret;
 }
 
+/**
+ * SUBTEST: legacy-gamma
+ * Description: Verify that legacy gamma LUT transformation works correctly
+ * Driver requirement: any
+ * Functionality: colorspace, colorspace_gamma
+ * Mega feature: Color mgmt
+ * Run type: FULL
+ * Test category: functionality test
+ */
+
 /*
  * Draw 3 gradient rectangles in red, green and blue, with a maxed out legacy
  * gamma LUT and verify we have the same CRC as drawing solid color rectangles
@@ -314,6 +348,17 @@ static bool test_pipe_legacy_gamma(data_t *data,
 	return ret;
 }
 
+/**
+ * SUBTEST: legacy-gamma-reset
+ * Description: Verify that setting the legacy gamma LUT resets the gamma LUT
+ *              set through GAMMA_LUT property
+ * Driver requirement: any
+ * Functionality: colorspace, colorspace_gamma
+ * Mega feature: Color mgmt
+ * Run type: FULL
+ * Test category: functionality test
+ */
+
 /*
  * Verify that setting the legacy gamma LUT resets the gamma LUT set
  * through the GAMMA_LUT property.
@@ -448,6 +493,27 @@ end:
 	return ret;
 }
 
+/**
+ * SUBTEST: ctm-%s
+ * Description: Check the color transformation %arg[1]
+ * Driver requirement: any
+ * Functionality: colorspace
+ * Mega feature: Color mgmt
+ * Run type: FULL
+ * Test category: functionality test
+ *
+ * arg[1]:
+ *
+ * @0-25:           for 0.25 transparency
+ * @0-50:           for 0.50 transparency
+ * @0-75:           for 0.75 transparency
+ * @blue-to-red:    from blue to red
+ * @green-to-red:   from green to red
+ * @max:            for maximum transparency
+ * @negative:       for negative transparency
+ * @red-to-blue:    from red to blue
+ */
+
 /*
  * Draw 3 rectangles using before colors with the ctm matrix apply and verify
  * the CRC is equal to using after colors with an identify ctm matrix.
@@ -795,6 +861,15 @@ out:
 	test_cleanup(data);
 }
 
+/**
+ * SUBTEST: deep-color
+ * Description: Verify that deep color works correctly
+ * Driver requirement: any
+ * Functionality: colorspace
+ * Mega feature: Color mgmt
+ * Run type: FULL
+ * Test category: functionality test
+ */
 static void
 run_deep_color_tests_for_pipe(data_t *data, enum pipe p)
 {
@@ -885,6 +960,21 @@ run_deep_color_tests_for_pipe(data_t *data, enum pipe p)
 	test_cleanup(data);
 }
 
+/**
+ * SUBTEST: invalid-%s-sizes
+ * Description: Negative check for %arg[1] sizes
+ * Driver requirement: any
+ * Functionality: colorspace
+ * Mega feature: Color mgmt
+ * Run type: FULL
+ * Test category: functionality test
+ *
+ * arg[1]:
+ *
+ * @ctm-matrix:         Color transformation matrix
+ * @degamma-lut:        Degamma LUT
+ * @gamma-lut:          Gamma LUT
+ */
 static void
 run_invalid_tests_for_pipe(data_t *data)
 {
-- 
2.40.0



More information about the igt-dev mailing list