1 /*
2  * This file is auto-generated. Modifications will be lost.
3  *
4  * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5  * for more information.
6  */
7 #ifndef _UAPI__LINUX_OMAPFB_H__
8 #define _UAPI__LINUX_OMAPFB_H__
9 #include <linux/fb.h>
10 #include <linux/ioctl.h>
11 #include <linux/types.h>
12 #define OMAP_IOW(num,dtype) _IOW('O', num, dtype)
13 #define OMAP_IOR(num,dtype) _IOR('O', num, dtype)
14 #define OMAP_IOWR(num,dtype) _IOWR('O', num, dtype)
15 #define OMAP_IO(num) _IO('O', num)
16 #define OMAPFB_MIRROR OMAP_IOW(31, int)
17 #define OMAPFB_SYNC_GFX OMAP_IO(37)
18 #define OMAPFB_VSYNC OMAP_IO(38)
19 #define OMAPFB_SET_UPDATE_MODE OMAP_IOW(40, int)
20 #define OMAPFB_GET_CAPS OMAP_IOR(42, struct omapfb_caps)
21 #define OMAPFB_GET_UPDATE_MODE OMAP_IOW(43, int)
22 #define OMAPFB_LCD_TEST OMAP_IOW(45, int)
23 #define OMAPFB_CTRL_TEST OMAP_IOW(46, int)
24 #define OMAPFB_UPDATE_WINDOW_OLD OMAP_IOW(47, struct omapfb_update_window_old)
25 #define OMAPFB_SET_COLOR_KEY OMAP_IOW(50, struct omapfb_color_key)
26 #define OMAPFB_GET_COLOR_KEY OMAP_IOW(51, struct omapfb_color_key)
27 #define OMAPFB_SETUP_PLANE OMAP_IOW(52, struct omapfb_plane_info)
28 #define OMAPFB_QUERY_PLANE OMAP_IOW(53, struct omapfb_plane_info)
29 #define OMAPFB_UPDATE_WINDOW OMAP_IOW(54, struct omapfb_update_window)
30 #define OMAPFB_SETUP_MEM OMAP_IOW(55, struct omapfb_mem_info)
31 #define OMAPFB_QUERY_MEM OMAP_IOW(56, struct omapfb_mem_info)
32 #define OMAPFB_WAITFORVSYNC OMAP_IO(57)
33 #define OMAPFB_MEMORY_READ OMAP_IOR(58, struct omapfb_memory_read)
34 #define OMAPFB_GET_OVERLAY_COLORMODE OMAP_IOR(59, struct omapfb_ovl_colormode)
35 #define OMAPFB_WAITFORGO OMAP_IO(60)
36 #define OMAPFB_GET_VRAM_INFO OMAP_IOR(61, struct omapfb_vram_info)
37 #define OMAPFB_SET_TEARSYNC OMAP_IOW(62, struct omapfb_tearsync_info)
38 #define OMAPFB_GET_DISPLAY_INFO OMAP_IOR(63, struct omapfb_display_info)
39 #define OMAPFB_CAPS_GENERIC_MASK 0x00000fff
40 #define OMAPFB_CAPS_LCDC_MASK 0x00fff000
41 #define OMAPFB_CAPS_PANEL_MASK 0xff000000
42 #define OMAPFB_CAPS_MANUAL_UPDATE 0x00001000
43 #define OMAPFB_CAPS_TEARSYNC 0x00002000
44 #define OMAPFB_CAPS_PLANE_RELOCATE_MEM 0x00004000
45 #define OMAPFB_CAPS_PLANE_SCALE 0x00008000
46 #define OMAPFB_CAPS_WINDOW_PIXEL_DOUBLE 0x00010000
47 #define OMAPFB_CAPS_WINDOW_SCALE 0x00020000
48 #define OMAPFB_CAPS_WINDOW_OVERLAY 0x00040000
49 #define OMAPFB_CAPS_WINDOW_ROTATE 0x00080000
50 #define OMAPFB_CAPS_SET_BACKLIGHT 0x01000000
51 #define OMAPFB_FORMAT_MASK 0x00ff
52 #define OMAPFB_FORMAT_FLAG_DOUBLE 0x0100
53 #define OMAPFB_FORMAT_FLAG_TEARSYNC 0x0200
54 #define OMAPFB_FORMAT_FLAG_FORCE_VSYNC 0x0400
55 #define OMAPFB_FORMAT_FLAG_ENABLE_OVERLAY 0x0800
56 #define OMAPFB_FORMAT_FLAG_DISABLE_OVERLAY 0x1000
57 #define OMAPFB_MEMTYPE_SDRAM 0
58 #define OMAPFB_MEMTYPE_SRAM 1
59 #define OMAPFB_MEMTYPE_MAX 1
60 #define OMAPFB_MEM_IDX_ENABLED 0x80
61 #define OMAPFB_MEM_IDX_MASK 0x7f
62 enum omapfb_color_format {
63   OMAPFB_COLOR_RGB565 = 0,
64   OMAPFB_COLOR_YUV422,
65   OMAPFB_COLOR_YUV420,
66   OMAPFB_COLOR_CLUT_8BPP,
67   OMAPFB_COLOR_CLUT_4BPP,
68   OMAPFB_COLOR_CLUT_2BPP,
69   OMAPFB_COLOR_CLUT_1BPP,
70   OMAPFB_COLOR_RGB444,
71   OMAPFB_COLOR_YUY422,
72   OMAPFB_COLOR_ARGB16,
73   OMAPFB_COLOR_RGB24U,
74   OMAPFB_COLOR_RGB24P,
75   OMAPFB_COLOR_ARGB32,
76   OMAPFB_COLOR_RGBA32,
77   OMAPFB_COLOR_RGBX32,
78 };
79 struct omapfb_update_window {
80   __u32 x, y;
81   __u32 width, height;
82   __u32 format;
83   __u32 out_x, out_y;
84   __u32 out_width, out_height;
85   __u32 reserved[8];
86 };
87 struct omapfb_update_window_old {
88   __u32 x, y;
89   __u32 width, height;
90   __u32 format;
91 };
92 enum omapfb_plane {
93   OMAPFB_PLANE_GFX = 0,
94   OMAPFB_PLANE_VID1,
95   OMAPFB_PLANE_VID2,
96 };
97 enum omapfb_channel_out {
98   OMAPFB_CHANNEL_OUT_LCD = 0,
99   OMAPFB_CHANNEL_OUT_DIGIT,
100 };
101 struct omapfb_plane_info {
102   __u32 pos_x;
103   __u32 pos_y;
104   __u8 enabled;
105   __u8 channel_out;
106   __u8 mirror;
107   __u8 mem_idx;
108   __u32 out_width;
109   __u32 out_height;
110   __u32 reserved2[12];
111 };
112 struct omapfb_mem_info {
113   __u32 size;
114   __u8 type;
115   __u8 reserved[3];
116 };
117 struct omapfb_caps {
118   __u32 ctrl;
119   __u32 plane_color;
120   __u32 wnd_color;
121 };
122 enum omapfb_color_key_type {
123   OMAPFB_COLOR_KEY_DISABLED = 0,
124   OMAPFB_COLOR_KEY_GFX_DST,
125   OMAPFB_COLOR_KEY_VID_SRC,
126 };
127 struct omapfb_color_key {
128   __u8 channel_out;
129   __u32 background;
130   __u32 trans_key;
131   __u8 key_type;
132 };
133 enum omapfb_update_mode {
134   OMAPFB_UPDATE_DISABLED = 0,
135   OMAPFB_AUTO_UPDATE,
136   OMAPFB_MANUAL_UPDATE
137 };
138 struct omapfb_memory_read {
139   __u16 x;
140   __u16 y;
141   __u16 w;
142   __u16 h;
143   size_t buffer_size;
144   void  * buffer;
145 };
146 struct omapfb_ovl_colormode {
147   __u8 overlay_idx;
148   __u8 mode_idx;
149   __u32 bits_per_pixel;
150   __u32 nonstd;
151   struct fb_bitfield red;
152   struct fb_bitfield green;
153   struct fb_bitfield blue;
154   struct fb_bitfield transp;
155 };
156 struct omapfb_vram_info {
157   __u32 total;
158   __u32 free;
159   __u32 largest_free_block;
160   __u32 reserved[5];
161 };
162 struct omapfb_tearsync_info {
163   __u8 enabled;
164   __u8 reserved1[3];
165   __u16 line;
166   __u16 reserved2;
167 };
168 struct omapfb_display_info {
169   __u16 xres;
170   __u16 yres;
171   __u32 width;
172   __u32 height;
173   __u32 reserved[5];
174 };
175 #endif
176