summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorImre Deak <imre.deak@intel.com>2023-03-17 10:01:09 +0200
committerImre Deak <imre.deak@intel.com>2023-03-17 10:14:43 +0200
commit47df7193f44eb0b2496f569e781d51dc5225f04e (patch)
tree90f4a3d4be40cdf649b3e3f0f87016db82c67b09
parent36a0eac3f4abc48beca0ee884db62936930ada68 (diff)
Revert "lib/igt_kms: handle spurious HPDs - IGT part" v2
This reverts commits b4ec7dac375e ("lib/igt_kms: handle spurious HPDs - IGT part") 28e88a6cc282 ("lib/igt_debugfs: set provision to ignore long HPDs") which were applied incorrectly instead of v3 of the patchset. Signed-off-by: Imre Deak <imre.deak@intel.com>
-rw-r--r--lib/igt_debugfs.c22
-rw-r--r--lib/igt_debugfs.h1
-rw-r--r--lib/igt_kms.c53
3 files changed, 2 insertions, 74 deletions
diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index 8d2d3144d..6de178d62 100644
--- a/lib/igt_debugfs.c
+++ b/lib/igt_debugfs.c
@@ -411,28 +411,6 @@ 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 fe23a5ef8..a883e2d4a 100644
--- a/lib/igt_debugfs.h
+++ b/lib/igt_debugfs.h
@@ -72,7 +72,6 @@ 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
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index aadb41773..d88863a90 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -2392,51 +2392,6 @@ static bool igt_pipe_has_valid_output(igt_display_t *display, enum pipe pipe)
}
/**
- * igt_handle_spurious_hpd:
- * @display: a pointer to igt_display_t structure
- *
- * Handle environment variable "IGT_KMS_IGNORE_HPD" to manage the spurious
- * HPD cases in CI systems where such spurious HPDs are generated by the
- * panels without any specific reasons and cause CI execution failures.
- *
- * This will set the i915_ignore_long_hpd debugfs entry to 1 as a cue for
- * the driver to start ignoring the HPDs.
- *
- * Also, this will set the active connectors' force status to "on"
- * so that dp/hdmi_detect routines don't get called frequently.
- *
- * Force status is kept on after this until it is manually reset.
- */
-static void igt_handle_spurious_hpd(igt_display_t *display)
-{
- igt_output_t *output;
-
- /* Proceed with spurious HPD handling only if the env var is set */
- if (!getenv("IGT_KMS_IGNORE_HPD"))
- return;
-
- /* Set the ignore HPD for the driver */
- igt_ignore_long_hpd(display->drm_fd, true);
-
- for_each_connected_output(display, output) {
- drmModeConnector *conn = output->config.connector;
-
- if (!force_connector(display->drm_fd, conn, "on")) {
- igt_info("Unable to force state on %s-%d\n",
- kmstest_connector_type_str(conn->connector_type),
- conn->connector_type_id);
- continue;
- }
-
- igt_info("Force connector ON for %s-%d\n",
- kmstest_connector_type_str(conn->connector_type),
- conn->connector_type_id);
- }
-
- dump_forced_connectors();
-}
-
-/**
* igt_display_require:
* @display: a pointer to an initialized #igt_display_t structure
*
@@ -2762,15 +2717,11 @@ void igt_display_require(igt_display_t *display, int drm_fd)
out:
LOG_UNINDENT(display);
- if (display->n_pipes && display->n_outputs) {
+ if (display->n_pipes && display->n_outputs)
igt_enable_connectors(drm_fd);
-
- igt_handle_spurious_hpd(display);
- }
- else {
+ else
igt_skip("No KMS driver or no outputs, pipes: %d, outputs: %d\n",
display->n_pipes, display->n_outputs);
- }
}
/**