* [PATCH] drm/i915/display: Fail intel_ddi_init if encoder init fails @ 2026-01-28 20:56 Jonathan Cavitt 2026-01-28 21:49 ` ✗ i915.CI.BAT: failure for " Patchwork 0 siblings, 1 reply; 2+ messages in thread From: Jonathan Cavitt @ 2026-01-28 20:56 UTC (permalink / raw) To: intel-gfx; +Cc: saurabhg.gupta, alex.zuo, jonathan.cavitt Static analysis issue: drm_encoder_init is capable of returning an error code in some cases, such as when drm_mode_object_add fails, or if dev->mode_config.num_encoder >= 32. In these cases, encoder->dev is not properly initialized, which may lead to issues when it is dereferenced in, for example, intel_ddi_init_dp_connector, which calls intel_dp_init_connector. Much like the other error cases in this function, just return if an error code is reported from drm_encoder_init. Note that goto err in this case would only exacerbate the issue, as drm_encoder_cleanup also relies on encoder->dev being present. So, just kfree the dig_port before returning, as that's the only necessary part of the error path to call here. Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com> --- drivers/gpu/drm/i915/display/intel_ddi.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c index d8739e2bb004..7fc5f726e9a8 100644 --- a/drivers/gpu/drm/i915/display/intel_ddi.c +++ b/drivers/gpu/drm/i915/display/intel_ddi.c @@ -5264,9 +5264,12 @@ void intel_ddi_init(struct intel_display *display, encoder = &dig_port->base; encoder->devdata = devdata; - drm_encoder_init(display->drm, &encoder->base, &intel_ddi_funcs, - DRM_MODE_ENCODER_TMDS, "%s", - intel_ddi_encoder_name(display, port, phy, &encoder_name)); + if (drm_encoder_init(display->drm, &encoder->base, &intel_ddi_funcs, + DRM_MODE_ENCODER_TMDS, "%s", + intel_ddi_encoder_name(display, port, phy, &encoder_name))) { + kfree(dig_port); + return; + } intel_encoder_link_check_init(encoder, intel_ddi_link_check); -- 2.43.0 ^ permalink raw reply related [flat|nested] 2+ messages in thread
* ✗ i915.CI.BAT: failure for drm/i915/display: Fail intel_ddi_init if encoder init fails 2026-01-28 20:56 [PATCH] drm/i915/display: Fail intel_ddi_init if encoder init fails Jonathan Cavitt @ 2026-01-28 21:49 ` Patchwork 0 siblings, 0 replies; 2+ messages in thread From: Patchwork @ 2026-01-28 21:49 UTC (permalink / raw) To: Jonathan Cavitt; +Cc: intel-gfx [-- Attachment #1: Type: text/plain, Size: 6795 bytes --] == Series Details == Series: drm/i915/display: Fail intel_ddi_init if encoder init fails URL : https://patchwork.freedesktop.org/series/160792/ State : failure == Summary == CI Bug Log - changes from CI_DRM_17900 -> Patchwork_160792v1 ==================================================== Summary ------- **FAILURE** Serious unknown changes coming with Patchwork_160792v1 absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_160792v1, please notify your bug team (I915-ci-infra@lists.freedesktop.org) 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/Patchwork_160792v1/index.html Participating hosts (42 -> 40) ------------------------------ Additional (1): bat-adls-6 Missing (3): bat-dg2-13 fi-glk-j4005 fi-snb-2520m Possible new issues ------------------- Here are the unknown changes that may have been introduced in Patchwork_160792v1: ### IGT changes ### #### Possible regressions #### * igt@gem_exec_fence@basic-await@bcs0: - bat-mtlp-8: [PASS][1] -> [FAIL][2] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_17900/bat-mtlp-8/igt@gem_exec_fence@basic-await@bcs0.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_160792v1/bat-mtlp-8/igt@gem_exec_fence@basic-await@bcs0.html * igt@i915_pm_rpm@module-reload: - bat-adlp-6: [PASS][3] -> [DMESG-WARN][4] +78 other tests dmesg-warn [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_17900/bat-adlp-6/igt@i915_pm_rpm@module-reload.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_160792v1/bat-adlp-6/igt@i915_pm_rpm@module-reload.html Known issues ------------ Here are the changes found in Patchwork_160792v1 that come from known issues: ### IGT changes ### #### Issues hit #### * igt@gem_exec_fence@basic-await: - bat-mtlp-8: [PASS][5] -> [FAIL][6] ([i915#15263]) [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_17900/bat-mtlp-8/igt@gem_exec_fence@basic-await.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_160792v1/bat-mtlp-8/igt@gem_exec_fence@basic-await.html * igt@gem_lmem_swapping@parallel-random-engines: - bat-adls-6: NOTRUN -> [SKIP][7] ([i915#4613]) +3 other tests skip [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_160792v1/bat-adls-6/igt@gem_lmem_swapping@parallel-random-engines.html * igt@gem_tiled_pread_basic: - bat-adls-6: NOTRUN -> [SKIP][8] ([i915#3282]) [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_160792v1/bat-adls-6/igt@gem_tiled_pread_basic.html * igt@intel_hwmon@hwmon-read: - bat-adls-6: NOTRUN -> [SKIP][9] ([i915#7707]) +1 other test skip [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_160792v1/bat-adls-6/igt@intel_hwmon@hwmon-read.html * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy: - bat-adls-6: NOTRUN -> [SKIP][10] ([i915#4103]) +1 other test skip [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_160792v1/bat-adls-6/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html * igt@kms_dsc@dsc-basic: - bat-adls-6: NOTRUN -> [SKIP][11] ([i915#3555] / [i915#3840]) [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_160792v1/bat-adls-6/igt@kms_dsc@dsc-basic.html * igt@kms_force_connector_basic@force-load-detect: - bat-adls-6: NOTRUN -> [SKIP][12] [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_160792v1/bat-adls-6/igt@kms_force_connector_basic@force-load-detect.html * igt@kms_pm_backlight@basic-brightness: - bat-adls-6: NOTRUN -> [SKIP][13] ([i915#5354]) [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_160792v1/bat-adls-6/igt@kms_pm_backlight@basic-brightness.html * igt@kms_psr@psr-primary-mmap-gtt: - bat-adls-6: NOTRUN -> [SKIP][14] ([i915#1072] / [i915#9732]) +3 other tests skip [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_160792v1/bat-adls-6/igt@kms_psr@psr-primary-mmap-gtt.html * igt@kms_setmode@basic-clone-single-crtc: - bat-adls-6: NOTRUN -> [SKIP][15] ([i915#3555]) [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_160792v1/bat-adls-6/igt@kms_setmode@basic-clone-single-crtc.html * igt@prime_vgem@basic-fence-read: - bat-adls-6: NOTRUN -> [SKIP][16] ([i915#3291]) +2 other tests skip [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_160792v1/bat-adls-6/igt@prime_vgem@basic-fence-read.html #### Possible fixes #### * igt@i915_selftest@live: - bat-mtlp-8: [DMESG-FAIL][17] ([i915#12061]) -> [PASS][18] +1 other test pass [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_17900/bat-mtlp-8/igt@i915_selftest@live.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_160792v1/bat-mtlp-8/igt@i915_selftest@live.html * igt@i915_selftest@live@workarounds: - bat-mtlp-9: [DMESG-FAIL][19] ([i915#12061]) -> [PASS][20] +1 other test pass [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_17900/bat-mtlp-9/igt@i915_selftest@live@workarounds.html [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_160792v1/bat-mtlp-9/igt@i915_selftest@live@workarounds.html [i915#1072]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/1072 [i915#12061]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12061 [i915#15263]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/15263 [i915#3282]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3282 [i915#3291]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3291 [i915#3555]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3555 [i915#3840]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3840 [i915#4103]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4103 [i915#4613]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4613 [i915#5354]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/5354 [i915#7707]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/7707 [i915#9732]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9732 Build changes ------------- * Linux: CI_DRM_17900 -> Patchwork_160792v1 CI-20190529: 20190529 CI_DRM_17900: 8059f097e25f736bb3da09af6a9b283079abfd4f @ git://anongit.freedesktop.org/gfx-ci/linux IGT_8721: 3707bb4267de22a18d61b232c4ab5fbaf61db90c @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git Patchwork_160792v1: 8059f097e25f736bb3da09af6a9b283079abfd4f @ git://anongit.freedesktop.org/gfx-ci/linux == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_160792v1/index.html [-- Attachment #2: Type: text/html, Size: 7948 bytes --] ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-01-28 21:49 UTC | newest] Thread overview: 2+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-01-28 20:56 [PATCH] drm/i915/display: Fail intel_ddi_init if encoder init fails Jonathan Cavitt 2026-01-28 21:49 ` ✗ i915.CI.BAT: failure for " Patchwork
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox