All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: do not warn late about hdmi on port A
@ 2019-11-08 21:42 ` Lucas De Marchi
  0 siblings, 0 replies; 14+ messages in thread
From: Lucas De Marchi @ 2019-11-08 21:42 UTC (permalink / raw)
  To: intel-gfx

The warning should be just a warning. Where it is currently is wrong
since we already registered the connector on drm, meaning it dies later
on a NULL pointer deref if the VBT-overriding we have is removed. Move
the warning up.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
 drivers/gpu/drm/i915/display/intel_hdmi.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
index e084c2f75379..ed4a68fb351f 100644
--- a/drivers/gpu/drm/i915/display/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
@@ -3140,6 +3140,9 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
 	DRM_DEBUG_KMS("Adding HDMI connector on [ENCODER:%d:%s]\n",
 		      intel_encoder->base.base.id, intel_encoder->base.name);
 
+	if (WARN_ON(port == PORT_A))
+		return;
+
 	if (WARN(intel_dig_port->max_lanes < 4,
 		 "Not enough lanes (%d) for HDMI on [ENCODER:%d:%s]\n",
 		 intel_dig_port->max_lanes, intel_encoder->base.base.id,
@@ -3159,8 +3162,6 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,
 
 	intel_hdmi->ddc_bus = intel_hdmi_ddc_pin(dev_priv, port);
 
-	if (WARN_ON(port == PORT_A))
-		return;
 	intel_encoder->hpd_pin = intel_hpd_pin_default(dev_priv, port);
 
 	if (HAS_DDI(dev_priv))
-- 
2.24.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-11-14 17:27 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-08 21:42 [PATCH] drm/i915: do not warn late about hdmi on port A Lucas De Marchi
2019-11-08 21:42 ` [Intel-gfx] " Lucas De Marchi
2019-11-08 22:37 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-11-08 22:37   ` [Intel-gfx] " Patchwork
2019-11-10 19:57 ` ✗ Fi.CI.IGT: failure " Patchwork
2019-11-10 19:57   ` [Intel-gfx] " Patchwork
2019-11-11 19:55 ` ✗ Fi.CI.BAT: failure for drm/i915: do not warn late about hdmi on port A (rev2) Patchwork
2019-11-11 19:55   ` [Intel-gfx] " Patchwork
2019-11-12 16:38 ` [PATCH] drm/i915: do not warn late about hdmi on port A Matt Roper
2019-11-12 16:38   ` [Intel-gfx] " Matt Roper
2019-11-14 12:46 ` Jani Nikula
2019-11-14 12:46   ` [Intel-gfx] " Jani Nikula
2019-11-14 17:27   ` Lucas De Marchi
2019-11-14 17:27     ` [Intel-gfx] " Lucas De Marchi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.