1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2020 Intel Corporation
4  */
5 
6 #ifndef _G4X_DP_H_
7 #define _G4X_DP_H_
8 
9 #include <linux/types.h>
10 
11 #include "i915_reg_defs.h"
12 
13 enum pipe;
14 enum port;
15 #define drm_i915_private inteldrm_softc
16 struct drm_i915_private;
17 struct intel_crtc_state;
18 struct intel_dp;
19 struct intel_encoder;
20 
21 #ifdef I915
22 const struct dpll *vlv_get_dpll(struct drm_i915_private *i915);
23 enum pipe vlv_active_pipe(struct intel_dp *intel_dp);
24 void g4x_dp_set_clock(struct intel_encoder *encoder,
25 		      struct intel_crtc_state *pipe_config);
26 bool g4x_dp_port_enabled(struct drm_i915_private *dev_priv,
27 			 i915_reg_t dp_reg, enum port port,
28 			 enum pipe *pipe);
29 bool g4x_dp_init(struct drm_i915_private *dev_priv,
30 		 i915_reg_t output_reg, enum port port);
31 #else
vlv_get_dpll(struct drm_i915_private * i915)32 static inline const struct dpll *vlv_get_dpll(struct drm_i915_private *i915)
33 {
34 	return NULL;
35 }
vlv_active_pipe(struct intel_dp * intel_dp)36 static inline int vlv_active_pipe(struct intel_dp *intel_dp)
37 {
38 	return 0;
39 }
g4x_dp_set_clock(struct intel_encoder * encoder,struct intel_crtc_state * pipe_config)40 static inline void g4x_dp_set_clock(struct intel_encoder *encoder,
41 				    struct intel_crtc_state *pipe_config)
42 {
43 }
g4x_dp_port_enabled(struct drm_i915_private * dev_priv,i915_reg_t dp_reg,int port,enum pipe * pipe)44 static inline bool g4x_dp_port_enabled(struct drm_i915_private *dev_priv,
45 				       i915_reg_t dp_reg, int port,
46 				       enum pipe *pipe)
47 {
48 	return false;
49 }
g4x_dp_init(struct drm_i915_private * dev_priv,i915_reg_t output_reg,int port)50 static inline bool g4x_dp_init(struct drm_i915_private *dev_priv,
51 			       i915_reg_t output_reg, int port)
52 {
53 	return false;
54 }
55 #endif
56 
57 #endif
58