[PATCH 0/3] drm/i915/display: handle hdmi connector init failures
Sergey Senozhatsky
senozhatsky at chromium.org
Fri Nov 15 05:00:45 UTC 2024
On (24/11/14 17:52), Jani Nikula wrote:
> This is an attempt to resolve [1].
>
> [1] https://lore.kernel.org/r/20241031105145.2140590-1-senozhatsky@chromium.org
>
> Jani Nikula (3):
> drm/i915/hdmi: propagate errors from intel_hdmi_init_connector()
> drm/i915/hdmi: add error handling in g4x_hdmi_init()
> drm/i915/ddi: propagate errors from intel_ddi_init_hdmi_connector()
So these look reasonable and good to me, and I think landing them
makes a lot of sense. For that part feel free to add:
Reported-and-tested-by: Sergey Senozhatsky <senozhatsky at chromium.org>
and FWIW
Reviewed-by: Sergey Senozhatsky <senozhatsky at chromium.org>
Now, regarding the issue in question - we are getting there, but not
quite there yet.
I'm still seeing multiple NULL-ptr derefs, namely on
DDI A/PHY A
DDI TC1/PHY TC1
DDI TC2/PHY TC2
DDI TC3/PHY TC3
DDI TC4/PHY TC4
The thing is, all of them are DP connectors, we only ever call
intel_ddi_init_dp_connector() on them, so dig_port->hdmi
is not init-ed, wheres intel_hdmi_encoder_shutdown() doesn't
distinguish and treats everyone as HDMI connector, dereferencing
->hdmi.
With the small addition I don't see null-ptr derefs anymore:
---
diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
index 1abf080b4a20..0c6bb378b708 100644
--- a/drivers/gpu/drm/i915/display/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
@@ -2377,6 +2377,11 @@ void intel_hdmi_encoder_shutdown(struct intel_encoder *encoder)
{
struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(encoder);
+ if (intel_encoder_is_dp(encoder)) {
+ pr_err(":: oops another day ::\n");
+ return;
+ }
+
/*
* Give a hand to buggy BIOSen which forget to turn
* the TMDS output buffers back on after a reboot.
More information about the Intel-gfx
mailing list