Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * Copyright (c) 2015 MediaTek Inc.
0004  * Author: CK Hu <ck.hu@mediatek.com>
0005  */
0006 
0007 #ifndef _MTK_DRM_PLANE_H_
0008 #define _MTK_DRM_PLANE_H_
0009 
0010 #include <drm/drm_crtc.h>
0011 #include <linux/types.h>
0012 
0013 struct mtk_plane_pending_state {
0014     bool                config;
0015     bool                enable;
0016     dma_addr_t          addr;
0017     unsigned int            pitch;
0018     unsigned int            format;
0019     unsigned int            x;
0020     unsigned int            y;
0021     unsigned int            width;
0022     unsigned int            height;
0023     unsigned int            rotation;
0024     bool                dirty;
0025     bool                async_dirty;
0026     bool                async_config;
0027     enum drm_color_encoding     color_encoding;
0028 };
0029 
0030 struct mtk_plane_state {
0031     struct drm_plane_state      base;
0032     struct mtk_plane_pending_state  pending;
0033 };
0034 
0035 static inline struct mtk_plane_state *
0036 to_mtk_plane_state(struct drm_plane_state *state)
0037 {
0038     return container_of(state, struct mtk_plane_state, base);
0039 }
0040 
0041 int mtk_plane_init(struct drm_device *dev, struct drm_plane *plane,
0042            unsigned long possible_crtcs, enum drm_plane_type type,
0043            unsigned int supported_rotations);
0044 
0045 #endif