[igt-dev] [PATCH i-g-t] tests/i915/kms_dsc: Skip test if DP res. < 5K

Swati Sharma swati2.sharma at intel.com
Fri Jul 8 05:29:06 UTC 2022


While rewriting the kms_dsc IGT; missed one condition.
Skip test if connector type is DP and resolution
is less than 5K since force dsc enable supports resolutions
above 5K in DP.

Signed-off-by: Swati Sharma <swati2.sharma at intel.com>
---
 tests/i915/kms_dsc.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/tests/i915/kms_dsc.c b/tests/i915/kms_dsc.c
index 3506fcb52..d8f924a93 100644
--- a/tests/i915/kms_dsc.c
+++ b/tests/i915/kms_dsc.c
@@ -165,6 +165,23 @@ static bool check_dsc_on_connector(data_t *data)
 	return true;
 }
 
+/* Force dsc enable supports resolutions above 5K in DP */
+static bool check_5k_dp_test_constraint(data_t *data)
+{
+	igt_output_t *output = data->output;
+	drmModeConnector *connector = output->config.connector;
+	drmModeModeInfo *mode = get_highres_mode(output);
+
+	if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort &&
+	    mode->hdisplay < 5120) {
+		igt_debug("Force dsc enable does not support res. < 5k in %s\n",
+			   output->name);
+		return false;
+	}
+
+	return true;
+}
+
 static bool check_big_joiner_test_constraint(data_t *data,
 					     enum dsc_test_type test_type)
 {
@@ -285,6 +302,7 @@ static void update_display(data_t *data, enum dsc_test_type test_type, unsigned
 	test_cleanup(data);
 }
 
+
 static void test_dsc(data_t *data, enum dsc_test_type test_type, int bpp, unsigned int plane_format)
 {
 	igt_display_t *display = &data->display;
@@ -300,6 +318,9 @@ static void test_dsc(data_t *data, enum dsc_test_type test_type, int bpp, unsign
 		if (!check_dsc_on_connector(data))
 			continue;
 
+		if (!check_5k_dp_test_constraint(data))
+			continue;
+
 		if (!check_big_joiner_test_constraint(data, test_type))
 			continue;
 
-- 
2.25.1



More information about the igt-dev mailing list