xref: /linux/drivers/gpu/drm/i915/display/vlv_dsi_pll.h (revision 4b660dbd9ee2059850fd30e0df420ca7a38a1856)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2021 Intel Corporation
4  */
5 
6 #ifndef __VLV_DSI_PLL_H__
7 #define __VLV_DSI_PLL_H__
8 
9 #include <linux/types.h>
10 
11 enum port;
12 struct drm_i915_private;
13 struct intel_crtc_state;
14 struct intel_encoder;
15 
16 int vlv_dsi_pll_compute(struct intel_encoder *encoder,
17 			struct intel_crtc_state *config);
18 void vlv_dsi_pll_enable(struct intel_encoder *encoder,
19 			const struct intel_crtc_state *config);
20 void vlv_dsi_pll_disable(struct intel_encoder *encoder);
21 u32 vlv_dsi_get_pclk(struct intel_encoder *encoder,
22 		     struct intel_crtc_state *config);
23 void vlv_dsi_reset_clocks(struct intel_encoder *encoder, enum port port);
24 
25 bool bxt_dsi_pll_is_enabled(struct drm_i915_private *dev_priv);
26 int bxt_dsi_pll_compute(struct intel_encoder *encoder,
27 			struct intel_crtc_state *config);
28 void bxt_dsi_pll_enable(struct intel_encoder *encoder,
29 			const struct intel_crtc_state *config);
30 void bxt_dsi_pll_disable(struct intel_encoder *encoder);
31 u32 bxt_dsi_get_pclk(struct intel_encoder *encoder,
32 		     struct intel_crtc_state *config);
33 void bxt_dsi_reset_clocks(struct intel_encoder *encoder, enum port port);
34 
35 #ifdef I915
36 void assert_dsi_pll_enabled(struct drm_i915_private *i915);
37 void assert_dsi_pll_disabled(struct drm_i915_private *i915);
38 #else
39 static inline void assert_dsi_pll_enabled(struct drm_i915_private *i915)
40 {
41 }
42 static inline void assert_dsi_pll_disabled(struct drm_i915_private *i915)
43 {
44 }
45 #endif
46 
47 #endif /* __VLV_DSI_PLL_H__ */
48