Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t] tests/i915/kms_dsc_helper: Fix helper to check dsc with output_format
Date: Tue,  8 Aug 2023 10:17:47 +0530	[thread overview]
Message-ID: <20230808044747.3274795-1-ankit.k.nautiyal@intel.com> (raw)

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@intel.com>
Cc: Jouni H_gander <jouni.hogander@intel.com>
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
Tested-by: Swati Sharma <swati2.sharma@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

             reply	other threads:[~2023-08-08  4:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-08  4:47 Ankit Nautiyal [this message]
2023-08-08  6:23 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/i915/kms_dsc_helper: Fix helper to check dsc with output_format Patchwork
2023-08-08  7:20 ` [igt-dev] ○ CI.xeBAT: info " Patchwork
2023-08-08 14:42 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230808044747.3274795-1-ankit.k.nautiyal@intel.com \
    --to=ankit.k.nautiyal@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox