[igt-dev] [PATCH i-g-t] tests/i915/kms_dsc_helper: Fix helper to check dsc with output_format

Ankit Nautiyal ankit.k.nautiyal at intel.com
Tue Aug 8 04:47:47 UTC 2023


Fix the condition that checks for DSC support by platform and the
sink in the helper is_dsc_output_format_supported.

v2:
-Fix commit message (Swati).
-Add closes tag. (Swati).
-Add debug message only for sink check (Ankit).

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/9062
Fixes: c365922f01c12 (tests/i915/kms_dsc: Enable validation for VDSC output formats)
Cc: Swati Sharma <swati2.sharma at intel.com>
Cc: Jouni H_gander <jouni.hogander at intel.com>
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal at intel.com>
Reviewed-by: Jouni Högander <jouni.hogander at intel.com>
Tested-by: Swati Sharma <swati2.sharma at intel.com>
---
 tests/i915/kms_dsc_helper.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/tests/i915/kms_dsc_helper.c b/tests/i915/kms_dsc_helper.c
index ae59edb6bec9..df999c9bde62 100644
--- a/tests/i915/kms_dsc_helper.c
+++ b/tests/i915/kms_dsc_helper.c
@@ -133,13 +133,14 @@ static bool is_dsc_output_format_supported_by_platform(int disp_ver, enum dsc_ou
 bool is_dsc_output_format_supported(int drmfd, int disp_ver, igt_output_t *output,
 				    enum dsc_output_format output_format)
 {
-	if (!(igt_is_dsc_output_format_supported_by_sink(drmfd, output->name, output_format)) &&
-	     (is_dsc_output_format_supported_by_platform(disp_ver, output_format))) {
-		    igt_debug("DSC %s output format not supported on connector %s\n",
-			       kmstest_dsc_output_format_str(output_format),
-			       output->name);
-			return false;
-		}
+	if (!is_dsc_output_format_supported_by_platform(disp_ver, output_format))
+		return false;
+
+	if (!igt_is_dsc_output_format_supported_by_sink(drmfd, output->name, output_format)) {
+		igt_debug("DSC %s output format not supported on connector %s\n",
+			  kmstest_dsc_output_format_str(output_format), output->name);
+		return false;
+	}
 
 	return true;
 }
-- 
2.40.1



More information about the igt-dev mailing list