1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2019 Intel Corporation
4  */
5 
6 #ifndef __INTEL_SNPS_PHY_H__
7 #define __INTEL_SNPS_PHY_H__
8 
9 #include <linux/types.h>
10 
11 struct drm_i915_private;
12 struct intel_atomic_state;
13 struct intel_crtc_state;
14 struct intel_encoder;
15 struct intel_mpllb_state;
16 enum phy;
17 
18 void intel_snps_phy_wait_for_calibration(struct drm_i915_private *dev_priv);
19 void intel_snps_phy_update_psr_power_state(struct drm_i915_private *dev_priv,
20 					   enum phy phy, bool enable);
21 
22 int intel_mpllb_calc_state(struct intel_crtc_state *crtc_state,
23 			   struct intel_encoder *encoder);
24 void intel_mpllb_enable(struct intel_encoder *encoder,
25 			const struct intel_crtc_state *crtc_state);
26 void intel_mpllb_disable(struct intel_encoder *encoder);
27 void intel_mpllb_readout_hw_state(struct intel_encoder *encoder,
28 				  struct intel_mpllb_state *pll_state);
29 int intel_mpllb_calc_port_clock(struct intel_encoder *encoder,
30 				const struct intel_mpllb_state *pll_state);
31 
32 int intel_snps_phy_check_hdmi_link_rate(int clock);
33 void intel_snps_phy_set_signal_levels(struct intel_encoder *encoder,
34 				      const struct intel_crtc_state *crtc_state);
35 void intel_mpllb_state_verify(struct intel_atomic_state *state,
36 			      struct intel_crtc_state *new_crtc_state);
37 
38 #endif /* __INTEL_SNPS_PHY_H__ */
39