Handle spurious HPDs - IGT part
cover Handle spurious HPDs - IGT part
Some panels generate spurious HPDs during CI execution causing random unexpected failures. Driver can ignore long HPDs during CI using ignore_long_hpd flag flag set/unset through debugfs. By forcing the already connected connectors ON from IGT, we can avoid the detect hooks being executed from drm and hence avoid random failures if the panels are in some unknown state in the middle of CI execution because of spurious HPDs.
Vinod Govindapillai (2):
lib/igt_debugfs: set provision to ignore long HPDs lib/igt_kms: handle spurious HPDs - IGT part
lib/igt_debugfs.c | 22 +++++++++++++++++++ lib/igt_debugfs.h | 1 + lib/igt_kms.c | 54 +++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 75 insertions(+), 2 deletions(-)
Signature · 1 line
2.34.1
PATCH 1/2 lib/igt_debugfs: set provision to ignore long HPDs
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.
--- lib/igt_debugfs.c | 22 ++++++++++++++++++++++ lib/igt_debugfs.h | 1 + 2 files changed, 23 insertions(+)
lib/igt_debugfs.c +22 -0
@@ -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 );
lib/igt_debugfs.h +1 -0
@@ -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
Signature · 1 line
2.34.1
PATCH 2/2 lib/igt_kms: handle spurious HPDs - IGT part
In reply to Vinod GovindapillaiSome panels generate long HPDs during CI execution steps even while connected to the system and cause unexpected CI execution failures. In environments like CI, we don't expect to disconnect the panels in the middle of the CI execution.
There are two parts to handle this case - display driver and IGT
1. In the display driver, based on a flag, long HPDs are ignored. This flag can be set/unset using debugfs on systems where such panels are connected.
2. In IGT, add provision to set ignore long HPD debugfs entry on the driver and also set Force "on" the active connectors. With force on, the connector's detect sequences will not get initiated.
This patch handles the IGT part.
An enviroment variable "IGT_KMS_IGNORE_HPD" is added to differentiate systems which require such spurious HPD handling. If this variable is on, ignore long HPD debugs entry is set and active connectors are set to force "on" state.
--- lib/igt_kms.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-)
lib/igt_kms.c +52 -2
@@ -2390,6 +2390,52 @@ static bool igt_pipe_has_valid_output(igt_display_t *display, enum pipe pipe)return false; } +/* +* Provision to handle spurious HPD issues in CI +* @display: a pointer to igt_display_t structure +* @drm_fd: drm file descriptor +* +* 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_suppress_wakeup_hpd debugfs entry to true for +* the driver so that the driver will start ignoring the long HPDs. +* +* Also, this will set the active connectors' force status to "on" for the +* connectors 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
@@ -2713,11 +2759,15 @@ 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); -else + +igt_handle_spurious_hpd (display); + } +else {igt_skip ("No KMS driver or no outputs, pipes: %d, outputs: %d\n" , display->n_pipes, display->n_outputs); + } }/**
Signature · 1 line
2.34.1
Patchwork
CI[igt-dev] ✗ Fi.CI.BAT: failure for Handle spurious HPDs - IGT part
In reply to Vinod Govindapillai== Series Details ==
== Series Details ==
Series: Handle spurious HPDs - IGT part
URL : https://patchwork.freedesktop.org/series/113820/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_12721 -> IGTPW_8473
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with IGTPW_8473 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in IGTPW_8473, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8473/index.html
Participating hosts (37 -> 35)
------------------------------
Missing (2): fi-kbl-soraka fi-snb-2520m
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_8473:
### IGT changes ###
#### Possible regressions ####
* igt@i915_selftest@live@late_gt_pm:
- fi-glk-j4005: [PASS][1] -> [ABORT][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12721/fi-glk-j4005/igt@i915_selftest@live@late_gt_pm.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8473/fi-glk-j4005/igt@i915_selftest@live@late_gt_pm.html
Known issues
------------
Here are the changes found in IGTPW_8473 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_gttfill@basic:
- fi-pnv-d510: [PASS][3] -> [FAIL][4] ([i915#7229])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12721/fi-pnv-d510/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8473/fi-pnv-d510/igt@[email protected]
* igt@kms_chamelium_hpd@common-hpd-after-suspend:
- fi-cfl-guc: NOTRUN -> [SKIP][5] ([fdo#109271])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8473/fi-cfl-guc/igt@[email protected]
#### Possible fixes ####
* igt@dmabuf@all-tests@dma_fence:
- fi-cfl-guc: [DMESG-FAIL][6] -> [PASS][7]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12721/fi-cfl-guc/igt@dmabuf@all-tests@dma_fence.html
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8473/fi-cfl-guc/igt@dmabuf@all-tests@dma_fence.html
* igt@dmabuf@all-tests@sanitycheck:
- fi-cfl-guc: [ABORT][8] -> [PASS][9]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12721/fi-cfl-guc/igt@dmabuf@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8473/fi-cfl-guc/igt@dmabuf@[email protected]
* igt@fbdev@write:
- fi-blb-e6850: [SKIP][10] ([fdo#109271]) -> [PASS][11] +4 similar issues
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12721/fi-blb-e6850/igt@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8473/fi-blb-e6850/igt@[email protected]
* igt@i915_selftest@live@dmabuf:
- fi-bsw-nick: [DMESG-FAIL][12] ([i915#7562] / [i915#7913]) -> [PASS][13]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12721/fi-bsw-nick/igt@i915_selftest@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8473/fi-bsw-nick/igt@i915_selftest@[email protected]
* igt@i915_selftest@live@gt_heartbeat:
- fi-apl-guc: [DMESG-FAIL][14] ([i915#5334]) -> [PASS][15]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12721/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8473/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
[i915#7229]: https://gitlab.freedesktop.org/drm/intel/issues/7229
[i915#7562]: https://gitlab.freedesktop.org/drm/intel/issues/7562
[i915#7911]: https://gitlab.freedesktop.org/drm/intel/issues/7911
[i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913
[i915#7977]: https://gitlab.freedesktop.org/drm/intel/issues/7977
[i915#7981]: https://gitlab.freedesktop.org/drm/intel/issues/7981
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_7155 -> IGTPW_8473
CI-20190529: 20190529
CI_DRM_12721: e1f9df7a92c1e3da1009afa74dc1d08ef95c3d7c @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_8473: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8473/index.html
IGT_7155: 75c508d4e19c65683d4060cb3a772df600aaf23e @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8473/index.html