xref: /linux/drivers/gpu/drm/i915/display/intel_lt_phy.h (revision 815e260a18a3af4dab59025ee99a7156c0e8b5e0)
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 intel_atomic_state;
12 struct intel_display;
13 struct intel_encoder;
14 struct intel_crtc_state;
15 struct intel_crtc;
16 struct intel_lt_phy_pll_state;
17 
18 void intel_lt_phy_pll_enable(struct intel_encoder *encoder,
19 			     const struct intel_crtc_state *crtc_state);
20 void intel_lt_phy_pll_disable(struct intel_encoder *encoder);
21 int
22 intel_lt_phy_pll_calc_state(struct intel_crtc_state *crtc_state,
23 			    struct intel_encoder *encoder);
24 int intel_lt_phy_calc_port_clock(struct intel_encoder *encoder,
25 				 const struct intel_crtc_state *crtc_state);
26 void intel_lt_phy_set_signal_levels(struct intel_encoder *encoder,
27 				    const struct intel_crtc_state *crtc_state);
28 void intel_lt_phy_dump_hw_state(struct intel_display *display,
29 				const struct intel_lt_phy_pll_state *hw_state);
30 bool
31 intel_lt_phy_pll_compare_hw_state(const struct intel_lt_phy_pll_state *a,
32 				  const struct intel_lt_phy_pll_state *b);
33 void intel_lt_phy_pll_readout_hw_state(struct intel_encoder *encoder,
34 				       const struct intel_crtc_state *crtc_state,
35 				       struct intel_lt_phy_pll_state *pll_state);
36 void intel_lt_phy_pll_state_verify(struct intel_atomic_state *state,
37 				   struct intel_crtc *crtc);
38 void intel_xe3plpd_pll_enable(struct intel_encoder *encoder,
39 			      const struct intel_crtc_state *crtc_state);
40 void intel_xe3plpd_pll_disable(struct intel_encoder *encoder);
41 
42 #define HAS_LT_PHY(display) (DISPLAY_VER(display) >= 35)
43 
44 #endif /* __INTEL_LT_PHY_H__ */
45