xref: /linux/drivers/gpu/drm/i915/display/intel_lt_phy.h (revision 5643c6b2c8308b206cb01cbfd0e6ac80f9f1bc9a)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2025 Intel Corporation
4  */
5 
6 #ifndef __INTEL_LT_PHY_H__
7 #define __INTEL_LT_PHY_H__
8 
9 #include <linux/types.h>
10 
11 struct drm_printer;
12 struct intel_atomic_state;
13 struct intel_display;
14 struct intel_dpll;
15 struct intel_dpll_hw_state;
16 struct intel_encoder;
17 struct intel_crtc_state;
18 struct intel_crtc;
19 struct intel_lt_phy_pll_state;
20 
21 void intel_lt_phy_pll_enable(struct intel_encoder *encoder,
22 			     struct intel_dpll *pll,
23 			     const struct intel_dpll_hw_state *dpll_hw_state);
24 void intel_lt_phy_pll_disable(struct intel_encoder *encoder);
25 int
26 intel_lt_phy_pll_calc_state(struct intel_crtc_state *crtc_state,
27 			    struct intel_encoder *encoder,
28 			    struct intel_dpll_hw_state *hw_state);
29 void intel_lt_phy_tbt_pll_calc_state(struct intel_dpll_hw_state *hw_state);
30 int intel_lt_phy_calc_port_clock(struct intel_display *display,
31 				 const struct intel_lt_phy_pll_state *lt_state);
32 void intel_lt_phy_set_signal_levels(struct intel_encoder *encoder,
33 				    const struct intel_crtc_state *crtc_state);
34 void intel_lt_phy_dump_hw_state(struct drm_printer *p,
35 				const struct intel_lt_phy_pll_state *hw_state);
36 bool
37 intel_lt_phy_pll_compare_hw_state(const struct intel_lt_phy_pll_state *a,
38 				  const struct intel_lt_phy_pll_state *b);
39 bool intel_lt_phy_tbt_pll_readout_hw_state(struct intel_display *display,
40 					   struct intel_dpll *pll,
41 					   struct intel_dpll_hw_state *hw_state);
42 bool intel_lt_phy_pll_readout_hw_state(struct intel_encoder *encoder,
43 				       struct intel_lt_phy_pll_state *pll_state);
44 int
45 intel_lt_phy_calculate_hdmi_state(struct intel_lt_phy_pll_state *lt_state,
46 				  u32 frequency_khz);
47 void intel_xe3plpd_pll_enable(struct intel_encoder *encoder,
48 			      struct intel_dpll *pll,
49 			      const struct intel_dpll_hw_state *dpll_hw_state);
50 void intel_xe3plpd_pll_disable(struct intel_encoder *encoder);
51 void intel_lt_phy_verify_plls(struct intel_display *display);
52 
53 #endif /* __INTEL_LT_PHY_H__ */
54