xref: /openbmc/linux/drivers/gpu/drm/i915/display/intel_snps_phy.h (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
129081008SMatt Roper /* SPDX-License-Identifier: MIT */
229081008SMatt Roper /*
329081008SMatt Roper  * Copyright © 2019 Intel Corporation
429081008SMatt Roper  */
529081008SMatt Roper 
629081008SMatt Roper #ifndef __INTEL_SNPS_PHY_H__
729081008SMatt Roper #define __INTEL_SNPS_PHY_H__
829081008SMatt Roper 
9a046a0daSMatt Roper #include <linux/types.h>
10a046a0daSMatt Roper 
11a6a12811SMatt Roper struct drm_i915_private;
12*781c336aSJani Nikula struct intel_atomic_state;
1329081008SMatt Roper struct intel_crtc_state;
14*781c336aSJani Nikula struct intel_encoder;
15865b73eaSMatt Roper struct intel_mpllb_state;
167711749aSGwan-gyeong Mun enum phy;
1729081008SMatt Roper 
18a6a12811SMatt Roper void intel_snps_phy_wait_for_calibration(struct drm_i915_private *dev_priv);
197711749aSGwan-gyeong Mun void intel_snps_phy_update_psr_power_state(struct drm_i915_private *dev_priv,
207711749aSGwan-gyeong Mun 					   enum phy phy, bool enable);
21a6a12811SMatt Roper 
2229081008SMatt Roper int intel_mpllb_calc_state(struct intel_crtc_state *crtc_state,
2329081008SMatt Roper 			   struct intel_encoder *encoder);
2429081008SMatt Roper void intel_mpllb_enable(struct intel_encoder *encoder,
2529081008SMatt Roper 			const struct intel_crtc_state *crtc_state);
2629081008SMatt Roper void intel_mpllb_disable(struct intel_encoder *encoder);
27865b73eaSMatt Roper void intel_mpllb_readout_hw_state(struct intel_encoder *encoder,
28865b73eaSMatt Roper 				  struct intel_mpllb_state *pll_state);
29865b73eaSMatt Roper int intel_mpllb_calc_port_clock(struct intel_encoder *encoder,
30865b73eaSMatt Roper 				const struct intel_mpllb_state *pll_state);
31865b73eaSMatt Roper 
32865b73eaSMatt Roper int intel_snps_phy_check_hdmi_link_rate(int clock);
33193299adSVille Syrjälä void intel_snps_phy_set_signal_levels(struct intel_encoder *encoder,
34193299adSVille Syrjälä 				      const struct intel_crtc_state *crtc_state);
35*781c336aSJani Nikula void intel_mpllb_state_verify(struct intel_atomic_state *state,
36*781c336aSJani Nikula 			      struct intel_crtc_state *new_crtc_state);
3729081008SMatt Roper 
3829081008SMatt Roper #endif /* __INTEL_SNPS_PHY_H__ */
39