From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: jani.nikula@intel.com,
Sergey Senozhatsky <senozhatsky@chromium.org>,
Ville Syrjala <ville.syrjala@linux.intel.com>,
Suraj Kandpal <suraj.kandpal@intel.com>
Subject: [PATCH v3 4/6] drm/i915/ddi: gracefully handle errors from intel_ddi_init_hdmi_connector()
Date: Fri, 13 Dec 2024 16:15:56 +0200 [thread overview]
Message-ID: <e6f582986722bf3187ddceb8e31dfd9fa5fd1d66.1734099220.git.jani.nikula@intel.com> (raw)
In-Reply-To: <cover.1734099220.git.jani.nikula@intel.com>
Errors from intel_ddi_init_hdmi_connector() can just mean "there's no
HDMI" while we'll still want to continue with DP only. Handle the errors
gracefully, but don't propagate. Clear the hdmi_reg which is used as a
proxy to indicate the HDMI is initialized.
v2: Gracefully handle but do not propagate
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Reported-and-tested-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Closes: https://lore.kernel.org/r/20241031105145.2140590-1-senozhatsky@chromium.org
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org> # v1
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/display/intel_ddi.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
index 21277cf8afef..2c4308506435 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -4757,7 +4757,16 @@ static int intel_ddi_init_hdmi_connector(struct intel_digital_port *dig_port)
return -ENOMEM;
dig_port->hdmi.hdmi_reg = DDI_BUF_CTL(port);
- intel_hdmi_init_connector(dig_port, connector);
+
+ if (!intel_hdmi_init_connector(dig_port, connector)) {
+ /*
+ * HDMI connector init failures may just mean conflicting DDC
+ * pins or not having enough lanes. Handle them gracefully, but
+ * don't fail the entire DDI init.
+ */
+ dig_port->hdmi.hdmi_reg = INVALID_MMIO_REG;
+ kfree(connector);
+ }
return 0;
}
--
2.39.5
next prev parent reply other threads:[~2024-12-13 14:16 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-13 14:15 [PATCH v3 0/6] drm/i915/display: handle hdmi connector init failures, and no HDMI/DP cases Jani Nikula
2024-12-13 14:15 ` [PATCH v3 1/6] drm/i915/ddi: change intel_ddi_init_{dp, hdmi}_connector() return type Jani Nikula
2024-12-13 15:05 ` [PATCH v3 1/6] drm/i915/ddi: change intel_ddi_init_{dp,hdmi}_connector() " Kandpal, Suraj
2024-12-16 11:38 ` Jani Nikula
2024-12-13 14:15 ` [PATCH v3 2/6] drm/i915/hdmi: propagate errors from intel_hdmi_init_connector() Jani Nikula
2024-12-13 14:15 ` [PATCH v3 3/6] drm/i915/hdmi: add error handling in g4x_hdmi_init() Jani Nikula
2024-12-13 14:15 ` Jani Nikula [this message]
2024-12-16 18:20 ` [PATCH v3 4/6] drm/i915/ddi: gracefully handle errors from intel_ddi_init_hdmi_connector() Kandpal, Suraj
2024-12-13 14:15 ` [PATCH v3 5/6] drm/i915/display: add intel_encoder_is_hdmi() Jani Nikula
2024-12-13 14:15 ` [PATCH v3 6/6] drm/i915/ddi: only call shutdown hooks for valid encoders Jani Nikula
2024-12-13 17:53 ` ✓ CI.Patch_applied: success for drm/i915/display: handle hdmi connector init failures, and no HDMI/DP cases (rev2) Patchwork
2024-12-13 17:53 ` ✓ CI.checkpatch: " Patchwork
2024-12-13 17:54 ` ✓ CI.KUnit: " Patchwork
2024-12-13 18:12 ` ✓ CI.Build: " Patchwork
2024-12-13 18:14 ` ✓ CI.Hooks: " Patchwork
2024-12-13 18:16 ` ✗ CI.checksparse: warning " Patchwork
2024-12-16 8:08 ` ✓ CI.BAT: success " Patchwork
2024-12-19 6:54 ` [PATCH v3 0/6] drm/i915/display: handle hdmi connector init failures, and no HDMI/DP cases Sergey Senozhatsky
2024-12-19 7:14 ` Sergey Senozhatsky
2024-12-20 10:10 ` ✓ CI.Patch_applied: success for drm/i915/display: handle hdmi connector init failures, and no HDMI/DP cases (rev3) Patchwork
2024-12-20 10:10 ` ✓ CI.checkpatch: " Patchwork
2024-12-20 10:11 ` ✓ CI.KUnit: " Patchwork
2024-12-20 10:30 ` ✓ CI.Build: " Patchwork
2024-12-20 10:32 ` ✓ CI.Hooks: " Patchwork
2024-12-20 10:34 ` ✗ CI.checksparse: warning " Patchwork
2024-12-20 11:02 ` ✓ Xe.CI.BAT: success " Patchwork
2024-12-21 12:36 ` ✗ Xe.CI.Full: failure " 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=e6f582986722bf3187ddceb8e31dfd9fa5fd1d66.1734099220.git.jani.nikula@intel.com \
--to=jani.nikula@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=senozhatsky@chromium.org \
--cc=suraj.kandpal@intel.com \
--cc=ville.syrjala@linux.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