| 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_format_info; |
| 13 | struct drm_framebuffer; |
| 14 | struct intel_crtc; |
| 15 | struct intel_display; |
| 16 | struct intel_initial_plane_config; |
| 17 | struct intel_plane; |
| 18 | struct intel_plane_state; |
| 19 | |
| 20 | #ifdef I915 |
| 21 | unsigned int i965_plane_max_stride(struct intel_plane *plane, |
| 22 | const struct drm_format_info *info, |
| 23 | u64 modifier, unsigned int rotation); |
| 24 | unsigned int vlv_plane_min_alignment(struct intel_plane *plane, |
| 25 | const struct drm_framebuffer *fb, |
| 26 | int colot_plane); |
| 27 | int i9xx_check_plane_surface(struct intel_plane_state *plane_state); |
| 28 | u32 i965_plane_surf_offset(const struct intel_plane_state *plane_state); |
| 29 | |
| 30 | struct intel_plane * |
| 31 | intel_primary_plane_create(struct intel_display *display, enum pipe pipe); |
| 32 | |
| 33 | void i9xx_get_initial_plane_config(struct intel_crtc *crtc, |
| 34 | struct intel_initial_plane_config *plane_config); |
| 35 | bool i9xx_fixup_initial_plane_config(struct intel_crtc *crtc, |
| 36 | const struct intel_initial_plane_config *plane_config); |
| 37 | #else |
| 38 | static inline unsigned int i965_plane_max_stride(struct intel_plane *plane, |
| 39 | u32 pixel_format, u64 modifier, |
| 40 | unsigned int rotation) |
| 41 | { |
| 42 | return 0; |
| 43 | } |
| 44 | static inline int i9xx_check_plane_surface(struct intel_plane_state *plane_state) |
| 45 | { |
| 46 | return 0; |
| 47 | } |
| 48 | static inline struct intel_plane * |
| 49 | intel_primary_plane_create(struct intel_display *display, int pipe) |
| 50 | { |
| 51 | return NULL; |
| 52 | } |
| 53 | static inline void i9xx_get_initial_plane_config(struct intel_crtc *crtc, |
| 54 | struct intel_initial_plane_config *plane_config) |
| 55 | { |
| 56 | } |
| 57 | static inline bool i9xx_fixup_initial_plane_config(struct intel_crtc *crtc, |
| 58 | const struct intel_initial_plane_config *plane_config) |
| 59 | { |
| 60 | return false; |
| 61 | } |
| 62 | #endif |
| 63 | |
| 64 | #endif |
| 65 | |