Skip to content

Commit 8ea07e2

Browse files
committed
drm/i915/ddi: gracefully handle errors from intel_ddi_init_hdmi_connector()
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 <[email protected]> Cc: Ville Syrjala <[email protected]> Reported-and-tested-by: Sergey Senozhatsky <[email protected]> Closes: https://lore.kernel.org/r/[email protected] Reviewed-by: Sergey Senozhatsky <[email protected]> # v1 Reviewed-by: Suraj Kandpal <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/d72cb54ac7cc5ca29b3b9d70e4d368ea41643b08.1735568047.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <[email protected]>
1 parent 7603ba8 commit 8ea07e2

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

drivers/gpu/drm/i915/display/intel_ddi.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4757,7 +4757,16 @@ static int intel_ddi_init_hdmi_connector(struct intel_digital_port *dig_port)
47574757
return -ENOMEM;
47584758

47594759
dig_port->hdmi.hdmi_reg = DDI_BUF_CTL(port);
4760-
intel_hdmi_init_connector(dig_port, connector);
4760+
4761+
if (!intel_hdmi_init_connector(dig_port, connector)) {
4762+
/*
4763+
* HDMI connector init failures may just mean conflicting DDC
4764+
* pins or not having enough lanes. Handle them gracefully, but
4765+
* don't fail the entire DDI init.
4766+
*/
4767+
dig_port->hdmi.hdmi_reg = INVALID_MMIO_REG;
4768+
kfree(connector);
4769+
}
47614770

47624771
return 0;
47634772
}

0 commit comments

Comments
 (0)