From: Sowmiya S <sowmiya.s@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: karthik.b.s@intel.com, swati2.sharma@intel.com,
Sowmiya S <sowmiya.s@intel.com>
Subject: [PATCH i-g-t v1 1/2] tests/kms_properties: Refresh connector when property fetch fails
Date: Mon, 2 Mar 2026 20:00:12 +0530 [thread overview]
Message-ID: <20260302143013.264657-2-sowmiya.s@intel.com> (raw)
In-Reply-To: <20260302143013.264657-1-sowmiya.s@intel.com>
drmModeObjectGetProperties() may fail for connectors
that have just changed state (e.g., hotplug, reprobing)
and whose connector ID is now stale. Add a connector
specific recovery path to test_properties
Signed-off-by: Sowmiya S <sowmiya.s@intel.com>
---
tests/kms_properties.c | 27 +++++++++++++++++++++------
1 file changed, 21 insertions(+), 6 deletions(-)
diff --git a/tests/kms_properties.c b/tests/kms_properties.c
index 86d05c6d4..8ac122850 100644
--- a/tests/kms_properties.c
+++ b/tests/kms_properties.c
@@ -178,14 +178,26 @@ static bool has_additional_test_lookup(uint32_t obj_type, const char *name,
return false;
}
-static void test_properties(int fd, uint32_t type, uint32_t id, bool atomic, bool has_color_pipeline)
+
+static void test_properties(int fd, uint32_t type, uint32_t id, bool atomic,
+ bool has_color_pipeline, igt_output_t *output)
{
drmModeObjectPropertiesPtr props =
drmModeObjectGetProperties(fd, id, type);
int i, j, ret;
drmModeAtomicReqPtr req = NULL;
- igt_assert(props);
+ if (!props && type == DRM_MODE_OBJECT_CONNECTOR && output) {
+ igt_info("Connector properties query failed on id=%u, refreshing output and retrying\n",
+ id);
+ igt_output_refresh(output);
+ id = output->id;
+ props = drmModeObjectGetProperties(fd, id, type);
+ }
+
+ igt_assert_f(props,
+ "Failed to get properties for object id=%u type=%u after retry (output: %s)\n",
+ id, type, output ? output->name : "N/A");
if (atomic)
req = drmModeAtomicAlloc();
@@ -261,7 +273,7 @@ static void run_colorop_property_tests(igt_display_t *display,
colorop->id,
kmstest_plane_type_name(plane->type), output->name);
test_properties(display->drm_fd, DRM_MODE_OBJECT_COLOROP, colorop->id,
- atomic, display->has_plane_color_pipeline);
+ atomic, display->has_plane_color_pipeline, output);
colorop_id = igt_colorop_get_prop(display, colorop,
IGT_COLOROP_NEXT);
@@ -288,7 +300,8 @@ static void run_plane_property_tests(igt_display_t *display, igt_crtc_t *crtc,
igt_crtc_name(crtc), plane->index,
kmstest_plane_type_name(plane->type), output->name);
- test_properties(display->drm_fd, DRM_MODE_OBJECT_PLANE, plane->drm_plane->plane_id, atomic, display->has_plane_color_pipeline);
+ test_properties(display->drm_fd, DRM_MODE_OBJECT_PLANE, plane->drm_plane->plane_id,
+ atomic, display->has_plane_color_pipeline, output);
}
cleanup_pipe(display, crtc, output,
@@ -309,7 +322,8 @@ static void run_crtc_property_tests(igt_display_t *display, igt_crtc_t *crtc,
test_properties(display->drm_fd, DRM_MODE_OBJECT_CRTC,
crtc->crtc_id,
atomic,
- false);
+ false,
+ output);
cleanup_pipe(display, crtc, output,
&fb);
@@ -328,7 +342,8 @@ static void run_connector_property_tests(igt_display_t *display,
igt_info("Testing connector properties on output %s (pipe: %s)\n", output->name,
igt_crtc_name(crtc));
- test_properties(display->drm_fd, DRM_MODE_OBJECT_CONNECTOR, output->id, atomic, false);
+ test_properties(display->drm_fd, DRM_MODE_OBJECT_CONNECTOR, output->id,
+ atomic, false, output);
if (crtc != NULL)
cleanup_pipe(display, crtc,
--
2.43.0
next prev parent reply other threads:[~2026-03-02 14:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-02 14:30 [PATCH i-g-t v1 0/2] Refresh connector when property fetch fails and update proper atomic flag Sowmiya S
2026-03-02 14:30 ` Sowmiya S [this message]
2026-03-02 14:30 ` [PATCH i-g-t v1 2/2] tests/kms_properties: Use per-subtest " Sowmiya S
2026-03-03 21:36 ` ✓ Xe.CI.BAT: success for Refresh connector when property fetch fails and update proper " Patchwork
2026-03-03 21:52 ` ✓ i915.CI.BAT: " Patchwork
2026-03-04 8:10 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-03-04 9:09 ` ✓ i915.CI.Full: success " 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=20260302143013.264657-2-sowmiya.s@intel.com \
--to=sowmiya.s@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=karthik.b.s@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