Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Khaled Almahallawy <khaled.almahallawy@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Khaled Almahallawy <khaled.almahallawy@intel.com>,
	Swati Sharma <swati2.sharma@intel.com>,
	Mark Yacoub <markyacoub@chromium.org>,
	Shawn Lee <shawn.c.lee@intel.com>,
	Kamil Konieczny <kamil.konieczny@linux.intel.com>,
	Manasi Navare <navaremanasi@chromium.org>
Subject: [PATCH i-g-t v2] tests/kms_sysfs_edid_timing: Skip the first detect
Date: Wed, 22 May 2024 17:04:09 -0700	[thread overview]
Message-ID: <20240523000409.284668-1-khaled.almahallawy@intel.com> (raw)

It is observed in some chrome devices that the first detect take a
long time due to PPS. In another device it was found the eDP panel
misbehaving and keep sending multiple long HPD during PPS which
trigger HPD storm warning. This first detect will always exceeds the
THRESHOLD_PER_CONNECTOR and will cause the test to fail.

Avoid that by skipping the measurement for the first detect.
Also adding more debug logs in the test and kernel to be able to
correlate the results.

v2: Add comment summarize why skip first detect (Manasi)
    Fix commit message and check code formatting (Kamil)

Cc: Swati Sharma <swati2.sharma@intel.com>
Cc: Mark Yacoub <markyacoub@chromium.org>
Cc: Shawn Lee <shawn.c.lee@intel.com>
Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Reviewed-by: Manasi Navare <navaremanasi@chromium.org>
Signed-off-by: Khaled Almahallawy <khaled.almahallawy@intel.com>
---
 tests/kms_sysfs_edid_timing.c | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/tests/kms_sysfs_edid_timing.c b/tests/kms_sysfs_edid_timing.c
index dbc66c876..763d36d32 100644
--- a/tests/kms_sysfs_edid_timing.c
+++ b/tests/kms_sysfs_edid_timing.c
@@ -50,7 +50,7 @@
 #define THRESHOLD_PER_CONNECTOR		150
 #define THRESHOLD_PER_CONNECTOR_MEAN	140
 #define THRESHOLD_ALL_CONNECTORS_MEAN	100
-#define CHECK_TIMES			15
+#define CHECK_TIMES			16
 
 IGT_TEST_DESCRIPTION("This test checks the time it takes to reprobe each "
 		     "connector and fails if either the time it takes for "
@@ -89,15 +89,28 @@ igt_simple_main
 		for (i = 0; i < CHECK_TIMES; i++) {
 			struct timespec ts = {};
 			int fd;
+			uint64_t current;
 
 			if ((fd = open(path, O_WRONLY)) < 0)
 				continue;
 
+			igt_kmsg(KMSG_DEBUG "%s: start detect\n", path);
 			igt_nsec_elapsed(&ts);
 			igt_ignore_warn(write(fd, "detect\n", 7));
-			igt_mean_add(&mean, igt_nsec_elapsed(&ts));
-
+			current = igt_nsec_elapsed(&ts);
+			igt_kmsg(KMSG_DEBUG "%s: end detect\n", path);
 			close(fd);
+
+			/*
+			 * Skip first detect to account for slower PPS or
+			 * misbehaving panel that has non-standard HPDs behavior
+			 */
+			if (i == 0)
+				continue;
+
+			igt_mean_add(&mean, current);
+			igt_debug("%s: i=%d current=%02fdms mean.max=%02fms mean.min=%02fms\n",
+				de->d_name, i, current/1e6,  mean.max/1e6, mean.min/1e6);
 		}
 
 		igt_debug("%s: mean.max %.2fns, %.2fus, %.2fms, "
-- 
2.34.1


             reply	other threads:[~2024-05-23  0:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-23  0:04 Khaled Almahallawy [this message]
2024-05-23  0:32 ` ✓ CI.xeBAT: success for tests/kms_sysfs_edid_timing: Skip the first detect (rev2) Patchwork
2024-05-23  0:45 ` ✓ Fi.CI.BAT: " Patchwork
2024-05-23  3:14 ` ✗ CI.xeFULL: failure " Patchwork
2024-05-24 16:27   ` Kamil Konieczny
2024-05-23 17:34 ` ✗ Fi.CI.IGT: " Patchwork
2024-05-24  7:01   ` Almahallawy, Khaled
2024-05-24 16:29   ` Kamil Konieczny

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=20240523000409.284668-1-khaled.almahallawy@intel.com \
    --to=khaled.almahallawy@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=kamil.konieczny@linux.intel.com \
    --cc=markyacoub@chromium.org \
    --cc=navaremanasi@chromium.org \
    --cc=shawn.c.lee@intel.com \
    --cc=swati2.sharma@intel.com \
    /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