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_encoder;
13 struct intel_crtc_state;
14 struct intel_mpllb_state;
15 enum phy;
16 
17 void intel_snps_phy_wait_for_calibration(struct drm_i915_private *dev_priv);
18 void intel_snps_phy_update_psr_power_state(struct drm_i915_private *dev_priv,
19 					   enum phy phy, bool enable);
20 
21 int intel_mpllb_calc_state(struct intel_crtc_state *crtc_state,
22 			   struct intel_encoder *encoder);
23 void intel_mpllb_enable(struct intel_encoder *encoder,
24 			const struct intel_crtc_state *crtc_state);
25 void intel_mpllb_disable(struct intel_encoder *encoder);
26 void intel_mpllb_readout_hw_state(struct intel_encoder *encoder,
27 				  struct intel_mpllb_state *pll_state);
28 int intel_mpllb_calc_port_clock(struct intel_encoder *encoder,
29 				const struct intel_mpllb_state *pll_state);
30 
31 int intel_snps_phy_check_hdmi_link_rate(int clock);
32 void intel_snps_phy_ddi_vswing_sequence(struct intel_encoder *encoder,
33 					u32 level);
34 
35 #endif /* __INTEL_SNPS_PHY_H__ */
36