xref: /linux/drivers/gpu/drm/i915/display/intel_fdi.h (revision 906fd46a65383cd639e5eec72a047efc33045d86)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2020 Intel Corporation
4  */
5 
6 #ifndef _INTEL_FDI_H_
7 #define _INTEL_FDI_H_
8 
9 #include <linux/types.h>
10 
11 enum pipe;
12 struct drm_i915_private;
13 struct intel_atomic_state;
14 struct intel_crtc;
15 struct intel_crtc_state;
16 struct intel_encoder;
17 struct intel_link_bw_limits;
18 
19 int intel_fdi_add_affected_crtcs(struct intel_atomic_state *state);
20 int intel_fdi_link_freq(struct drm_i915_private *i915,
21 			const struct intel_crtc_state *pipe_config);
22 bool intel_fdi_compute_pipe_bpp(struct intel_crtc_state *crtc_state);
23 int ilk_fdi_compute_config(struct intel_crtc *intel_crtc,
24 			   struct intel_crtc_state *pipe_config);
25 int intel_fdi_atomic_check_link(struct intel_atomic_state *state,
26 				struct intel_link_bw_limits *limits);
27 void intel_fdi_normal_train(struct intel_crtc *crtc);
28 void ilk_fdi_disable(struct intel_crtc *crtc);
29 void ilk_fdi_pll_disable(struct intel_crtc *intel_crtc);
30 void ilk_fdi_pll_enable(const struct intel_crtc_state *crtc_state);
31 void intel_fdi_init_hook(struct drm_i915_private *dev_priv);
32 void hsw_fdi_link_train(struct intel_encoder *encoder,
33 			const struct intel_crtc_state *crtc_state);
34 void hsw_fdi_disable(struct intel_encoder *encoder);
35 void intel_fdi_pll_freq_update(struct drm_i915_private *i915);
36 
37 void intel_fdi_link_train(struct intel_crtc *crtc,
38 			  const struct intel_crtc_state *crtc_state);
39 
40 void assert_fdi_tx_enabled(struct drm_i915_private *i915, enum pipe pipe);
41 void assert_fdi_tx_disabled(struct drm_i915_private *i915, enum pipe pipe);
42 void assert_fdi_rx_enabled(struct drm_i915_private *i915, enum pipe pipe);
43 void assert_fdi_rx_disabled(struct drm_i915_private *i915, enum pipe pipe);
44 void assert_fdi_tx_pll_enabled(struct drm_i915_private *i915, enum pipe pipe);
45 void assert_fdi_rx_pll_enabled(struct drm_i915_private *i915, enum pipe pipe);
46 void assert_fdi_rx_pll_disabled(struct drm_i915_private *i915, enum pipe pipe);
47 
48 #endif
49