• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Allwinner SoCs display driver.
3  *
4  * Copyright (C) 2016 Allwinner.
5  *
6  * This file is licensed under the terms of the GNU General Public
7  * License version 2.  This program is licensed "as is" without any
8  * warranty of any kind, whether express or implied.
9  */
10 
11 /* ************************************************************************* */
12 /* File name   :	rtmx_eink.h */
13 /*  */
14 /* Description :	display engine 2.0 realtime mixer processing */
15 /*			base functions implement */
16 /*  */
17 /* History     :	2015/06/28  iptang  v0.1  Initial version */
18 /*  */
19 /* ************************************************************************* */
20 
21 #ifndef __RTMX_EE_H__
22 #define __RTMX_EE_H__
23 
24 #if 0
25 enum de_color_space {
26 	DE_BT601  = 0,
27 	DE_BT709  = 1,
28 	DE_YCC    = 2,
29 	DE_ENHANCE = 3,
30 	/* DE_VXYCC  = 3, */
31 };
32 
33 enum de_pixel_format {
34 	DE_FORMAT_ARGB_8888                    = 0x00,/* MSB  A-R-G-B  LSB */
35 	DE_FORMAT_ABGR_8888                    = 0x01,
36 	DE_FORMAT_RGBA_8888                    = 0x02,
37 	DE_FORMAT_BGRA_8888                    = 0x03,
38 	DE_FORMAT_XRGB_8888                    = 0x04,
39 	DE_FORMAT_XBGR_8888                    = 0x05,
40 	DE_FORMAT_RGBX_8888                    = 0x06,
41 	DE_FORMAT_BGRX_8888                    = 0x07,
42 	DE_FORMAT_RGB_888                      = 0x08,
43 	DE_FORMAT_BGR_888                      = 0x09,
44 	DE_FORMAT_RGB_565                      = 0x0a,
45 	DE_FORMAT_BGR_565                      = 0x0b,
46 	DE_FORMAT_ARGB_4444                    = 0x0c,
47 	DE_FORMAT_ABGR_4444                    = 0x0d,
48 	DE_FORMAT_RGBA_4444                    = 0x0e,
49 	DE_FORMAT_BGRA_4444                    = 0x0f,
50 	DE_FORMAT_ARGB_1555                    = 0x10,
51 	DE_FORMAT_ABGR_1555                    = 0x11,
52 	DE_FORMAT_RGBA_5551                    = 0x12,
53 	DE_FORMAT_BGRA_5551                    = 0x13,
54 
55 	/* SP: semi-planar, P:planar, I:interleaved
56 	 * UVUV: U in the LSBs;     VUVU: V in the LSBs
57 	 */
58 	DE_FORMAT_YUV444_I_AYUV         = 0x40,/* MSB  A-Y-U-V  LSB, reserved */
59 	DE_FORMAT_YUV444_I_VUYA                = 0x41,/* MSB  V-U-Y-A  LSB */
60 	DE_FORMAT_YUV422_I_YVYU                = 0x42,/* MSB  Y-V-Y-U  LSB */
61 	DE_FORMAT_YUV422_I_YUYV                = 0x43,/* MSB  Y-U-Y-V  LSB */
62 	DE_FORMAT_YUV422_I_UYVY                = 0x44,/* MSB  U-Y-V-Y  LSB */
63 	DE_FORMAT_YUV422_I_VYUY                = 0x45,/* MSB  V-Y-U-Y  LSB */
64 	DE_FORMAT_YUV444_P                     = 0x46,
65 			/* MSB  P3-2-1-0 LSB,  YYYY UUUU VVVV, reserved */
66 	DE_FORMAT_YUV422_P                     = 0x47,
67 			/* MSB  P3-2-1-0 LSB   YYYY UU   VV */
68 	DE_FORMAT_YUV420_P                     = 0x48,
69 			/* MSB  P3-2-1-0 LSB   YYYY U    V */
70 	DE_FORMAT_YUV411_P                     = 0x49,
71 			/* MSB  P3-2-1-0 LSB   YYYY U    V */
72 	DE_FORMAT_YUV422_SP_UVUV               = 0x4a,/* MSB  V-U-V-U  LSB */
73 	DE_FORMAT_YUV422_SP_VUVU               = 0x4b,/* MSB  U-V-U-V  LSB */
74 	DE_FORMAT_YUV420_SP_UVUV               = 0x4c,
75 	DE_FORMAT_YUV420_SP_VUVU               = 0x4d,
76 	DE_FORMAT_YUV411_SP_UVUV               = 0x4e,
77 	DE_FORMAT_YUV411_SP_VUVU               = 0x4f,
78 };
79 
80 struct de_fb {
81 	unsigned int w;
82 	unsigned int h;
83 };
84 
85 struct de_rect {
86 	int x;
87 	int y;
88 	unsigned int w;
89 	unsigned int h;
90 };
91 
92 struct de_rect64 {
93 	long long x;
94 	long long y;
95 	unsigned long long w;
96 	unsigned long long h;
97 };
98 #endif
99 
100 int rtmx_set_base(unsigned int reg_base);
101 void rt_mixer_init(int sel, unsigned int addr0, unsigned int addr1,
102 		unsigned int addr2, unsigned int w, unsigned int h,
103 		unsigned int outw, unsigned int outh, unsigned int fmt);
104 void rt_mixer_set_addr(int sel, unsigned int addr0);
105 
106 #endif
107