Lines Matching full:encoder
91 static int intel_ddi_hdmi_level(struct intel_encoder *encoder, in intel_ddi_hdmi_level() argument
96 level = intel_bios_hdmi_level_shift(encoder->devdata); in intel_ddi_hdmi_level()
118 void hsw_prepare_dp_ddi_buffers(struct intel_encoder *encoder, in hsw_prepare_dp_ddi_buffers() argument
121 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in hsw_prepare_dp_ddi_buffers()
124 enum port port = encoder->port; in hsw_prepare_dp_ddi_buffers()
127 trans = encoder->get_buf_trans(encoder, crtc_state, &n_entries); in hsw_prepare_dp_ddi_buffers()
133 intel_bios_dp_boost_level(encoder->devdata)) in hsw_prepare_dp_ddi_buffers()
149 static void hsw_prepare_hdmi_ddi_buffers(struct intel_encoder *encoder, in hsw_prepare_hdmi_ddi_buffers() argument
152 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in hsw_prepare_hdmi_ddi_buffers()
153 int level = intel_ddi_level(encoder, crtc_state, 0); in hsw_prepare_hdmi_ddi_buffers()
156 enum port port = encoder->port; in hsw_prepare_hdmi_ddi_buffers()
159 trans = encoder->get_buf_trans(encoder, crtc_state, &n_entries); in hsw_prepare_hdmi_ddi_buffers()
165 intel_bios_hdmi_boost_level(encoder->devdata)) in hsw_prepare_hdmi_ddi_buffers()
260 static u32 icl_pll_to_ddi_clk_sel(struct intel_encoder *encoder, in icl_pll_to_ddi_clk_sel() argument
324 static void intel_ddi_init_dp_buf_reg(struct intel_encoder *encoder, in intel_ddi_init_dp_buf_reg() argument
327 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in intel_ddi_init_dp_buf_reg()
328 struct intel_dp *intel_dp = enc_to_intel_dp(encoder); in intel_ddi_init_dp_buf_reg()
329 struct intel_digital_port *dig_port = enc_to_dig_port(encoder); in intel_ddi_init_dp_buf_reg()
330 enum phy phy = intel_port_to_phy(i915, encoder->port); in intel_ddi_init_dp_buf_reg()
452 intel_ddi_config_transcoder_dp2(struct intel_encoder *encoder, in intel_ddi_config_transcoder_dp2() argument
455 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in intel_ddi_config_transcoder_dp2()
472 intel_ddi_transcoder_func_reg_val_get(struct intel_encoder *encoder, in intel_ddi_transcoder_func_reg_val_get() argument
479 enum port port = encoder->port; in intel_ddi_transcoder_func_reg_val_get()
583 void intel_ddi_enable_transcoder_func(struct intel_encoder *encoder, in intel_ddi_enable_transcoder_func() argument
607 intel_ddi_transcoder_func_reg_val_get(encoder, in intel_ddi_enable_transcoder_func()
616 intel_ddi_config_transcoder_func(struct intel_encoder *encoder, in intel_ddi_config_transcoder_func() argument
624 ctl = intel_ddi_transcoder_func_reg_val_get(encoder, crtc_state); in intel_ddi_config_transcoder_func()
694 struct intel_encoder *encoder = intel_attached_encoder(intel_connector); in intel_ddi_connector_get_hw_state() local
696 enum port port = encoder->port; in intel_ddi_connector_get_hw_state()
704 encoder->power_domain); in intel_ddi_connector_get_hw_state()
708 if (!encoder->get_hw_state(encoder, &pipe)) { in intel_ddi_connector_get_hw_state()
752 intel_display_power_put(dev_priv, encoder->power_domain, wakeref); in intel_ddi_connector_get_hw_state()
757 static void intel_ddi_get_encoder_pipes(struct intel_encoder *encoder, in intel_ddi_get_encoder_pipes() argument
760 struct drm_device *dev = encoder->base.dev; in intel_ddi_get_encoder_pipes()
762 enum port port = encoder->port; in intel_ddi_get_encoder_pipes()
772 encoder->power_domain); in intel_ddi_get_encoder_pipes()
840 "No pipe for [ENCODER:%d:%s] found\n", in intel_ddi_get_encoder_pipes()
841 encoder->base.base.id, encoder->base.name); in intel_ddi_get_encoder_pipes()
845 "Multiple pipes for [ENCODER:%d:%s] (pipe_mask %02x)\n", in intel_ddi_get_encoder_pipes()
846 encoder->base.base.id, encoder->base.name, in intel_ddi_get_encoder_pipes()
853 … "Conflicting MST and non-MST state for [ENCODER:%d:%s] (pipe_mask %02x mst_pipe_mask %02x)\n", in intel_ddi_get_encoder_pipes()
854 encoder->base.base.id, encoder->base.name, in intel_ddi_get_encoder_pipes()
866 "[ENCODER:%d:%s] enabled but PHY powered down? (PHY_CTL %08x)\n", in intel_ddi_get_encoder_pipes()
867 encoder->base.base.id, encoder->base.name, tmp); in intel_ddi_get_encoder_pipes()
870 intel_display_power_put(dev_priv, encoder->power_domain, wakeref); in intel_ddi_get_encoder_pipes()
873 bool intel_ddi_get_hw_state(struct intel_encoder *encoder, in intel_ddi_get_hw_state() argument
879 intel_ddi_get_encoder_pipes(encoder, &pipe_mask, &is_mst); in intel_ddi_get_hw_state()
951 static void intel_ddi_get_power_domains(struct intel_encoder *encoder, in intel_ddi_get_power_domains() argument
954 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_ddi_get_power_domains()
966 dig_port = enc_to_dig_port(encoder); in intel_ddi_get_power_domains()
977 void intel_ddi_enable_transcoder_clock(struct intel_encoder *encoder, in intel_ddi_enable_transcoder_clock() argument
983 enum phy phy = intel_port_to_phy(dev_priv, encoder->port); in intel_ddi_enable_transcoder_clock()
992 val = TGL_TRANS_CLK_SEL_PORT(encoder->port); in intel_ddi_enable_transcoder_clock()
994 val = TRANS_CLK_SEL_PORT(encoder->port); in intel_ddi_enable_transcoder_clock()
1030 static void skl_ddi_set_iboost(struct intel_encoder *encoder, in skl_ddi_set_iboost() argument
1034 struct intel_digital_port *dig_port = enc_to_dig_port(encoder); in skl_ddi_set_iboost()
1035 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in skl_ddi_set_iboost()
1039 iboost = intel_bios_hdmi_boost_level(encoder->devdata); in skl_ddi_set_iboost()
1041 iboost = intel_bios_dp_boost_level(encoder->devdata); in skl_ddi_set_iboost()
1047 trans = encoder->get_buf_trans(encoder, crtc_state, &n_entries); in skl_ddi_set_iboost()
1060 _skl_ddi_set_iboost(dev_priv, encoder->port, iboost); in skl_ddi_set_iboost()
1062 if (encoder->port == PORT_A && dig_port->max_lanes == 4) in skl_ddi_set_iboost()
1069 struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base; in intel_ddi_dp_voltage_max() local
1070 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_ddi_dp_voltage_max()
1073 encoder->get_buf_trans(encoder, crtc_state, &n_entries); in intel_ddi_dp_voltage_max()
1107 static void icl_ddi_combo_vswing_program(struct intel_encoder *encoder, in icl_ddi_combo_vswing_program() argument
1110 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in icl_ddi_combo_vswing_program()
1112 enum phy phy = intel_port_to_phy(dev_priv, encoder->port); in icl_ddi_combo_vswing_program()
1116 trans = encoder->get_buf_trans(encoder, crtc_state, &n_entries); in icl_ddi_combo_vswing_program()
1121 struct intel_dp *intel_dp = enc_to_intel_dp(encoder); in icl_ddi_combo_vswing_program()
1140 int level = intel_ddi_level(encoder, crtc_state, ln); in icl_ddi_combo_vswing_program()
1152 int level = intel_ddi_level(encoder, crtc_state, ln); in icl_ddi_combo_vswing_program()
1163 int level = intel_ddi_level(encoder, crtc_state, ln); in icl_ddi_combo_vswing_program()
1171 static void icl_combo_phy_set_signal_levels(struct intel_encoder *encoder, in icl_combo_phy_set_signal_levels() argument
1174 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in icl_combo_phy_set_signal_levels()
1175 enum phy phy = intel_port_to_phy(dev_priv, encoder->port); in icl_combo_phy_set_signal_levels()
1214 icl_ddi_combo_vswing_program(encoder, crtc_state); in icl_combo_phy_set_signal_levels()
1222 static void icl_mg_phy_set_signal_levels(struct intel_encoder *encoder, in icl_mg_phy_set_signal_levels() argument
1225 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in icl_mg_phy_set_signal_levels()
1226 enum tc_port tc_port = intel_port_to_tc(dev_priv, encoder->port); in icl_mg_phy_set_signal_levels()
1230 if (intel_tc_port_in_tbt_alt_mode(enc_to_dig_port(encoder))) in icl_mg_phy_set_signal_levels()
1233 trans = encoder->get_buf_trans(encoder, crtc_state, &n_entries); in icl_mg_phy_set_signal_levels()
1248 level = intel_ddi_level(encoder, crtc_state, 2*ln+0); in icl_mg_phy_set_signal_levels()
1254 level = intel_ddi_level(encoder, crtc_state, 2*ln+1); in icl_mg_phy_set_signal_levels()
1265 level = intel_ddi_level(encoder, crtc_state, 2*ln+0); in icl_mg_phy_set_signal_levels()
1274 level = intel_ddi_level(encoder, crtc_state, 2*ln+1); in icl_mg_phy_set_signal_levels()
1323 static void tgl_dkl_phy_set_signal_levels(struct intel_encoder *encoder, in tgl_dkl_phy_set_signal_levels() argument
1326 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in tgl_dkl_phy_set_signal_levels()
1327 enum tc_port tc_port = intel_port_to_tc(dev_priv, encoder->port); in tgl_dkl_phy_set_signal_levels()
1331 if (intel_tc_port_in_tbt_alt_mode(enc_to_dig_port(encoder))) in tgl_dkl_phy_set_signal_levels()
1334 trans = encoder->get_buf_trans(encoder, crtc_state, &n_entries); in tgl_dkl_phy_set_signal_levels()
1343 level = intel_ddi_level(encoder, crtc_state, 2*ln+0); in tgl_dkl_phy_set_signal_levels()
1353 level = intel_ddi_level(encoder, crtc_state, 2*ln+1); in tgl_dkl_phy_set_signal_levels()
1424 int intel_ddi_level(struct intel_encoder *encoder, in intel_ddi_level() argument
1428 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in intel_ddi_level()
1432 trans = encoder->get_buf_trans(encoder, crtc_state, &n_entries); in intel_ddi_level()
1437 level = intel_ddi_hdmi_level(encoder, trans); in intel_ddi_level()
1439 level = intel_ddi_dp_level(enc_to_intel_dp(encoder), crtc_state, in intel_ddi_level()
1449 hsw_set_signal_levels(struct intel_encoder *encoder, in hsw_set_signal_levels() argument
1452 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in hsw_set_signal_levels()
1453 struct intel_dp *intel_dp = enc_to_intel_dp(encoder); in hsw_set_signal_levels()
1454 int level = intel_ddi_level(encoder, crtc_state, 0); in hsw_set_signal_levels()
1455 enum port port = encoder->port; in hsw_set_signal_levels()
1459 skl_ddi_set_iboost(encoder, crtc_state, level); in hsw_set_signal_levels()
1520 static void adls_ddi_enable_clock(struct intel_encoder *encoder, in adls_ddi_enable_clock() argument
1523 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in adls_ddi_enable_clock()
1525 enum phy phy = intel_port_to_phy(i915, encoder->port); in adls_ddi_enable_clock()
1536 static void adls_ddi_disable_clock(struct intel_encoder *encoder) in adls_ddi_disable_clock() argument
1538 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in adls_ddi_disable_clock()
1539 enum phy phy = intel_port_to_phy(i915, encoder->port); in adls_ddi_disable_clock()
1545 static bool adls_ddi_is_clock_enabled(struct intel_encoder *encoder) in adls_ddi_is_clock_enabled() argument
1547 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in adls_ddi_is_clock_enabled()
1548 enum phy phy = intel_port_to_phy(i915, encoder->port); in adls_ddi_is_clock_enabled()
1554 static struct intel_shared_dpll *adls_ddi_get_pll(struct intel_encoder *encoder) in adls_ddi_get_pll() argument
1556 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in adls_ddi_get_pll()
1557 enum phy phy = intel_port_to_phy(i915, encoder->port); in adls_ddi_get_pll()
1564 static void rkl_ddi_enable_clock(struct intel_encoder *encoder, in rkl_ddi_enable_clock() argument
1567 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in rkl_ddi_enable_clock()
1569 enum phy phy = intel_port_to_phy(i915, encoder->port); in rkl_ddi_enable_clock()
1580 static void rkl_ddi_disable_clock(struct intel_encoder *encoder) in rkl_ddi_disable_clock() argument
1582 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in rkl_ddi_disable_clock()
1583 enum phy phy = intel_port_to_phy(i915, encoder->port); in rkl_ddi_disable_clock()
1589 static bool rkl_ddi_is_clock_enabled(struct intel_encoder *encoder) in rkl_ddi_is_clock_enabled() argument
1591 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in rkl_ddi_is_clock_enabled()
1592 enum phy phy = intel_port_to_phy(i915, encoder->port); in rkl_ddi_is_clock_enabled()
1598 static struct intel_shared_dpll *rkl_ddi_get_pll(struct intel_encoder *encoder) in rkl_ddi_get_pll() argument
1600 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in rkl_ddi_get_pll()
1601 enum phy phy = intel_port_to_phy(i915, encoder->port); in rkl_ddi_get_pll()
1608 static void dg1_ddi_enable_clock(struct intel_encoder *encoder, in dg1_ddi_enable_clock() argument
1611 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in dg1_ddi_enable_clock()
1613 enum phy phy = intel_port_to_phy(i915, encoder->port); in dg1_ddi_enable_clock()
1633 static void dg1_ddi_disable_clock(struct intel_encoder *encoder) in dg1_ddi_disable_clock() argument
1635 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in dg1_ddi_disable_clock()
1636 enum phy phy = intel_port_to_phy(i915, encoder->port); in dg1_ddi_disable_clock()
1642 static bool dg1_ddi_is_clock_enabled(struct intel_encoder *encoder) in dg1_ddi_is_clock_enabled() argument
1644 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in dg1_ddi_is_clock_enabled()
1645 enum phy phy = intel_port_to_phy(i915, encoder->port); in dg1_ddi_is_clock_enabled()
1651 static struct intel_shared_dpll *dg1_ddi_get_pll(struct intel_encoder *encoder) in dg1_ddi_get_pll() argument
1653 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in dg1_ddi_get_pll()
1654 enum phy phy = intel_port_to_phy(i915, encoder->port); in dg1_ddi_get_pll()
1674 static void icl_ddi_combo_enable_clock(struct intel_encoder *encoder, in icl_ddi_combo_enable_clock() argument
1677 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in icl_ddi_combo_enable_clock()
1679 enum phy phy = intel_port_to_phy(i915, encoder->port); in icl_ddi_combo_enable_clock()
1690 static void icl_ddi_combo_disable_clock(struct intel_encoder *encoder) in icl_ddi_combo_disable_clock() argument
1692 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in icl_ddi_combo_disable_clock()
1693 enum phy phy = intel_port_to_phy(i915, encoder->port); in icl_ddi_combo_disable_clock()
1699 static bool icl_ddi_combo_is_clock_enabled(struct intel_encoder *encoder) in icl_ddi_combo_is_clock_enabled() argument
1701 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in icl_ddi_combo_is_clock_enabled()
1702 enum phy phy = intel_port_to_phy(i915, encoder->port); in icl_ddi_combo_is_clock_enabled()
1708 struct intel_shared_dpll *icl_ddi_combo_get_pll(struct intel_encoder *encoder) in icl_ddi_combo_get_pll() argument
1710 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in icl_ddi_combo_get_pll()
1711 enum phy phy = intel_port_to_phy(i915, encoder->port); in icl_ddi_combo_get_pll()
1718 static void jsl_ddi_tc_enable_clock(struct intel_encoder *encoder, in jsl_ddi_tc_enable_clock() argument
1721 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in jsl_ddi_tc_enable_clock()
1723 enum port port = encoder->port; in jsl_ddi_tc_enable_clock()
1734 icl_ddi_combo_enable_clock(encoder, crtc_state); in jsl_ddi_tc_enable_clock()
1737 static void jsl_ddi_tc_disable_clock(struct intel_encoder *encoder) in jsl_ddi_tc_disable_clock() argument
1739 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in jsl_ddi_tc_disable_clock()
1740 enum port port = encoder->port; in jsl_ddi_tc_disable_clock()
1742 icl_ddi_combo_disable_clock(encoder); in jsl_ddi_tc_disable_clock()
1747 static bool jsl_ddi_tc_is_clock_enabled(struct intel_encoder *encoder) in jsl_ddi_tc_is_clock_enabled() argument
1749 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in jsl_ddi_tc_is_clock_enabled()
1750 enum port port = encoder->port; in jsl_ddi_tc_is_clock_enabled()
1758 return icl_ddi_combo_is_clock_enabled(encoder); in jsl_ddi_tc_is_clock_enabled()
1761 static void icl_ddi_tc_enable_clock(struct intel_encoder *encoder, in icl_ddi_tc_enable_clock() argument
1764 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in icl_ddi_tc_enable_clock()
1766 enum tc_port tc_port = intel_port_to_tc(i915, encoder->port); in icl_ddi_tc_enable_clock()
1767 enum port port = encoder->port; in icl_ddi_tc_enable_clock()
1773 icl_pll_to_ddi_clk_sel(encoder, crtc_state)); in icl_ddi_tc_enable_clock()
1783 static void icl_ddi_tc_disable_clock(struct intel_encoder *encoder) in icl_ddi_tc_disable_clock() argument
1785 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in icl_ddi_tc_disable_clock()
1786 enum tc_port tc_port = intel_port_to_tc(i915, encoder->port); in icl_ddi_tc_disable_clock()
1787 enum port port = encoder->port; in icl_ddi_tc_disable_clock()
1799 static bool icl_ddi_tc_is_clock_enabled(struct intel_encoder *encoder) in icl_ddi_tc_is_clock_enabled() argument
1801 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in icl_ddi_tc_is_clock_enabled()
1802 enum tc_port tc_port = intel_port_to_tc(i915, encoder->port); in icl_ddi_tc_is_clock_enabled()
1803 enum port port = encoder->port; in icl_ddi_tc_is_clock_enabled()
1816 static struct intel_shared_dpll *icl_ddi_tc_get_pll(struct intel_encoder *encoder) in icl_ddi_tc_get_pll() argument
1818 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in icl_ddi_tc_get_pll()
1819 enum tc_port tc_port = intel_port_to_tc(i915, encoder->port); in icl_ddi_tc_get_pll()
1820 enum port port = encoder->port; in icl_ddi_tc_get_pll()
1846 static struct intel_shared_dpll *bxt_ddi_get_pll(struct intel_encoder *encoder) in bxt_ddi_get_pll() argument
1848 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in bxt_ddi_get_pll()
1851 switch (encoder->port) { in bxt_ddi_get_pll()
1862 MISSING_CASE(encoder->port); in bxt_ddi_get_pll()
1869 static void skl_ddi_enable_clock(struct intel_encoder *encoder, in skl_ddi_enable_clock() argument
1872 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in skl_ddi_enable_clock()
1874 enum port port = encoder->port; in skl_ddi_enable_clock()
1890 static void skl_ddi_disable_clock(struct intel_encoder *encoder) in skl_ddi_disable_clock() argument
1892 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in skl_ddi_disable_clock()
1893 enum port port = encoder->port; in skl_ddi_disable_clock()
1903 static bool skl_ddi_is_clock_enabled(struct intel_encoder *encoder) in skl_ddi_is_clock_enabled() argument
1905 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in skl_ddi_is_clock_enabled()
1906 enum port port = encoder->port; in skl_ddi_is_clock_enabled()
1915 static struct intel_shared_dpll *skl_ddi_get_pll(struct intel_encoder *encoder) in skl_ddi_get_pll() argument
1917 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in skl_ddi_get_pll()
1918 enum port port = encoder->port; in skl_ddi_get_pll()
1937 void hsw_ddi_enable_clock(struct intel_encoder *encoder, in hsw_ddi_enable_clock() argument
1940 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in hsw_ddi_enable_clock()
1942 enum port port = encoder->port; in hsw_ddi_enable_clock()
1950 void hsw_ddi_disable_clock(struct intel_encoder *encoder) in hsw_ddi_disable_clock() argument
1952 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in hsw_ddi_disable_clock()
1953 enum port port = encoder->port; in hsw_ddi_disable_clock()
1958 bool hsw_ddi_is_clock_enabled(struct intel_encoder *encoder) in hsw_ddi_is_clock_enabled() argument
1960 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in hsw_ddi_is_clock_enabled()
1961 enum port port = encoder->port; in hsw_ddi_is_clock_enabled()
1966 static struct intel_shared_dpll *hsw_ddi_get_pll(struct intel_encoder *encoder) in hsw_ddi_get_pll() argument
1968 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in hsw_ddi_get_pll()
1969 enum port port = encoder->port; in hsw_ddi_get_pll()
2004 void intel_ddi_enable_clock(struct intel_encoder *encoder, in intel_ddi_enable_clock() argument
2007 if (encoder->enable_clock) in intel_ddi_enable_clock()
2008 encoder->enable_clock(encoder, crtc_state); in intel_ddi_enable_clock()
2011 void intel_ddi_disable_clock(struct intel_encoder *encoder) in intel_ddi_disable_clock() argument
2013 if (encoder->disable_clock) in intel_ddi_disable_clock()
2014 encoder->disable_clock(encoder); in intel_ddi_disable_clock()
2017 void intel_ddi_sanitize_encoder_pll_mapping(struct intel_encoder *encoder) in intel_ddi_sanitize_encoder_pll_mapping() argument
2019 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in intel_ddi_sanitize_encoder_pll_mapping()
2024 * In case of DP MST, we sanitize the primary encoder only, not the in intel_ddi_sanitize_encoder_pll_mapping()
2027 if (encoder->type == INTEL_OUTPUT_DP_MST) in intel_ddi_sanitize_encoder_pll_mapping()
2030 if (!encoder->base.crtc && intel_encoder_is_dp(encoder)) { in intel_ddi_sanitize_encoder_pll_mapping()
2034 intel_ddi_get_encoder_pipes(encoder, &pipe_mask, &is_mst); in intel_ddi_sanitize_encoder_pll_mapping()
2043 port_mask = BIT(encoder->port); in intel_ddi_sanitize_encoder_pll_mapping()
2044 ddi_clk_needed = encoder->base.crtc; in intel_ddi_sanitize_encoder_pll_mapping()
2046 if (encoder->type == INTEL_OUTPUT_DSI) { in intel_ddi_sanitize_encoder_pll_mapping()
2049 port_mask = intel_dsi_encoder_ports(encoder); in intel_ddi_sanitize_encoder_pll_mapping()
2052 * encoder using any of the ports of this DSI encoder. in intel_ddi_sanitize_encoder_pll_mapping()
2055 if (other_encoder == encoder) in intel_ddi_sanitize_encoder_pll_mapping()
2069 if (ddi_clk_needed || !encoder->is_clock_enabled || in intel_ddi_sanitize_encoder_pll_mapping()
2070 !encoder->is_clock_enabled(encoder)) in intel_ddi_sanitize_encoder_pll_mapping()
2074 "[ENCODER:%d:%s] is disabled/in DSI mode with an ungated DDI clock, gate it\n", in intel_ddi_sanitize_encoder_pll_mapping()
2075 encoder->base.base.id, encoder->base.name); in intel_ddi_sanitize_encoder_pll_mapping()
2077 encoder->disable_clock(encoder); in intel_ddi_sanitize_encoder_pll_mapping()
2174 i915_reg_t dp_tp_ctl_reg(struct intel_encoder *encoder, in dp_tp_ctl_reg() argument
2177 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in dp_tp_ctl_reg()
2182 return DP_TP_CTL(encoder->port); in dp_tp_ctl_reg()
2185 i915_reg_t dp_tp_status_reg(struct intel_encoder *encoder, in dp_tp_status_reg() argument
2188 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in dp_tp_status_reg()
2193 return DP_TP_STATUS(encoder->port); in dp_tp_status_reg()
2225 static void intel_ddi_enable_fec(struct intel_encoder *encoder, in intel_ddi_enable_fec() argument
2228 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_ddi_enable_fec()
2233 intel_de_rmw(dev_priv, dp_tp_ctl_reg(encoder, crtc_state), in intel_ddi_enable_fec()
2237 static void intel_ddi_disable_fec_state(struct intel_encoder *encoder, in intel_ddi_disable_fec_state() argument
2240 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_ddi_disable_fec_state()
2245 intel_de_rmw(dev_priv, dp_tp_ctl_reg(encoder, crtc_state), in intel_ddi_disable_fec_state()
2247 intel_de_posting_read(dev_priv, dp_tp_ctl_reg(encoder, crtc_state)); in intel_ddi_disable_fec_state()
2250 static void intel_ddi_power_up_lanes(struct intel_encoder *encoder, in intel_ddi_power_up_lanes() argument
2253 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in intel_ddi_power_up_lanes()
2254 struct intel_digital_port *dig_port = enc_to_dig_port(encoder); in intel_ddi_power_up_lanes()
2255 enum phy phy = intel_port_to_phy(i915, encoder->port); in intel_ddi_power_up_lanes()
2276 static void intel_ddi_mso_get_config(struct intel_encoder *encoder, in intel_ddi_mso_get_config() argument
2356 mtl_ddi_enable_d2d(struct intel_encoder *encoder) in mtl_ddi_enable_d2d() argument
2358 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in mtl_ddi_enable_d2d()
2359 enum port port = encoder->port; in mtl_ddi_enable_d2d()
2371 static void mtl_port_buf_ctl_program(struct intel_encoder *encoder, in mtl_port_buf_ctl_program() argument
2374 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in mtl_port_buf_ctl_program()
2375 struct intel_digital_port *dig_port = enc_to_dig_port(encoder); in mtl_port_buf_ctl_program()
2376 enum port port = encoder->port; in mtl_port_buf_ctl_program()
2395 static void mtl_port_buf_ctl_io_selection(struct intel_encoder *encoder) in mtl_port_buf_ctl_io_selection() argument
2397 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in mtl_port_buf_ctl_io_selection()
2398 struct intel_digital_port *dig_port = enc_to_dig_port(encoder); in mtl_port_buf_ctl_io_selection()
2403 intel_de_rmw(i915, XELPDP_PORT_BUF_CTL1(encoder->port), in mtl_port_buf_ctl_io_selection()
2408 struct intel_encoder *encoder, in mtl_ddi_pre_enable_dp() argument
2412 struct intel_dp *intel_dp = enc_to_intel_dp(encoder); in mtl_ddi_pre_enable_dp()
2423 intel_ddi_init_dp_buf_reg(encoder, crtc_state); in mtl_ddi_pre_enable_dp()
2435 mtl_port_buf_ctl_io_selection(encoder); in mtl_ddi_pre_enable_dp()
2441 intel_ddi_enable_clock(encoder, crtc_state); in mtl_ddi_pre_enable_dp()
2447 intel_ddi_enable_transcoder_clock(encoder, crtc_state); in mtl_ddi_pre_enable_dp()
2452 intel_ddi_config_transcoder_dp2(encoder, crtc_state); in mtl_ddi_pre_enable_dp()
2458 intel_ddi_config_transcoder_func(encoder, crtc_state); in mtl_ddi_pre_enable_dp()
2506 intel_ddi_enable_fec(encoder, crtc_state); in mtl_ddi_pre_enable_dp()
2508 intel_dsc_dp_pps_write(encoder, crtc_state); in mtl_ddi_pre_enable_dp()
2512 struct intel_encoder *encoder, in tgl_ddi_pre_enable_dp() argument
2516 struct intel_dp *intel_dp = enc_to_intel_dp(encoder); in tgl_ddi_pre_enable_dp()
2517 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in tgl_ddi_pre_enable_dp()
2518 struct intel_digital_port *dig_port = enc_to_dig_port(encoder); in tgl_ddi_pre_enable_dp()
2529 intel_ddi_init_dp_buf_reg(encoder, crtc_state); in tgl_ddi_pre_enable_dp()
2556 intel_ddi_enable_clock(encoder, crtc_state); in tgl_ddi_pre_enable_dp()
2582 intel_ddi_enable_transcoder_clock(encoder, crtc_state); in tgl_ddi_pre_enable_dp()
2585 intel_ddi_config_transcoder_dp2(encoder, crtc_state); in tgl_ddi_pre_enable_dp()
2591 intel_ddi_config_transcoder_func(encoder, crtc_state); in tgl_ddi_pre_enable_dp()
2602 encoder->set_signal_levels(encoder, crtc_state); in tgl_ddi_pre_enable_dp()
2608 intel_ddi_power_up_lanes(encoder, crtc_state); in tgl_ddi_pre_enable_dp()
2644 intel_ddi_enable_fec(encoder, crtc_state); in tgl_ddi_pre_enable_dp()
2646 intel_dsc_dp_pps_write(encoder, crtc_state); in tgl_ddi_pre_enable_dp()
2650 struct intel_encoder *encoder, in hsw_ddi_pre_enable_dp() argument
2654 struct intel_dp *intel_dp = enc_to_intel_dp(encoder); in hsw_ddi_pre_enable_dp()
2655 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in hsw_ddi_pre_enable_dp()
2656 enum port port = encoder->port; in hsw_ddi_pre_enable_dp()
2657 struct intel_digital_port *dig_port = enc_to_dig_port(encoder); in hsw_ddi_pre_enable_dp()
2674 intel_ddi_init_dp_buf_reg(encoder, crtc_state); in hsw_ddi_pre_enable_dp()
2678 intel_ddi_enable_clock(encoder, crtc_state); in hsw_ddi_pre_enable_dp()
2689 hsw_prepare_dp_ddi_buffers(encoder, crtc_state); in hsw_ddi_pre_enable_dp()
2691 encoder->set_signal_levels(encoder, crtc_state); in hsw_ddi_pre_enable_dp()
2693 intel_ddi_power_up_lanes(encoder, crtc_state); in hsw_ddi_pre_enable_dp()
2706 intel_ddi_enable_fec(encoder, crtc_state); in hsw_ddi_pre_enable_dp()
2709 intel_ddi_enable_transcoder_clock(encoder, crtc_state); in hsw_ddi_pre_enable_dp()
2711 intel_dsc_dp_pps_write(encoder, crtc_state); in hsw_ddi_pre_enable_dp()
2715 struct intel_encoder *encoder, in intel_ddi_pre_enable_dp() argument
2719 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_ddi_pre_enable_dp()
2722 intel_dp_128b132b_sdp_crc16(enc_to_intel_dp(encoder), in intel_ddi_pre_enable_dp()
2726 mtl_ddi_pre_enable_dp(state, encoder, crtc_state, conn_state); in intel_ddi_pre_enable_dp()
2728 tgl_ddi_pre_enable_dp(state, encoder, crtc_state, conn_state); in intel_ddi_pre_enable_dp()
2730 hsw_ddi_pre_enable_dp(state, encoder, crtc_state, conn_state); in intel_ddi_pre_enable_dp()
2733 * from MST encoder pre_enable callback. in intel_ddi_pre_enable_dp()
2740 struct intel_encoder *encoder, in intel_ddi_pre_enable_hdmi() argument
2744 struct intel_digital_port *dig_port = enc_to_dig_port(encoder); in intel_ddi_pre_enable_hdmi()
2746 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_ddi_pre_enable_hdmi()
2749 intel_ddi_enable_clock(encoder, crtc_state); in intel_ddi_pre_enable_hdmi()
2757 intel_ddi_enable_transcoder_clock(encoder, crtc_state); in intel_ddi_pre_enable_hdmi()
2759 dig_port->set_infoframes(encoder, in intel_ddi_pre_enable_hdmi()
2765 struct intel_encoder *encoder, in intel_ddi_pre_enable() argument
2776 * - encoder will be the main encoder (ie. mst->primary) in intel_ddi_pre_enable()
2791 intel_ddi_pre_enable_hdmi(state, encoder, crtc_state, in intel_ddi_pre_enable()
2794 struct intel_digital_port *dig_port = enc_to_dig_port(encoder); in intel_ddi_pre_enable()
2796 intel_ddi_pre_enable_dp(state, encoder, crtc_state, in intel_ddi_pre_enable()
2802 dig_port->set_infoframes(encoder, in intel_ddi_pre_enable()
2809 mtl_ddi_disable_d2d_link(struct intel_encoder *encoder) in mtl_ddi_disable_d2d_link() argument
2811 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in mtl_ddi_disable_d2d_link()
2812 enum port port = encoder->port; in mtl_ddi_disable_d2d_link()
2823 static void mtl_disable_ddi_buf(struct intel_encoder *encoder, in mtl_disable_ddi_buf() argument
2826 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in mtl_disable_ddi_buf()
2827 enum port port = encoder->port; in mtl_disable_ddi_buf()
2841 mtl_ddi_disable_d2d_link(encoder); in mtl_disable_ddi_buf()
2845 intel_de_rmw(dev_priv, dp_tp_ctl_reg(encoder, crtc_state), in mtl_disable_ddi_buf()
2850 static void disable_ddi_buf(struct intel_encoder *encoder, in disable_ddi_buf() argument
2853 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in disable_ddi_buf()
2854 enum port port = encoder->port; in disable_ddi_buf()
2866 intel_de_rmw(dev_priv, dp_tp_ctl_reg(encoder, crtc_state), in disable_ddi_buf()
2870 intel_ddi_disable_fec_state(encoder, crtc_state); in disable_ddi_buf()
2876 static void intel_disable_ddi_buf(struct intel_encoder *encoder, in intel_disable_ddi_buf() argument
2879 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_disable_ddi_buf()
2882 mtl_disable_ddi_buf(encoder, crtc_state); in intel_disable_ddi_buf()
2885 intel_ddi_disable_fec_state(encoder, crtc_state); in intel_disable_ddi_buf()
2887 disable_ddi_buf(encoder, crtc_state); in intel_disable_ddi_buf()
2892 struct intel_encoder *encoder, in intel_ddi_post_disable_dp() argument
2896 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_ddi_post_disable_dp()
2897 struct intel_digital_port *dig_port = enc_to_dig_port(encoder); in intel_ddi_post_disable_dp()
2904 intel_dp_set_infoframes(encoder, false, in intel_ddi_post_disable_dp()
2926 intel_disable_ddi_buf(encoder, old_crtc_state); in intel_ddi_post_disable_dp()
2946 intel_ddi_disable_clock(encoder); in intel_ddi_post_disable_dp()
2950 intel_de_rmw(dev_priv, XELPDP_PORT_BUF_CTL1(encoder->port), in intel_ddi_post_disable_dp()
2955 struct intel_encoder *encoder, in intel_ddi_post_disable_hdmi() argument
2959 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_ddi_post_disable_hdmi()
2960 struct intel_digital_port *dig_port = enc_to_dig_port(encoder); in intel_ddi_post_disable_hdmi()
2964 dig_port->set_infoframes(encoder, false, in intel_ddi_post_disable_hdmi()
2970 intel_disable_ddi_buf(encoder, old_crtc_state); in intel_ddi_post_disable_hdmi()
2981 intel_ddi_disable_clock(encoder); in intel_ddi_post_disable_hdmi()
2987 struct intel_encoder *encoder, in intel_ddi_post_disable() argument
2991 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_ddi_post_disable()
3023 * - encoder will be the main encoder (ie. mst->primary) in intel_ddi_post_disable()
3034 intel_ddi_post_disable_hdmi(state, encoder, old_crtc_state, in intel_ddi_post_disable()
3037 intel_ddi_post_disable_dp(state, encoder, old_crtc_state, in intel_ddi_post_disable()
3042 struct intel_encoder *encoder, in intel_ddi_post_pll_disable() argument
3046 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in intel_ddi_post_pll_disable()
3047 struct intel_digital_port *dig_port = enc_to_dig_port(encoder); in intel_ddi_post_pll_disable()
3048 enum phy phy = intel_port_to_phy(i915, encoder->port); in intel_ddi_post_pll_disable()
3058 struct intel_encoder *encoder, in trans_port_sync_stop_link_train() argument
3090 intel_dp_stop_link_train(enc_to_intel_dp(encoder), in trans_port_sync_stop_link_train()
3095 struct intel_encoder *encoder, in intel_enable_ddi_dp() argument
3099 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_enable_ddi_dp()
3100 struct intel_dp *intel_dp = enc_to_intel_dp(encoder); in intel_enable_ddi_dp()
3101 struct intel_digital_port *dig_port = enc_to_dig_port(encoder); in intel_enable_ddi_dp()
3102 enum port port = encoder->port; in intel_enable_ddi_dp()
3111 intel_dp_set_infoframes(encoder, true, crtc_state, conn_state); in intel_enable_ddi_dp()
3113 intel_audio_codec_enable(encoder, crtc_state, conn_state); in intel_enable_ddi_dp()
3115 trans_port_sync_stop_link_train(state, encoder, crtc_state); in intel_enable_ddi_dp()
3139 struct intel_encoder *encoder, in intel_enable_ddi_hdmi() argument
3143 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_enable_ddi_hdmi()
3144 struct intel_digital_port *dig_port = enc_to_dig_port(encoder); in intel_enable_ddi_hdmi()
3146 enum port port = encoder->port; in intel_enable_ddi_hdmi()
3150 if (!intel_hdmi_handle_sink_scrambling(encoder, connector, in intel_enable_ddi_hdmi()
3158 hsw_prepare_hdmi_ddi_buffers(encoder, crtc_state); in intel_enable_ddi_hdmi()
3162 mtl_ddi_enable_d2d(encoder); in intel_enable_ddi_hdmi()
3164 encoder->set_signal_levels(encoder, crtc_state); in intel_enable_ddi_hdmi()
3201 intel_ddi_power_up_lanes(encoder, crtc_state); in intel_enable_ddi_hdmi()
3237 intel_audio_codec_enable(encoder, crtc_state, conn_state); in intel_enable_ddi_hdmi()
3241 struct intel_encoder *encoder, in intel_enable_ddi() argument
3248 intel_ddi_enable_transcoder_func(encoder, crtc_state); in intel_enable_ddi()
3251 intel_audio_sdp_split_update(encoder, crtc_state); in intel_enable_ddi()
3258 intel_enable_ddi_hdmi(state, encoder, crtc_state, conn_state); in intel_enable_ddi()
3260 intel_enable_ddi_dp(state, encoder, crtc_state, conn_state); in intel_enable_ddi()
3265 intel_hdcp_enable(state, encoder, crtc_state, conn_state); in intel_enable_ddi()
3269 struct intel_encoder *encoder, in intel_disable_ddi_dp() argument
3273 struct intel_dp *intel_dp = enc_to_intel_dp(encoder); in intel_disable_ddi_dp()
3277 intel_audio_codec_disable(encoder, old_crtc_state, old_conn_state); in intel_disable_ddi_dp()
3290 struct intel_encoder *encoder, in intel_disable_ddi_hdmi() argument
3294 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in intel_disable_ddi_hdmi()
3297 intel_audio_codec_disable(encoder, old_crtc_state, old_conn_state); in intel_disable_ddi_hdmi()
3299 if (!intel_hdmi_handle_sink_scrambling(encoder, connector, in intel_disable_ddi_hdmi()
3307 struct intel_encoder *encoder, in intel_disable_ddi() argument
3311 intel_tc_port_link_cancel_reset_work(enc_to_dig_port(encoder)); in intel_disable_ddi()
3316 intel_disable_ddi_hdmi(state, encoder, old_crtc_state, in intel_disable_ddi()
3319 intel_disable_ddi_dp(state, encoder, old_crtc_state, in intel_disable_ddi()
3324 struct intel_encoder *encoder, in intel_ddi_update_pipe_dp() argument
3330 intel_dp_set_infoframes(encoder, true, crtc_state, conn_state); in intel_ddi_update_pipe_dp()
3332 intel_backlight_update(state, encoder, crtc_state, conn_state); in intel_ddi_update_pipe_dp()
3337 struct intel_encoder *encoder, in intel_ddi_update_pipe() argument
3343 !intel_encoder_is_mst(encoder)) in intel_ddi_update_pipe()
3344 intel_ddi_update_pipe_dp(state, encoder, crtc_state, in intel_ddi_update_pipe()
3347 intel_hdcp_update_pipe(state, encoder, crtc_state, conn_state); in intel_ddi_update_pipe()
3351 struct intel_encoder *encoder, in intel_ddi_update_active_dpll() argument
3354 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in intel_ddi_update_active_dpll()
3358 enum phy phy = intel_port_to_phy(i915, encoder->port); in intel_ddi_update_active_dpll()
3364 intel_update_active_dpll(state, crtc, encoder); in intel_ddi_update_active_dpll()
3367 intel_update_active_dpll(state, slave_crtc, encoder); in intel_ddi_update_active_dpll()
3372 struct intel_encoder *encoder, in intel_ddi_pre_pll_enable() argument
3376 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_ddi_pre_pll_enable()
3377 struct intel_digital_port *dig_port = enc_to_dig_port(encoder); in intel_ddi_pre_pll_enable()
3378 enum phy phy = intel_port_to_phy(dev_priv, encoder->port); in intel_ddi_pre_pll_enable()
3386 intel_ddi_update_active_dpll(state, encoder, master_crtc); in intel_ddi_pre_pll_enable()
3398 bxt_ddi_phy_set_lane_optim_mask(encoder, in intel_ddi_pre_pll_enable()
3402 static void adlp_tbt_to_dp_alt_switch_wa(struct intel_encoder *encoder) in adlp_tbt_to_dp_alt_switch_wa() argument
3404 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in adlp_tbt_to_dp_alt_switch_wa()
3405 enum tc_port tc_port = intel_port_to_tc(i915, encoder->port); in adlp_tbt_to_dp_alt_switch_wa()
3416 struct intel_encoder *encoder = &dig_port->base; in mtl_ddi_prepare_link_retrain() local
3417 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in mtl_ddi_prepare_link_retrain()
3418 enum port port = encoder->port; in mtl_ddi_prepare_link_retrain()
3425 dp_tp_ctl = intel_de_read(dev_priv, dp_tp_ctl_reg(encoder, crtc_state)); in mtl_ddi_prepare_link_retrain()
3427 mtl_disable_ddi_buf(encoder, crtc_state); in mtl_ddi_prepare_link_retrain()
3438 intel_de_write(dev_priv, dp_tp_ctl_reg(encoder, crtc_state), dp_tp_ctl); in mtl_ddi_prepare_link_retrain()
3439 intel_de_posting_read(dev_priv, dp_tp_ctl_reg(encoder, crtc_state)); in mtl_ddi_prepare_link_retrain()
3442 mtl_ddi_enable_d2d(encoder); in mtl_ddi_prepare_link_retrain()
3445 encoder->set_signal_levels(encoder, crtc_state); in mtl_ddi_prepare_link_retrain()
3448 mtl_port_buf_ctl_program(encoder, crtc_state); in mtl_ddi_prepare_link_retrain()
3463 struct intel_encoder *encoder = &dig_port->base; in intel_ddi_prepare_link_retrain() local
3464 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_ddi_prepare_link_retrain()
3465 enum port port = encoder->port; in intel_ddi_prepare_link_retrain()
3469 dp_tp_ctl = intel_de_read(dev_priv, dp_tp_ctl_reg(encoder, crtc_state)); in intel_ddi_prepare_link_retrain()
3480 intel_de_write(dev_priv, dp_tp_ctl_reg(encoder, crtc_state), dp_tp_ctl); in intel_ddi_prepare_link_retrain()
3481 intel_de_posting_read(dev_priv, dp_tp_ctl_reg(encoder, crtc_state)); in intel_ddi_prepare_link_retrain()
3495 intel_de_write(dev_priv, dp_tp_ctl_reg(encoder, crtc_state), dp_tp_ctl); in intel_ddi_prepare_link_retrain()
3496 intel_de_posting_read(dev_priv, dp_tp_ctl_reg(encoder, crtc_state)); in intel_ddi_prepare_link_retrain()
3500 adlp_tbt_to_dp_alt_switch_wa(encoder); in intel_ddi_prepare_link_retrain()
3513 struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base; in intel_ddi_set_link_train() local
3514 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_ddi_set_link_train()
3517 temp = intel_de_read(dev_priv, dp_tp_ctl_reg(encoder, crtc_state)); in intel_ddi_set_link_train()
3538 intel_de_write(dev_priv, dp_tp_ctl_reg(encoder, crtc_state), temp); in intel_ddi_set_link_train()
3544 struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base; in intel_ddi_set_idle_link_train() local
3545 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_ddi_set_idle_link_train()
3546 enum port port = encoder->port; in intel_ddi_set_idle_link_train()
3548 intel_de_rmw(dev_priv, dp_tp_ctl_reg(encoder, crtc_state), in intel_ddi_set_idle_link_train()
3562 dp_tp_status_reg(encoder, crtc_state), in intel_ddi_set_idle_link_train()
3653 static void intel_ddi_read_func_ctl(struct intel_encoder *encoder, in intel_ddi_read_func_ctl() argument
3656 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_ddi_read_func_ctl()
3659 struct intel_digital_port *dig_port = enc_to_dig_port(encoder); in intel_ddi_read_func_ctl()
3696 intel_hdmi_infoframes_enabled(encoder, pipe_config); in intel_ddi_read_func_ctl()
3715 if (encoder->type == INTEL_OUTPUT_EDP) in intel_ddi_read_func_ctl()
3728 intel_de_read(dev_priv, dp_tp_ctl_reg(encoder, pipe_config)) & in intel_ddi_read_func_ctl()
3734 dp_tp_ctl_reg(encoder, pipe_config)) & DP_TP_CTL_FEC_ENABLE; in intel_ddi_read_func_ctl()
3738 intel_lspcon_infoframes_enabled(encoder, pipe_config); in intel_ddi_read_func_ctl()
3741 intel_hdmi_infoframes_enabled(encoder, pipe_config); in intel_ddi_read_func_ctl()
3748 intel_de_read(dev_priv, dp_tp_ctl_reg(encoder, pipe_config)) & in intel_ddi_read_func_ctl()
3766 intel_hdmi_infoframes_enabled(encoder, pipe_config); in intel_ddi_read_func_ctl()
3773 static void intel_ddi_get_config(struct intel_encoder *encoder, in intel_ddi_get_config() argument
3776 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_ddi_get_config()
3783 intel_ddi_read_func_ctl(encoder, pipe_config); in intel_ddi_get_config()
3785 intel_ddi_mso_get_config(encoder, pipe_config); in intel_ddi_get_config()
3790 if (encoder->type == INTEL_OUTPUT_EDP) in intel_ddi_get_config()
3791 intel_edp_fixup_vbt_bpp(encoder, pipe_config->pipe_bpp); in intel_ddi_get_config()
3797 bxt_ddi_phy_get_lane_lat_optim_mask(encoder); in intel_ddi_get_config()
3801 intel_hdmi_read_gcp_infoframe(encoder, pipe_config); in intel_ddi_get_config()
3803 intel_read_infoframe(encoder, pipe_config, in intel_ddi_get_config()
3806 intel_read_infoframe(encoder, pipe_config, in intel_ddi_get_config()
3809 intel_read_infoframe(encoder, pipe_config, in intel_ddi_get_config()
3812 intel_read_infoframe(encoder, pipe_config, in intel_ddi_get_config()
3819 intel_read_dp_sdp(encoder, pipe_config, HDMI_PACKET_TYPE_GAMUT_METADATA); in intel_ddi_get_config()
3820 intel_read_dp_sdp(encoder, pipe_config, DP_SDP_VSC); in intel_ddi_get_config()
3822 intel_psr_get_config(encoder, pipe_config); in intel_ddi_get_config()
3824 intel_audio_codec_get_config(encoder, pipe_config); in intel_ddi_get_config()
3827 void intel_ddi_get_clock(struct intel_encoder *encoder, in intel_ddi_get_clock() argument
3831 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in intel_ddi_get_clock()
3849 static void mtl_ddi_get_config(struct intel_encoder *encoder, in mtl_ddi_get_config() argument
3852 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in mtl_ddi_get_config()
3853 enum phy phy = intel_port_to_phy(i915, encoder->port); in mtl_ddi_get_config()
3854 struct intel_digital_port *dig_port = enc_to_dig_port(encoder); in mtl_ddi_get_config()
3857 crtc_state->port_clock = intel_mtl_tbt_calc_port_clock(encoder); in mtl_ddi_get_config()
3859 intel_c10pll_readout_hw_state(encoder, &crtc_state->cx0pll_state.c10); in mtl_ddi_get_config()
3861 crtc_state->port_clock = intel_c10pll_calc_port_clock(encoder, &crtc_state->cx0pll_state.c10); in mtl_ddi_get_config()
3863 intel_c20pll_readout_hw_state(encoder, &crtc_state->cx0pll_state.c20); in mtl_ddi_get_config()
3865 crtc_state->port_clock = intel_c20pll_calc_port_clock(encoder, &crtc_state->cx0pll_state.c20); in mtl_ddi_get_config()
3868 intel_ddi_get_config(encoder, crtc_state); in mtl_ddi_get_config()
3871 static void dg2_ddi_get_config(struct intel_encoder *encoder, in dg2_ddi_get_config() argument
3874 intel_mpllb_readout_hw_state(encoder, &crtc_state->mpllb_state); in dg2_ddi_get_config()
3875 crtc_state->port_clock = intel_mpllb_calc_port_clock(encoder, &crtc_state->mpllb_state); in dg2_ddi_get_config()
3877 intel_ddi_get_config(encoder, crtc_state); in dg2_ddi_get_config()
3880 static void adls_ddi_get_config(struct intel_encoder *encoder, in adls_ddi_get_config() argument
3883 intel_ddi_get_clock(encoder, crtc_state, adls_ddi_get_pll(encoder)); in adls_ddi_get_config()
3884 intel_ddi_get_config(encoder, crtc_state); in adls_ddi_get_config()
3887 static void rkl_ddi_get_config(struct intel_encoder *encoder, in rkl_ddi_get_config() argument
3890 intel_ddi_get_clock(encoder, crtc_state, rkl_ddi_get_pll(encoder)); in rkl_ddi_get_config()
3891 intel_ddi_get_config(encoder, crtc_state); in rkl_ddi_get_config()
3894 static void dg1_ddi_get_config(struct intel_encoder *encoder, in dg1_ddi_get_config() argument
3897 intel_ddi_get_clock(encoder, crtc_state, dg1_ddi_get_pll(encoder)); in dg1_ddi_get_config()
3898 intel_ddi_get_config(encoder, crtc_state); in dg1_ddi_get_config()
3901 static void icl_ddi_combo_get_config(struct intel_encoder *encoder, in icl_ddi_combo_get_config() argument
3904 intel_ddi_get_clock(encoder, crtc_state, icl_ddi_combo_get_pll(encoder)); in icl_ddi_combo_get_config()
3905 intel_ddi_get_config(encoder, crtc_state); in icl_ddi_combo_get_config()
3914 icl_ddi_tc_port_pll_type(struct intel_encoder *encoder, in icl_ddi_tc_port_pll_type() argument
3917 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in icl_ddi_tc_port_pll_type()
3930 intel_ddi_port_pll_type(struct intel_encoder *encoder, in intel_ddi_port_pll_type() argument
3933 if (!encoder->port_pll_type) in intel_ddi_port_pll_type()
3936 return encoder->port_pll_type(encoder, crtc_state); in intel_ddi_port_pll_type()
3939 static void icl_ddi_tc_get_clock(struct intel_encoder *encoder, in icl_ddi_tc_get_clock() argument
3943 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in icl_ddi_tc_get_clock()
3965 crtc_state->port_clock = icl_calc_tbt_pll_link(i915, encoder->port); in icl_ddi_tc_get_clock()
3971 static void icl_ddi_tc_get_config(struct intel_encoder *encoder, in icl_ddi_tc_get_config() argument
3974 icl_ddi_tc_get_clock(encoder, crtc_state, icl_ddi_tc_get_pll(encoder)); in icl_ddi_tc_get_config()
3975 intel_ddi_get_config(encoder, crtc_state); in icl_ddi_tc_get_config()
3978 static void bxt_ddi_get_config(struct intel_encoder *encoder, in bxt_ddi_get_config() argument
3981 intel_ddi_get_clock(encoder, crtc_state, bxt_ddi_get_pll(encoder)); in bxt_ddi_get_config()
3982 intel_ddi_get_config(encoder, crtc_state); in bxt_ddi_get_config()
3985 static void skl_ddi_get_config(struct intel_encoder *encoder, in skl_ddi_get_config() argument
3988 intel_ddi_get_clock(encoder, crtc_state, skl_ddi_get_pll(encoder)); in skl_ddi_get_config()
3989 intel_ddi_get_config(encoder, crtc_state); in skl_ddi_get_config()
3992 void hsw_ddi_get_config(struct intel_encoder *encoder, in hsw_ddi_get_config() argument
3995 intel_ddi_get_clock(encoder, crtc_state, hsw_ddi_get_pll(encoder)); in hsw_ddi_get_config()
3996 intel_ddi_get_config(encoder, crtc_state); in hsw_ddi_get_config()
3999 static void intel_ddi_sync_state(struct intel_encoder *encoder, in intel_ddi_sync_state() argument
4002 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in intel_ddi_sync_state()
4003 enum phy phy = intel_port_to_phy(i915, encoder->port); in intel_ddi_sync_state()
4006 intel_tc_port_sanitize_mode(enc_to_dig_port(encoder), in intel_ddi_sync_state()
4010 intel_dp_sync_state(encoder, crtc_state); in intel_ddi_sync_state()
4013 static bool intel_ddi_initial_fastset_check(struct intel_encoder *encoder, in intel_ddi_initial_fastset_check() argument
4016 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in intel_ddi_initial_fastset_check()
4017 enum phy phy = intel_port_to_phy(i915, encoder->port); in intel_ddi_initial_fastset_check()
4021 drm_dbg_kms(&i915->drm, "[ENCODER:%d:%s] Forcing full modeset to compute TC port DPLLs\n", in intel_ddi_initial_fastset_check()
4022 encoder->base.base.id, encoder->base.name); in intel_ddi_initial_fastset_check()
4028 !intel_dp_initial_fastset_check(encoder, crtc_state)) in intel_ddi_initial_fastset_check()
4035 intel_ddi_compute_output_type(struct intel_encoder *encoder, in intel_ddi_compute_output_type() argument
4052 static int intel_ddi_compute_config(struct intel_encoder *encoder, in intel_ddi_compute_config() argument
4057 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_ddi_compute_config()
4058 enum port port = encoder->port; in intel_ddi_compute_config()
4066 intel_hdmi_compute_has_hdmi_sink(encoder, pipe_config, conn_state); in intel_ddi_compute_config()
4068 ret = intel_hdmi_compute_config(encoder, pipe_config, conn_state); in intel_ddi_compute_config()
4070 ret = intel_dp_compute_config(encoder, pipe_config, conn_state); in intel_ddi_compute_config()
4173 static int intel_ddi_compute_config_late(struct intel_encoder *encoder, in intel_ddi_compute_config_late() argument
4177 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in intel_ddi_compute_config_late()
4181 drm_dbg_kms(&i915->drm, "[ENCODER:%d:%s] [CRTC:%d:%s]", in intel_ddi_compute_config_late()
4182 encoder->base.base.id, encoder->base.name, in intel_ddi_compute_config_late()
4207 static void intel_ddi_encoder_destroy(struct drm_encoder *encoder) in intel_ddi_encoder_destroy() argument
4209 struct drm_i915_private *i915 = to_i915(encoder->dev); in intel_ddi_encoder_destroy()
4210 struct intel_digital_port *dig_port = enc_to_dig_port(to_intel_encoder(encoder)); in intel_ddi_encoder_destroy()
4213 intel_dp_encoder_flush_work(encoder); in intel_ddi_encoder_destroy()
4218 drm_encoder_cleanup(encoder); in intel_ddi_encoder_destroy()
4223 static void intel_ddi_encoder_reset(struct drm_encoder *encoder) in intel_ddi_encoder_reset() argument
4225 struct drm_i915_private *i915 = to_i915(encoder->dev); in intel_ddi_encoder_reset()
4226 struct intel_dp *intel_dp = enc_to_intel_dp(to_intel_encoder(encoder)); in intel_ddi_encoder_reset()
4227 struct intel_digital_port *dig_port = enc_to_dig_port(to_intel_encoder(encoder)); in intel_ddi_encoder_reset()
4240 struct intel_encoder *encoder = to_intel_encoder(_encoder); in intel_ddi_encoder_late_register() local
4242 intel_tc_port_link_reset(enc_to_dig_port(encoder)); in intel_ddi_encoder_late_register()
4325 static int intel_hdmi_reset_link(struct intel_encoder *encoder, in intel_hdmi_reset_link() argument
4328 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_hdmi_reset_link()
4329 struct intel_hdmi *hdmi = enc_to_intel_hdmi(encoder); in intel_hdmi_reset_link()
4399 intel_ddi_hotplug(struct intel_encoder *encoder, in intel_ddi_hotplug() argument
4402 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in intel_ddi_hotplug()
4403 struct intel_digital_port *dig_port = enc_to_dig_port(encoder); in intel_ddi_hotplug()
4405 enum phy phy = intel_port_to_phy(i915, encoder->port); in intel_ddi_hotplug()
4413 intel_dp_phy_test(encoder); in intel_ddi_hotplug()
4418 state = intel_encoder_hotplug(encoder, connector); in intel_ddi_hotplug()
4423 ret = intel_hdmi_reset_link(encoder, &ctx); in intel_ddi_hotplug()
4425 ret = intel_dp_retrain_link(encoder, &ctx); in intel_ddi_hotplug()
4428 drm_WARN_ON(encoder->base.dev, ret); in intel_ddi_hotplug()
4461 static bool lpt_digital_port_connected(struct intel_encoder *encoder) in lpt_digital_port_connected() argument
4463 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in lpt_digital_port_connected()
4464 u32 bit = dev_priv->display.hotplug.pch_hpd[encoder->hpd_pin]; in lpt_digital_port_connected()
4469 static bool hsw_digital_port_connected(struct intel_encoder *encoder) in hsw_digital_port_connected() argument
4471 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in hsw_digital_port_connected()
4472 u32 bit = dev_priv->display.hotplug.hpd[encoder->hpd_pin]; in hsw_digital_port_connected()
4477 static bool bdw_digital_port_connected(struct intel_encoder *encoder) in bdw_digital_port_connected() argument
4479 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in bdw_digital_port_connected()
4480 u32 bit = dev_priv->display.hotplug.hpd[encoder->hpd_pin]; in bdw_digital_port_connected()
4633 static void intel_ddi_encoder_suspend(struct intel_encoder *encoder) in intel_ddi_encoder_suspend() argument
4635 intel_dp_encoder_suspend(encoder); in intel_ddi_encoder_suspend()
4638 static void intel_ddi_tc_encoder_suspend_complete(struct intel_encoder *encoder) in intel_ddi_tc_encoder_suspend_complete() argument
4640 struct intel_dp *intel_dp = enc_to_intel_dp(encoder); in intel_ddi_tc_encoder_suspend_complete()
4646 static void intel_ddi_encoder_shutdown(struct intel_encoder *encoder) in intel_ddi_encoder_shutdown() argument
4648 intel_dp_encoder_shutdown(encoder); in intel_ddi_encoder_shutdown()
4649 intel_hdmi_encoder_shutdown(encoder); in intel_ddi_encoder_shutdown()
4652 static void intel_ddi_tc_encoder_shutdown_complete(struct intel_encoder *encoder) in intel_ddi_tc_encoder_shutdown_complete() argument
4654 struct intel_dp *intel_dp = enc_to_intel_dp(encoder); in intel_ddi_tc_encoder_shutdown_complete()
4686 static bool need_aux_ch(struct intel_encoder *encoder, bool init_dp) in need_aux_ch() argument
4688 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in need_aux_ch()
4689 enum phy phy = intel_port_to_phy(i915, encoder->port); in need_aux_ch()
4703 struct intel_encoder *encoder; in port_in_use() local
4705 for_each_intel_encoder(&i915->drm, encoder) { in port_in_use()
4707 if (encoder->port == port) in port_in_use()
4718 struct intel_encoder *encoder; in intel_ddi_init() local
4801 encoder = &dig_port->base; in intel_ddi_init()
4802 encoder->devdata = devdata; in intel_ddi_init()
4805 drm_encoder_init(&dev_priv->drm, &encoder->base, &intel_ddi_funcs, in intel_ddi_init()
4813 drm_encoder_init(&dev_priv->drm, &encoder->base, &intel_ddi_funcs, in intel_ddi_init()
4823 drm_encoder_init(&dev_priv->drm, &encoder->base, &intel_ddi_funcs, in intel_ddi_init()
4831 drm_encoder_init(&dev_priv->drm, &encoder->base, &intel_ddi_funcs, in intel_ddi_init()
4839 encoder->hotplug = intel_ddi_hotplug; in intel_ddi_init()
4840 encoder->compute_output_type = intel_ddi_compute_output_type; in intel_ddi_init()
4841 encoder->compute_config = intel_ddi_compute_config; in intel_ddi_init()
4842 encoder->compute_config_late = intel_ddi_compute_config_late; in intel_ddi_init()
4843 encoder->enable = intel_enable_ddi; in intel_ddi_init()
4844 encoder->pre_pll_enable = intel_ddi_pre_pll_enable; in intel_ddi_init()
4845 encoder->pre_enable = intel_ddi_pre_enable; in intel_ddi_init()
4846 encoder->disable = intel_disable_ddi; in intel_ddi_init()
4847 encoder->post_pll_disable = intel_ddi_post_pll_disable; in intel_ddi_init()
4848 encoder->post_disable = intel_ddi_post_disable; in intel_ddi_init()
4849 encoder->update_pipe = intel_ddi_update_pipe; in intel_ddi_init()
4850 encoder->get_hw_state = intel_ddi_get_hw_state; in intel_ddi_init()
4851 encoder->sync_state = intel_ddi_sync_state; in intel_ddi_init()
4852 encoder->initial_fastset_check = intel_ddi_initial_fastset_check; in intel_ddi_init()
4853 encoder->suspend = intel_ddi_encoder_suspend; in intel_ddi_init()
4854 encoder->shutdown = intel_ddi_encoder_shutdown; in intel_ddi_init()
4855 encoder->get_power_domains = intel_ddi_get_power_domains; in intel_ddi_init()
4857 encoder->type = INTEL_OUTPUT_DDI; in intel_ddi_init()
4858 encoder->power_domain = intel_display_power_ddi_lanes_domain(dev_priv, port); in intel_ddi_init()
4859 encoder->port = port; in intel_ddi_init()
4860 encoder->cloneable = 0; in intel_ddi_init()
4861 encoder->pipe_mask = ~0; in intel_ddi_init()
4864 encoder->enable_clock = intel_mtl_pll_enable; in intel_ddi_init()
4865 encoder->disable_clock = intel_mtl_pll_disable; in intel_ddi_init()
4866 encoder->port_pll_type = intel_mtl_port_pll_type; in intel_ddi_init()
4867 encoder->get_config = mtl_ddi_get_config; in intel_ddi_init()
4869 encoder->enable_clock = intel_mpllb_enable; in intel_ddi_init()
4870 encoder->disable_clock = intel_mpllb_disable; in intel_ddi_init()
4871 encoder->get_config = dg2_ddi_get_config; in intel_ddi_init()
4873 encoder->enable_clock = adls_ddi_enable_clock; in intel_ddi_init()
4874 encoder->disable_clock = adls_ddi_disable_clock; in intel_ddi_init()
4875 encoder->is_clock_enabled = adls_ddi_is_clock_enabled; in intel_ddi_init()
4876 encoder->get_config = adls_ddi_get_config; in intel_ddi_init()
4878 encoder->enable_clock = rkl_ddi_enable_clock; in intel_ddi_init()
4879 encoder->disable_clock = rkl_ddi_disable_clock; in intel_ddi_init()
4880 encoder->is_clock_enabled = rkl_ddi_is_clock_enabled; in intel_ddi_init()
4881 encoder->get_config = rkl_ddi_get_config; in intel_ddi_init()
4883 encoder->enable_clock = dg1_ddi_enable_clock; in intel_ddi_init()
4884 encoder->disable_clock = dg1_ddi_disable_clock; in intel_ddi_init()
4885 encoder->is_clock_enabled = dg1_ddi_is_clock_enabled; in intel_ddi_init()
4886 encoder->get_config = dg1_ddi_get_config; in intel_ddi_init()
4889 encoder->enable_clock = jsl_ddi_tc_enable_clock; in intel_ddi_init()
4890 encoder->disable_clock = jsl_ddi_tc_disable_clock; in intel_ddi_init()
4891 encoder->is_clock_enabled = jsl_ddi_tc_is_clock_enabled; in intel_ddi_init()
4892 encoder->port_pll_type = icl_ddi_tc_port_pll_type; in intel_ddi_init()
4893 encoder->get_config = icl_ddi_combo_get_config; in intel_ddi_init()
4895 encoder->enable_clock = icl_ddi_combo_enable_clock; in intel_ddi_init()
4896 encoder->disable_clock = icl_ddi_combo_disable_clock; in intel_ddi_init()
4897 encoder->is_clock_enabled = icl_ddi_combo_is_clock_enabled; in intel_ddi_init()
4898 encoder->get_config = icl_ddi_combo_get_config; in intel_ddi_init()
4902 encoder->enable_clock = icl_ddi_tc_enable_clock; in intel_ddi_init()
4903 encoder->disable_clock = icl_ddi_tc_disable_clock; in intel_ddi_init()
4904 encoder->is_clock_enabled = icl_ddi_tc_is_clock_enabled; in intel_ddi_init()
4905 encoder->port_pll_type = icl_ddi_tc_port_pll_type; in intel_ddi_init()
4906 encoder->get_config = icl_ddi_tc_get_config; in intel_ddi_init()
4908 encoder->enable_clock = icl_ddi_combo_enable_clock; in intel_ddi_init()
4909 encoder->disable_clock = icl_ddi_combo_disable_clock; in intel_ddi_init()
4910 encoder->is_clock_enabled = icl_ddi_combo_is_clock_enabled; in intel_ddi_init()
4911 encoder->get_config = icl_ddi_combo_get_config; in intel_ddi_init()
4915 encoder->get_config = bxt_ddi_get_config; in intel_ddi_init()
4917 encoder->enable_clock = skl_ddi_enable_clock; in intel_ddi_init()
4918 encoder->disable_clock = skl_ddi_disable_clock; in intel_ddi_init()
4919 encoder->is_clock_enabled = skl_ddi_is_clock_enabled; in intel_ddi_init()
4920 encoder->get_config = skl_ddi_get_config; in intel_ddi_init()
4922 encoder->enable_clock = hsw_ddi_enable_clock; in intel_ddi_init()
4923 encoder->disable_clock = hsw_ddi_disable_clock; in intel_ddi_init()
4924 encoder->is_clock_enabled = hsw_ddi_is_clock_enabled; in intel_ddi_init()
4925 encoder->get_config = hsw_ddi_get_config; in intel_ddi_init()
4929 encoder->set_signal_levels = intel_cx0_phy_set_signal_levels; in intel_ddi_init()
4931 encoder->set_signal_levels = intel_snps_phy_set_signal_levels; in intel_ddi_init()
4934 encoder->set_signal_levels = icl_combo_phy_set_signal_levels; in intel_ddi_init()
4936 encoder->set_signal_levels = tgl_dkl_phy_set_signal_levels; in intel_ddi_init()
4939 encoder->set_signal_levels = icl_combo_phy_set_signal_levels; in intel_ddi_init()
4941 encoder->set_signal_levels = icl_mg_phy_set_signal_levels; in intel_ddi_init()
4943 encoder->set_signal_levels = bxt_ddi_phy_set_signal_levels; in intel_ddi_init()
4945 encoder->set_signal_levels = hsw_set_signal_levels; in intel_ddi_init()
4948 intel_ddi_buf_trans_init(encoder); in intel_ddi_init()
4951 encoder->hpd_pin = xelpd_hpd_pin(dev_priv, port); in intel_ddi_init()
4953 encoder->hpd_pin = dg1_hpd_pin(dev_priv, port); in intel_ddi_init()
4955 encoder->hpd_pin = rkl_hpd_pin(dev_priv, port); in intel_ddi_init()
4957 encoder->hpd_pin = tgl_hpd_pin(dev_priv, port); in intel_ddi_init()
4959 encoder->hpd_pin = ehl_hpd_pin(dev_priv, port); in intel_ddi_init()
4961 encoder->hpd_pin = icl_hpd_pin(dev_priv, port); in intel_ddi_init()
4963 encoder->hpd_pin = skl_hpd_pin(dev_priv, port); in intel_ddi_init()
4965 encoder->hpd_pin = intel_hpd_pin_default(dev_priv, port); in intel_ddi_init()
4982 if (need_aux_ch(encoder, init_dp)) { in intel_ddi_init()
4983 dig_port->aux_ch = intel_dp_aux_ch(encoder); in intel_ddi_init()
5003 encoder->suspend_complete = intel_ddi_tc_encoder_suspend_complete; in intel_ddi_init()
5004 encoder->shutdown_complete = intel_ddi_tc_encoder_shutdown_complete; in intel_ddi_init()
5043 encoder->pipe_mask = intel_ddi_splitter_pipe_mask(dev_priv); in intel_ddi_init()
5047 * In theory we don't need the encoder->type check, in intel_ddi_init()
5050 if (encoder->type != INTEL_OUTPUT_EDP && init_hdmi) { in intel_ddi_init()
5058 drm_encoder_cleanup(&encoder->base); in intel_ddi_init()