From: Imre Deak <imre.deak@intel.com>
To: <intel-gfx@lists.freedesktop.org>, <intel-xe@lists.freedesktop.org>
Subject: [PATCH 1/2] drm/i915/ddi: Fix cleanup after DP connector init failure
Date: Thu, 7 May 2026 09:59:39 +0300 [thread overview]
Message-ID: <20260507065940.2046690-1-imre.deak@intel.com> (raw)
Fix the error path during DDI encoder/connector initialization by
calling the missing TC port cleanup function.
This fixes the leaked TC port state.
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
drivers/gpu/drm/i915/display/intel_ddi.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
index 2681940a5cfe3..e37cc32ee83ed 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -5411,7 +5411,7 @@ void intel_ddi_init(struct intel_display *display,
if (need_aux_ch(encoder, init_dp)) {
dig_port->aux_ch = intel_dp_aux_ch(encoder);
if (dig_port->aux_ch == AUX_CH_NONE)
- goto err;
+ goto err_aux_ch_init;
}
/*
@@ -5447,7 +5447,7 @@ void intel_ddi_init(struct intel_display *display,
dig_port->unlock = intel_tc_port_unlock;
if (intel_tc_port_init(dig_port, is_legacy) < 0)
- goto err;
+ goto err_aux_ch_init;
}
drm_WARN_ON(display->drm, port > PORT_I);
@@ -5478,7 +5478,7 @@ void intel_ddi_init(struct intel_display *display,
if (init_dp) {
if (intel_ddi_init_dp_connector(dig_port))
- goto err;
+ goto err_dp_connector_init;
dig_port->hpd_pulse = intel_dp_hpd_pulse;
@@ -5492,12 +5492,15 @@ void intel_ddi_init(struct intel_display *display,
*/
if (encoder->type != INTEL_OUTPUT_EDP && init_hdmi) {
if (intel_ddi_init_hdmi_connector(dig_port))
- goto err;
+ goto err_dp_connector_init;
}
return;
-err:
+err_dp_connector_init:
+ if (intel_encoder_is_tc(encoder))
+ intel_tc_port_cleanup(dig_port);
+err_aux_ch_init:
drm_encoder_cleanup(&encoder->base);
kfree(dig_port);
}
--
2.49.1
next reply other threads:[~2026-05-07 7:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-07 6:59 Imre Deak [this message]
2026-05-07 6:59 ` [PATCH 2/2] drm/i915/ddi: Fix cleanup after HDMI connector init failure Imre Deak
2026-05-08 14:29 ` Hogander, Jouni
2026-05-08 14:34 ` Imre Deak
2026-05-11 5:20 ` Hogander, Jouni
2026-05-07 7:45 ` ✗ CI.checkpatch: warning for series starting with [1/2] drm/i915/ddi: Fix cleanup after DP " Patchwork
2026-05-07 7:48 ` ✓ CI.KUnit: success " Patchwork
2026-05-07 8:58 ` ✓ Xe.CI.BAT: " Patchwork
2026-05-07 18:59 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-05-08 12:26 ` [PATCH 1/2] " Hogander, Jouni
2026-05-08 12:38 ` Imre Deak
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=20260507065940.2046690-1-imre.deak@intel.com \
--to=imre.deak@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
/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