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 bool i9xx_fixup_initial_plane_config(struct intel_crtc *crtc, 30 const struct intel_initial_plane_config *plane_config); 31 #else 32 static inline unsigned int i965_plane_max_stride(struct intel_plane *plane, 33 u32 pixel_format, u64 modifier, 34 unsigned int rotation) 35 { 36 return 0; 37 } 38 static inline int i9xx_check_plane_surface(struct intel_plane_state *plane_state) 39 { 40 return 0; 41 } 42 static inline struct intel_plane * 43 intel_primary_plane_create(struct drm_i915_private *dev_priv, int pipe) 44 { 45 return NULL; 46 } 47 static inline void i9xx_get_initial_plane_config(struct intel_crtc *crtc, 48 struct intel_initial_plane_config *plane_config) 49 { 50 } 51 static inline bool i9xx_fixup_initial_plane_config(struct intel_crtc *crtc, 52 const struct intel_initial_plane_config *plane_config) 53 { 54 return false; 55 } 56 #endif 57 58 #endif 59