1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2020 Intel Corporation
4  */
5 
6 #ifndef _SKL_UNIVERSAL_PLANE_H_
7 #define _SKL_UNIVERSAL_PLANE_H_
8 
9 #include <linux/types.h>
10 
11 struct drm_framebuffer;
12 struct drm_i915_private;
13 struct intel_crtc;
14 struct intel_initial_plane_config;
15 struct intel_plane_state;
16 
17 enum pipe;
18 enum plane_id;
19 
20 struct intel_plane *
21 skl_universal_plane_create(struct drm_i915_private *dev_priv,
22 			   enum pipe pipe, enum plane_id plane_id);
23 
24 void skl_get_initial_plane_config(struct intel_crtc *crtc,
25 				  struct intel_initial_plane_config *plane_config);
26 
27 int skl_format_to_fourcc(int format, bool rgb_order, bool alpha);
28 
29 int skl_ccs_to_main_plane(const struct drm_framebuffer *fb, int ccs_plane);
30 int skl_calc_main_surface_offset(const struct intel_plane_state *plane_state,
31 				 int *x, int *y, u32 *offset);
32 
33 bool icl_is_nv12_y_plane(struct drm_i915_private *dev_priv,
34 			 enum plane_id plane_id);
35 bool icl_is_hdr_plane(struct drm_i915_private *dev_priv, enum plane_id plane_id);
36 
37 #endif
38