From: Vinod Govindapillai <vinod.govindapillai@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t v2 1/2] lib/igt_debugfs: set provision to ignore long HPDs
Date: Tue, 14 Feb 2023 11:57:23 +0200 [thread overview]
Message-ID: <20230214095724.77881-2-vinod.govindapillai@intel.com> (raw)
In-Reply-To: <20230214095724.77881-1-vinod.govindapillai@intel.com>
Add provision to ignore long HPDs as some displays generate
long HPDs even while connected. For some CI systems with
such displays it might be usefull to ignore such spurious
HPDs while executing testcases.
Cc: Imre Deak <imre.deak@intel.com>
Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
---
lib/igt_debugfs.c | 22 ++++++++++++++++++++++
lib/igt_debugfs.h | 1 +
2 files changed, 23 insertions(+)
diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index 6de178d6..8d2d3144 100644
--- a/lib/igt_debugfs.c
+++ b/lib/igt_debugfs.c
@@ -411,6 +411,28 @@ bool igt_debugfs_search(int device, const char *filename, const char *substring)
return matched;
}
+/**
+ * igt_ignore_long_hpd:
+ *
+ * Set / unset ignore long HPD events from the panels. Some panels
+ * generate long HPDs even while connected to the ports causing
+ * unexpected CI execution issues. Set this to ignore such unexpected
+ * long HPDs where we dont expect to disconnect the displays.
+ */
+void igt_ignore_long_hpd(int drm_fd, bool enable)
+{
+ int fd = igt_debugfs_open(drm_fd, "i915_ignore_long_hpd", O_WRONLY);
+
+ if (fd < 0) {
+ igt_debug("couldn't open ignore long hpd file\n");
+ return;
+ }
+
+ igt_assert_eq(write(fd, enable ? "1" : "0", 1), 1);
+
+ close(fd);
+}
+
static void igt_hpd_storm_exit_handler(int sig)
{
int fd = drm_open_driver(DRIVER_INTEL);
diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h
index a883e2d4..fe23a5ef 100644
--- a/lib/igt_debugfs.h
+++ b/lib/igt_debugfs.h
@@ -72,6 +72,7 @@ void igt_hpd_storm_set_threshold(int fd, unsigned int threshold);
void igt_hpd_storm_reset(int fd);
bool igt_hpd_storm_detected(int fd);
void igt_require_hpd_storm_ctl(int fd);
+void igt_ignore_long_hpd(int fd, bool enable);
/*
* Drop caches
--
2.34.1
next prev parent reply other threads:[~2023-02-14 9:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-14 9:57 [igt-dev] [PATCH i-g-t v2 0/2] Handle spurious HPDs - IGT part Vinod Govindapillai
2023-02-14 9:57 ` Vinod Govindapillai [this message]
2023-03-08 18:36 ` [igt-dev] [PATCH i-g-t v2 1/2] lib/igt_debugfs: set provision to ignore long HPDs Kamil Konieczny
2023-03-09 8:54 ` Govindapillai, Vinod
2023-02-14 9:57 ` [igt-dev] [PATCH i-g-t v2 2/2] lib/igt_kms: handle spurious HPDs - IGT part Vinod Govindapillai
2023-03-08 18:31 ` Kamil Konieczny
2023-02-14 10:46 ` [igt-dev] ✓ Fi.CI.BAT: success for Handle spurious HPDs - IGT part (rev2) Patchwork
2023-02-14 14:42 ` [igt-dev] ✓ Fi.CI.IGT: " 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=20230214095724.77881-2-vinod.govindapillai@intel.com \
--to=vinod.govindapillai@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