Lines Matching full:encoder

94 static int intel_ddi_hdmi_level(struct intel_encoder *encoder,  in intel_ddi_hdmi_level()  argument
99 level = intel_bios_hdmi_level_shift(encoder->devdata); in intel_ddi_hdmi_level()
121 void hsw_prepare_dp_ddi_buffers(struct intel_encoder *encoder, in hsw_prepare_dp_ddi_buffers() argument
124 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in hsw_prepare_dp_ddi_buffers()
127 enum port port = encoder->port; in hsw_prepare_dp_ddi_buffers()
130 trans = encoder->get_buf_trans(encoder, crtc_state, &n_entries); in hsw_prepare_dp_ddi_buffers()
136 intel_bios_dp_boost_level(encoder->devdata)) in hsw_prepare_dp_ddi_buffers()
152 static void hsw_prepare_hdmi_ddi_buffers(struct intel_encoder *encoder, in hsw_prepare_hdmi_ddi_buffers() argument
155 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in hsw_prepare_hdmi_ddi_buffers()
156 int level = intel_ddi_level(encoder, crtc_state, 0); in hsw_prepare_hdmi_ddi_buffers()
159 enum port port = encoder->port; in hsw_prepare_hdmi_ddi_buffers()
162 trans = encoder->get_buf_trans(encoder, crtc_state, &n_entries); in hsw_prepare_hdmi_ddi_buffers()
168 intel_bios_hdmi_boost_level(encoder->devdata)) in hsw_prepare_hdmi_ddi_buffers()
204 static void intel_wait_ddi_buf_active(struct intel_encoder *encoder) in intel_wait_ddi_buf_active() argument
206 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_wait_ddi_buf_active()
207 enum port port = encoder->port; in intel_wait_ddi_buf_active()
222 if (intel_encoder_is_tc(encoder)) in intel_wait_ddi_buf_active()
265 static u32 icl_pll_to_ddi_clk_sel(struct intel_encoder *encoder, in icl_pll_to_ddi_clk_sel() argument
329 static void intel_ddi_init_dp_buf_reg(struct intel_encoder *encoder, in intel_ddi_init_dp_buf_reg() argument
332 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in intel_ddi_init_dp_buf_reg()
333 struct intel_dp *intel_dp = enc_to_intel_dp(encoder); in intel_ddi_init_dp_buf_reg()
334 struct intel_digital_port *dig_port = enc_to_dig_port(encoder); in intel_ddi_init_dp_buf_reg()
348 if (IS_ALDERLAKE_P(i915) && intel_encoder_is_tc(encoder)) { in intel_ddi_init_dp_buf_reg()
457 intel_ddi_config_transcoder_dp2(struct intel_encoder *encoder, in intel_ddi_config_transcoder_dp2() argument
460 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in intel_ddi_config_transcoder_dp2()
477 intel_ddi_transcoder_func_reg_val_get(struct intel_encoder *encoder, in intel_ddi_transcoder_func_reg_val_get() argument
484 enum port port = encoder->port; in intel_ddi_transcoder_func_reg_val_get()
588 void intel_ddi_enable_transcoder_func(struct intel_encoder *encoder, in intel_ddi_enable_transcoder_func() argument
613 intel_ddi_transcoder_func_reg_val_get(encoder, in intel_ddi_enable_transcoder_func()
622 intel_ddi_config_transcoder_func(struct intel_encoder *encoder, in intel_ddi_config_transcoder_func() argument
630 ctl = intel_ddi_transcoder_func_reg_val_get(encoder, crtc_state); in intel_ddi_config_transcoder_func()
704 struct intel_encoder *encoder = intel_attached_encoder(intel_connector); in intel_ddi_connector_get_hw_state() local
706 enum port port = encoder->port; in intel_ddi_connector_get_hw_state()
714 encoder->power_domain); in intel_ddi_connector_get_hw_state()
718 if (!encoder->get_hw_state(encoder, &pipe)) { in intel_ddi_connector_get_hw_state()
763 intel_display_power_put(dev_priv, encoder->power_domain, wakeref); in intel_ddi_connector_get_hw_state()
768 static void intel_ddi_get_encoder_pipes(struct intel_encoder *encoder, in intel_ddi_get_encoder_pipes() argument
771 struct drm_device *dev = encoder->base.dev; in intel_ddi_get_encoder_pipes()
773 enum port port = encoder->port; in intel_ddi_get_encoder_pipes()
783 encoder->power_domain); in intel_ddi_get_encoder_pipes()
851 "No pipe for [ENCODER:%d:%s] found\n", in intel_ddi_get_encoder_pipes()
852 encoder->base.base.id, encoder->base.name); in intel_ddi_get_encoder_pipes()
856 "Multiple pipes for [ENCODER:%d:%s] (pipe_mask %02x)\n", in intel_ddi_get_encoder_pipes()
857 encoder->base.base.id, encoder->base.name, in intel_ddi_get_encoder_pipes()
864 … "Conflicting MST and non-MST state for [ENCODER:%d:%s] (pipe_mask %02x mst_pipe_mask %02x)\n", in intel_ddi_get_encoder_pipes()
865 encoder->base.base.id, encoder->base.name, in intel_ddi_get_encoder_pipes()
877 "[ENCODER:%d:%s] enabled but PHY powered down? (PHY_CTL %08x)\n", in intel_ddi_get_encoder_pipes()
878 encoder->base.base.id, encoder->base.name, tmp); in intel_ddi_get_encoder_pipes()
881 intel_display_power_put(dev_priv, encoder->power_domain, wakeref); in intel_ddi_get_encoder_pipes()
884 bool intel_ddi_get_hw_state(struct intel_encoder *encoder, in intel_ddi_get_hw_state() argument
890 intel_ddi_get_encoder_pipes(encoder, &pipe_mask, &is_mst); in intel_ddi_get_hw_state()
961 static void intel_ddi_get_power_domains(struct intel_encoder *encoder, in intel_ddi_get_power_domains() argument
964 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_ddi_get_power_domains()
976 dig_port = enc_to_dig_port(encoder); in intel_ddi_get_power_domains()
987 void intel_ddi_enable_transcoder_clock(struct intel_encoder *encoder, in intel_ddi_enable_transcoder_clock() argument
993 enum phy phy = intel_encoder_to_phy(encoder); in intel_ddi_enable_transcoder_clock()
1002 val = TGL_TRANS_CLK_SEL_PORT(encoder->port); in intel_ddi_enable_transcoder_clock()
1004 val = TRANS_CLK_SEL_PORT(encoder->port); in intel_ddi_enable_transcoder_clock()
1040 static void skl_ddi_set_iboost(struct intel_encoder *encoder, in skl_ddi_set_iboost() argument
1044 struct intel_digital_port *dig_port = enc_to_dig_port(encoder); in skl_ddi_set_iboost()
1045 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in skl_ddi_set_iboost()
1049 iboost = intel_bios_hdmi_boost_level(encoder->devdata); in skl_ddi_set_iboost()
1051 iboost = intel_bios_dp_boost_level(encoder->devdata); in skl_ddi_set_iboost()
1057 trans = encoder->get_buf_trans(encoder, crtc_state, &n_entries); in skl_ddi_set_iboost()
1070 _skl_ddi_set_iboost(dev_priv, encoder->port, iboost); in skl_ddi_set_iboost()
1072 if (encoder->port == PORT_A && dig_port->max_lanes == 4) in skl_ddi_set_iboost()
1079 struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base; in intel_ddi_dp_voltage_max() local
1080 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_ddi_dp_voltage_max()
1083 encoder->get_buf_trans(encoder, crtc_state, &n_entries); in intel_ddi_dp_voltage_max()
1117 static void icl_ddi_combo_vswing_program(struct intel_encoder *encoder, in icl_ddi_combo_vswing_program() argument
1120 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in icl_ddi_combo_vswing_program()
1122 enum phy phy = intel_encoder_to_phy(encoder); in icl_ddi_combo_vswing_program()
1126 trans = encoder->get_buf_trans(encoder, crtc_state, &n_entries); in icl_ddi_combo_vswing_program()
1131 struct intel_dp *intel_dp = enc_to_intel_dp(encoder); in icl_ddi_combo_vswing_program()
1150 int level = intel_ddi_level(encoder, crtc_state, ln); in icl_ddi_combo_vswing_program()
1162 int level = intel_ddi_level(encoder, crtc_state, ln); in icl_ddi_combo_vswing_program()
1173 int level = intel_ddi_level(encoder, crtc_state, ln); in icl_ddi_combo_vswing_program()
1181 static void icl_combo_phy_set_signal_levels(struct intel_encoder *encoder, in icl_combo_phy_set_signal_levels() argument
1184 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in icl_combo_phy_set_signal_levels()
1185 enum phy phy = intel_encoder_to_phy(encoder); in icl_combo_phy_set_signal_levels()
1224 icl_ddi_combo_vswing_program(encoder, crtc_state); in icl_combo_phy_set_signal_levels()
1232 static void icl_mg_phy_set_signal_levels(struct intel_encoder *encoder, in icl_mg_phy_set_signal_levels() argument
1235 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in icl_mg_phy_set_signal_levels()
1236 enum tc_port tc_port = intel_encoder_to_tc(encoder); in icl_mg_phy_set_signal_levels()
1240 if (intel_tc_port_in_tbt_alt_mode(enc_to_dig_port(encoder))) in icl_mg_phy_set_signal_levels()
1243 trans = encoder->get_buf_trans(encoder, crtc_state, &n_entries); in icl_mg_phy_set_signal_levels()
1258 level = intel_ddi_level(encoder, crtc_state, 2*ln+0); in icl_mg_phy_set_signal_levels()
1264 level = intel_ddi_level(encoder, crtc_state, 2*ln+1); in icl_mg_phy_set_signal_levels()
1275 level = intel_ddi_level(encoder, crtc_state, 2*ln+0); in icl_mg_phy_set_signal_levels()
1284 level = intel_ddi_level(encoder, crtc_state, 2*ln+1); in icl_mg_phy_set_signal_levels()
1333 static void tgl_dkl_phy_set_signal_levels(struct intel_encoder *encoder, in tgl_dkl_phy_set_signal_levels() argument
1336 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in tgl_dkl_phy_set_signal_levels()
1337 enum tc_port tc_port = intel_encoder_to_tc(encoder); in tgl_dkl_phy_set_signal_levels()
1341 if (intel_tc_port_in_tbt_alt_mode(enc_to_dig_port(encoder))) in tgl_dkl_phy_set_signal_levels()
1344 trans = encoder->get_buf_trans(encoder, crtc_state, &n_entries); in tgl_dkl_phy_set_signal_levels()
1353 level = intel_ddi_level(encoder, crtc_state, 2*ln+0); in tgl_dkl_phy_set_signal_levels()
1363 level = intel_ddi_level(encoder, crtc_state, 2*ln+1); in tgl_dkl_phy_set_signal_levels()
1434 int intel_ddi_level(struct intel_encoder *encoder, in intel_ddi_level() argument
1438 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in intel_ddi_level()
1442 trans = encoder->get_buf_trans(encoder, crtc_state, &n_entries); in intel_ddi_level()
1447 level = intel_ddi_hdmi_level(encoder, trans); in intel_ddi_level()
1449 level = intel_ddi_dp_level(enc_to_intel_dp(encoder), crtc_state, in intel_ddi_level()
1459 hsw_set_signal_levels(struct intel_encoder *encoder, in hsw_set_signal_levels() argument
1462 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in hsw_set_signal_levels()
1463 struct intel_dp *intel_dp = enc_to_intel_dp(encoder); in hsw_set_signal_levels()
1464 int level = intel_ddi_level(encoder, crtc_state, 0); in hsw_set_signal_levels()
1465 enum port port = encoder->port; in hsw_set_signal_levels()
1469 skl_ddi_set_iboost(encoder, crtc_state, level); in hsw_set_signal_levels()
1530 static void adls_ddi_enable_clock(struct intel_encoder *encoder, in adls_ddi_enable_clock() argument
1533 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in adls_ddi_enable_clock()
1535 enum phy phy = intel_encoder_to_phy(encoder); in adls_ddi_enable_clock()
1546 static void adls_ddi_disable_clock(struct intel_encoder *encoder) in adls_ddi_disable_clock() argument
1548 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in adls_ddi_disable_clock()
1549 enum phy phy = intel_encoder_to_phy(encoder); in adls_ddi_disable_clock()
1555 static bool adls_ddi_is_clock_enabled(struct intel_encoder *encoder) in adls_ddi_is_clock_enabled() argument
1557 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in adls_ddi_is_clock_enabled()
1558 enum phy phy = intel_encoder_to_phy(encoder); in adls_ddi_is_clock_enabled()
1564 static struct intel_shared_dpll *adls_ddi_get_pll(struct intel_encoder *encoder) in adls_ddi_get_pll() argument
1566 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in adls_ddi_get_pll()
1567 enum phy phy = intel_encoder_to_phy(encoder); in adls_ddi_get_pll()
1574 static void rkl_ddi_enable_clock(struct intel_encoder *encoder, in rkl_ddi_enable_clock() argument
1577 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in rkl_ddi_enable_clock()
1579 enum phy phy = intel_encoder_to_phy(encoder); in rkl_ddi_enable_clock()
1590 static void rkl_ddi_disable_clock(struct intel_encoder *encoder) in rkl_ddi_disable_clock() argument
1592 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in rkl_ddi_disable_clock()
1593 enum phy phy = intel_encoder_to_phy(encoder); in rkl_ddi_disable_clock()
1599 static bool rkl_ddi_is_clock_enabled(struct intel_encoder *encoder) in rkl_ddi_is_clock_enabled() argument
1601 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in rkl_ddi_is_clock_enabled()
1602 enum phy phy = intel_encoder_to_phy(encoder); in rkl_ddi_is_clock_enabled()
1608 static struct intel_shared_dpll *rkl_ddi_get_pll(struct intel_encoder *encoder) in rkl_ddi_get_pll() argument
1610 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in rkl_ddi_get_pll()
1611 enum phy phy = intel_encoder_to_phy(encoder); in rkl_ddi_get_pll()
1618 static void dg1_ddi_enable_clock(struct intel_encoder *encoder, in dg1_ddi_enable_clock() argument
1621 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in dg1_ddi_enable_clock()
1623 enum phy phy = intel_encoder_to_phy(encoder); in dg1_ddi_enable_clock()
1643 static void dg1_ddi_disable_clock(struct intel_encoder *encoder) in dg1_ddi_disable_clock() argument
1645 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in dg1_ddi_disable_clock()
1646 enum phy phy = intel_encoder_to_phy(encoder); in dg1_ddi_disable_clock()
1652 static bool dg1_ddi_is_clock_enabled(struct intel_encoder *encoder) in dg1_ddi_is_clock_enabled() argument
1654 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in dg1_ddi_is_clock_enabled()
1655 enum phy phy = intel_encoder_to_phy(encoder); in dg1_ddi_is_clock_enabled()
1661 static struct intel_shared_dpll *dg1_ddi_get_pll(struct intel_encoder *encoder) in dg1_ddi_get_pll() argument
1663 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in dg1_ddi_get_pll()
1664 enum phy phy = intel_encoder_to_phy(encoder); in dg1_ddi_get_pll()
1684 static void icl_ddi_combo_enable_clock(struct intel_encoder *encoder, in icl_ddi_combo_enable_clock() argument
1687 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in icl_ddi_combo_enable_clock()
1689 enum phy phy = intel_encoder_to_phy(encoder); in icl_ddi_combo_enable_clock()
1700 static void icl_ddi_combo_disable_clock(struct intel_encoder *encoder) in icl_ddi_combo_disable_clock() argument
1702 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in icl_ddi_combo_disable_clock()
1703 enum phy phy = intel_encoder_to_phy(encoder); in icl_ddi_combo_disable_clock()
1709 static bool icl_ddi_combo_is_clock_enabled(struct intel_encoder *encoder) in icl_ddi_combo_is_clock_enabled() argument
1711 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in icl_ddi_combo_is_clock_enabled()
1712 enum phy phy = intel_encoder_to_phy(encoder); in icl_ddi_combo_is_clock_enabled()
1718 struct intel_shared_dpll *icl_ddi_combo_get_pll(struct intel_encoder *encoder) in icl_ddi_combo_get_pll() argument
1720 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in icl_ddi_combo_get_pll()
1721 enum phy phy = intel_encoder_to_phy(encoder); in icl_ddi_combo_get_pll()
1728 static void jsl_ddi_tc_enable_clock(struct intel_encoder *encoder, in jsl_ddi_tc_enable_clock() argument
1731 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in jsl_ddi_tc_enable_clock()
1733 enum port port = encoder->port; in jsl_ddi_tc_enable_clock()
1744 icl_ddi_combo_enable_clock(encoder, crtc_state); in jsl_ddi_tc_enable_clock()
1747 static void jsl_ddi_tc_disable_clock(struct intel_encoder *encoder) in jsl_ddi_tc_disable_clock() argument
1749 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in jsl_ddi_tc_disable_clock()
1750 enum port port = encoder->port; in jsl_ddi_tc_disable_clock()
1752 icl_ddi_combo_disable_clock(encoder); in jsl_ddi_tc_disable_clock()
1757 static bool jsl_ddi_tc_is_clock_enabled(struct intel_encoder *encoder) in jsl_ddi_tc_is_clock_enabled() argument
1759 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in jsl_ddi_tc_is_clock_enabled()
1760 enum port port = encoder->port; in jsl_ddi_tc_is_clock_enabled()
1768 return icl_ddi_combo_is_clock_enabled(encoder); in jsl_ddi_tc_is_clock_enabled()
1771 static void icl_ddi_tc_enable_clock(struct intel_encoder *encoder, in icl_ddi_tc_enable_clock() argument
1774 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in icl_ddi_tc_enable_clock()
1776 enum tc_port tc_port = intel_encoder_to_tc(encoder); in icl_ddi_tc_enable_clock()
1777 enum port port = encoder->port; in icl_ddi_tc_enable_clock()
1783 icl_pll_to_ddi_clk_sel(encoder, crtc_state)); in icl_ddi_tc_enable_clock()
1793 static void icl_ddi_tc_disable_clock(struct intel_encoder *encoder) in icl_ddi_tc_disable_clock() argument
1795 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in icl_ddi_tc_disable_clock()
1796 enum tc_port tc_port = intel_encoder_to_tc(encoder); in icl_ddi_tc_disable_clock()
1797 enum port port = encoder->port; in icl_ddi_tc_disable_clock()
1809 static bool icl_ddi_tc_is_clock_enabled(struct intel_encoder *encoder) in icl_ddi_tc_is_clock_enabled() argument
1811 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in icl_ddi_tc_is_clock_enabled()
1812 enum tc_port tc_port = intel_encoder_to_tc(encoder); in icl_ddi_tc_is_clock_enabled()
1813 enum port port = encoder->port; in icl_ddi_tc_is_clock_enabled()
1826 static struct intel_shared_dpll *icl_ddi_tc_get_pll(struct intel_encoder *encoder) in icl_ddi_tc_get_pll() argument
1828 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in icl_ddi_tc_get_pll()
1829 enum tc_port tc_port = intel_encoder_to_tc(encoder); in icl_ddi_tc_get_pll()
1830 enum port port = encoder->port; in icl_ddi_tc_get_pll()
1856 static struct intel_shared_dpll *bxt_ddi_get_pll(struct intel_encoder *encoder) in bxt_ddi_get_pll() argument
1858 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in bxt_ddi_get_pll()
1861 switch (encoder->port) { in bxt_ddi_get_pll()
1872 MISSING_CASE(encoder->port); in bxt_ddi_get_pll()
1879 static void skl_ddi_enable_clock(struct intel_encoder *encoder, in skl_ddi_enable_clock() argument
1882 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in skl_ddi_enable_clock()
1884 enum port port = encoder->port; in skl_ddi_enable_clock()
1900 static void skl_ddi_disable_clock(struct intel_encoder *encoder) in skl_ddi_disable_clock() argument
1902 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in skl_ddi_disable_clock()
1903 enum port port = encoder->port; in skl_ddi_disable_clock()
1913 static bool skl_ddi_is_clock_enabled(struct intel_encoder *encoder) in skl_ddi_is_clock_enabled() argument
1915 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in skl_ddi_is_clock_enabled()
1916 enum port port = encoder->port; in skl_ddi_is_clock_enabled()
1925 static struct intel_shared_dpll *skl_ddi_get_pll(struct intel_encoder *encoder) in skl_ddi_get_pll() argument
1927 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in skl_ddi_get_pll()
1928 enum port port = encoder->port; in skl_ddi_get_pll()
1947 void hsw_ddi_enable_clock(struct intel_encoder *encoder, in hsw_ddi_enable_clock() argument
1950 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in hsw_ddi_enable_clock()
1952 enum port port = encoder->port; in hsw_ddi_enable_clock()
1960 void hsw_ddi_disable_clock(struct intel_encoder *encoder) in hsw_ddi_disable_clock() argument
1962 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in hsw_ddi_disable_clock()
1963 enum port port = encoder->port; in hsw_ddi_disable_clock()
1968 bool hsw_ddi_is_clock_enabled(struct intel_encoder *encoder) in hsw_ddi_is_clock_enabled() argument
1970 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in hsw_ddi_is_clock_enabled()
1971 enum port port = encoder->port; in hsw_ddi_is_clock_enabled()
1976 static struct intel_shared_dpll *hsw_ddi_get_pll(struct intel_encoder *encoder) in hsw_ddi_get_pll() argument
1978 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in hsw_ddi_get_pll()
1979 enum port port = encoder->port; in hsw_ddi_get_pll()
2014 void intel_ddi_enable_clock(struct intel_encoder *encoder, in intel_ddi_enable_clock() argument
2017 if (encoder->enable_clock) in intel_ddi_enable_clock()
2018 encoder->enable_clock(encoder, crtc_state); in intel_ddi_enable_clock()
2021 void intel_ddi_disable_clock(struct intel_encoder *encoder) in intel_ddi_disable_clock() argument
2023 if (encoder->disable_clock) in intel_ddi_disable_clock()
2024 encoder->disable_clock(encoder); in intel_ddi_disable_clock()
2027 void intel_ddi_sanitize_encoder_pll_mapping(struct intel_encoder *encoder) in intel_ddi_sanitize_encoder_pll_mapping() argument
2029 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in intel_ddi_sanitize_encoder_pll_mapping()
2034 * In case of DP MST, we sanitize the primary encoder only, not the in intel_ddi_sanitize_encoder_pll_mapping()
2037 if (encoder->type == INTEL_OUTPUT_DP_MST) in intel_ddi_sanitize_encoder_pll_mapping()
2040 if (!encoder->base.crtc && intel_encoder_is_dp(encoder)) { in intel_ddi_sanitize_encoder_pll_mapping()
2044 intel_ddi_get_encoder_pipes(encoder, &pipe_mask, &is_mst); in intel_ddi_sanitize_encoder_pll_mapping()
2053 port_mask = BIT(encoder->port); in intel_ddi_sanitize_encoder_pll_mapping()
2054 ddi_clk_needed = encoder->base.crtc; in intel_ddi_sanitize_encoder_pll_mapping()
2056 if (encoder->type == INTEL_OUTPUT_DSI) { in intel_ddi_sanitize_encoder_pll_mapping()
2059 port_mask = intel_dsi_encoder_ports(encoder); in intel_ddi_sanitize_encoder_pll_mapping()
2062 * encoder using any of the ports of this DSI encoder. in intel_ddi_sanitize_encoder_pll_mapping()
2065 if (other_encoder == encoder) in intel_ddi_sanitize_encoder_pll_mapping()
2079 if (ddi_clk_needed || !encoder->is_clock_enabled || in intel_ddi_sanitize_encoder_pll_mapping()
2080 !encoder->is_clock_enabled(encoder)) in intel_ddi_sanitize_encoder_pll_mapping()
2084 "[ENCODER:%d:%s] is disabled/in DSI mode with an ungated DDI clock, gate it\n", in intel_ddi_sanitize_encoder_pll_mapping()
2085 encoder->base.base.id, encoder->base.name); in intel_ddi_sanitize_encoder_pll_mapping()
2087 encoder->disable_clock(encoder); in intel_ddi_sanitize_encoder_pll_mapping()
2186 i915_reg_t dp_tp_ctl_reg(struct intel_encoder *encoder, in dp_tp_ctl_reg() argument
2189 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in dp_tp_ctl_reg()
2195 return DP_TP_CTL(encoder->port); in dp_tp_ctl_reg()
2198 i915_reg_t dp_tp_status_reg(struct intel_encoder *encoder, in dp_tp_status_reg() argument
2201 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in dp_tp_status_reg()
2207 return DP_TP_STATUS(encoder->port); in dp_tp_status_reg()
2279 void intel_ddi_wait_for_fec_status(struct intel_encoder *encoder, in intel_ddi_wait_for_fec_status() argument
2284 struct intel_dp *intel_dp = enc_to_intel_dp(encoder); in intel_ddi_wait_for_fec_status()
2291 ret = intel_de_wait_for_set(i915, dp_tp_status_reg(encoder, crtc_state), in intel_ddi_wait_for_fec_status()
2294 ret = intel_de_wait_for_clear(i915, dp_tp_status_reg(encoder, crtc_state), in intel_ddi_wait_for_fec_status()
2310 static void intel_ddi_enable_fec(struct intel_encoder *encoder, in intel_ddi_enable_fec() argument
2313 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_ddi_enable_fec()
2318 intel_de_rmw(dev_priv, dp_tp_ctl_reg(encoder, crtc_state), in intel_ddi_enable_fec()
2322 static void intel_ddi_disable_fec(struct intel_encoder *encoder, in intel_ddi_disable_fec() argument
2325 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_ddi_disable_fec()
2330 intel_de_rmw(dev_priv, dp_tp_ctl_reg(encoder, crtc_state), in intel_ddi_disable_fec()
2332 intel_de_posting_read(dev_priv, dp_tp_ctl_reg(encoder, crtc_state)); in intel_ddi_disable_fec()
2335 static void intel_ddi_power_up_lanes(struct intel_encoder *encoder, in intel_ddi_power_up_lanes() argument
2338 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in intel_ddi_power_up_lanes()
2339 struct intel_digital_port *dig_port = enc_to_dig_port(encoder); in intel_ddi_power_up_lanes()
2341 if (intel_encoder_is_combo(encoder)) { in intel_ddi_power_up_lanes()
2342 enum phy phy = intel_encoder_to_phy(encoder); in intel_ddi_power_up_lanes()
2366 static void intel_ddi_mso_get_config(struct intel_encoder *encoder, in intel_ddi_mso_get_config() argument
2446 mtl_ddi_enable_d2d(struct intel_encoder *encoder) in mtl_ddi_enable_d2d() argument
2448 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in mtl_ddi_enable_d2d()
2449 enum port port = encoder->port; in mtl_ddi_enable_d2d()
2470 static void mtl_port_buf_ctl_program(struct intel_encoder *encoder, in mtl_port_buf_ctl_program() argument
2473 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in mtl_port_buf_ctl_program()
2474 struct intel_digital_port *dig_port = enc_to_dig_port(encoder); in mtl_port_buf_ctl_program()
2475 enum port port = encoder->port; in mtl_port_buf_ctl_program()
2494 static void mtl_port_buf_ctl_io_selection(struct intel_encoder *encoder) in mtl_port_buf_ctl_io_selection() argument
2496 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in mtl_port_buf_ctl_io_selection()
2497 struct intel_digital_port *dig_port = enc_to_dig_port(encoder); in mtl_port_buf_ctl_io_selection()
2502 intel_de_rmw(i915, XELPDP_PORT_BUF_CTL1(i915, encoder->port), in mtl_port_buf_ctl_io_selection()
2507 struct intel_encoder *encoder, in mtl_ddi_pre_enable_dp() argument
2511 struct intel_dp *intel_dp = enc_to_intel_dp(encoder); in mtl_ddi_pre_enable_dp()
2522 intel_ddi_init_dp_buf_reg(encoder, crtc_state); in mtl_ddi_pre_enable_dp()
2534 mtl_port_buf_ctl_io_selection(encoder); in mtl_ddi_pre_enable_dp()
2540 intel_ddi_enable_clock(encoder, crtc_state); in mtl_ddi_pre_enable_dp()
2546 intel_ddi_enable_transcoder_clock(encoder, crtc_state); in mtl_ddi_pre_enable_dp()
2551 intel_ddi_config_transcoder_dp2(encoder, crtc_state); in mtl_ddi_pre_enable_dp()
2557 intel_ddi_config_transcoder_func(encoder, crtc_state); in mtl_ddi_pre_enable_dp()
2609 intel_ddi_enable_fec(encoder, crtc_state); in mtl_ddi_pre_enable_dp()
2612 intel_dsc_dp_pps_write(encoder, crtc_state); in mtl_ddi_pre_enable_dp()
2616 struct intel_encoder *encoder, in tgl_ddi_pre_enable_dp() argument
2620 struct intel_dp *intel_dp = enc_to_intel_dp(encoder); in tgl_ddi_pre_enable_dp()
2621 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in tgl_ddi_pre_enable_dp()
2622 struct intel_digital_port *dig_port = enc_to_dig_port(encoder); in tgl_ddi_pre_enable_dp()
2633 intel_ddi_init_dp_buf_reg(encoder, crtc_state); in tgl_ddi_pre_enable_dp()
2660 intel_ddi_enable_clock(encoder, crtc_state); in tgl_ddi_pre_enable_dp()
2686 intel_ddi_enable_transcoder_clock(encoder, crtc_state); in tgl_ddi_pre_enable_dp()
2689 intel_ddi_config_transcoder_dp2(encoder, crtc_state); in tgl_ddi_pre_enable_dp()
2695 intel_ddi_config_transcoder_func(encoder, crtc_state); in tgl_ddi_pre_enable_dp()
2706 encoder->set_signal_levels(encoder, crtc_state); in tgl_ddi_pre_enable_dp()
2712 intel_ddi_power_up_lanes(encoder, crtc_state); in tgl_ddi_pre_enable_dp()
2751 intel_ddi_enable_fec(encoder, crtc_state); in tgl_ddi_pre_enable_dp()
2754 intel_dsc_dp_pps_write(encoder, crtc_state); in tgl_ddi_pre_enable_dp()
2758 struct intel_encoder *encoder, in hsw_ddi_pre_enable_dp() argument
2762 struct intel_dp *intel_dp = enc_to_intel_dp(encoder); in hsw_ddi_pre_enable_dp()
2763 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in hsw_ddi_pre_enable_dp()
2764 enum port port = encoder->port; in hsw_ddi_pre_enable_dp()
2765 struct intel_digital_port *dig_port = enc_to_dig_port(encoder); in hsw_ddi_pre_enable_dp()
2782 intel_ddi_init_dp_buf_reg(encoder, crtc_state); in hsw_ddi_pre_enable_dp()
2786 intel_ddi_enable_clock(encoder, crtc_state); in hsw_ddi_pre_enable_dp()
2797 hsw_prepare_dp_ddi_buffers(encoder, crtc_state); in hsw_ddi_pre_enable_dp()
2799 encoder->set_signal_levels(encoder, crtc_state); in hsw_ddi_pre_enable_dp()
2801 intel_ddi_power_up_lanes(encoder, crtc_state); in hsw_ddi_pre_enable_dp()
2816 intel_ddi_enable_fec(encoder, crtc_state); in hsw_ddi_pre_enable_dp()
2819 intel_ddi_enable_transcoder_clock(encoder, crtc_state); in hsw_ddi_pre_enable_dp()
2820 intel_dsc_dp_pps_write(encoder, crtc_state); in hsw_ddi_pre_enable_dp()
2825 struct intel_encoder *encoder, in intel_ddi_pre_enable_dp() argument
2829 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_ddi_pre_enable_dp()
2832 intel_dp_128b132b_sdp_crc16(enc_to_intel_dp(encoder), in intel_ddi_pre_enable_dp()
2837 intel_psr_enable_sink(enc_to_intel_dp(encoder), crtc_state); in intel_ddi_pre_enable_dp()
2840 mtl_ddi_pre_enable_dp(state, encoder, crtc_state, conn_state); in intel_ddi_pre_enable_dp()
2842 tgl_ddi_pre_enable_dp(state, encoder, crtc_state, conn_state); in intel_ddi_pre_enable_dp()
2844 hsw_ddi_pre_enable_dp(state, encoder, crtc_state, conn_state); in intel_ddi_pre_enable_dp()
2847 * from MST encoder pre_enable callback. in intel_ddi_pre_enable_dp()
2854 struct intel_encoder *encoder, in intel_ddi_pre_enable_hdmi() argument
2858 struct intel_digital_port *dig_port = enc_to_dig_port(encoder); in intel_ddi_pre_enable_hdmi()
2860 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_ddi_pre_enable_hdmi()
2863 intel_ddi_enable_clock(encoder, crtc_state); in intel_ddi_pre_enable_hdmi()
2871 intel_ddi_enable_transcoder_clock(encoder, crtc_state); in intel_ddi_pre_enable_hdmi()
2873 dig_port->set_infoframes(encoder, in intel_ddi_pre_enable_hdmi()
2879 struct intel_encoder *encoder, in intel_ddi_pre_enable() argument
2890 * - encoder will be the main encoder (ie. mst->primary) in intel_ddi_pre_enable()
2905 intel_ddi_pre_enable_hdmi(state, encoder, crtc_state, in intel_ddi_pre_enable()
2908 struct intel_digital_port *dig_port = enc_to_dig_port(encoder); in intel_ddi_pre_enable()
2910 intel_ddi_pre_enable_dp(state, encoder, crtc_state, in intel_ddi_pre_enable()
2916 dig_port->set_infoframes(encoder, in intel_ddi_pre_enable()
2923 mtl_ddi_disable_d2d_link(struct intel_encoder *encoder) in mtl_ddi_disable_d2d_link() argument
2925 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in mtl_ddi_disable_d2d_link()
2926 enum port port = encoder->port; in mtl_ddi_disable_d2d_link()
2946 static void mtl_disable_ddi_buf(struct intel_encoder *encoder, in mtl_disable_ddi_buf() argument
2949 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in mtl_disable_ddi_buf()
2950 enum port port = encoder->port; in mtl_disable_ddi_buf()
2964 mtl_ddi_disable_d2d_link(encoder); in mtl_disable_ddi_buf()
2968 intel_de_rmw(dev_priv, dp_tp_ctl_reg(encoder, crtc_state), in mtl_disable_ddi_buf()
2973 static void disable_ddi_buf(struct intel_encoder *encoder, in disable_ddi_buf() argument
2976 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in disable_ddi_buf()
2977 enum port port = encoder->port; in disable_ddi_buf()
2989 intel_de_rmw(dev_priv, dp_tp_ctl_reg(encoder, crtc_state), in disable_ddi_buf()
2992 intel_ddi_disable_fec(encoder, crtc_state); in disable_ddi_buf()
2998 static void intel_disable_ddi_buf(struct intel_encoder *encoder, in intel_disable_ddi_buf() argument
3001 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_disable_ddi_buf()
3004 mtl_disable_ddi_buf(encoder, crtc_state); in intel_disable_ddi_buf()
3007 intel_ddi_disable_fec(encoder, crtc_state); in intel_disable_ddi_buf()
3009 disable_ddi_buf(encoder, crtc_state); in intel_disable_ddi_buf()
3012 intel_ddi_wait_for_fec_status(encoder, crtc_state, false); in intel_disable_ddi_buf()
3016 struct intel_encoder *encoder, in intel_ddi_post_disable_dp() argument
3020 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_ddi_post_disable_dp()
3021 struct intel_digital_port *dig_port = enc_to_dig_port(encoder); in intel_ddi_post_disable_dp()
3028 intel_dp_set_infoframes(encoder, false, in intel_ddi_post_disable_dp()
3051 intel_disable_ddi_buf(encoder, old_crtc_state); in intel_ddi_post_disable_dp()
3073 intel_ddi_disable_clock(encoder); in intel_ddi_post_disable_dp()
3077 intel_de_rmw(dev_priv, XELPDP_PORT_BUF_CTL1(dev_priv, encoder->port), in intel_ddi_post_disable_dp()
3082 struct intel_encoder *encoder, in intel_ddi_post_disable_hdmi() argument
3086 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_ddi_post_disable_hdmi()
3087 struct intel_digital_port *dig_port = enc_to_dig_port(encoder); in intel_ddi_post_disable_hdmi()
3091 dig_port->set_infoframes(encoder, false, in intel_ddi_post_disable_hdmi()
3097 intel_disable_ddi_buf(encoder, old_crtc_state); in intel_ddi_post_disable_hdmi()
3108 intel_ddi_disable_clock(encoder); in intel_ddi_post_disable_hdmi()
3114 struct intel_encoder *encoder, in intel_ddi_post_disable_hdmi_or_sst() argument
3118 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_ddi_post_disable_hdmi_or_sst()
3148 struct intel_encoder *encoder, in intel_ddi_post_disable() argument
3153 intel_ddi_post_disable_hdmi_or_sst(state, encoder, old_crtc_state, in intel_ddi_post_disable()
3159 * - encoder will be the main encoder (ie. mst->primary) in intel_ddi_post_disable()
3170 intel_ddi_post_disable_hdmi(state, encoder, old_crtc_state, in intel_ddi_post_disable()
3173 intel_ddi_post_disable_dp(state, encoder, old_crtc_state, in intel_ddi_post_disable()
3178 struct intel_encoder *encoder, in intel_ddi_post_pll_disable() argument
3182 struct intel_digital_port *dig_port = enc_to_dig_port(encoder); in intel_ddi_post_pll_disable()
3186 if (intel_encoder_is_tc(encoder)) in intel_ddi_post_pll_disable()
3191 struct intel_encoder *encoder, in trans_port_sync_stop_link_train() argument
3223 intel_dp_stop_link_train(enc_to_intel_dp(encoder), in trans_port_sync_stop_link_train()
3228 struct intel_encoder *encoder, in intel_enable_ddi_dp() argument
3232 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_enable_ddi_dp()
3233 struct intel_dp *intel_dp = enc_to_intel_dp(encoder); in intel_enable_ddi_dp()
3234 struct intel_digital_port *dig_port = enc_to_dig_port(encoder); in intel_enable_ddi_dp()
3235 enum port port = encoder->port; in intel_enable_ddi_dp()
3244 intel_dp_set_infoframes(encoder, true, crtc_state, conn_state); in intel_enable_ddi_dp()
3246 trans_port_sync_stop_link_train(state, encoder, crtc_state); in intel_enable_ddi_dp()
3279 struct intel_encoder *encoder, in intel_enable_ddi_hdmi() argument
3283 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_enable_ddi_hdmi()
3284 struct intel_digital_port *dig_port = enc_to_dig_port(encoder); in intel_enable_ddi_hdmi()
3286 enum port port = encoder->port; in intel_enable_ddi_hdmi()
3289 if (!intel_hdmi_handle_sink_scrambling(encoder, connector, in intel_enable_ddi_hdmi()
3297 hsw_prepare_hdmi_ddi_buffers(encoder, crtc_state); in intel_enable_ddi_hdmi()
3301 mtl_ddi_enable_d2d(encoder); in intel_enable_ddi_hdmi()
3303 encoder->set_signal_levels(encoder, crtc_state); in intel_enable_ddi_hdmi()
3340 intel_ddi_power_up_lanes(encoder, crtc_state); in intel_enable_ddi_hdmi()
3370 } else if (IS_ALDERLAKE_P(dev_priv) && intel_encoder_is_tc(encoder)) { in intel_enable_ddi_hdmi()
3377 intel_wait_ddi_buf_active(encoder); in intel_enable_ddi_hdmi()
3381 struct intel_encoder *encoder, in intel_enable_ddi() argument
3385 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in intel_enable_ddi()
3388 intel_ddi_enable_transcoder_func(encoder, crtc_state); in intel_enable_ddi()
3395 intel_ddi_wait_for_fec_status(encoder, crtc_state, true); in intel_enable_ddi()
3406 intel_enable_ddi_hdmi(state, encoder, crtc_state, conn_state); in intel_enable_ddi()
3408 intel_enable_ddi_dp(state, encoder, crtc_state, conn_state); in intel_enable_ddi()
3410 intel_hdcp_enable(state, encoder, crtc_state, conn_state); in intel_enable_ddi()
3415 struct intel_encoder *encoder, in intel_disable_ddi_dp() argument
3419 struct intel_dp *intel_dp = enc_to_intel_dp(encoder); in intel_disable_ddi_dp()
3436 struct intel_encoder *encoder, in intel_disable_ddi_hdmi() argument
3440 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in intel_disable_ddi_hdmi()
3443 if (!intel_hdmi_handle_sink_scrambling(encoder, connector, in intel_disable_ddi_hdmi()
3451 struct intel_encoder *encoder, in intel_disable_ddi() argument
3455 intel_tc_port_link_cancel_reset_work(enc_to_dig_port(encoder)); in intel_disable_ddi()
3460 intel_disable_ddi_hdmi(state, encoder, old_crtc_state, in intel_disable_ddi()
3463 intel_disable_ddi_dp(state, encoder, old_crtc_state, in intel_disable_ddi()
3468 struct intel_encoder *encoder, in intel_ddi_update_pipe_dp() argument
3474 intel_dp_set_infoframes(encoder, true, crtc_state, conn_state); in intel_ddi_update_pipe_dp()
3476 intel_backlight_update(state, encoder, crtc_state, conn_state); in intel_ddi_update_pipe_dp()
3481 struct intel_encoder *encoder, in intel_ddi_update_pipe() argument
3487 !intel_encoder_is_mst(encoder)) in intel_ddi_update_pipe()
3488 intel_ddi_update_pipe_dp(state, encoder, crtc_state, in intel_ddi_update_pipe()
3491 intel_hdcp_update_pipe(state, encoder, crtc_state, conn_state); in intel_ddi_update_pipe()
3495 struct intel_encoder *encoder, in intel_ddi_update_active_dpll() argument
3498 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in intel_ddi_update_active_dpll()
3504 if (DISPLAY_VER(i915) >= 14 || !intel_encoder_is_tc(encoder)) in intel_ddi_update_active_dpll()
3509 intel_update_active_dpll(state, pipe_crtc, encoder); in intel_ddi_update_active_dpll()
3514 struct intel_encoder *encoder, in intel_ddi_pre_pll_enable() argument
3518 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_ddi_pre_pll_enable()
3519 struct intel_digital_port *dig_port = enc_to_dig_port(encoder); in intel_ddi_pre_pll_enable()
3520 bool is_tc_port = intel_encoder_is_tc(encoder); in intel_ddi_pre_pll_enable()
3526 intel_ddi_update_active_dpll(state, encoder, crtc); in intel_ddi_pre_pll_enable()
3538 bxt_dpio_phy_set_lane_optim_mask(encoder, in intel_ddi_pre_pll_enable()
3542 static void adlp_tbt_to_dp_alt_switch_wa(struct intel_encoder *encoder) in adlp_tbt_to_dp_alt_switch_wa() argument
3544 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in adlp_tbt_to_dp_alt_switch_wa()
3545 enum tc_port tc_port = intel_encoder_to_tc(encoder); in adlp_tbt_to_dp_alt_switch_wa()
3556 struct intel_encoder *encoder = &dig_port->base; in mtl_ddi_prepare_link_retrain() local
3557 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in mtl_ddi_prepare_link_retrain()
3558 enum port port = encoder->port; in mtl_ddi_prepare_link_retrain()
3565 dp_tp_ctl = intel_de_read(dev_priv, dp_tp_ctl_reg(encoder, crtc_state)); in mtl_ddi_prepare_link_retrain()
3567 mtl_disable_ddi_buf(encoder, crtc_state); in mtl_ddi_prepare_link_retrain()
3578 intel_de_write(dev_priv, dp_tp_ctl_reg(encoder, crtc_state), dp_tp_ctl); in mtl_ddi_prepare_link_retrain()
3579 intel_de_posting_read(dev_priv, dp_tp_ctl_reg(encoder, crtc_state)); in mtl_ddi_prepare_link_retrain()
3582 mtl_ddi_enable_d2d(encoder); in mtl_ddi_prepare_link_retrain()
3585 encoder->set_signal_levels(encoder, crtc_state); in mtl_ddi_prepare_link_retrain()
3588 mtl_port_buf_ctl_program(encoder, crtc_state); in mtl_ddi_prepare_link_retrain()
3599 intel_wait_ddi_buf_active(encoder); in mtl_ddi_prepare_link_retrain()
3606 struct intel_encoder *encoder = &dig_port->base; in intel_ddi_prepare_link_retrain() local
3607 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_ddi_prepare_link_retrain()
3608 enum port port = encoder->port; in intel_ddi_prepare_link_retrain()
3612 dp_tp_ctl = intel_de_read(dev_priv, dp_tp_ctl_reg(encoder, crtc_state)); in intel_ddi_prepare_link_retrain()
3623 intel_de_write(dev_priv, dp_tp_ctl_reg(encoder, crtc_state), dp_tp_ctl); in intel_ddi_prepare_link_retrain()
3624 intel_de_posting_read(dev_priv, dp_tp_ctl_reg(encoder, crtc_state)); in intel_ddi_prepare_link_retrain()
3638 intel_de_write(dev_priv, dp_tp_ctl_reg(encoder, crtc_state), dp_tp_ctl); in intel_ddi_prepare_link_retrain()
3639 intel_de_posting_read(dev_priv, dp_tp_ctl_reg(encoder, crtc_state)); in intel_ddi_prepare_link_retrain()
3643 adlp_tbt_to_dp_alt_switch_wa(encoder); in intel_ddi_prepare_link_retrain()
3649 intel_wait_ddi_buf_active(encoder); in intel_ddi_prepare_link_retrain()
3656 struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base; in intel_ddi_set_link_train() local
3657 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_ddi_set_link_train()
3660 temp = intel_de_read(dev_priv, dp_tp_ctl_reg(encoder, crtc_state)); in intel_ddi_set_link_train()
3681 intel_de_write(dev_priv, dp_tp_ctl_reg(encoder, crtc_state), temp); in intel_ddi_set_link_train()
3687 struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base; in intel_ddi_set_idle_link_train() local
3688 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_ddi_set_idle_link_train()
3689 enum port port = encoder->port; in intel_ddi_set_idle_link_train()
3691 intel_de_rmw(dev_priv, dp_tp_ctl_reg(encoder, crtc_state), in intel_ddi_set_idle_link_train()
3705 dp_tp_status_reg(encoder, crtc_state), in intel_ddi_set_idle_link_train()
3824 static void intel_ddi_read_func_ctl(struct intel_encoder *encoder, in intel_ddi_read_func_ctl() argument
3827 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_ddi_read_func_ctl()
3830 struct intel_digital_port *dig_port = enc_to_dig_port(encoder); in intel_ddi_read_func_ctl()
3868 intel_hdmi_infoframes_enabled(encoder, pipe_config); in intel_ddi_read_func_ctl()
3887 if (encoder->type == INTEL_OUTPUT_EDP) in intel_ddi_read_func_ctl()
3900 intel_de_read(dev_priv, dp_tp_ctl_reg(encoder, pipe_config)) & in intel_ddi_read_func_ctl()
3906 dp_tp_ctl_reg(encoder, pipe_config)) & DP_TP_CTL_FEC_ENABLE; in intel_ddi_read_func_ctl()
3910 intel_lspcon_infoframes_enabled(encoder, pipe_config); in intel_ddi_read_func_ctl()
3913 intel_hdmi_infoframes_enabled(encoder, pipe_config); in intel_ddi_read_func_ctl()
3920 intel_de_read(dev_priv, dp_tp_ctl_reg(encoder, pipe_config)) & in intel_ddi_read_func_ctl()
3940 dp_tp_ctl_reg(encoder, pipe_config)) & DP_TP_CTL_FEC_ENABLE; in intel_ddi_read_func_ctl()
3943 intel_hdmi_infoframes_enabled(encoder, pipe_config); in intel_ddi_read_func_ctl()
3950 static void intel_ddi_get_config(struct intel_encoder *encoder, in intel_ddi_get_config() argument
3953 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_ddi_get_config()
3960 intel_ddi_read_func_ctl(encoder, pipe_config); in intel_ddi_get_config()
3962 intel_ddi_mso_get_config(encoder, pipe_config); in intel_ddi_get_config()
3967 if (encoder->type == INTEL_OUTPUT_EDP) in intel_ddi_get_config()
3968 intel_edp_fixup_vbt_bpp(encoder, pipe_config->pipe_bpp); in intel_ddi_get_config()
3974 bxt_dpio_phy_get_lane_lat_optim_mask(encoder); in intel_ddi_get_config()
3978 intel_hdmi_read_gcp_infoframe(encoder, pipe_config); in intel_ddi_get_config()
3980 intel_read_infoframe(encoder, pipe_config, in intel_ddi_get_config()
3983 intel_read_infoframe(encoder, pipe_config, in intel_ddi_get_config()
3986 intel_read_infoframe(encoder, pipe_config, in intel_ddi_get_config()
3989 intel_read_infoframe(encoder, pipe_config, in intel_ddi_get_config()
3996 intel_psr_get_config(encoder, pipe_config); in intel_ddi_get_config()
3998 intel_read_dp_sdp(encoder, pipe_config, HDMI_PACKET_TYPE_GAMUT_METADATA); in intel_ddi_get_config()
3999 intel_read_dp_sdp(encoder, pipe_config, DP_SDP_VSC); in intel_ddi_get_config()
4000 intel_read_dp_sdp(encoder, pipe_config, DP_SDP_ADAPTIVE_SYNC); in intel_ddi_get_config()
4002 intel_audio_codec_get_config(encoder, pipe_config); in intel_ddi_get_config()
4005 void intel_ddi_get_clock(struct intel_encoder *encoder, in intel_ddi_get_clock() argument
4009 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in intel_ddi_get_clock()
4027 static void mtl_ddi_get_config(struct intel_encoder *encoder, in mtl_ddi_get_config() argument
4030 intel_cx0pll_readout_hw_state(encoder, &crtc_state->dpll_hw_state.cx0pll); in mtl_ddi_get_config()
4033 crtc_state->port_clock = intel_mtl_tbt_calc_port_clock(encoder); in mtl_ddi_get_config()
4035 crtc_state->port_clock = intel_cx0pll_calc_port_clock(encoder, &crtc_state->dpll_hw_state.cx0pll); in mtl_ddi_get_config()
4037 intel_ddi_get_config(encoder, crtc_state); in mtl_ddi_get_config()
4040 static void dg2_ddi_get_config(struct intel_encoder *encoder, in dg2_ddi_get_config() argument
4043 intel_mpllb_readout_hw_state(encoder, &crtc_state->dpll_hw_state.mpllb); in dg2_ddi_get_config()
4044 crtc_state->port_clock = intel_mpllb_calc_port_clock(encoder, &crtc_state->dpll_hw_state.mpllb); in dg2_ddi_get_config()
4046 intel_ddi_get_config(encoder, crtc_state); in dg2_ddi_get_config()
4049 static void adls_ddi_get_config(struct intel_encoder *encoder, in adls_ddi_get_config() argument
4052 intel_ddi_get_clock(encoder, crtc_state, adls_ddi_get_pll(encoder)); in adls_ddi_get_config()
4053 intel_ddi_get_config(encoder, crtc_state); in adls_ddi_get_config()
4056 static void rkl_ddi_get_config(struct intel_encoder *encoder, in rkl_ddi_get_config() argument
4059 intel_ddi_get_clock(encoder, crtc_state, rkl_ddi_get_pll(encoder)); in rkl_ddi_get_config()
4060 intel_ddi_get_config(encoder, crtc_state); in rkl_ddi_get_config()
4063 static void dg1_ddi_get_config(struct intel_encoder *encoder, in dg1_ddi_get_config() argument
4066 intel_ddi_get_clock(encoder, crtc_state, dg1_ddi_get_pll(encoder)); in dg1_ddi_get_config()
4067 intel_ddi_get_config(encoder, crtc_state); in dg1_ddi_get_config()
4070 static void icl_ddi_combo_get_config(struct intel_encoder *encoder, in icl_ddi_combo_get_config() argument
4073 intel_ddi_get_clock(encoder, crtc_state, icl_ddi_combo_get_pll(encoder)); in icl_ddi_combo_get_config()
4074 intel_ddi_get_config(encoder, crtc_state); in icl_ddi_combo_get_config()
4083 icl_ddi_tc_port_pll_type(struct intel_encoder *encoder, in icl_ddi_tc_port_pll_type() argument
4086 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in icl_ddi_tc_port_pll_type()
4099 intel_ddi_port_pll_type(struct intel_encoder *encoder, in intel_ddi_port_pll_type() argument
4102 if (!encoder->port_pll_type) in intel_ddi_port_pll_type()
4105 return encoder->port_pll_type(encoder, crtc_state); in intel_ddi_port_pll_type()
4108 static void icl_ddi_tc_get_clock(struct intel_encoder *encoder, in icl_ddi_tc_get_clock() argument
4112 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in icl_ddi_tc_get_clock()
4134 crtc_state->port_clock = icl_calc_tbt_pll_link(i915, encoder->port); in icl_ddi_tc_get_clock()
4140 static void icl_ddi_tc_get_config(struct intel_encoder *encoder, in icl_ddi_tc_get_config() argument
4143 icl_ddi_tc_get_clock(encoder, crtc_state, icl_ddi_tc_get_pll(encoder)); in icl_ddi_tc_get_config()
4144 intel_ddi_get_config(encoder, crtc_state); in icl_ddi_tc_get_config()
4147 static void bxt_ddi_get_config(struct intel_encoder *encoder, in bxt_ddi_get_config() argument
4150 intel_ddi_get_clock(encoder, crtc_state, bxt_ddi_get_pll(encoder)); in bxt_ddi_get_config()
4151 intel_ddi_get_config(encoder, crtc_state); in bxt_ddi_get_config()
4154 static void skl_ddi_get_config(struct intel_encoder *encoder, in skl_ddi_get_config() argument
4157 intel_ddi_get_clock(encoder, crtc_state, skl_ddi_get_pll(encoder)); in skl_ddi_get_config()
4158 intel_ddi_get_config(encoder, crtc_state); in skl_ddi_get_config()
4161 void hsw_ddi_get_config(struct intel_encoder *encoder, in hsw_ddi_get_config() argument
4164 intel_ddi_get_clock(encoder, crtc_state, hsw_ddi_get_pll(encoder)); in hsw_ddi_get_config()
4165 intel_ddi_get_config(encoder, crtc_state); in hsw_ddi_get_config()
4168 static void intel_ddi_sync_state(struct intel_encoder *encoder, in intel_ddi_sync_state() argument
4171 if (intel_encoder_is_tc(encoder)) in intel_ddi_sync_state()
4172 intel_tc_port_sanitize_mode(enc_to_dig_port(encoder), in intel_ddi_sync_state()
4176 (!crtc_state && intel_encoder_is_dp(encoder))) in intel_ddi_sync_state()
4177 intel_dp_sync_state(encoder, crtc_state); in intel_ddi_sync_state()
4180 static bool intel_ddi_initial_fastset_check(struct intel_encoder *encoder, in intel_ddi_initial_fastset_check() argument
4183 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in intel_ddi_initial_fastset_check()
4186 if (intel_encoder_is_tc(encoder)) { in intel_ddi_initial_fastset_check()
4187 drm_dbg_kms(&i915->drm, "[ENCODER:%d:%s] Forcing full modeset to compute TC port DPLLs\n", in intel_ddi_initial_fastset_check()
4188 encoder->base.base.id, encoder->base.name); in intel_ddi_initial_fastset_check()
4194 !intel_dp_initial_fastset_check(encoder, crtc_state)) in intel_ddi_initial_fastset_check()
4201 intel_ddi_compute_output_type(struct intel_encoder *encoder, in intel_ddi_compute_output_type() argument
4218 static int intel_ddi_compute_config(struct intel_encoder *encoder, in intel_ddi_compute_config() argument
4223 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_ddi_compute_config()
4224 enum port port = encoder->port; in intel_ddi_compute_config()
4232 intel_hdmi_compute_has_hdmi_sink(encoder, pipe_config, conn_state); in intel_ddi_compute_config()
4234 ret = intel_hdmi_compute_config(encoder, pipe_config, conn_state); in intel_ddi_compute_config()
4236 ret = intel_dp_compute_config(encoder, pipe_config, conn_state); in intel_ddi_compute_config()
4339 static int intel_ddi_compute_config_late(struct intel_encoder *encoder, in intel_ddi_compute_config_late() argument
4343 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in intel_ddi_compute_config_late()
4347 drm_dbg_kms(&i915->drm, "[ENCODER:%d:%s] [CRTC:%d:%s]\n", in intel_ddi_compute_config_late()
4348 encoder->base.base.id, encoder->base.name, in intel_ddi_compute_config_late()
4373 static void intel_ddi_encoder_destroy(struct drm_encoder *encoder) in intel_ddi_encoder_destroy() argument
4375 struct drm_i915_private *i915 = to_i915(encoder->dev); in intel_ddi_encoder_destroy()
4376 struct intel_digital_port *dig_port = enc_to_dig_port(to_intel_encoder(encoder)); in intel_ddi_encoder_destroy()
4378 intel_dp_encoder_flush_work(encoder); in intel_ddi_encoder_destroy()
4383 drm_encoder_cleanup(encoder); in intel_ddi_encoder_destroy()
4388 static void intel_ddi_encoder_reset(struct drm_encoder *encoder) in intel_ddi_encoder_reset() argument
4390 struct intel_dp *intel_dp = enc_to_intel_dp(to_intel_encoder(encoder)); in intel_ddi_encoder_reset()
4391 struct intel_digital_port *dig_port = enc_to_dig_port(to_intel_encoder(encoder)); in intel_ddi_encoder_reset()
4403 struct intel_encoder *encoder = to_intel_encoder(_encoder); in intel_ddi_encoder_late_register() local
4405 intel_tc_port_link_reset(enc_to_dig_port(encoder)); in intel_ddi_encoder_late_register()
4459 static int intel_hdmi_reset_link(struct intel_encoder *encoder, in intel_hdmi_reset_link() argument
4462 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in intel_hdmi_reset_link()
4463 struct intel_hdmi *hdmi = enc_to_intel_hdmi(encoder); in intel_hdmi_reset_link()
4531 static void intel_ddi_link_check(struct intel_encoder *encoder) in intel_ddi_link_check() argument
4533 struct drm_i915_private *i915 = to_i915(encoder->base.dev); in intel_ddi_link_check()
4534 struct intel_digital_port *dig_port = enc_to_dig_port(encoder); in intel_ddi_link_check()
4539 intel_dp_link_check(encoder); in intel_ddi_link_check()
4543 intel_ddi_hotplug(struct intel_encoder *encoder, in intel_ddi_hotplug() argument
4546 struct intel_digital_port *dig_port = enc_to_dig_port(encoder); in intel_ddi_hotplug()
4548 bool is_tc = intel_encoder_is_tc(encoder); in intel_ddi_hotplug()
4555 intel_dp_phy_test(encoder); in intel_ddi_hotplug()
4560 state = intel_encoder_hotplug(encoder, connector); in intel_ddi_hotplug()
4565 ret = intel_hdmi_reset_link(encoder, &ctx); in intel_ddi_hotplug()
4566 drm_WARN_ON(encoder->base.dev, ret); in intel_ddi_hotplug()
4602 static bool lpt_digital_port_connected(struct intel_encoder *encoder) in lpt_digital_port_connected() argument
4604 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in lpt_digital_port_connected()
4605 u32 bit = dev_priv->display.hotplug.pch_hpd[encoder->hpd_pin]; in lpt_digital_port_connected()
4610 static bool hsw_digital_port_connected(struct intel_encoder *encoder) in hsw_digital_port_connected() argument
4612 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in hsw_digital_port_connected()
4613 u32 bit = dev_priv->display.hotplug.hpd[encoder->hpd_pin]; in hsw_digital_port_connected()
4618 static bool bdw_digital_port_connected(struct intel_encoder *encoder) in bdw_digital_port_connected() argument
4620 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); in bdw_digital_port_connected()
4621 u32 bit = dev_priv->display.hotplug.hpd[encoder->hpd_pin]; in bdw_digital_port_connected()
4774 static void intel_ddi_encoder_suspend(struct intel_encoder *encoder) in intel_ddi_encoder_suspend() argument
4776 intel_dp_encoder_suspend(encoder); in intel_ddi_encoder_suspend()
4779 static void intel_ddi_tc_encoder_suspend_complete(struct intel_encoder *encoder) in intel_ddi_tc_encoder_suspend_complete() argument
4781 struct intel_dp *intel_dp = enc_to_intel_dp(encoder); in intel_ddi_tc_encoder_suspend_complete()
4788 intel_encoder_link_check_flush_work(encoder); in intel_ddi_tc_encoder_suspend_complete()
4792 static void intel_ddi_encoder_shutdown(struct intel_encoder *encoder) in intel_ddi_encoder_shutdown() argument
4794 intel_dp_encoder_shutdown(encoder); in intel_ddi_encoder_shutdown()
4795 intel_hdmi_encoder_shutdown(encoder); in intel_ddi_encoder_shutdown()
4798 static void intel_ddi_tc_encoder_shutdown_complete(struct intel_encoder *encoder) in intel_ddi_tc_encoder_shutdown_complete() argument
4800 struct intel_dp *intel_dp = enc_to_intel_dp(encoder); in intel_ddi_tc_encoder_shutdown_complete()
4832 static bool need_aux_ch(struct intel_encoder *encoder, bool init_dp) in need_aux_ch() argument
4834 return init_dp || intel_encoder_is_tc(encoder); in need_aux_ch()
4846 struct intel_encoder *encoder; in port_in_use() local
4848 for_each_intel_encoder(&i915->drm, encoder) { in port_in_use()
4850 if (encoder->port == port) in port_in_use()
4862 struct intel_encoder *encoder; in intel_ddi_init() local
4945 encoder = &dig_port->base; in intel_ddi_init()
4946 encoder->devdata = devdata; in intel_ddi_init()
4949 drm_encoder_init(&dev_priv->drm, &encoder->base, &intel_ddi_funcs, in intel_ddi_init()
4957 drm_encoder_init(&dev_priv->drm, &encoder->base, &intel_ddi_funcs, in intel_ddi_init()
4967 drm_encoder_init(&dev_priv->drm, &encoder->base, &intel_ddi_funcs, in intel_ddi_init()
4975 drm_encoder_init(&dev_priv->drm, &encoder->base, &intel_ddi_funcs, in intel_ddi_init()
4980 intel_encoder_link_check_init(encoder, intel_ddi_link_check); in intel_ddi_init()
4985 encoder->hotplug = intel_ddi_hotplug; in intel_ddi_init()
4986 encoder->compute_output_type = intel_ddi_compute_output_type; in intel_ddi_init()
4987 encoder->compute_config = intel_ddi_compute_config; in intel_ddi_init()
4988 encoder->compute_config_late = intel_ddi_compute_config_late; in intel_ddi_init()
4989 encoder->enable = intel_enable_ddi; in intel_ddi_init()
4990 encoder->pre_pll_enable = intel_ddi_pre_pll_enable; in intel_ddi_init()
4991 encoder->pre_enable = intel_ddi_pre_enable; in intel_ddi_init()
4992 encoder->disable = intel_disable_ddi; in intel_ddi_init()
4993 encoder->post_pll_disable = intel_ddi_post_pll_disable; in intel_ddi_init()
4994 encoder->post_disable = intel_ddi_post_disable; in intel_ddi_init()
4995 encoder->update_pipe = intel_ddi_update_pipe; in intel_ddi_init()
4996 encoder->audio_enable = intel_audio_codec_enable; in intel_ddi_init()
4997 encoder->audio_disable = intel_audio_codec_disable; in intel_ddi_init()
4998 encoder->get_hw_state = intel_ddi_get_hw_state; in intel_ddi_init()
4999 encoder->sync_state = intel_ddi_sync_state; in intel_ddi_init()
5000 encoder->initial_fastset_check = intel_ddi_initial_fastset_check; in intel_ddi_init()
5001 encoder->suspend = intel_ddi_encoder_suspend; in intel_ddi_init()
5002 encoder->shutdown = intel_ddi_encoder_shutdown; in intel_ddi_init()
5003 encoder->get_power_domains = intel_ddi_get_power_domains; in intel_ddi_init()
5005 encoder->type = INTEL_OUTPUT_DDI; in intel_ddi_init()
5006 encoder->power_domain = intel_display_power_ddi_lanes_domain(dev_priv, port); in intel_ddi_init()
5007 encoder->port = port; in intel_ddi_init()
5008 encoder->cloneable = 0; in intel_ddi_init()
5009 encoder->pipe_mask = ~0; in intel_ddi_init()
5012 encoder->enable_clock = intel_mtl_pll_enable; in intel_ddi_init()
5013 encoder->disable_clock = intel_mtl_pll_disable; in intel_ddi_init()
5014 encoder->port_pll_type = intel_mtl_port_pll_type; in intel_ddi_init()
5015 encoder->get_config = mtl_ddi_get_config; in intel_ddi_init()
5017 encoder->enable_clock = intel_mpllb_enable; in intel_ddi_init()
5018 encoder->disable_clock = intel_mpllb_disable; in intel_ddi_init()
5019 encoder->get_config = dg2_ddi_get_config; in intel_ddi_init()
5021 encoder->enable_clock = adls_ddi_enable_clock; in intel_ddi_init()
5022 encoder->disable_clock = adls_ddi_disable_clock; in intel_ddi_init()
5023 encoder->is_clock_enabled = adls_ddi_is_clock_enabled; in intel_ddi_init()
5024 encoder->get_config = adls_ddi_get_config; in intel_ddi_init()
5026 encoder->enable_clock = rkl_ddi_enable_clock; in intel_ddi_init()
5027 encoder->disable_clock = rkl_ddi_disable_clock; in intel_ddi_init()
5028 encoder->is_clock_enabled = rkl_ddi_is_clock_enabled; in intel_ddi_init()
5029 encoder->get_config = rkl_ddi_get_config; in intel_ddi_init()
5031 encoder->enable_clock = dg1_ddi_enable_clock; in intel_ddi_init()
5032 encoder->disable_clock = dg1_ddi_disable_clock; in intel_ddi_init()
5033 encoder->is_clock_enabled = dg1_ddi_is_clock_enabled; in intel_ddi_init()
5034 encoder->get_config = dg1_ddi_get_config; in intel_ddi_init()
5037 encoder->enable_clock = jsl_ddi_tc_enable_clock; in intel_ddi_init()
5038 encoder->disable_clock = jsl_ddi_tc_disable_clock; in intel_ddi_init()
5039 encoder->is_clock_enabled = jsl_ddi_tc_is_clock_enabled; in intel_ddi_init()
5040 encoder->port_pll_type = icl_ddi_tc_port_pll_type; in intel_ddi_init()
5041 encoder->get_config = icl_ddi_combo_get_config; in intel_ddi_init()
5043 encoder->enable_clock = icl_ddi_combo_enable_clock; in intel_ddi_init()
5044 encoder->disable_clock = icl_ddi_combo_disable_clock; in intel_ddi_init()
5045 encoder->is_clock_enabled = icl_ddi_combo_is_clock_enabled; in intel_ddi_init()
5046 encoder->get_config = icl_ddi_combo_get_config; in intel_ddi_init()
5050 encoder->enable_clock = icl_ddi_tc_enable_clock; in intel_ddi_init()
5051 encoder->disable_clock = icl_ddi_tc_disable_clock; in intel_ddi_init()
5052 encoder->is_clock_enabled = icl_ddi_tc_is_clock_enabled; in intel_ddi_init()
5053 encoder->port_pll_type = icl_ddi_tc_port_pll_type; in intel_ddi_init()
5054 encoder->get_config = icl_ddi_tc_get_config; in intel_ddi_init()
5056 encoder->enable_clock = icl_ddi_combo_enable_clock; in intel_ddi_init()
5057 encoder->disable_clock = icl_ddi_combo_disable_clock; in intel_ddi_init()
5058 encoder->is_clock_enabled = icl_ddi_combo_is_clock_enabled; in intel_ddi_init()
5059 encoder->get_config = icl_ddi_combo_get_config; in intel_ddi_init()
5063 encoder->get_config = bxt_ddi_get_config; in intel_ddi_init()
5065 encoder->enable_clock = skl_ddi_enable_clock; in intel_ddi_init()
5066 encoder->disable_clock = skl_ddi_disable_clock; in intel_ddi_init()
5067 encoder->is_clock_enabled = skl_ddi_is_clock_enabled; in intel_ddi_init()
5068 encoder->get_config = skl_ddi_get_config; in intel_ddi_init()
5070 encoder->enable_clock = hsw_ddi_enable_clock; in intel_ddi_init()
5071 encoder->disable_clock = hsw_ddi_disable_clock; in intel_ddi_init()
5072 encoder->is_clock_enabled = hsw_ddi_is_clock_enabled; in intel_ddi_init()
5073 encoder->get_config = hsw_ddi_get_config; in intel_ddi_init()
5077 encoder->set_signal_levels = intel_cx0_phy_set_signal_levels; in intel_ddi_init()
5079 encoder->set_signal_levels = intel_snps_phy_set_signal_levels; in intel_ddi_init()
5081 if (intel_encoder_is_combo(encoder)) in intel_ddi_init()
5082 encoder->set_signal_levels = icl_combo_phy_set_signal_levels; in intel_ddi_init()
5084 encoder->set_signal_levels = tgl_dkl_phy_set_signal_levels; in intel_ddi_init()
5086 if (intel_encoder_is_combo(encoder)) in intel_ddi_init()
5087 encoder->set_signal_levels = icl_combo_phy_set_signal_levels; in intel_ddi_init()
5089 encoder->set_signal_levels = icl_mg_phy_set_signal_levels; in intel_ddi_init()
5091 encoder->set_signal_levels = bxt_dpio_phy_set_signal_levels; in intel_ddi_init()
5093 encoder->set_signal_levels = hsw_set_signal_levels; in intel_ddi_init()
5096 intel_ddi_buf_trans_init(encoder); in intel_ddi_init()
5099 encoder->hpd_pin = xelpd_hpd_pin(dev_priv, port); in intel_ddi_init()
5101 encoder->hpd_pin = dg1_hpd_pin(dev_priv, port); in intel_ddi_init()
5103 encoder->hpd_pin = rkl_hpd_pin(dev_priv, port); in intel_ddi_init()
5105 encoder->hpd_pin = tgl_hpd_pin(dev_priv, port); in intel_ddi_init()
5107 encoder->hpd_pin = ehl_hpd_pin(dev_priv, port); in intel_ddi_init()
5109 encoder->hpd_pin = icl_hpd_pin(dev_priv, port); in intel_ddi_init()
5111 encoder->hpd_pin = skl_hpd_pin(dev_priv, port); in intel_ddi_init()
5113 encoder->hpd_pin = intel_hpd_pin_default(dev_priv, port); in intel_ddi_init()
5130 if (need_aux_ch(encoder, init_dp)) { in intel_ddi_init()
5131 dig_port->aux_ch = intel_dp_aux_ch(encoder); in intel_ddi_init()
5136 if (intel_encoder_is_tc(encoder)) { in intel_ddi_init()
5151 encoder->suspend_complete = intel_ddi_tc_encoder_suspend_complete; in intel_ddi_init()
5152 encoder->shutdown_complete = intel_ddi_tc_encoder_shutdown_complete; in intel_ddi_init()
5165 if (intel_encoder_is_tc(encoder)) in intel_ddi_init()
5194 encoder->pipe_mask = intel_ddi_splitter_pipe_mask(dev_priv); in intel_ddi_init()
5198 * In theory we don't need the encoder->type check, in intel_ddi_init()
5201 if (encoder->type != INTEL_OUTPUT_EDP && init_hdmi) { in intel_ddi_init()
5209 drm_encoder_cleanup(&encoder->base); in intel_ddi_init()