xref: /linux/drivers/gpu/drm/i915/display/i9xx_plane.h (revision 78964fcac47fc1525ecb4c37cd5fbc873c28320b)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2020 Intel Corporation
4  */
5 
6 #ifndef _I9XX_PLANE_H_
7 #define _I9XX_PLANE_H_
8 
9 #include <linux/types.h>
10 
11 enum pipe;
12 struct drm_i915_private;
13 struct intel_crtc;
14 struct intel_initial_plane_config;
15 struct intel_plane;
16 struct intel_plane_state;
17 
18 #ifdef I915
19 unsigned int i965_plane_max_stride(struct intel_plane *plane,
20 				   u32 pixel_format, u64 modifier,
21 				   unsigned int rotation);
22 int i9xx_check_plane_surface(struct intel_plane_state *plane_state);
23 
24 struct intel_plane *
25 intel_primary_plane_create(struct drm_i915_private *dev_priv, enum pipe pipe);
26 
27 void i9xx_get_initial_plane_config(struct intel_crtc *crtc,
28 				   struct intel_initial_plane_config *plane_config);
29 #else
30 static inline unsigned int i965_plane_max_stride(struct intel_plane *plane,
31 						 u32 pixel_format, u64 modifier,
32 						 unsigned int rotation)
33 {
34 	return 0;
35 }
36 static inline int i9xx_check_plane_surface(struct intel_plane_state *plane_state)
37 {
38 	return 0;
39 }
40 static inline struct intel_plane *
41 intel_primary_plane_create(struct drm_i915_private *dev_priv, int pipe)
42 {
43 	return NULL;
44 }
45 static inline void i9xx_get_initial_plane_config(struct intel_crtc *crtc,
46 						 struct intel_initial_plane_config *plane_config)
47 {
48 }
49 #endif
50 
51 #endif
52