]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915: Don't enable the DDI-IO power in the TypeC TBT-alt mode
authorImre Deak <imre.deak@intel.com>
Fri, 28 Jun 2019 14:36:17 +0000 (17:36 +0300)
committerImre Deak <imre.deak@intel.com>
Mon, 1 Jul 2019 11:49:58 +0000 (14:49 +0300)
According to the spec we should not enable the DDI-IO power domain if
the TypeC port is in the TBT-alt mode, so do that only in the other
TypeC modes or for non-TypeC ports. See the internal BSpec Index/22243.

v2:
- Add the internal BSpec reference to the log message. (José)

Cc: Manasi Navare <manasi.d.navare@intel.com>
Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
Cc: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190628143635.22066-6-imre.deak@intel.com
drivers/gpu/drm/i915/display/intel_ddi.c

index 442cd3997109afb1785985af067593c271298d11..c16fa789a931c8f3d270dfa9ec76cb4f8e61c351 100644 (file)
@@ -3124,7 +3124,10 @@ static void intel_ddi_pre_enable_dp(struct intel_encoder *encoder,
 
        intel_ddi_clk_select(encoder, crtc_state);
 
-       intel_display_power_get(dev_priv, dig_port->ddi_io_power_domain);
+       if (!intel_port_is_tc(dev_priv, port) ||
+           dig_port->tc_mode != TC_PORT_TBT_ALT)
+               intel_display_power_get(dev_priv,
+                                       dig_port->ddi_io_power_domain);
 
        icl_program_mg_dp_mode(dig_port);
        icl_disable_phy_clock_gating(dig_port);
@@ -3306,8 +3309,10 @@ static void intel_ddi_post_disable_dp(struct intel_encoder *encoder,
        intel_edp_panel_vdd_on(intel_dp);
        intel_edp_panel_off(intel_dp);
 
-       intel_display_power_put_unchecked(dev_priv,
-                                         dig_port->ddi_io_power_domain);
+       if (!intel_port_is_tc(dev_priv, encoder->port) ||
+           dig_port->tc_mode != TC_PORT_TBT_ALT)
+               intel_display_power_put_unchecked(dev_priv,
+                                                 dig_port->ddi_io_power_domain);
 
        intel_ddi_clk_disable(encoder);
 }