@@ -246,7 +246,14 @@ static enum phy icl_aux_pw_to_phy(struct drm_i915_private *i915,
246246 enum aux_ch aux_ch = icl_aux_pw_to_ch (power_well );
247247 struct intel_digital_port * dig_port = aux_ch_to_digital_port (i915 , aux_ch );
248248
249- return intel_port_to_phy (i915 , dig_port -> base .port );
249+ /*
250+ * FIXME should we care about the (VBT defined) dig_port->aux_ch
251+ * relationship or should this be purely defined by the hardware layout?
252+ * Currently if the port doesn't appear in the VBT, or if it's declared
253+ * as HDMI-only and routed to a combo PHY, the encoder either won't be
254+ * present at all or it will not have an aux_ch assigned.
255+ */
256+ return dig_port ? intel_port_to_phy (i915 , dig_port -> base .port ) : PHY_NONE ;
250257}
251258
252259static void hsw_wait_for_power_well_enable (struct drm_i915_private * dev_priv ,
@@ -414,7 +421,8 @@ icl_combo_phy_aux_power_well_enable(struct drm_i915_private *dev_priv,
414421
415422 intel_de_rmw (dev_priv , regs -> driver , 0 , HSW_PWR_WELL_CTL_REQ (pw_idx ));
416423
417- if (DISPLAY_VER (dev_priv ) < 12 )
424+ /* FIXME this is a mess */
425+ if (phy != PHY_NONE )
418426 intel_de_rmw (dev_priv , ICL_PORT_CL_DW12 (phy ),
419427 0 , ICL_LANE_ENABLE_AUX );
420428
@@ -437,7 +445,10 @@ icl_combo_phy_aux_power_well_disable(struct drm_i915_private *dev_priv,
437445
438446 drm_WARN_ON (& dev_priv -> drm , !IS_ICELAKE (dev_priv ));
439447
440- intel_de_rmw (dev_priv , ICL_PORT_CL_DW12 (phy ), ICL_LANE_ENABLE_AUX , 0 );
448+ /* FIXME this is a mess */
449+ if (phy != PHY_NONE )
450+ intel_de_rmw (dev_priv , ICL_PORT_CL_DW12 (phy ),
451+ ICL_LANE_ENABLE_AUX , 0 );
441452
442453 intel_de_rmw (dev_priv , regs -> driver , HSW_PWR_WELL_CTL_REQ (pw_idx ), 0 );
443454
0 commit comments