• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2019 Allwinnertech Co.Ltd
3  * Authors: zhengwanyu
4  *
5  * This program is free software; you can redistribute  it and/or modify it
6  * under  the terms of  the GNU General  Public License as published by the
7  * Free Software Foundation;  either version 2 of the  License, or (at your
8  * option) any later version.
9  *
10  */
11 
12 #ifndef _SUNXI_DRM_PLANE_H_
13 #define _SUNXI_DRM_PLANE_H_
14 
15 #include <drm/drm_crtc.h>
16 #include "de/include.h"
17 
18 enum sunxi_plane_alpha_mode {
19 	PIXEL_ALPHA = 0,
20 	GLOBAL_ALPHA = 1,
21 	MIXED_ALPHA = 2,
22 	NONE_ALPHA_MODE,
23 	ALPHA_MODE_NUM,
24 };
25 
26 struct sunxi_drm_plane {
27 	struct drm_plane plane;
28 	unsigned int plane_id;
29 
30 	/*Hardware layer config parameters*/
31 	struct disp_layer_config_data config;
32 
33 	unsigned long long alpha_mode;
34 	unsigned long long galpha_value; /*global alpha value*/
35 
36 	struct drm_property *alpha_mode_property;
37 	struct drm_property *galpha_value_property;
38 };
39 
40 #define to_sunxi_plane(x)  container_of(x, struct sunxi_drm_plane, plane)
41 
42 void sunxi_plane_dump(struct drm_plane *plane, bool dump_fb);
43 ssize_t sunxi_drm_planes_show(char *buf, struct drm_device *dev,
44 						struct drm_crtc *crtc);
45 
46 
47 int sunxi_drm_plane_init(struct drm_device *dev,
48 			struct sunxi_drm_plane *plane,
49 			int crtc_id, int plane_id, int type);
50 #endif
51