Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Subject: [i-g-t 4/4] tests/kms_vrr: Add more logs to skips
Date: Tue, 13 Aug 2024 11:08:45 +0530	[thread overview]
Message-ID: <20240813053845.2567954-5-bhanuprakash.modem@intel.com> (raw)
In-Reply-To: <20240813053845.2567954-1-bhanuprakash.modem@intel.com>

Debugging would be easier if we had logs available for
test failures and skips. This patch adds print statements
at crucial points to provide better insights.

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/kms_vrr.c | 29 +++++++++++++++++++++--------
 1 file changed, 21 insertions(+), 8 deletions(-)

diff --git a/tests/kms_vrr.c b/tests/kms_vrr.c
index 4fa3df417..36a22eebe 100644
--- a/tests/kms_vrr.c
+++ b/tests/kms_vrr.c
@@ -879,12 +879,14 @@ static bool output_constraint(data_t *data, igt_output_t *output, uint32_t flags
 	data->debugfs_fd = igt_debugfs_dir(data->drm_fd);
 
 	if ((flags & (TEST_SEAMLESS_VRR | TEST_SEAMLESS_DRRS | TEST_CMRR | TEST_LINK_OFF)) &&
-	    output->config.connector->connector_type != DRM_MODE_CONNECTOR_eDP)
+	    output->config.connector->connector_type != DRM_MODE_CONNECTOR_eDP) {
+		igt_info("%s: Connected panel is not eDP.\n", igt_output_name(output));
 		return false;
+	}
 
 	if ((flags & TEST_SEAMLESS_DRRS) &&
 	    !intel_output_has_drrs(data->drm_fd, output)) {
-		igt_info("Selected panel won't support DRRS.\n");
+		igt_info("%s: Won't support DRRS.\n", igt_output_name(output));
 		return false;
 	}
 
@@ -894,7 +896,7 @@ static bool output_constraint(data_t *data, igt_output_t *output, uint32_t flags
 			psr_disable(data->drm_fd, data->debugfs_fd, NULL);
 
 		if (igt_get_i915_edp_lobf_status(data->drm_fd, output->name)) {
-			igt_info("LOBF not supported. \n");
+			igt_info("%s: LOBF not supported.\n", igt_output_name(output));
 			return false;
 		}
 	}
@@ -911,8 +913,11 @@ static bool output_constraint(data_t *data, igt_output_t *output, uint32_t flags
 	 *   - Limit the vrr_max range with the override mode vrefresh.
 	 */
 	data->switch_modes[HIGH_RR_MODE] = output_mode_with_maxrate(output, data->range.max);
-	if (data->switch_modes[HIGH_RR_MODE].vrefresh < data->range.min)
+	if (data->switch_modes[HIGH_RR_MODE].vrefresh < data->range.min) {
+		igt_info("%s: Can't find a valid mode with refresh rate (%d) greater than Vmin (%d).\n",
+			 igt_output_name(output), data->switch_modes[HIGH_RR_MODE].vrefresh, data->range.min);
 		return false;
+	}
 
 	data->range.max = data->switch_modes[HIGH_RR_MODE].vrefresh;
 	igt_output_override_mode(output, &data->switch_modes[HIGH_RR_MODE]);
@@ -922,8 +927,10 @@ static bool output_constraint(data_t *data, igt_output_t *output, uint32_t flags
 		return true;
 
 	data->switch_modes[LOW_RR_MODE] = low_rr_mode_with_same_res(output, data->range.min);
-	if (data->switch_modes[LOW_RR_MODE].vrefresh == data->switch_modes[HIGH_RR_MODE].vrefresh)
+	if (data->switch_modes[LOW_RR_MODE].vrefresh == data->switch_modes[HIGH_RR_MODE].vrefresh) {
+		igt_info("%s: Not found a valid low refresh rate mode.\n", igt_output_name(output));
 		return false;
+	}
 
 	data->range.min = data->switch_modes[LOW_RR_MODE].vrefresh;
 
@@ -933,18 +940,24 @@ static bool output_constraint(data_t *data, igt_output_t *output, uint32_t flags
 
 static bool config_constraint(data_t *data, igt_output_t *output, uint32_t flags)
 {
-	if (!has_vrr(output))
+	if (!has_vrr(output)) {
+		igt_info("Driver doesn't support VRR.\n");
 		return false;
+	}
 
 	if (flags & TEST_SEAMLESS_DRRS)
 		goto out;
 
 	/* For Negative tests, panel should be non-vrr. */
-	if ((flags & TEST_NEGATIVE) && vrr_capable(output))
+	if ((flags & TEST_NEGATIVE) && vrr_capable(output)) {
+		igt_info("%s: Can't run negative tests on VRR panel.\n", igt_output_name(output));
 		return false;
+	}
 
-	if ((flags & ~TEST_NEGATIVE) && !vrr_capable(output))
+	if ((flags & ~TEST_NEGATIVE) && !vrr_capable(output)) {
+		igt_info("%s: Can't run VRR tests on non-VRR panel.\n", igt_output_name(output));
 		return false;
+	}
 
 out:
 	if (!output_constraint(data, output, flags))
-- 
2.43.2


  parent reply	other threads:[~2024-08-13  5:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-13  5:38 [i-g-t 0/4] Add more logs to skips (KMS) Bhanuprakash Modem
2024-08-13  5:38 ` [i-g-t 1/4] tests/kms_color: Add more logs to skips Bhanuprakash Modem
2024-08-21  5:23   ` Samala, Pranay
2024-08-13  5:38 ` [i-g-t 2/4] tests/kms_dither: " Bhanuprakash Modem
2024-08-21  5:24   ` Samala, Pranay
2024-08-13  5:38 ` [i-g-t 3/4] tests/kms_vblank: " Bhanuprakash Modem
2024-08-21  5:50   ` Samala, Pranay
2024-08-13  5:38 ` Bhanuprakash Modem [this message]
2024-08-21  5:56   ` [i-g-t 4/4] tests/kms_vrr: " Samala, Pranay
2024-08-26  6:08     ` Samala, Pranay
2024-08-13  7:04 ` ✓ CI.xeBAT: success for Add more logs to skips (KMS) Patchwork
2024-08-13  7:21 ` ✓ Fi.CI.BAT: " Patchwork
2024-08-13  8:58 ` ✗ CI.xeFULL: failure " Patchwork
2024-08-13 14:12 ` ✗ Fi.CI.IGT: " Patchwork
2024-08-21  7:14 ` ✓ CI.xeBAT: success for Add more logs to skips (KMS) (rev2) Patchwork
2024-08-21  7:35 ` ✓ Fi.CI.BAT: " Patchwork
2024-08-21  8:43 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-08-21  9:54 ` ✗ CI.xeFULL: " 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=20240813053845.2567954-5-bhanuprakash.modem@intel.com \
    --to=bhanuprakash.modem@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