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