Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915/dpll: Rename intel_shared_dpll

Rename intel_shared_dpll to intel_dpll to represent both
shared and individual dplls. Since from MTL each PHY has it's
own PLL making the shared PLL naming a little outdated. In an
effort to make this framework accepting of future changes this
needs to be done.

--v2
-Use intel_dpll_global to make sure names start with the filename
[Jani/Ville]
-Explain the need of this rename [Jani]

--v3
-Just keep it intel_dpll [Jani]

--v4
-Fix comment [Jani]
-Use just num_dpll and dplls [Jani]

Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Link: https://lore.kernel.org/r/20250515071801.2221120-7-suraj.kandpal@intel.com

+179 -179
+1 -1
drivers/gpu/drm/i915/display/icl_dsi.c
··· 658 658 { 659 659 struct intel_display *display = to_intel_display(encoder); 660 660 struct intel_dsi *intel_dsi = enc_to_intel_dsi(encoder); 661 - struct intel_shared_dpll *pll = crtc_state->shared_dpll; 661 + struct intel_dpll *pll = crtc_state->intel_dpll; 662 662 enum phy phy; 663 663 u32 val; 664 664
+26 -26
drivers/gpu/drm/i915/display/intel_ddi.c
··· 236 236 port_name(port)); 237 237 } 238 238 239 - static u32 hsw_pll_to_ddi_pll_sel(const struct intel_shared_dpll *pll) 239 + static u32 hsw_pll_to_ddi_pll_sel(const struct intel_dpll *pll) 240 240 { 241 241 switch (pll->info->id) { 242 242 case DPLL_ID_WRPLL1: ··· 260 260 static u32 icl_pll_to_ddi_clk_sel(struct intel_encoder *encoder, 261 261 const struct intel_crtc_state *crtc_state) 262 262 { 263 - const struct intel_shared_dpll *pll = crtc_state->shared_dpll; 263 + const struct intel_dpll *pll = crtc_state->intel_dpll; 264 264 int clock = crtc_state->port_clock; 265 265 const enum intel_dpll_id id = pll->info->id; 266 266 ··· 1561 1561 return !(intel_de_read(display, reg) & clk_off); 1562 1562 } 1563 1563 1564 - static struct intel_shared_dpll * 1564 + static struct intel_dpll * 1565 1565 _icl_ddi_get_pll(struct intel_display *display, i915_reg_t reg, 1566 1566 u32 clk_sel_mask, u32 clk_sel_shift) 1567 1567 { ··· 1576 1576 const struct intel_crtc_state *crtc_state) 1577 1577 { 1578 1578 struct intel_display *display = to_intel_display(encoder); 1579 - const struct intel_shared_dpll *pll = crtc_state->shared_dpll; 1579 + const struct intel_dpll *pll = crtc_state->intel_dpll; 1580 1580 enum phy phy = intel_encoder_to_phy(encoder); 1581 1581 1582 1582 if (drm_WARN_ON(display->drm, !pll)) ··· 1606 1606 ICL_DPCLKA_CFGCR0_DDI_CLK_OFF(phy)); 1607 1607 } 1608 1608 1609 - static struct intel_shared_dpll *adls_ddi_get_pll(struct intel_encoder *encoder) 1609 + static struct intel_dpll *adls_ddi_get_pll(struct intel_encoder *encoder) 1610 1610 { 1611 1611 struct intel_display *display = to_intel_display(encoder); 1612 1612 enum phy phy = intel_encoder_to_phy(encoder); ··· 1620 1620 const struct intel_crtc_state *crtc_state) 1621 1621 { 1622 1622 struct intel_display *display = to_intel_display(encoder); 1623 - const struct intel_shared_dpll *pll = crtc_state->shared_dpll; 1623 + const struct intel_dpll *pll = crtc_state->intel_dpll; 1624 1624 enum phy phy = intel_encoder_to_phy(encoder); 1625 1625 1626 1626 if (drm_WARN_ON(display->drm, !pll)) ··· 1650 1650 RKL_DPCLKA_CFGCR0_DDI_CLK_OFF(phy)); 1651 1651 } 1652 1652 1653 - static struct intel_shared_dpll *rkl_ddi_get_pll(struct intel_encoder *encoder) 1653 + static struct intel_dpll *rkl_ddi_get_pll(struct intel_encoder *encoder) 1654 1654 { 1655 1655 struct intel_display *display = to_intel_display(encoder); 1656 1656 enum phy phy = intel_encoder_to_phy(encoder); ··· 1664 1664 const struct intel_crtc_state *crtc_state) 1665 1665 { 1666 1666 struct intel_display *display = to_intel_display(encoder); 1667 - const struct intel_shared_dpll *pll = crtc_state->shared_dpll; 1667 + const struct intel_dpll *pll = crtc_state->intel_dpll; 1668 1668 enum phy phy = intel_encoder_to_phy(encoder); 1669 1669 1670 1670 if (drm_WARN_ON(display->drm, !pll)) ··· 1703 1703 DG1_DPCLKA_CFGCR0_DDI_CLK_OFF(phy)); 1704 1704 } 1705 1705 1706 - static struct intel_shared_dpll *dg1_ddi_get_pll(struct intel_encoder *encoder) 1706 + static struct intel_dpll *dg1_ddi_get_pll(struct intel_encoder *encoder) 1707 1707 { 1708 1708 struct intel_display *display = to_intel_display(encoder); 1709 1709 enum phy phy = intel_encoder_to_phy(encoder); ··· 1730 1730 const struct intel_crtc_state *crtc_state) 1731 1731 { 1732 1732 struct intel_display *display = to_intel_display(encoder); 1733 - const struct intel_shared_dpll *pll = crtc_state->shared_dpll; 1733 + const struct intel_dpll *pll = crtc_state->intel_dpll; 1734 1734 enum phy phy = intel_encoder_to_phy(encoder); 1735 1735 1736 1736 if (drm_WARN_ON(display->drm, !pll)) ··· 1760 1760 ICL_DPCLKA_CFGCR0_DDI_CLK_OFF(phy)); 1761 1761 } 1762 1762 1763 - struct intel_shared_dpll *icl_ddi_combo_get_pll(struct intel_encoder *encoder) 1763 + struct intel_dpll *icl_ddi_combo_get_pll(struct intel_encoder *encoder) 1764 1764 { 1765 1765 struct intel_display *display = to_intel_display(encoder); 1766 1766 enum phy phy = intel_encoder_to_phy(encoder); ··· 1774 1774 const struct intel_crtc_state *crtc_state) 1775 1775 { 1776 1776 struct intel_display *display = to_intel_display(encoder); 1777 - const struct intel_shared_dpll *pll = crtc_state->shared_dpll; 1777 + const struct intel_dpll *pll = crtc_state->intel_dpll; 1778 1778 enum port port = encoder->port; 1779 1779 1780 1780 if (drm_WARN_ON(display->drm, !pll)) ··· 1817 1817 const struct intel_crtc_state *crtc_state) 1818 1818 { 1819 1819 struct intel_display *display = to_intel_display(encoder); 1820 - const struct intel_shared_dpll *pll = crtc_state->shared_dpll; 1820 + const struct intel_dpll *pll = crtc_state->intel_dpll; 1821 1821 enum tc_port tc_port = intel_encoder_to_tc(encoder); 1822 1822 enum port port = encoder->port; 1823 1823 ··· 1868 1868 return !(tmp & ICL_DPCLKA_CFGCR0_TC_CLK_OFF(tc_port)); 1869 1869 } 1870 1870 1871 - static struct intel_shared_dpll *icl_ddi_tc_get_pll(struct intel_encoder *encoder) 1871 + static struct intel_dpll *icl_ddi_tc_get_pll(struct intel_encoder *encoder) 1872 1872 { 1873 1873 struct intel_display *display = to_intel_display(encoder); 1874 1874 enum tc_port tc_port = intel_encoder_to_tc(encoder); ··· 1898 1898 return intel_get_shared_dpll_by_id(display, id); 1899 1899 } 1900 1900 1901 - static struct intel_shared_dpll *bxt_ddi_get_pll(struct intel_encoder *encoder) 1901 + static struct intel_dpll *bxt_ddi_get_pll(struct intel_encoder *encoder) 1902 1902 { 1903 1903 struct intel_display *display = to_intel_display(encoder->base.dev); 1904 1904 enum intel_dpll_id id; ··· 1925 1925 const struct intel_crtc_state *crtc_state) 1926 1926 { 1927 1927 struct intel_display *display = to_intel_display(encoder); 1928 - const struct intel_shared_dpll *pll = crtc_state->shared_dpll; 1928 + const struct intel_dpll *pll = crtc_state->intel_dpll; 1929 1929 enum port port = encoder->port; 1930 1930 1931 1931 if (drm_WARN_ON(display->drm, !pll)) ··· 1967 1967 return !(intel_de_read(display, DPLL_CTRL2) & DPLL_CTRL2_DDI_CLK_OFF(port)); 1968 1968 } 1969 1969 1970 - static struct intel_shared_dpll *skl_ddi_get_pll(struct intel_encoder *encoder) 1970 + static struct intel_dpll *skl_ddi_get_pll(struct intel_encoder *encoder) 1971 1971 { 1972 1972 struct intel_display *display = to_intel_display(encoder); 1973 1973 enum port port = encoder->port; ··· 1993 1993 const struct intel_crtc_state *crtc_state) 1994 1994 { 1995 1995 struct intel_display *display = to_intel_display(encoder); 1996 - const struct intel_shared_dpll *pll = crtc_state->shared_dpll; 1996 + const struct intel_dpll *pll = crtc_state->intel_dpll; 1997 1997 enum port port = encoder->port; 1998 1998 1999 1999 if (drm_WARN_ON(display->drm, !pll)) ··· 2018 2018 return intel_de_read(display, PORT_CLK_SEL(port)) != PORT_CLK_SEL_NONE; 2019 2019 } 2020 2020 2021 - static struct intel_shared_dpll *hsw_ddi_get_pll(struct intel_encoder *encoder) 2021 + static struct intel_dpll *hsw_ddi_get_pll(struct intel_encoder *encoder) 2022 2022 { 2023 2023 struct intel_display *display = to_intel_display(encoder); 2024 2024 enum port port = encoder->port; ··· 4187 4187 4188 4188 void intel_ddi_get_clock(struct intel_encoder *encoder, 4189 4189 struct intel_crtc_state *crtc_state, 4190 - struct intel_shared_dpll *pll) 4190 + struct intel_dpll *pll) 4191 4191 { 4192 4192 struct intel_display *display = to_intel_display(encoder); 4193 4193 enum icl_port_dpll_id port_dpll_id = ICL_PORT_DPLL_DEFAULT; ··· 4203 4203 4204 4204 icl_set_active_port_dpll(crtc_state, port_dpll_id); 4205 4205 4206 - crtc_state->port_clock = intel_dpll_get_freq(display, crtc_state->shared_dpll, 4206 + crtc_state->port_clock = intel_dpll_get_freq(display, crtc_state->intel_dpll, 4207 4207 &crtc_state->dpll_hw_state); 4208 4208 } 4209 4209 ··· 4257 4257 intel_ddi_get_config(encoder, crtc_state); 4258 4258 } 4259 4259 4260 - static bool icl_ddi_tc_pll_is_tbt(const struct intel_shared_dpll *pll) 4260 + static bool icl_ddi_tc_pll_is_tbt(const struct intel_dpll *pll) 4261 4261 { 4262 4262 return pll->info->id == DPLL_ID_ICL_TBTPLL; 4263 4263 } ··· 4267 4267 const struct intel_crtc_state *crtc_state) 4268 4268 { 4269 4269 struct intel_display *display = to_intel_display(encoder); 4270 - const struct intel_shared_dpll *pll = crtc_state->shared_dpll; 4270 + const struct intel_dpll *pll = crtc_state->intel_dpll; 4271 4271 4272 4272 if (drm_WARN_ON(display->drm, !pll)) 4273 4273 return ICL_PORT_DPLL_DEFAULT; ··· 4290 4290 4291 4291 static void icl_ddi_tc_get_clock(struct intel_encoder *encoder, 4292 4292 struct intel_crtc_state *crtc_state, 4293 - struct intel_shared_dpll *pll) 4293 + struct intel_dpll *pll) 4294 4294 { 4295 4295 struct intel_display *display = to_intel_display(encoder); 4296 4296 enum icl_port_dpll_id port_dpll_id; ··· 4313 4313 4314 4314 icl_set_active_port_dpll(crtc_state, port_dpll_id); 4315 4315 4316 - if (icl_ddi_tc_pll_is_tbt(crtc_state->shared_dpll)) 4316 + if (icl_ddi_tc_pll_is_tbt(crtc_state->intel_dpll)) 4317 4317 crtc_state->port_clock = icl_calc_tbt_pll_link(display, encoder->port); 4318 4318 else 4319 - crtc_state->port_clock = intel_dpll_get_freq(display, crtc_state->shared_dpll, 4319 + crtc_state->port_clock = intel_dpll_get_freq(display, crtc_state->intel_dpll, 4320 4320 &crtc_state->dpll_hw_state); 4321 4321 } 4322 4322
+3 -3
drivers/gpu/drm/i915/display/intel_ddi.h
··· 16 16 struct intel_crtc_state; 17 17 struct intel_display; 18 18 struct intel_dp; 19 + struct intel_dpll; 19 20 struct intel_dpll_hw_state; 20 21 struct intel_encoder; 21 - struct intel_shared_dpll; 22 22 enum pipe; 23 23 enum port; 24 24 enum transcoder; ··· 40 40 void intel_ddi_disable_clock(struct intel_encoder *encoder); 41 41 void intel_ddi_get_clock(struct intel_encoder *encoder, 42 42 struct intel_crtc_state *crtc_state, 43 - struct intel_shared_dpll *pll); 43 + struct intel_dpll *pll); 44 44 void hsw_ddi_enable_clock(struct intel_encoder *encoder, 45 45 const struct intel_crtc_state *crtc_state); 46 46 void hsw_ddi_disable_clock(struct intel_encoder *encoder); ··· 50 50 const struct intel_crtc_state *crtc_state); 51 51 void hsw_ddi_get_config(struct intel_encoder *encoder, 52 52 struct intel_crtc_state *crtc_state); 53 - struct intel_shared_dpll *icl_ddi_combo_get_pll(struct intel_encoder *encoder); 53 + struct intel_dpll *icl_ddi_combo_get_pll(struct intel_encoder *encoder); 54 54 void hsw_prepare_dp_ddi_buffers(struct intel_encoder *encoder, 55 55 const struct intel_crtc_state *crtc_state); 56 56 void intel_wait_ddi_buf_idle(struct intel_display *display, enum port port);
+6 -6
drivers/gpu/drm/i915/display/intel_display.c
··· 1325 1325 if (intel_crtc_needs_modeset(new_crtc_state)) 1326 1326 continue; 1327 1327 1328 - new_crtc_state->shared_dpll = old_crtc_state->shared_dpll; 1328 + new_crtc_state->intel_dpll = old_crtc_state->intel_dpll; 1329 1329 new_crtc_state->dpll_hw_state = old_crtc_state->dpll_hw_state; 1330 1330 } 1331 1331 } ··· 1663 1663 1664 1664 intel_encoders_pre_pll_enable(state, crtc); 1665 1665 1666 - if (new_crtc_state->shared_dpll) 1666 + if (new_crtc_state->intel_dpll) 1667 1667 intel_enable_shared_dpll(new_crtc_state); 1668 1668 1669 1669 intel_encoders_pre_enable(state, crtc); ··· 1959 1959 if (HAS_DDI(display) && crtc_state->has_audio) 1960 1960 set_bit(POWER_DOMAIN_AUDIO_MMIO, mask->bits); 1961 1961 1962 - if (crtc_state->shared_dpll) 1962 + if (crtc_state->intel_dpll) 1963 1963 set_bit(POWER_DOMAIN_DISPLAY_CORE, mask->bits); 1964 1964 1965 1965 if (crtc_state->dsc.compression_enable) ··· 4509 4509 /* preserve some things from the slave's original crtc state */ 4510 4510 saved_state->uapi = secondary_crtc_state->uapi; 4511 4511 saved_state->scaler_state = secondary_crtc_state->scaler_state; 4512 - saved_state->shared_dpll = secondary_crtc_state->shared_dpll; 4512 + saved_state->intel_dpll = secondary_crtc_state->intel_dpll; 4513 4513 saved_state->crc_enabled = secondary_crtc_state->crc_enabled; 4514 4514 4515 4515 intel_crtc_free_hw_state(secondary_crtc_state); ··· 4572 4572 saved_state->uapi = crtc_state->uapi; 4573 4573 saved_state->inherited = crtc_state->inherited; 4574 4574 saved_state->scaler_state = crtc_state->scaler_state; 4575 - saved_state->shared_dpll = crtc_state->shared_dpll; 4575 + saved_state->intel_dpll = crtc_state->intel_dpll; 4576 4576 saved_state->dpll_hw_state = crtc_state->dpll_hw_state; 4577 4577 memcpy(saved_state->icl_port_dplls, crtc_state->icl_port_dplls, 4578 4578 sizeof(saved_state->icl_port_dplls)); ··· 5326 5326 PIPE_CONF_CHECK_BOOL(double_wide); 5327 5327 5328 5328 if (display->dpll.mgr) 5329 - PIPE_CONF_CHECK_P(shared_dpll); 5329 + PIPE_CONF_CHECK_P(intel_dpll); 5330 5330 5331 5331 /* FIXME convert everything over the dpll_mgr */ 5332 5332 if (display->dpll.mgr || HAS_GMCH(display))
+2 -2
drivers/gpu/drm/i915/display/intel_display_core.h
··· 125 125 struct intel_dpll_global { 126 126 struct mutex lock; 127 127 128 - int num_shared_dpll; 129 - struct intel_shared_dpll shared_dplls[I915_NUM_PLLS]; 128 + int num_dpll; 129 + struct intel_dpll dplls[I915_NUM_PLLS]; 130 130 const struct intel_dpll_mgr *mgr; 131 131 132 132 struct {
+1 -1
drivers/gpu/drm/i915/display/intel_display_debugfs.c
··· 618 618 { 619 619 struct intel_display *display = node_to_intel_display(m->private); 620 620 struct drm_printer p = drm_seq_file_printer(m); 621 - struct intel_shared_dpll *pll; 621 + struct intel_dpll *pll; 622 622 int i; 623 623 624 624 drm_modeset_lock_all(display->drm);
+3 -3
drivers/gpu/drm/i915/display/intel_display_types.h
··· 1079 1079 * haswell. */ 1080 1080 struct dpll dpll; 1081 1081 1082 - /* Selected dpll when shared or NULL. */ 1083 - struct intel_shared_dpll *shared_dpll; 1082 + /* Selected dpll or NULL. */ 1083 + struct intel_dpll *intel_dpll; 1084 1084 1085 1085 /* Actual register state of the dpll, for shared dpll cross-checking. */ 1086 1086 struct intel_dpll_hw_state dpll_hw_state; ··· 1090 1090 * setting shared_dpll and dpll_hw_state to one of these reserved ones. 1091 1091 */ 1092 1092 struct icl_port_dpll { 1093 - struct intel_shared_dpll *pll; 1093 + struct intel_dpll *pll; 1094 1094 struct intel_dpll_hw_state hw_state; 1095 1095 } icl_port_dplls[ICL_PORT_DPLL_COUNT]; 1096 1096
+2 -2
drivers/gpu/drm/i915/display/intel_dpll.c
··· 1768 1768 int ret; 1769 1769 1770 1770 drm_WARN_ON(display->drm, !intel_crtc_needs_modeset(crtc_state)); 1771 - drm_WARN_ON(display->drm, !crtc_state->hw.enable && crtc_state->shared_dpll); 1771 + drm_WARN_ON(display->drm, !crtc_state->hw.enable && crtc_state->intel_dpll); 1772 1772 1773 - if (!crtc_state->hw.enable || crtc_state->shared_dpll) 1773 + if (!crtc_state->hw.enable || crtc_state->intel_dpll) 1774 1774 return 0; 1775 1775 1776 1776 if (!display->funcs.dpll->crtc_get_shared_dpll)
+114 -114
drivers/gpu/drm/i915/display/intel_dpll_mgr.c
··· 70 70 * the pll is not already enabled. 71 71 */ 72 72 void (*enable)(struct intel_display *display, 73 - struct intel_shared_dpll *pll, 73 + struct intel_dpll *pll, 74 74 const struct intel_dpll_hw_state *dpll_hw_state); 75 75 76 76 /* ··· 79 79 * tracked users for it. 80 80 */ 81 81 void (*disable)(struct intel_display *display, 82 - struct intel_shared_dpll *pll); 82 + struct intel_dpll *pll); 83 83 84 84 /* 85 85 * Hook for reading the values currently programmed to the DPLL ··· 87 87 * verification after a mode set. 88 88 */ 89 89 bool (*get_hw_state)(struct intel_display *display, 90 - struct intel_shared_dpll *pll, 90 + struct intel_dpll *pll, 91 91 struct intel_dpll_hw_state *dpll_hw_state); 92 92 93 93 /* ··· 95 95 * in state. 96 96 */ 97 97 int (*get_freq)(struct intel_display *i915, 98 - const struct intel_shared_dpll *pll, 98 + const struct intel_dpll *pll, 99 99 const struct intel_dpll_hw_state *dpll_hw_state); 100 100 }; 101 101 ··· 124 124 intel_atomic_duplicate_dpll_state(struct intel_display *display, 125 125 struct intel_dpll_state *dpll_state) 126 126 { 127 - struct intel_shared_dpll *pll; 127 + struct intel_dpll *pll; 128 128 int i; 129 129 130 130 /* Copy dpll state */ ··· 158 158 * Returns: 159 159 * A pointer to the DPLL with @id 160 160 */ 161 - struct intel_shared_dpll * 161 + struct intel_dpll * 162 162 intel_get_shared_dpll_by_id(struct intel_display *display, 163 163 enum intel_dpll_id id) 164 164 { 165 - struct intel_shared_dpll *pll; 165 + struct intel_dpll *pll; 166 166 int i; 167 167 168 168 for_each_dpll(display, pll, i) { ··· 176 176 177 177 /* For ILK+ */ 178 178 void assert_shared_dpll(struct intel_display *display, 179 - struct intel_shared_dpll *pll, 179 + struct intel_dpll *pll, 180 180 bool state) 181 181 { 182 182 bool cur_state; ··· 205 205 206 206 static i915_reg_t 207 207 intel_combo_pll_enable_reg(struct intel_display *display, 208 - struct intel_shared_dpll *pll) 208 + struct intel_dpll *pll) 209 209 { 210 210 if (display->platform.dg1) 211 211 return DG1_DPLL_ENABLE(pll->info->id); ··· 218 218 219 219 static i915_reg_t 220 220 intel_tc_pll_enable_reg(struct intel_display *display, 221 - struct intel_shared_dpll *pll) 221 + struct intel_dpll *pll) 222 222 { 223 223 const enum intel_dpll_id id = pll->info->id; 224 224 enum tc_port tc_port = icl_pll_id_to_tc_port(id); ··· 230 230 } 231 231 232 232 static void _intel_enable_shared_dpll(struct intel_display *display, 233 - struct intel_shared_dpll *pll) 233 + struct intel_dpll *pll) 234 234 { 235 235 if (pll->info->power_domain) 236 236 pll->wakeref = intel_display_power_get(display, pll->info->power_domain); ··· 240 240 } 241 241 242 242 static void _intel_disable_shared_dpll(struct intel_display *display, 243 - struct intel_shared_dpll *pll) 243 + struct intel_dpll *pll) 244 244 { 245 245 pll->info->funcs->disable(display, pll); 246 246 pll->on = false; ··· 259 259 { 260 260 struct intel_display *display = to_intel_display(crtc_state); 261 261 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); 262 - struct intel_shared_dpll *pll = crtc_state->shared_dpll; 262 + struct intel_dpll *pll = crtc_state->intel_dpll; 263 263 unsigned int pipe_mask = intel_crtc_joined_pipe_mask(crtc_state); 264 264 unsigned int old_mask; 265 265 ··· 305 305 { 306 306 struct intel_display *display = to_intel_display(crtc_state); 307 307 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); 308 - struct intel_shared_dpll *pll = crtc_state->shared_dpll; 308 + struct intel_dpll *pll = crtc_state->intel_dpll; 309 309 unsigned int pipe_mask = intel_crtc_joined_pipe_mask(crtc_state); 310 310 311 311 /* PCH only available on ILK+ */ ··· 344 344 static unsigned long 345 345 intel_dpll_mask_all(struct intel_display *display) 346 346 { 347 - struct intel_shared_dpll *pll; 347 + struct intel_dpll *pll; 348 348 unsigned long dpll_mask = 0; 349 349 int i; 350 350 ··· 357 357 return dpll_mask; 358 358 } 359 359 360 - static struct intel_shared_dpll * 360 + static struct intel_dpll * 361 361 intel_find_shared_dpll(struct intel_atomic_state *state, 362 362 const struct intel_crtc *crtc, 363 363 const struct intel_dpll_hw_state *dpll_hw_state, ··· 366 366 struct intel_display *display = to_intel_display(crtc); 367 367 unsigned long dpll_mask_all = intel_dpll_mask_all(display); 368 368 struct intel_dpll_state *dpll_state; 369 - struct intel_shared_dpll *unused_pll = NULL; 369 + struct intel_dpll *unused_pll = NULL; 370 370 enum intel_dpll_id id; 371 371 372 372 dpll_state = intel_atomic_get_shared_dpll_state(&state->base); ··· 374 374 drm_WARN_ON(display->drm, dpll_mask & ~dpll_mask_all); 375 375 376 376 for_each_set_bit(id, &dpll_mask, fls(dpll_mask_all)) { 377 - struct intel_shared_dpll *pll; 377 + struct intel_dpll *pll; 378 378 379 379 pll = intel_get_shared_dpll_by_id(display, id); 380 380 if (!pll) ··· 421 421 */ 422 422 static void 423 423 intel_reference_shared_dpll_crtc(const struct intel_crtc *crtc, 424 - const struct intel_shared_dpll *pll, 424 + const struct intel_dpll *pll, 425 425 struct intel_dpll_state *dpll_state) 426 426 { 427 427 struct intel_display *display = to_intel_display(crtc); ··· 437 437 static void 438 438 intel_reference_shared_dpll(struct intel_atomic_state *state, 439 439 const struct intel_crtc *crtc, 440 - const struct intel_shared_dpll *pll, 440 + const struct intel_dpll *pll, 441 441 const struct intel_dpll_hw_state *dpll_hw_state) 442 442 { 443 443 struct intel_dpll_state *dpll_state; ··· 460 460 */ 461 461 void 462 462 intel_unreference_shared_dpll_crtc(const struct intel_crtc *crtc, 463 - const struct intel_shared_dpll *pll, 463 + const struct intel_dpll *pll, 464 464 struct intel_dpll_state *dpll_state) 465 465 { 466 466 struct intel_display *display = to_intel_display(crtc); ··· 475 475 476 476 static void intel_unreference_shared_dpll(struct intel_atomic_state *state, 477 477 const struct intel_crtc *crtc, 478 - const struct intel_shared_dpll *pll) 478 + const struct intel_dpll *pll) 479 479 { 480 480 struct intel_dpll_state *dpll_state; 481 481 ··· 492 492 struct intel_crtc_state *new_crtc_state = 493 493 intel_atomic_get_new_crtc_state(state, crtc); 494 494 495 - new_crtc_state->shared_dpll = NULL; 495 + new_crtc_state->intel_dpll = NULL; 496 496 497 - if (!old_crtc_state->shared_dpll) 497 + if (!old_crtc_state->intel_dpll) 498 498 return; 499 499 500 - intel_unreference_shared_dpll(state, crtc, old_crtc_state->shared_dpll); 500 + intel_unreference_shared_dpll(state, crtc, old_crtc_state->intel_dpll); 501 501 } 502 502 503 503 /** ··· 515 515 { 516 516 struct intel_display *display = to_intel_display(state); 517 517 struct intel_dpll_state *dpll_state = state->dpll_state; 518 - struct intel_shared_dpll *pll; 518 + struct intel_dpll *pll; 519 519 int i; 520 520 521 521 if (!state->dpll_set) ··· 526 526 } 527 527 528 528 static bool ibx_pch_dpll_get_hw_state(struct intel_display *display, 529 - struct intel_shared_dpll *pll, 529 + struct intel_dpll *pll, 530 530 struct intel_dpll_hw_state *dpll_hw_state) 531 531 { 532 532 struct i9xx_dpll_hw_state *hw_state = &dpll_hw_state->i9xx; ··· 562 562 } 563 563 564 564 static void ibx_pch_dpll_enable(struct intel_display *display, 565 - struct intel_shared_dpll *pll, 565 + struct intel_dpll *pll, 566 566 const struct intel_dpll_hw_state *dpll_hw_state) 567 567 { 568 568 const struct i9xx_dpll_hw_state *hw_state = &dpll_hw_state->i9xx; ··· 591 591 } 592 592 593 593 static void ibx_pch_dpll_disable(struct intel_display *display, 594 - struct intel_shared_dpll *pll) 594 + struct intel_dpll *pll) 595 595 { 596 596 const enum intel_dpll_id id = pll->info->id; 597 597 ··· 614 614 struct intel_display *display = to_intel_display(state); 615 615 struct intel_crtc_state *crtc_state = 616 616 intel_atomic_get_new_crtc_state(state, crtc); 617 - struct intel_shared_dpll *pll; 617 + struct intel_dpll *pll; 618 618 enum intel_dpll_id id; 619 619 620 620 if (HAS_PCH_IBX(display)) { ··· 640 640 intel_reference_shared_dpll(state, crtc, 641 641 pll, &crtc_state->dpll_hw_state); 642 642 643 - crtc_state->shared_dpll = pll; 643 + crtc_state->intel_dpll = pll; 644 644 645 645 return 0; 646 646 } ··· 692 692 }; 693 693 694 694 static void hsw_ddi_wrpll_enable(struct intel_display *display, 695 - struct intel_shared_dpll *pll, 695 + struct intel_dpll *pll, 696 696 const struct intel_dpll_hw_state *dpll_hw_state) 697 697 { 698 698 const struct hsw_dpll_hw_state *hw_state = &dpll_hw_state->hsw; ··· 704 704 } 705 705 706 706 static void hsw_ddi_spll_enable(struct intel_display *display, 707 - struct intel_shared_dpll *pll, 707 + struct intel_dpll *pll, 708 708 const struct intel_dpll_hw_state *dpll_hw_state) 709 709 { 710 710 const struct hsw_dpll_hw_state *hw_state = &dpll_hw_state->hsw; ··· 715 715 } 716 716 717 717 static void hsw_ddi_wrpll_disable(struct intel_display *display, 718 - struct intel_shared_dpll *pll) 718 + struct intel_dpll *pll) 719 719 { 720 720 const enum intel_dpll_id id = pll->info->id; 721 721 ··· 731 731 } 732 732 733 733 static void hsw_ddi_spll_disable(struct intel_display *display, 734 - struct intel_shared_dpll *pll) 734 + struct intel_dpll *pll) 735 735 { 736 736 enum intel_dpll_id id = pll->info->id; 737 737 ··· 747 747 } 748 748 749 749 static bool hsw_ddi_wrpll_get_hw_state(struct intel_display *display, 750 - struct intel_shared_dpll *pll, 750 + struct intel_dpll *pll, 751 751 struct intel_dpll_hw_state *dpll_hw_state) 752 752 { 753 753 struct hsw_dpll_hw_state *hw_state = &dpll_hw_state->hsw; ··· 769 769 } 770 770 771 771 static bool hsw_ddi_spll_get_hw_state(struct intel_display *display, 772 - struct intel_shared_dpll *pll, 772 + struct intel_dpll *pll, 773 773 struct intel_dpll_hw_state *dpll_hw_state) 774 774 { 775 775 struct hsw_dpll_hw_state *hw_state = &dpll_hw_state->hsw; ··· 996 996 } 997 997 998 998 static int hsw_ddi_wrpll_get_freq(struct intel_display *display, 999 - const struct intel_shared_dpll *pll, 999 + const struct intel_dpll *pll, 1000 1000 const struct intel_dpll_hw_state *dpll_hw_state) 1001 1001 { 1002 1002 const struct hsw_dpll_hw_state *hw_state = &dpll_hw_state->hsw; ··· 1059 1059 return 0; 1060 1060 } 1061 1061 1062 - static struct intel_shared_dpll * 1062 + static struct intel_dpll * 1063 1063 hsw_ddi_wrpll_get_dpll(struct intel_atomic_state *state, 1064 1064 struct intel_crtc *crtc) 1065 1065 { ··· 1090 1090 } 1091 1091 } 1092 1092 1093 - static struct intel_shared_dpll * 1093 + static struct intel_dpll * 1094 1094 hsw_ddi_lcpll_get_dpll(struct intel_crtc_state *crtc_state) 1095 1095 { 1096 1096 struct intel_display *display = to_intel_display(crtc_state); 1097 - struct intel_shared_dpll *pll; 1097 + struct intel_dpll *pll; 1098 1098 enum intel_dpll_id pll_id; 1099 1099 int clock = crtc_state->port_clock; 1100 1100 ··· 1122 1122 } 1123 1123 1124 1124 static int hsw_ddi_lcpll_get_freq(struct intel_display *display, 1125 - const struct intel_shared_dpll *pll, 1125 + const struct intel_dpll *pll, 1126 1126 const struct intel_dpll_hw_state *dpll_hw_state) 1127 1127 { 1128 1128 int link_clock = 0; ··· 1162 1162 return 0; 1163 1163 } 1164 1164 1165 - static struct intel_shared_dpll * 1165 + static struct intel_dpll * 1166 1166 hsw_ddi_spll_get_dpll(struct intel_atomic_state *state, 1167 1167 struct intel_crtc *crtc) 1168 1168 { ··· 1174 1174 } 1175 1175 1176 1176 static int hsw_ddi_spll_get_freq(struct intel_display *display, 1177 - const struct intel_shared_dpll *pll, 1177 + const struct intel_dpll *pll, 1178 1178 const struct intel_dpll_hw_state *dpll_hw_state) 1179 1179 { 1180 1180 const struct hsw_dpll_hw_state *hw_state = &dpll_hw_state->hsw; ··· 1221 1221 { 1222 1222 struct intel_crtc_state *crtc_state = 1223 1223 intel_atomic_get_new_crtc_state(state, crtc); 1224 - struct intel_shared_dpll *pll = NULL; 1224 + struct intel_dpll *pll = NULL; 1225 1225 1226 1226 if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI)) 1227 1227 pll = hsw_ddi_wrpll_get_dpll(state, crtc); ··· 1236 1236 intel_reference_shared_dpll(state, crtc, 1237 1237 pll, &crtc_state->dpll_hw_state); 1238 1238 1239 - crtc_state->shared_dpll = pll; 1239 + crtc_state->intel_dpll = pll; 1240 1240 1241 1241 return 0; 1242 1242 } ··· 1285 1285 }; 1286 1286 1287 1287 static void hsw_ddi_lcpll_enable(struct intel_display *display, 1288 - struct intel_shared_dpll *pll, 1288 + struct intel_dpll *pll, 1289 1289 const struct intel_dpll_hw_state *hw_state) 1290 1290 { 1291 1291 } 1292 1292 1293 1293 static void hsw_ddi_lcpll_disable(struct intel_display *display, 1294 - struct intel_shared_dpll *pll) 1294 + struct intel_dpll *pll) 1295 1295 { 1296 1296 } 1297 1297 1298 1298 static bool hsw_ddi_lcpll_get_hw_state(struct intel_display *display, 1299 - struct intel_shared_dpll *pll, 1299 + struct intel_dpll *pll, 1300 1300 struct intel_dpll_hw_state *dpll_hw_state) 1301 1301 { 1302 1302 return true; ··· 1364 1364 }; 1365 1365 1366 1366 static void skl_ddi_pll_write_ctrl1(struct intel_display *display, 1367 - struct intel_shared_dpll *pll, 1367 + struct intel_dpll *pll, 1368 1368 const struct skl_dpll_hw_state *hw_state) 1369 1369 { 1370 1370 const enum intel_dpll_id id = pll->info->id; ··· 1378 1378 } 1379 1379 1380 1380 static void skl_ddi_pll_enable(struct intel_display *display, 1381 - struct intel_shared_dpll *pll, 1381 + struct intel_dpll *pll, 1382 1382 const struct intel_dpll_hw_state *dpll_hw_state) 1383 1383 { 1384 1384 const struct skl_dpll_hw_state *hw_state = &dpll_hw_state->skl; ··· 1400 1400 } 1401 1401 1402 1402 static void skl_ddi_dpll0_enable(struct intel_display *display, 1403 - struct intel_shared_dpll *pll, 1403 + struct intel_dpll *pll, 1404 1404 const struct intel_dpll_hw_state *dpll_hw_state) 1405 1405 { 1406 1406 const struct skl_dpll_hw_state *hw_state = &dpll_hw_state->skl; ··· 1409 1409 } 1410 1410 1411 1411 static void skl_ddi_pll_disable(struct intel_display *display, 1412 - struct intel_shared_dpll *pll) 1412 + struct intel_dpll *pll) 1413 1413 { 1414 1414 const struct skl_dpll_regs *regs = skl_dpll_regs; 1415 1415 const enum intel_dpll_id id = pll->info->id; ··· 1420 1420 } 1421 1421 1422 1422 static void skl_ddi_dpll0_disable(struct intel_display *display, 1423 - struct intel_shared_dpll *pll) 1423 + struct intel_dpll *pll) 1424 1424 { 1425 1425 } 1426 1426 1427 1427 static bool skl_ddi_pll_get_hw_state(struct intel_display *display, 1428 - struct intel_shared_dpll *pll, 1428 + struct intel_dpll *pll, 1429 1429 struct intel_dpll_hw_state *dpll_hw_state) 1430 1430 { 1431 1431 struct skl_dpll_hw_state *hw_state = &dpll_hw_state->skl; ··· 1463 1463 } 1464 1464 1465 1465 static bool skl_ddi_dpll0_get_hw_state(struct intel_display *display, 1466 - struct intel_shared_dpll *pll, 1466 + struct intel_dpll *pll, 1467 1467 struct intel_dpll_hw_state *dpll_hw_state) 1468 1468 { 1469 1469 struct skl_dpll_hw_state *hw_state = &dpll_hw_state->skl; ··· 1736 1736 } 1737 1737 1738 1738 static int skl_ddi_wrpll_get_freq(struct intel_display *display, 1739 - const struct intel_shared_dpll *pll, 1739 + const struct intel_dpll *pll, 1740 1740 const struct intel_dpll_hw_state *dpll_hw_state) 1741 1741 { 1742 1742 const struct skl_dpll_hw_state *hw_state = &dpll_hw_state->skl; ··· 1884 1884 } 1885 1885 1886 1886 static int skl_ddi_lcpll_get_freq(struct intel_display *display, 1887 - const struct intel_shared_dpll *pll, 1887 + const struct intel_dpll *pll, 1888 1888 const struct intel_dpll_hw_state *dpll_hw_state) 1889 1889 { 1890 1890 const struct skl_dpll_hw_state *hw_state = &dpll_hw_state->skl; ··· 1939 1939 { 1940 1940 struct intel_crtc_state *crtc_state = 1941 1941 intel_atomic_get_new_crtc_state(state, crtc); 1942 - struct intel_shared_dpll *pll; 1942 + struct intel_dpll *pll; 1943 1943 1944 1944 if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_EDP)) 1945 1945 pll = intel_find_shared_dpll(state, crtc, ··· 1957 1957 intel_reference_shared_dpll(state, crtc, 1958 1958 pll, &crtc_state->dpll_hw_state); 1959 1959 1960 - crtc_state->shared_dpll = pll; 1960 + crtc_state->intel_dpll = pll; 1961 1961 1962 1962 return 0; 1963 1963 } 1964 1964 1965 1965 static int skl_ddi_pll_get_freq(struct intel_display *display, 1966 - const struct intel_shared_dpll *pll, 1966 + const struct intel_dpll *pll, 1967 1967 const struct intel_dpll_hw_state *dpll_hw_state) 1968 1968 { 1969 1969 const struct skl_dpll_hw_state *hw_state = &dpll_hw_state->skl; ··· 2038 2038 }; 2039 2039 2040 2040 static void bxt_ddi_pll_enable(struct intel_display *display, 2041 - struct intel_shared_dpll *pll, 2041 + struct intel_dpll *pll, 2042 2042 const struct intel_dpll_hw_state *dpll_hw_state) 2043 2043 { 2044 2044 const struct bxt_dpll_hw_state *hw_state = &dpll_hw_state->bxt; ··· 2141 2141 } 2142 2142 2143 2143 static void bxt_ddi_pll_disable(struct intel_display *display, 2144 - struct intel_shared_dpll *pll) 2144 + struct intel_dpll *pll) 2145 2145 { 2146 2146 enum port port = (enum port)pll->info->id; /* 1:1 port->PLL mapping */ 2147 2147 ··· 2160 2160 } 2161 2161 2162 2162 static bool bxt_ddi_pll_get_hw_state(struct intel_display *display, 2163 - struct intel_shared_dpll *pll, 2163 + struct intel_dpll *pll, 2164 2164 struct intel_dpll_hw_state *dpll_hw_state) 2165 2165 { 2166 2166 struct bxt_dpll_hw_state *hw_state = &dpll_hw_state->bxt; ··· 2360 2360 } 2361 2361 2362 2362 static int bxt_ddi_pll_get_freq(struct intel_display *display, 2363 - const struct intel_shared_dpll *pll, 2363 + const struct intel_dpll *pll, 2364 2364 const struct intel_dpll_hw_state *dpll_hw_state) 2365 2365 { 2366 2366 const struct bxt_dpll_hw_state *hw_state = &dpll_hw_state->bxt; ··· 2429 2429 struct intel_display *display = to_intel_display(state); 2430 2430 struct intel_crtc_state *crtc_state = 2431 2431 intel_atomic_get_new_crtc_state(state, crtc); 2432 - struct intel_shared_dpll *pll; 2432 + struct intel_dpll *pll; 2433 2433 enum intel_dpll_id id; 2434 2434 2435 2435 /* 1:1 mapping between ports and PLLs */ ··· 2442 2442 intel_reference_shared_dpll(state, crtc, 2443 2443 pll, &crtc_state->dpll_hw_state); 2444 2444 2445 - crtc_state->shared_dpll = pll; 2445 + crtc_state->intel_dpll = pll; 2446 2446 2447 2447 return 0; 2448 2448 } ··· 2755 2755 } 2756 2756 2757 2757 static int icl_ddi_tbt_pll_get_freq(struct intel_display *display, 2758 - const struct intel_shared_dpll *pll, 2758 + const struct intel_dpll *pll, 2759 2759 const struct intel_dpll_hw_state *dpll_hw_state) 2760 2760 { 2761 2761 /* ··· 2826 2826 } 2827 2827 2828 2828 static int icl_ddi_combo_pll_get_freq(struct intel_display *display, 2829 - const struct intel_shared_dpll *pll, 2829 + const struct intel_dpll *pll, 2830 2830 const struct intel_dpll_hw_state *dpll_hw_state) 2831 2831 { 2832 2832 const struct icl_dpll_hw_state *hw_state = &dpll_hw_state->icl; ··· 3199 3199 } 3200 3200 3201 3201 static int icl_ddi_mg_pll_get_freq(struct intel_display *display, 3202 - const struct intel_shared_dpll *pll, 3202 + const struct intel_dpll *pll, 3203 3203 const struct intel_dpll_hw_state *dpll_hw_state) 3204 3204 { 3205 3205 const struct icl_dpll_hw_state *hw_state = &dpll_hw_state->icl; ··· 3285 3285 struct icl_port_dpll *port_dpll = 3286 3286 &crtc_state->icl_port_dplls[port_dpll_id]; 3287 3287 3288 - crtc_state->shared_dpll = port_dpll->pll; 3288 + crtc_state->intel_dpll = port_dpll->pll; 3289 3289 crtc_state->dpll_hw_state = port_dpll->hw_state; 3290 3290 } 3291 3291 ··· 3428 3428 return ret; 3429 3429 3430 3430 /* this is mainly for the fastset check */ 3431 - if (old_crtc_state->shared_dpll && 3432 - old_crtc_state->shared_dpll->info->id == DPLL_ID_ICL_TBTPLL) 3431 + if (old_crtc_state->intel_dpll && 3432 + old_crtc_state->intel_dpll->info->id == DPLL_ID_ICL_TBTPLL) 3433 3433 icl_set_active_port_dpll(crtc_state, ICL_PORT_DPLL_DEFAULT); 3434 3434 else 3435 3435 icl_set_active_port_dpll(crtc_state, ICL_PORT_DPLL_MG_PHY); ··· 3521 3521 intel_atomic_get_new_crtc_state(state, crtc); 3522 3522 enum icl_port_dpll_id id; 3523 3523 3524 - new_crtc_state->shared_dpll = NULL; 3524 + new_crtc_state->intel_dpll = NULL; 3525 3525 3526 3526 for (id = ICL_PORT_DPLL_DEFAULT; id < ICL_PORT_DPLL_COUNT; id++) { 3527 3527 const struct icl_port_dpll *old_port_dpll = ··· 3539 3539 } 3540 3540 3541 3541 static bool mg_pll_get_hw_state(struct intel_display *display, 3542 - struct intel_shared_dpll *pll, 3542 + struct intel_dpll *pll, 3543 3543 struct intel_dpll_hw_state *dpll_hw_state) 3544 3544 { 3545 3545 struct icl_dpll_hw_state *hw_state = &dpll_hw_state->icl; ··· 3606 3606 } 3607 3607 3608 3608 static bool dkl_pll_get_hw_state(struct intel_display *display, 3609 - struct intel_shared_dpll *pll, 3609 + struct intel_dpll *pll, 3610 3610 struct intel_dpll_hw_state *dpll_hw_state) 3611 3611 { 3612 3612 struct icl_dpll_hw_state *hw_state = &dpll_hw_state->icl; ··· 3678 3678 } 3679 3679 3680 3680 static bool icl_pll_get_hw_state(struct intel_display *display, 3681 - struct intel_shared_dpll *pll, 3681 + struct intel_dpll *pll, 3682 3682 struct intel_dpll_hw_state *dpll_hw_state, 3683 3683 i915_reg_t enable_reg) 3684 3684 { ··· 3739 3739 } 3740 3740 3741 3741 static bool combo_pll_get_hw_state(struct intel_display *display, 3742 - struct intel_shared_dpll *pll, 3742 + struct intel_dpll *pll, 3743 3743 struct intel_dpll_hw_state *dpll_hw_state) 3744 3744 { 3745 3745 i915_reg_t enable_reg = intel_combo_pll_enable_reg(display, pll); ··· 3748 3748 } 3749 3749 3750 3750 static bool tbt_pll_get_hw_state(struct intel_display *display, 3751 - struct intel_shared_dpll *pll, 3751 + struct intel_dpll *pll, 3752 3752 struct intel_dpll_hw_state *dpll_hw_state) 3753 3753 { 3754 3754 return icl_pll_get_hw_state(display, pll, dpll_hw_state, TBT_PLL_ENABLE); 3755 3755 } 3756 3756 3757 3757 static void icl_dpll_write(struct intel_display *display, 3758 - struct intel_shared_dpll *pll, 3758 + struct intel_dpll *pll, 3759 3759 const struct icl_dpll_hw_state *hw_state) 3760 3760 { 3761 3761 const enum intel_dpll_id id = pll->info->id; ··· 3797 3797 } 3798 3798 3799 3799 static void icl_mg_pll_write(struct intel_display *display, 3800 - struct intel_shared_dpll *pll, 3800 + struct intel_dpll *pll, 3801 3801 const struct icl_dpll_hw_state *hw_state) 3802 3802 { 3803 3803 enum tc_port tc_port = icl_pll_id_to_tc_port(pll->info->id); ··· 3840 3840 } 3841 3841 3842 3842 static void dkl_pll_write(struct intel_display *display, 3843 - struct intel_shared_dpll *pll, 3843 + struct intel_dpll *pll, 3844 3844 const struct icl_dpll_hw_state *hw_state) 3845 3845 { 3846 3846 enum tc_port tc_port = icl_pll_id_to_tc_port(pll->info->id); ··· 3905 3905 } 3906 3906 3907 3907 static void icl_pll_power_enable(struct intel_display *display, 3908 - struct intel_shared_dpll *pll, 3908 + struct intel_dpll *pll, 3909 3909 i915_reg_t enable_reg) 3910 3910 { 3911 3911 intel_de_rmw(display, enable_reg, 0, PLL_POWER_ENABLE); ··· 3920 3920 } 3921 3921 3922 3922 static void icl_pll_enable(struct intel_display *display, 3923 - struct intel_shared_dpll *pll, 3923 + struct intel_dpll *pll, 3924 3924 i915_reg_t enable_reg) 3925 3925 { 3926 3926 intel_de_rmw(display, enable_reg, 0, PLL_ENABLE); ··· 3930 3930 drm_err(display->drm, "PLL %d not locked\n", pll->info->id); 3931 3931 } 3932 3932 3933 - static void adlp_cmtg_clock_gating_wa(struct intel_display *display, struct intel_shared_dpll *pll) 3933 + static void adlp_cmtg_clock_gating_wa(struct intel_display *display, struct intel_dpll *pll) 3934 3934 { 3935 3935 u32 val; 3936 3936 ··· 3955 3955 } 3956 3956 3957 3957 static void combo_pll_enable(struct intel_display *display, 3958 - struct intel_shared_dpll *pll, 3958 + struct intel_dpll *pll, 3959 3959 const struct intel_dpll_hw_state *dpll_hw_state) 3960 3960 { 3961 3961 const struct icl_dpll_hw_state *hw_state = &dpll_hw_state->icl; ··· 3979 3979 } 3980 3980 3981 3981 static void tbt_pll_enable(struct intel_display *display, 3982 - struct intel_shared_dpll *pll, 3982 + struct intel_dpll *pll, 3983 3983 const struct intel_dpll_hw_state *dpll_hw_state) 3984 3984 { 3985 3985 const struct icl_dpll_hw_state *hw_state = &dpll_hw_state->icl; ··· 4000 4000 } 4001 4001 4002 4002 static void mg_pll_enable(struct intel_display *display, 4003 - struct intel_shared_dpll *pll, 4003 + struct intel_dpll *pll, 4004 4004 const struct intel_dpll_hw_state *dpll_hw_state) 4005 4005 { 4006 4006 const struct icl_dpll_hw_state *hw_state = &dpll_hw_state->icl; ··· 4025 4025 } 4026 4026 4027 4027 static void icl_pll_disable(struct intel_display *display, 4028 - struct intel_shared_dpll *pll, 4028 + struct intel_dpll *pll, 4029 4029 i915_reg_t enable_reg) 4030 4030 { 4031 4031 /* The first steps are done by intel_ddi_post_disable(). */ ··· 4056 4056 } 4057 4057 4058 4058 static void combo_pll_disable(struct intel_display *display, 4059 - struct intel_shared_dpll *pll) 4059 + struct intel_dpll *pll) 4060 4060 { 4061 4061 i915_reg_t enable_reg = intel_combo_pll_enable_reg(display, pll); 4062 4062 ··· 4064 4064 } 4065 4065 4066 4066 static void tbt_pll_disable(struct intel_display *display, 4067 - struct intel_shared_dpll *pll) 4067 + struct intel_dpll *pll) 4068 4068 { 4069 4069 icl_pll_disable(display, pll, TBT_PLL_ENABLE); 4070 4070 } 4071 4071 4072 4072 static void mg_pll_disable(struct intel_display *display, 4073 - struct intel_shared_dpll *pll) 4073 + struct intel_dpll *pll) 4074 4074 { 4075 4075 i915_reg_t enable_reg = intel_tc_pll_enable_reg(display, pll); 4076 4076 ··· 4346 4346 4347 4347 for (i = 0; dpll_info[i].name; i++) { 4348 4348 if (drm_WARN_ON(display->drm, 4349 - i >= ARRAY_SIZE(display->dpll.shared_dplls))) 4349 + i >= ARRAY_SIZE(display->dpll.dplls))) 4350 4350 break; 4351 4351 4352 4352 /* must fit into unsigned long bitmask on 32bit */ 4353 4353 if (drm_WARN_ON(display->drm, dpll_info[i].id >= 32)) 4354 4354 break; 4355 4355 4356 - display->dpll.shared_dplls[i].info = &dpll_info[i]; 4357 - display->dpll.shared_dplls[i].index = i; 4356 + display->dpll.dplls[i].info = &dpll_info[i]; 4357 + display->dpll.dplls[i].index = i; 4358 4358 } 4359 4359 4360 4360 display->dpll.mgr = dpll_mgr; 4361 - display->dpll.num_shared_dpll = i; 4361 + display->dpll.num_dpll = i; 4362 4362 } 4363 4363 4364 4364 /** ··· 4482 4482 * Return the output frequency corresponding to @pll's passed in @dpll_hw_state. 4483 4483 */ 4484 4484 int intel_dpll_get_freq(struct intel_display *display, 4485 - const struct intel_shared_dpll *pll, 4485 + const struct intel_dpll *pll, 4486 4486 const struct intel_dpll_hw_state *dpll_hw_state) 4487 4487 { 4488 4488 if (drm_WARN_ON(display->drm, !pll->info->funcs->get_freq)) ··· 4500 4500 * Read out @pll's hardware state into @dpll_hw_state. 4501 4501 */ 4502 4502 bool intel_dpll_get_hw_state(struct intel_display *display, 4503 - struct intel_shared_dpll *pll, 4503 + struct intel_dpll *pll, 4504 4504 struct intel_dpll_hw_state *dpll_hw_state) 4505 4505 { 4506 4506 return pll->info->funcs->get_hw_state(display, pll, dpll_hw_state); 4507 4507 } 4508 4508 4509 4509 static void readout_dpll_hw_state(struct intel_display *display, 4510 - struct intel_shared_dpll *pll) 4510 + struct intel_dpll *pll) 4511 4511 { 4512 4512 struct intel_crtc *crtc; 4513 4513 ··· 4521 4521 struct intel_crtc_state *crtc_state = 4522 4522 to_intel_crtc_state(crtc->base.state); 4523 4523 4524 - if (crtc_state->hw.active && crtc_state->shared_dpll == pll) 4524 + if (crtc_state->hw.active && crtc_state->intel_dpll == pll) 4525 4525 intel_reference_shared_dpll_crtc(crtc, pll, &pll->state); 4526 4526 } 4527 4527 pll->active_mask = pll->state.pipe_mask; ··· 4539 4539 4540 4540 void intel_dpll_readout_hw_state(struct intel_display *display) 4541 4541 { 4542 - struct intel_shared_dpll *pll; 4542 + struct intel_dpll *pll; 4543 4543 int i; 4544 4544 4545 4545 for_each_dpll(display, pll, i) ··· 4547 4547 } 4548 4548 4549 4549 static void sanitize_dpll_state(struct intel_display *display, 4550 - struct intel_shared_dpll *pll) 4550 + struct intel_dpll *pll) 4551 4551 { 4552 4552 if (!pll->on) 4553 4553 return; ··· 4566 4566 4567 4567 void intel_dpll_sanitize_state(struct intel_display *display) 4568 4568 { 4569 - struct intel_shared_dpll *pll; 4569 + struct intel_dpll *pll; 4570 4570 int i; 4571 4571 4572 4572 intel_cx0_pll_power_save_wa(display); ··· 4623 4623 4624 4624 static void 4625 4625 verify_single_dpll_state(struct intel_display *display, 4626 - struct intel_shared_dpll *pll, 4626 + struct intel_dpll *pll, 4627 4627 struct intel_crtc *crtc, 4628 4628 const struct intel_crtc_state *new_crtc_state) 4629 4629 { ··· 4676 4676 pll->info->name); 4677 4677 } 4678 4678 4679 - static bool has_alt_port_dpll(const struct intel_shared_dpll *old_pll, 4680 - const struct intel_shared_dpll *new_pll) 4679 + static bool has_alt_port_dpll(const struct intel_dpll *old_pll, 4680 + const struct intel_dpll *new_pll) 4681 4681 { 4682 4682 return old_pll && new_pll && old_pll != new_pll && 4683 4683 (old_pll->info->is_alt_port_dpll || new_pll->info->is_alt_port_dpll); ··· 4692 4692 const struct intel_crtc_state *new_crtc_state = 4693 4693 intel_atomic_get_new_crtc_state(state, crtc); 4694 4694 4695 - if (new_crtc_state->shared_dpll) 4696 - verify_single_dpll_state(display, new_crtc_state->shared_dpll, 4695 + if (new_crtc_state->intel_dpll) 4696 + verify_single_dpll_state(display, new_crtc_state->intel_dpll, 4697 4697 crtc, new_crtc_state); 4698 4698 4699 - if (old_crtc_state->shared_dpll && 4700 - old_crtc_state->shared_dpll != new_crtc_state->shared_dpll) { 4699 + if (old_crtc_state->intel_dpll && 4700 + old_crtc_state->intel_dpll != new_crtc_state->intel_dpll) { 4701 4701 u8 pipe_mask = BIT(crtc->pipe); 4702 - struct intel_shared_dpll *pll = old_crtc_state->shared_dpll; 4702 + struct intel_dpll *pll = old_crtc_state->intel_dpll; 4703 4703 4704 4704 INTEL_DISPLAY_STATE_WARN(display, pll->active_mask & pipe_mask, 4705 4705 "%s: pll active mismatch (didn't expect pipe %c in active mask (0x%x))\n", 4706 4706 pll->info->name, pipe_name(crtc->pipe), pll->active_mask); 4707 4707 4708 4708 /* TC ports have both MG/TC and TBT PLL referenced simultaneously */ 4709 - INTEL_DISPLAY_STATE_WARN(display, !has_alt_port_dpll(old_crtc_state->shared_dpll, 4710 - new_crtc_state->shared_dpll) && 4709 + INTEL_DISPLAY_STATE_WARN(display, !has_alt_port_dpll(old_crtc_state->intel_dpll, 4710 + new_crtc_state->intel_dpll) && 4711 4711 pll->state.pipe_mask & pipe_mask, 4712 4712 "%s: pll enabled crtcs mismatch (found pipe %c in enabled mask (0x%x))\n", 4713 4713 pll->info->name, pipe_name(crtc->pipe), pll->state.pipe_mask); ··· 4717 4717 void intel_shared_dpll_verify_disabled(struct intel_atomic_state *state) 4718 4718 { 4719 4719 struct intel_display *display = to_intel_display(state); 4720 - struct intel_shared_dpll *pll; 4720 + struct intel_dpll *pll; 4721 4721 int i; 4722 4722 4723 4723 for_each_dpll(display, pll, i)
+9 -9
drivers/gpu/drm/i915/display/intel_dpll_mgr.h
··· 31 31 #include "intel_wakeref.h" 32 32 33 33 #define for_each_dpll(__display, __pll, __i) \ 34 - for ((__i) = 0; (__i) < (__display)->dpll.num_shared_dpll && \ 35 - ((__pll) = &(__display)->dpll.shared_dplls[(__i)]) ; (__i)++) 34 + for ((__i) = 0; (__i) < (__display)->dpll.num_dpll && \ 35 + ((__pll) = &(__display)->dpll.dplls[(__i)]) ; (__i)++) 36 36 37 37 enum tc_port; 38 38 struct drm_printer; ··· 344 344 }; 345 345 346 346 /** 347 - * struct intel_shared_dpll - display PLL with tracked state and users 347 + * struct intel_dpll - display PLL with tracked state and users 348 348 */ 349 - struct intel_shared_dpll { 349 + struct intel_dpll { 350 350 /** 351 351 * @state: 352 352 * ··· 388 388 #define SKL_DPLL3 3 389 389 390 390 /* shared dpll functions */ 391 - struct intel_shared_dpll * 391 + struct intel_dpll * 392 392 intel_get_shared_dpll_by_id(struct intel_display *display, 393 393 enum intel_dpll_id id); 394 394 void assert_shared_dpll(struct intel_display *display, 395 - struct intel_shared_dpll *pll, 395 + struct intel_dpll *pll, 396 396 bool state); 397 397 #define assert_shared_dpll_enabled(d, p) assert_shared_dpll(d, p, true) 398 398 #define assert_shared_dpll_disabled(d, p) assert_shared_dpll(d, p, false) ··· 405 405 void intel_release_shared_dplls(struct intel_atomic_state *state, 406 406 struct intel_crtc *crtc); 407 407 void intel_unreference_shared_dpll_crtc(const struct intel_crtc *crtc, 408 - const struct intel_shared_dpll *pll, 408 + const struct intel_dpll *pll, 409 409 struct intel_dpll_state *shared_dpll_state); 410 410 void icl_set_active_port_dpll(struct intel_crtc_state *crtc_state, 411 411 enum icl_port_dpll_id port_dpll_id); ··· 413 413 struct intel_crtc *crtc, 414 414 struct intel_encoder *encoder); 415 415 int intel_dpll_get_freq(struct intel_display *display, 416 - const struct intel_shared_dpll *pll, 416 + const struct intel_dpll *pll, 417 417 const struct intel_dpll_hw_state *dpll_hw_state); 418 418 bool intel_dpll_get_hw_state(struct intel_display *display, 419 - struct intel_shared_dpll *pll, 419 + struct intel_dpll *pll, 420 420 struct intel_dpll_hw_state *dpll_hw_state); 421 421 void intel_enable_shared_dpll(const struct intel_crtc_state *crtc_state); 422 422 void intel_disable_shared_dpll(const struct intel_crtc_state *crtc_state);
+1 -1
drivers/gpu/drm/i915/display/intel_fdi.c
··· 910 910 intel_de_write(display, FDI_RX_CTL(PIPE_A), rx_ctl_val); 911 911 912 912 /* Configure Port Clock Select */ 913 - drm_WARN_ON(display->drm, crtc_state->shared_dpll->info->id != DPLL_ID_SPLL); 913 + drm_WARN_ON(display->drm, crtc_state->intel_dpll->info->id != DPLL_ID_SPLL); 914 914 intel_ddi_enable_clock(encoder, crtc_state); 915 915 916 916 /* Start the training iterating through available voltages and emphasis,
+1 -1
drivers/gpu/drm/i915/display/intel_lvds.c
··· 249 249 250 250 if (HAS_PCH_SPLIT(display)) { 251 251 assert_fdi_rx_pll_disabled(display, pipe); 252 - assert_shared_dpll_disabled(display, crtc_state->shared_dpll); 252 + assert_shared_dpll_disabled(display, crtc_state->intel_dpll); 253 253 } else { 254 254 assert_pll_disabled(display, pipe); 255 255 }
+4 -4
drivers/gpu/drm/i915/display/intel_modeset_setup.c
··· 92 92 crtc->active = false; 93 93 crtc->base.enabled = false; 94 94 95 - if (crtc_state->shared_dpll) 95 + if (crtc_state->intel_dpll) 96 96 intel_unreference_shared_dpll_crtc(crtc, 97 - crtc_state->shared_dpll, 98 - &crtc_state->shared_dpll->state); 97 + crtc_state->intel_dpll, 98 + &crtc_state->intel_dpll->state); 99 99 } 100 100 101 101 static void set_encoder_for_connector(struct intel_connector *connector, ··· 565 565 */ 566 566 return display->platform.sandybridge && 567 567 crtc_state->hw.active && 568 - crtc_state->shared_dpll && 568 + crtc_state->intel_dpll && 569 569 crtc_state->port_clock == 0; 570 570 } 571 571
+5 -5
drivers/gpu/drm/i915/display/intel_pch_display.c
··· 251 251 u32 val, pipeconf_val; 252 252 253 253 /* Make sure PCH DPLL is enabled */ 254 - assert_shared_dpll_enabled(display, crtc_state->shared_dpll); 254 + assert_shared_dpll_enabled(display, crtc_state->intel_dpll); 255 255 256 256 /* FDI must be feeding us bits for PCH ports */ 257 257 assert_fdi_tx_enabled(display, pipe); ··· 381 381 temp = intel_de_read(display, PCH_DPLL_SEL); 382 382 temp |= TRANS_DPLL_ENABLE(pipe); 383 383 sel = TRANS_DPLLB_SEL(pipe); 384 - if (crtc_state->shared_dpll == 384 + if (crtc_state->intel_dpll == 385 385 intel_get_shared_dpll_by_id(display, DPLL_ID_PCH_PLL_B)) 386 386 temp |= sel; 387 387 else ··· 496 496 { 497 497 struct intel_display *display = to_intel_display(crtc_state); 498 498 struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc); 499 - struct intel_shared_dpll *pll; 499 + struct intel_dpll *pll; 500 500 enum pipe pipe = crtc->pipe; 501 501 enum intel_dpll_id pll_id; 502 502 bool pll_active; ··· 528 528 pll_id = DPLL_ID_PCH_PLL_A; 529 529 } 530 530 531 - crtc_state->shared_dpll = intel_get_shared_dpll_by_id(display, pll_id); 532 - pll = crtc_state->shared_dpll; 531 + crtc_state->intel_dpll = intel_get_shared_dpll_by_id(display, pll_id); 532 + pll = crtc_state->intel_dpll; 533 533 534 534 pll_active = intel_dpll_get_hw_state(display, pll, 535 535 &crtc_state->dpll_hw_state);
+1 -1
drivers/gpu/drm/i915/display/intel_pch_refclk.c
··· 499 499 static void ilk_init_pch_refclk(struct intel_display *display) 500 500 { 501 501 struct intel_encoder *encoder; 502 - struct intel_shared_dpll *pll; 502 + struct intel_dpll *pll; 503 503 int i; 504 504 u32 val, final; 505 505 bool has_lvds = false;