summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2024-12-30 16:14:43 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-08-15 12:14:11 +0200
commit428434769e45fd34b05bde2ebb76808068335216 (patch)
treefa34e2c655fa094bbac977bd942221c82acc0918
parent743de353a43401652f83935cb09d81395e843882 (diff)
drm/i915/ddi: gracefully handle errors from intel_ddi_init_hdmi_connector()
commit 8ea07e294ea2d046e16fa98e37007edcd4b9525d upstream. 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 Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/d72cb54ac7cc5ca29b3b9d70e4d368ea41643b08.1735568047.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/gpu/drm/i915/display/intel_ddi.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
index b567efc5b93c..9e42f0836989 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -4632,7 +4632,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;
}