[PATCH i-g-t] tests/intel/kms_dsc: add new constraint

Swati Sharma swati2.sharma at intel.com
Fri Jan 5 06:52:36 UTC 2024


If output max bpc is less than min dsc bpc (8) which is supported
by intel driver, don't execute test.

Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1066
Signed-off-by: Swati Sharma <swati2.sharma at intel.com>
---
 tests/intel/kms_dsc.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/intel/kms_dsc.c b/tests/intel/kms_dsc.c
index 3433e0907..8ea15f4d2 100644
--- a/tests/intel/kms_dsc.c
+++ b/tests/intel/kms_dsc.c
@@ -63,6 +63,7 @@ IGT_TEST_DESCRIPTION("Test to validate display stream compression");
 
 #define LEN		20
 #define DEFAULT_BPC	0
+#define MIN_DSC_BPC	8
 
 #define TEST_DSC_BASIC		(0<<0)
 #define TEST_DSC_BPC		(1<<0)
@@ -283,6 +284,9 @@ static void test_dsc(data_t *data, uint32_t test_type, int bpc,
 		      check_gen11_dp_constraint(data->drm_fd, data->output, data->pipe)))
 			continue;
 
+		if (igt_get_output_max_bpc(data->drm_fd, output->name) < MIN_DSC_BPC)
+			continue;
+
 		if ((test_type & TEST_DSC_OUTPUT_FORMAT) &&
 		    (!is_dsc_output_format_supported(data->drm_fd, data->disp_ver,
 						     data->output, data->output_format)))
-- 
2.25.1



More information about the igt-dev mailing list