From: Ville Syrjälä <ville.syrj...@linux.intel.com>

We'll need dig_port->connected() to be there for a HPD live
state check during eDP connector probing. Reorder intel_ddi_init()
accordingly. g4x_dp_init() is already fine.

Reviewed-by: Jani Nikula <jani.nik...@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrj...@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_ddi.c | 40 ++++++++++++------------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c 
b/drivers/gpu/drm/i915/display/intel_ddi.c
index e5979427b38b..40b5c93f9223 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -4504,6 +4504,26 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, 
enum port port)
        drm_WARN_ON(&dev_priv->drm, port > PORT_I);
        dig_port->ddi_io_power_domain = 
intel_display_power_ddi_io_domain(dev_priv, port);
 
+       if (DISPLAY_VER(dev_priv) >= 11) {
+               if (intel_phy_is_tc(dev_priv, phy))
+                       dig_port->connected = intel_tc_port_connected;
+               else
+                       dig_port->connected = lpt_digital_port_connected;
+       } else if (DISPLAY_VER(dev_priv) >= 8) {
+               if (port == PORT_A || IS_GEMINILAKE(dev_priv) ||
+                   IS_BROXTON(dev_priv))
+                       dig_port->connected = bdw_digital_port_connected;
+               else
+                       dig_port->connected = lpt_digital_port_connected;
+       } else {
+               if (port == PORT_A)
+                       dig_port->connected = hsw_digital_port_connected;
+               else
+                       dig_port->connected = lpt_digital_port_connected;
+       }
+
+       intel_infoframe_init(dig_port);
+
        if (init_dp) {
                if (!intel_ddi_init_dp_connector(dig_port))
                        goto err;
@@ -4521,26 +4541,6 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, 
enum port port)
                        goto err;
        }
 
-       if (DISPLAY_VER(dev_priv) >= 11) {
-               if (intel_phy_is_tc(dev_priv, phy))
-                       dig_port->connected = intel_tc_port_connected;
-               else
-                       dig_port->connected = lpt_digital_port_connected;
-       } else if (DISPLAY_VER(dev_priv) >= 8) {
-               if (port == PORT_A || IS_GEMINILAKE(dev_priv) ||
-                   IS_BROXTON(dev_priv))
-                       dig_port->connected = bdw_digital_port_connected;
-               else
-                       dig_port->connected = lpt_digital_port_connected;
-       } else {
-               if (port == PORT_A)
-                       dig_port->connected = hsw_digital_port_connected;
-               else
-                       dig_port->connected = lpt_digital_port_connected;
-       }
-
-       intel_infoframe_init(dig_port);
-
        return;
 
 err:
-- 
2.39.2

Reply via email to