From: Sowmiya S <sowmiya.s@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: swati2.sharma@intel.com, kunal1.joshi@intel.com,
Sowmiya S <sowmiya.s@intel.com>
Subject: [PATCH i-g-t v1] tests/intel/kms_pipe_stress: retry connectors with no modes and skip unusable pipes
Date: Fri, 8 May 2026 11:01:51 +0530 [thread overview]
Message-ID: <20260508053151.3141169-1-sowmiya.s@intel.com> (raw)
Retry connectors with no probed modes up to 3 times (100ms intervals).
Skip connectors/pipes that remain unusable and clear connector entries.
Log skips using connector names (e.g. DP-5) to aid debugging.
Keep downstream state consistent so framebuffers/threads skip invalid pipes.
Signed-off-by: Sowmiya S <sowmiya.s@intel.com>
---
tests/intel/kms_pipe_stress.c | 67 ++++++++++++++++++++++++++++++-----
1 file changed, 58 insertions(+), 9 deletions(-)
diff --git a/tests/intel/kms_pipe_stress.c b/tests/intel/kms_pipe_stress.c
index 36e3842c6..1dc65b73c 100644
--- a/tests/intel/kms_pipe_stress.c
+++ b/tests/intel/kms_pipe_stress.c
@@ -15,6 +15,7 @@
#include <string.h>
#include <time.h>
#include <poll.h>
+#include <unistd.h>
#include <pthread.h>
#include <semaphore.h>
#include "i915/gem.h"
@@ -603,6 +604,7 @@ static void stress_pipes(struct data *data, struct timespec *start,
#define MIN_DURATION_SEC 5.0
#define MIN_ITERATIONS (igt_run_in_simulation() ? 5 : 20)
+#define MST_MODE_RETRY_COUNT 3
static void stress(struct data *data)
{
@@ -763,6 +765,7 @@ static void prepare_test(struct data *data)
int i, j;
int num_connectors;
int num_cpus = (int) sysconf(_SC_NPROCESSORS_ONLN);
+ bool any_pipe = false;
data->number_of_cores = min(num_cpus, MAX_CORES);
@@ -792,26 +795,62 @@ static void prepare_test(struct data *data)
for (i = 0; i < IGT_MAX_PIPES; i++) {
drmModeConnector *connector = (drmModeConnector *)data->connectors[i];
igt_crtc_t *crtc;
+ int retry;
if (!connector)
continue;
+ /*
+ * MST connectors may appear connected before modes are
+ * populated (HPD/topology settling). Retry a few times
+ * before giving up on this pipe.
+ */
+ if (!connector->count_modes) {
+ uint32_t conn_id = connector->connector_id;
+
+ for (retry = 0; retry < MST_MODE_RETRY_COUNT; retry++) {
+ igt_info("Connector %s-%d has no modes yet "
+ "(attempt %d/%d), retrying...\n",
+ kmstest_connector_type_str(connector->connector_type),
+ connector->connector_type_id,
+ retry + 1, MST_MODE_RETRY_COUNT);
+ usleep(100 * 1000); /* 100 ms */
+ drmModeFreeConnector(connector);
+ connector = drmModeGetConnector(data->drm_fd, conn_id);
+ if (!connector)
+ break;
+ data->connectors[i] = connector;
+ if (connector->count_modes)
+ break;
+ }
+ }
+
+ if (!connector || connector->connection != DRM_MODE_CONNECTED ||
+ !connector->count_modes) {
+ if (connector)
+ igt_info("Skipping connector %s-%d: not ready or no usable modes\n",
+ kmstest_connector_type_str(connector->connector_type),
+ connector->connector_type_id);
+ data->connectors[i] = NULL;
+ continue;
+ }
+
+ data->highest_mode[i] = find_highest_mode(connector);
if (!data->highest_mode[i]) {
- if (connector->count_modes)
- data->highest_mode[i] = find_highest_mode(connector);
+ igt_info("Connector %s-%d: find_highest_mode returned NULL, skipping\n",
+ kmstest_connector_type_str(connector->connector_type),
+ connector->connector_type_id);
+ data->connectors[i] = NULL;
+ continue;
}
- igt_assert(data->highest_mode[i]);
crtc = igt_crtc_for_pipe(display, i);
if (!crtc)
continue;
- if (data->highest_mode[i]) {
- igt_info("Using mode: \n");
- kmstest_dump_mode(data->highest_mode[i]);
- data->pipe_crc[i] = igt_crtc_crc_new(crtc, IGT_PIPE_CRC_SOURCE_AUTO);
- } else
- data->pipe_crc[i] = NULL;
+ igt_info("Using mode:\n");
+ kmstest_dump_mode(data->highest_mode[i]);
+ data->pipe_crc[i] = igt_crtc_crc_new(crtc, IGT_PIPE_CRC_SOURCE_AUTO);
if (data->num_planes[i] == -1)
data->num_planes[i] = crtc->n_planes;
@@ -820,6 +859,16 @@ static void prepare_test(struct data *data)
data->num_planes[i], i);
}
+ for (i = 0; i < IGT_MAX_PIPES; i++) {
+ if (data->highest_mode[i]) {
+ any_pipe = true;
+ break;
+ }
+ igt_require_f(any_pipe,
+ "No pipes with usable display modes found "
+ "(MST topology may still be settling)\n");
+ }
+
create_framebuffers(data);
if (intel_gen(intel_get_drm_devid(data->drm_fd)) > 9)
--
2.43.0
next reply other threads:[~2026-05-08 5:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-08 5:31 Sowmiya S [this message]
2026-05-08 6:09 ` ✓ i915.CI.BAT: success for tests/intel/kms_pipe_stress: retry connectors with no modes and skip unusable pipes Patchwork
2026-05-08 6:14 ` ✓ Xe.CI.BAT: " Patchwork
2026-05-08 17:55 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-05-09 2:10 ` ✗ i915.CI.Full: " 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=20260508053151.3141169-1-sowmiya.s@intel.com \
--to=sowmiya.s@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kunal1.joshi@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