1 /* SPDX-License-Identifier: MIT */
2 /*
3 * Copyright © 2021 Intel Corporation
4 */
5
6 #ifndef _INTEL_PCH_DISPLAY_H_
7 #define _INTEL_PCH_DISPLAY_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_link_m_n;
17
18 #ifdef I915
19 bool intel_has_pch_trancoder(struct drm_i915_private *i915,
20 enum pipe pch_transcoder);
21 enum pipe intel_crtc_pch_transcoder(struct intel_crtc *crtc);
22
23 void ilk_pch_pre_enable(struct intel_atomic_state *state,
24 struct intel_crtc *crtc);
25 void ilk_pch_enable(struct intel_atomic_state *state,
26 struct intel_crtc *crtc);
27 void ilk_pch_disable(struct intel_atomic_state *state,
28 struct intel_crtc *crtc);
29 void ilk_pch_post_disable(struct intel_atomic_state *state,
30 struct intel_crtc *crtc);
31 void ilk_pch_get_config(struct intel_crtc_state *crtc_state);
32
33 void lpt_pch_enable(struct intel_atomic_state *state,
34 struct intel_crtc *crtc);
35 void lpt_pch_disable(struct intel_atomic_state *state,
36 struct intel_crtc *crtc);
37 void lpt_pch_get_config(struct intel_crtc_state *crtc_state);
38
39 void intel_pch_transcoder_get_m1_n1(struct intel_crtc *crtc,
40 struct intel_link_m_n *m_n);
41 void intel_pch_transcoder_get_m2_n2(struct intel_crtc *crtc,
42 struct intel_link_m_n *m_n);
43
44 void intel_pch_sanitize(struct drm_i915_private *i915);
45 #else
intel_has_pch_trancoder(struct drm_i915_private * i915,enum pipe pch_transcoder)46 static inline bool intel_has_pch_trancoder(struct drm_i915_private *i915,
47 enum pipe pch_transcoder)
48 {
49 return false;
50 }
intel_crtc_pch_transcoder(struct intel_crtc * crtc)51 static inline int intel_crtc_pch_transcoder(struct intel_crtc *crtc)
52 {
53 return 0;
54 }
ilk_pch_pre_enable(struct intel_atomic_state * state,struct intel_crtc * crtc)55 static inline void ilk_pch_pre_enable(struct intel_atomic_state *state,
56 struct intel_crtc *crtc)
57 {
58 }
ilk_pch_enable(struct intel_atomic_state * state,struct intel_crtc * crtc)59 static inline void ilk_pch_enable(struct intel_atomic_state *state,
60 struct intel_crtc *crtc)
61 {
62 }
ilk_pch_disable(struct intel_atomic_state * state,struct intel_crtc * crtc)63 static inline void ilk_pch_disable(struct intel_atomic_state *state,
64 struct intel_crtc *crtc)
65 {
66 }
ilk_pch_post_disable(struct intel_atomic_state * state,struct intel_crtc * crtc)67 static inline void ilk_pch_post_disable(struct intel_atomic_state *state,
68 struct intel_crtc *crtc)
69 {
70 }
ilk_pch_get_config(struct intel_crtc_state * crtc_state)71 static inline void ilk_pch_get_config(struct intel_crtc_state *crtc_state)
72 {
73 }
lpt_pch_enable(struct intel_atomic_state * state,struct intel_crtc * crtc)74 static inline void lpt_pch_enable(struct intel_atomic_state *state,
75 struct intel_crtc *crtc)
76 {
77 }
lpt_pch_disable(struct intel_atomic_state * state,struct intel_crtc * crtc)78 static inline void lpt_pch_disable(struct intel_atomic_state *state,
79 struct intel_crtc *crtc)
80 {
81 }
lpt_pch_get_config(struct intel_crtc_state * crtc_state)82 static inline void lpt_pch_get_config(struct intel_crtc_state *crtc_state)
83 {
84 }
intel_pch_transcoder_get_m1_n1(struct intel_crtc * crtc,struct intel_link_m_n * m_n)85 static inline void intel_pch_transcoder_get_m1_n1(struct intel_crtc *crtc,
86 struct intel_link_m_n *m_n)
87 {
88 }
intel_pch_transcoder_get_m2_n2(struct intel_crtc * crtc,struct intel_link_m_n * m_n)89 static inline void intel_pch_transcoder_get_m2_n2(struct intel_crtc *crtc,
90 struct intel_link_m_n *m_n)
91 {
92 }
intel_pch_sanitize(struct drm_i915_private * i915)93 static inline void intel_pch_sanitize(struct drm_i915_private *i915)
94 {
95 }
96 #endif
97
98 #endif
99