xref: /linux/drivers/gpu/drm/i915/display/intel_pch_display.h (revision 24168c5e6dfbdd5b414f048f47f75d64533296ca)
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
46 static inline bool intel_has_pch_trancoder(struct drm_i915_private *i915,
47 					   enum pipe pch_transcoder)
48 {
49 	return false;
50 }
51 static inline int intel_crtc_pch_transcoder(struct intel_crtc *crtc)
52 {
53 	return 0;
54 }
55 static inline void ilk_pch_pre_enable(struct intel_atomic_state *state,
56 				      struct intel_crtc *crtc)
57 {
58 }
59 static inline void ilk_pch_enable(struct intel_atomic_state *state,
60 				  struct intel_crtc *crtc)
61 {
62 }
63 static inline void ilk_pch_disable(struct intel_atomic_state *state,
64 				   struct intel_crtc *crtc)
65 {
66 }
67 static inline void ilk_pch_post_disable(struct intel_atomic_state *state,
68 					struct intel_crtc *crtc)
69 {
70 }
71 static inline void ilk_pch_get_config(struct intel_crtc_state *crtc_state)
72 {
73 }
74 static inline void lpt_pch_enable(struct intel_atomic_state *state,
75 				  struct intel_crtc *crtc)
76 {
77 }
78 static inline void lpt_pch_disable(struct intel_atomic_state *state,
79 				   struct intel_crtc *crtc)
80 {
81 }
82 static inline void lpt_pch_get_config(struct intel_crtc_state *crtc_state)
83 {
84 }
85 static inline void intel_pch_transcoder_get_m1_n1(struct intel_crtc *crtc,
86 						  struct intel_link_m_n *m_n)
87 {
88 }
89 static inline void intel_pch_transcoder_get_m2_n2(struct intel_crtc *crtc,
90 						  struct intel_link_m_n *m_n)
91 {
92 }
93 static inline void intel_pch_sanitize(struct drm_i915_private *i915)
94 {
95 }
96 #endif
97 
98 #endif
99