]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915: do not warn late about hdmi on port A
authorLucas De Marchi <lucas.demarchi@intel.com>
Fri, 8 Nov 2019 21:42:51 +0000 (13:42 -0800)
committerLucas De Marchi <lucas.demarchi@intel.com>
Tue, 12 Nov 2019 23:31:26 +0000 (15:31 -0800)
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>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191108214251.79305-1-lucas.demarchi@intel.com
drivers/gpu/drm/i915/display/intel_hdmi.c

index e084c2f753790aca1803058839bd17c6f54e57f5..ed4a68fb351f830f241e3e2bf92d501dac60e128 100644 (file)
@@ -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))