1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (c) 2015 MediaTek Inc.
7 #ifndef _MTK_DRM_PLANE_H_
8 #define _MTK_DRM_PLANE_H_
10 #include <drm/drm_crtc.h>
11 #include <linux/types.h>
13 struct mtk_plane_pending_state {
23 unsigned int rotation;
27 enum drm_color_encoding color_encoding;
30 struct mtk_plane_state {
31 struct drm_plane_state base;
32 struct mtk_plane_pending_state pending;
35 static inline struct mtk_plane_state *
36 to_mtk_plane_state(struct drm_plane_state *state)
38 return container_of(state, struct mtk_plane_state, base);
41 int mtk_plane_init(struct drm_device *dev, struct drm_plane *plane,
42 unsigned long possible_crtcs, enum drm_plane_type type,
43 unsigned int supported_rotations);