* [PATCH] tests/unigraf: Mitigate EDID cache races and zero-mode fallback panics @ 2026-08-13 18:42 Mark Yacoub 2026-08-13 22:06 ` ✓ Xe.CI.BAT: success for " Patchwork 2026-08-13 22:34 ` ✓ i915.CI.BAT: " Patchwork 0 siblings, 2 replies; 3+ messages in thread From: Mark Yacoub @ 2026-08-13 18:42 UTC (permalink / raw) To: igt-dev; +Cc: louis.chauvet, Mark Yacoub When initializing the active output geometry directly following an external unigraf_hpd_pulse(), the legacy execution queried the DRM software cache for the current mode. Because the kernel utilizes an asynchronous background interrupt thread to negotiate DP AUX EDID transactions, dynamically querying the software cache right as the kernel is processing the HPD pulse frequently yields 0 structural modes. Furthermore, since igt_output_get_mode() does not return a clean NULL pointer when count_modes == 0—but instead returns a pointer to an uninitialized geometry plane—dynamically assigning this blank pipe downstream fatally crashes the test execution suite when it attempts to allocate a 0x0 coordinate block. This patch stabilizes the execution vectors fundamentally: 1. It replaces igt_output_get_mode() with an active, polling drmModeGetConnector() evaluation loop configured to block until conn->count_modes > 0. This enforces strict timing synchronicity between the unigraf HPD pulse and the kernel DP AUX handler. 2. It hoists the mode fetching logic strictly before establishing and binding the software pipe to the CRTC, guaranteeing that the baseline hardware preferred mode is secured before any DRM surfaces are allocated. Signed-off-by: Mark Yacoub <markyacoub@google.com> --- tests/unigraf/unigraf_lt.c | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/tests/unigraf/unigraf_lt.c b/tests/unigraf/unigraf_lt.c index 81e6ecd3f..0cac014e8 100644 --- a/tests/unigraf/unigraf_lt.c +++ b/tests/unigraf/unigraf_lt.c @@ -38,19 +38,45 @@ static void init_output_and_display_pattern(igt_display_t *display, igt_output_t igt_crtc_t *crtc; struct igt_fb fb; igt_plane_t *primary; - drmModeModeInfo *mode; + drmModeModeInfo *mode = NULL; int fb_id; + int retries = 10; igt_modeset_disable_all_outputs(display); igt_display_reset(display); + /* Get the current mode */ + + while (retries--) { + /* Force an active hardware probe instead of a cached one */ + drmModeConnector *conn = drmModeGetConnector(display->drm_fd, output->id); + + if (conn && conn->count_modes > 0) { + /* Found dynamically probed modes! Update the output config */ + drmModeFreeConnector(output->config.connector); + output->config.connector = conn; + + /* DO NOT call igt_output_refresh here! It would free our probed + * connector and replace it with drmModeGetConnectorCurrent. */ + mode = &conn->modes[0]; + if (mode && mode->hdisplay > 0) + break; + } else if (conn) { + drmModeFreeConnector(conn); + } + + igt_info("Waiting for connector modes to repopulate after HPD pulse... (%d)\n", + retries); + sleep(1); + } + + igt_assert(mode); + igt_output_set_crtc(output, 0); crtc = igt_get_crtc_for_output(display, output); igt_output_set_crtc(output, crtc); - /* Get the current mode */ - mode = igt_output_get_mode(output); - igt_assert(mode); + igt_info("Final Mode: %dx%d\n", mode->hdisplay, mode->vdisplay); /* Create a framebuffer with a solid color pattern */ fb_id = igt_create_color_pattern_fb(display->drm_fd, mode->hdisplay, -- 2.55.0.691.gc56d675ccc-goog ^ permalink raw reply related [flat|nested] 3+ messages in thread
* ✓ Xe.CI.BAT: success for tests/unigraf: Mitigate EDID cache races and zero-mode fallback panics 2026-08-13 18:42 [PATCH] tests/unigraf: Mitigate EDID cache races and zero-mode fallback panics Mark Yacoub @ 2026-08-13 22:06 ` Patchwork 2026-08-13 22:34 ` ✓ i915.CI.BAT: " Patchwork 1 sibling, 0 replies; 3+ messages in thread From: Patchwork @ 2026-08-13 22:06 UTC (permalink / raw) To: Mark Yacoub; +Cc: igt-dev [-- Attachment #1: Type: text/plain, Size: 5443 bytes --] == Series Details == Series: tests/unigraf: Mitigate EDID cache races and zero-mode fallback panics URL : https://patchwork.freedesktop.org/series/172174/ State : success == Summary == CI Bug Log - changes from XEIGT_9055_BAT -> XEIGTPW_15681_BAT ==================================================== Summary ------- **SUCCESS** No regressions found. Participating hosts (12 -> 13) ------------------------------ Additional (1): bat-bmg-2 Known issues ------------ Here are the changes found in XEIGTPW_15681_BAT that come from known issues: ### IGT changes ### #### Issues hit #### * igt@core_hotunplug@unbind-rebind: - bat-nvls-1: [PASS][1] -> [DMESG-WARN][2] ([Intel XE#8762]) [1]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_9055/bat-nvls-1/igt@core_hotunplug@unbind-rebind.html [2]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15681/bat-nvls-1/igt@core_hotunplug@unbind-rebind.html * igt@fbdev@write: - bat-bmg-2: NOTRUN -> [SKIP][3] ([Intel XE#2134]) +4 other tests skip [3]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15681/bat-bmg-2/igt@fbdev@write.html * igt@kms_addfb_basic@addfb25-y-tiled-small-legacy: - bat-bmg-2: NOTRUN -> [SKIP][4] ([Intel XE#2233]) [4]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15681/bat-bmg-2/igt@kms_addfb_basic@addfb25-y-tiled-small-legacy.html * igt@kms_cursor_legacy@basic-flip-after-cursor-legacy: - bat-bmg-2: NOTRUN -> [SKIP][5] ([Intel XE#2489] / [Intel XE#3419]) +13 other tests skip [5]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15681/bat-bmg-2/igt@kms_cursor_legacy@basic-flip-after-cursor-legacy.html * igt@kms_flip@basic-flip-vs-modeset: - bat-bmg-2: NOTRUN -> [SKIP][6] ([Intel XE#2482]) +3 other tests skip [6]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15681/bat-bmg-2/igt@kms_flip@basic-flip-vs-modeset.html * igt@kms_frontbuffer_tracking@basic: - bat-bmg-2: NOTRUN -> [SKIP][7] ([Intel XE#2434] / [Intel XE#2548] / [Intel XE#6314]) [7]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15681/bat-bmg-2/igt@kms_frontbuffer_tracking@basic.html * igt@kms_psr@psr-sprite-plane-onoff: - bat-bmg-2: NOTRUN -> [SKIP][8] ([Intel XE#2234] / [Intel XE#2850]) +2 other tests skip [8]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15681/bat-bmg-2/igt@kms_psr@psr-sprite-plane-onoff.html * igt@xe_exec_multi_queue@priority: - bat-bmg-2: NOTRUN -> [SKIP][9] ([Intel XE#8364]) +13 other tests skip [9]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15681/bat-bmg-2/igt@xe_exec_multi_queue@priority.html * igt@xe_live_ktest@xe_bo@xe_ccs_migrate_kunit: - bat-bmg-2: NOTRUN -> [SKIP][10] ([Intel XE#2229]) [10]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15681/bat-bmg-2/igt@xe_live_ktest@xe_bo@xe_ccs_migrate_kunit.html * igt@xe_pat@pat-index-xehpc: - bat-bmg-2: NOTRUN -> [SKIP][11] ([Intel XE#1420] / [Intel XE#7590]) [11]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15681/bat-bmg-2/igt@xe_pat@pat-index-xehpc.html * igt@xe_pat@pat-index-xelp: - bat-bmg-2: NOTRUN -> [SKIP][12] ([Intel XE#2245] / [Intel XE#7590]) [12]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15681/bat-bmg-2/igt@xe_pat@pat-index-xelp.html * igt@xe_pat@pat-index-xelpg: - bat-bmg-2: NOTRUN -> [SKIP][13] ([Intel XE#2236] / [Intel XE#7590]) [13]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15681/bat-bmg-2/igt@xe_pat@pat-index-xelpg.html [Intel XE#1420]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1420 [Intel XE#2134]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2134 [Intel XE#2229]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2229 [Intel XE#2233]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2233 [Intel XE#2234]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2234 [Intel XE#2236]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2236 [Intel XE#2245]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2245 [Intel XE#2434]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2434 [Intel XE#2482]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2482 [Intel XE#2489]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2489 [Intel XE#2548]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2548 [Intel XE#2850]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2850 [Intel XE#3419]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3419 [Intel XE#6314]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6314 [Intel XE#7590]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7590 [Intel XE#8364]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/8364 [Intel XE#8762]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/8762 Build changes ------------- * IGT: IGT_9055 -> IGTPW_15681 * Linux: xe-5593-12a74df2314c42325731297e95b9aafd9329a20d -> xe-5594-1f159dc3afe658eaaea3c77d3018705de6b1a31e IGTPW_15681: 15681 IGT_9055: 8484e14a094150b500aeeb9bfb0db2ee0de862ea @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git xe-5593-12a74df2314c42325731297e95b9aafd9329a20d: 12a74df2314c42325731297e95b9aafd9329a20d xe-5594-1f159dc3afe658eaaea3c77d3018705de6b1a31e: 1f159dc3afe658eaaea3c77d3018705de6b1a31e == Logs == For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15681/index.html [-- Attachment #2: Type: text/html, Size: 6387 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
* ✓ i915.CI.BAT: success for tests/unigraf: Mitigate EDID cache races and zero-mode fallback panics 2026-08-13 18:42 [PATCH] tests/unigraf: Mitigate EDID cache races and zero-mode fallback panics Mark Yacoub 2026-08-13 22:06 ` ✓ Xe.CI.BAT: success for " Patchwork @ 2026-08-13 22:34 ` Patchwork 1 sibling, 0 replies; 3+ messages in thread From: Patchwork @ 2026-08-13 22:34 UTC (permalink / raw) To: Mark Yacoub; +Cc: igt-dev [-- Attachment #1: Type: text/plain, Size: 2058 bytes --] == Series Details == Series: tests/unigraf: Mitigate EDID cache races and zero-mode fallback panics URL : https://patchwork.freedesktop.org/series/172174/ State : success == Summary == CI Bug Log - changes from IGT_9055 -> IGTPW_15681 ==================================================== Summary ------- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15681/index.html Participating hosts (37 -> 35) ------------------------------ Missing (2): bat-dg2-13 fi-snb-2520m Known issues ------------ Here are the changes found in IGTPW_15681 that come from known issues: ### IGT changes ### #### Possible fixes #### * igt@i915_selftest@live: - fi-tgl-1115g4: [DMESG-FAIL][1] ([i915#14808]) -> [PASS][2] +1 other test pass [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_9055/fi-tgl-1115g4/igt@i915_selftest@live.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15681/fi-tgl-1115g4/igt@i915_selftest@live.html * igt@kms_pm_rpm@basic-rte: - bat-rpls-4: [DMESG-WARN][3] ([i915#13400]) -> [PASS][4] [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_9055/bat-rpls-4/igt@kms_pm_rpm@basic-rte.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15681/bat-rpls-4/igt@kms_pm_rpm@basic-rte.html [i915#13400]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13400 [i915#14808]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/14808 Build changes ------------- * CI: CI-20190529 -> None * IGT: IGT_9055 -> IGTPW_15681 * Linux: CI_DRM_18994 -> CI_DRM_18995 CI-20190529: 20190529 CI_DRM_18994: 12a74df2314c42325731297e95b9aafd9329a20d @ git://anongit.freedesktop.org/gfx-ci/linux CI_DRM_18995: 1f159dc3afe658eaaea3c77d3018705de6b1a31e @ git://anongit.freedesktop.org/gfx-ci/linux IGTPW_15681: 15681 IGT_9055: 8484e14a094150b500aeeb9bfb0db2ee0de862ea @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15681/index.html [-- Attachment #2: Type: text/html, Size: 2695 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-13 22:35 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-08-13 18:42 [PATCH] tests/unigraf: Mitigate EDID cache races and zero-mode fallback panics Mark Yacoub 2026-08-13 22:06 ` ✓ Xe.CI.BAT: success for " Patchwork 2026-08-13 22:34 ` ✓ i915.CI.BAT: " Patchwork
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox