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
11struct drm_i915_private;
12struct intel_crtc;
13struct intel_initial_plane_config;
14struct intel_plane_state;
15
16enum pipe;
17enum plane_id;
18
19struct intel_plane *
20skl_universal_plane_create(struct drm_i915_private *dev_priv,
21			   enum pipe pipe, enum plane_id plane_id);
22
23void skl_get_initial_plane_config(struct intel_crtc *crtc,
24				  struct intel_initial_plane_config *plane_config);
25bool skl_fixup_initial_plane_config(struct intel_crtc *crtc,
26				    const struct intel_initial_plane_config *plane_config);
27
28int skl_format_to_fourcc(int format, bool rgb_order, bool alpha);
29
30int skl_calc_main_surface_offset(const struct intel_plane_state *plane_state,
31				 int *x, int *y, u32 *offset);
32
33bool icl_is_nv12_y_plane(struct drm_i915_private *dev_priv,
34			 enum plane_id plane_id);
35u8 icl_hdr_plane_mask(void);
36bool icl_is_hdr_plane(struct drm_i915_private *dev_priv, enum plane_id plane_id);
37
38#endif
39