| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 1 | /**************************************************************************** | 
|  | 2 | **************************************************************************** | 
|  | 3 | *** | 
|  | 4 | ***   This header was automatically generated from a Linux kernel header | 
|  | 5 | ***   of the same name, to make information necessary for userspace to | 
|  | 6 | ***   call into the kernel available to libc.  It contains only constants, | 
|  | 7 | ***   structures, and macros generated from the original header, and thus, | 
|  | 8 | ***   contains no copyrightable information. | 
|  | 9 | *** | 
|  | 10 | ***   To edit the content of this header, modify the corresponding | 
|  | 11 | ***   source file (e.g. under external/kernel-headers/original/) then | 
|  | 12 | ***   run bionic/libc/kernel/tools/update_all.py | 
|  | 13 | *** | 
|  | 14 | ***   Any manual change here will be lost the next time this script will | 
|  | 15 | ***   be run. You've been warned! | 
|  | 16 | *** | 
|  | 17 | **************************************************************************** | 
|  | 18 | ****************************************************************************/ | 
|  | 19 | #ifndef _UAPI__LINUX_OMAPFB_H__ | 
|  | 20 | #define _UAPI__LINUX_OMAPFB_H__ | 
|  | 21 | #include <linux/fb.h> | 
|  | 22 | #include <linux/ioctl.h> | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | #include <linux/types.h> | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 24 | #define OMAP_IOW(num,dtype) _IOW('O', num, dtype) | 
|  | 25 | #define OMAP_IOR(num,dtype) _IOR('O', num, dtype) | 
|  | 26 | #define OMAP_IOWR(num,dtype) _IOWR('O', num, dtype) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 27 | #define OMAP_IO(num) _IO('O', num) | 
|  | 28 | #define OMAPFB_MIRROR OMAP_IOW(31, int) | 
|  | 29 | #define OMAPFB_SYNC_GFX OMAP_IO(37) | 
|  | 30 | #define OMAPFB_VSYNC OMAP_IO(38) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 31 | #define OMAPFB_SET_UPDATE_MODE OMAP_IOW(40, int) | 
|  | 32 | #define OMAPFB_GET_CAPS OMAP_IOR(42, struct omapfb_caps) | 
|  | 33 | #define OMAPFB_GET_UPDATE_MODE OMAP_IOW(43, int) | 
|  | 34 | #define OMAPFB_LCD_TEST OMAP_IOW(45, int) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 35 | #define OMAPFB_CTRL_TEST OMAP_IOW(46, int) | 
|  | 36 | #define OMAPFB_UPDATE_WINDOW_OLD OMAP_IOW(47, struct omapfb_update_window_old) | 
|  | 37 | #define OMAPFB_SET_COLOR_KEY OMAP_IOW(50, struct omapfb_color_key) | 
|  | 38 | #define OMAPFB_GET_COLOR_KEY OMAP_IOW(51, struct omapfb_color_key) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 39 | #define OMAPFB_SETUP_PLANE OMAP_IOW(52, struct omapfb_plane_info) | 
|  | 40 | #define OMAPFB_QUERY_PLANE OMAP_IOW(53, struct omapfb_plane_info) | 
|  | 41 | #define OMAPFB_UPDATE_WINDOW OMAP_IOW(54, struct omapfb_update_window) | 
|  | 42 | #define OMAPFB_SETUP_MEM OMAP_IOW(55, struct omapfb_mem_info) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 43 | #define OMAPFB_QUERY_MEM OMAP_IOW(56, struct omapfb_mem_info) | 
|  | 44 | #define OMAPFB_WAITFORVSYNC OMAP_IO(57) | 
|  | 45 | #define OMAPFB_MEMORY_READ OMAP_IOR(58, struct omapfb_memory_read) | 
|  | 46 | #define OMAPFB_GET_OVERLAY_COLORMODE OMAP_IOR(59, struct omapfb_ovl_colormode) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 47 | #define OMAPFB_WAITFORGO OMAP_IO(60) | 
|  | 48 | #define OMAPFB_GET_VRAM_INFO OMAP_IOR(61, struct omapfb_vram_info) | 
|  | 49 | #define OMAPFB_SET_TEARSYNC OMAP_IOW(62, struct omapfb_tearsync_info) | 
|  | 50 | #define OMAPFB_GET_DISPLAY_INFO OMAP_IOR(63, struct omapfb_display_info) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 51 | #define OMAPFB_CAPS_GENERIC_MASK 0x00000fff | 
|  | 52 | #define OMAPFB_CAPS_LCDC_MASK 0x00fff000 | 
|  | 53 | #define OMAPFB_CAPS_PANEL_MASK 0xff000000 | 
|  | 54 | #define OMAPFB_CAPS_MANUAL_UPDATE 0x00001000 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 55 | #define OMAPFB_CAPS_TEARSYNC 0x00002000 | 
|  | 56 | #define OMAPFB_CAPS_PLANE_RELOCATE_MEM 0x00004000 | 
|  | 57 | #define OMAPFB_CAPS_PLANE_SCALE 0x00008000 | 
|  | 58 | #define OMAPFB_CAPS_WINDOW_PIXEL_DOUBLE 0x00010000 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 59 | #define OMAPFB_CAPS_WINDOW_SCALE 0x00020000 | 
|  | 60 | #define OMAPFB_CAPS_WINDOW_OVERLAY 0x00040000 | 
|  | 61 | #define OMAPFB_CAPS_WINDOW_ROTATE 0x00080000 | 
|  | 62 | #define OMAPFB_CAPS_SET_BACKLIGHT 0x01000000 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 63 | #define OMAPFB_FORMAT_MASK 0x00ff | 
|  | 64 | #define OMAPFB_FORMAT_FLAG_DOUBLE 0x0100 | 
|  | 65 | #define OMAPFB_FORMAT_FLAG_TEARSYNC 0x0200 | 
|  | 66 | #define OMAPFB_FORMAT_FLAG_FORCE_VSYNC 0x0400 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 67 | #define OMAPFB_FORMAT_FLAG_ENABLE_OVERLAY 0x0800 | 
|  | 68 | #define OMAPFB_FORMAT_FLAG_DISABLE_OVERLAY 0x1000 | 
|  | 69 | #define OMAPFB_MEMTYPE_SDRAM 0 | 
|  | 70 | #define OMAPFB_MEMTYPE_SRAM 1 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 71 | #define OMAPFB_MEMTYPE_MAX 1 | 
|  | 72 | #define OMAPFB_MEM_IDX_ENABLED 0x80 | 
|  | 73 | #define OMAPFB_MEM_IDX_MASK 0x7f | 
|  | 74 | enum omapfb_color_format { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 75 | OMAPFB_COLOR_RGB565 = 0, | 
|  | 76 | OMAPFB_COLOR_YUV422, | 
|  | 77 | OMAPFB_COLOR_YUV420, | 
|  | 78 | OMAPFB_COLOR_CLUT_8BPP, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 79 | OMAPFB_COLOR_CLUT_4BPP, | 
|  | 80 | OMAPFB_COLOR_CLUT_2BPP, | 
|  | 81 | OMAPFB_COLOR_CLUT_1BPP, | 
|  | 82 | OMAPFB_COLOR_RGB444, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 83 | OMAPFB_COLOR_YUY422, | 
|  | 84 | OMAPFB_COLOR_ARGB16, | 
|  | 85 | OMAPFB_COLOR_RGB24U, | 
|  | 86 | OMAPFB_COLOR_RGB24P, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 87 | OMAPFB_COLOR_ARGB32, | 
|  | 88 | OMAPFB_COLOR_RGBA32, | 
|  | 89 | OMAPFB_COLOR_RGBX32, | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 90 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 91 | struct omapfb_update_window { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 92 | __u32 x, y; | 
|  | 93 | __u32 width, height; | 
|  | 94 | __u32 format; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 95 | __u32 out_x, out_y; | 
|  | 96 | __u32 out_width, out_height; | 
|  | 97 | __u32 reserved[8]; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 98 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 99 | struct omapfb_update_window_old { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 100 | __u32 x, y; | 
|  | 101 | __u32 width, height; | 
|  | 102 | __u32 format; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 103 | }; | 
|  | 104 | enum omapfb_plane { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 105 | OMAPFB_PLANE_GFX = 0, | 
|  | 106 | OMAPFB_PLANE_VID1, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 107 | OMAPFB_PLANE_VID2, | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 108 | }; | 
|  | 109 | enum omapfb_channel_out { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 110 | OMAPFB_CHANNEL_OUT_LCD = 0, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 111 | OMAPFB_CHANNEL_OUT_DIGIT, | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 112 | }; | 
|  | 113 | struct omapfb_plane_info { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 114 | __u32 pos_x; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 115 | __u32 pos_y; | 
|  | 116 | __u8 enabled; | 
|  | 117 | __u8 channel_out; | 
|  | 118 | __u8 mirror; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 119 | __u8 mem_idx; | 
|  | 120 | __u32 out_width; | 
|  | 121 | __u32 out_height; | 
|  | 122 | __u32 reserved2[12]; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 123 | }; | 
|  | 124 | struct omapfb_mem_info { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 125 | __u32 size; | 
|  | 126 | __u8 type; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 127 | __u8 reserved[3]; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 128 | }; | 
|  | 129 | struct omapfb_caps { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 130 | __u32 ctrl; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 131 | __u32 plane_color; | 
|  | 132 | __u32 wnd_color; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 133 | }; | 
|  | 134 | enum omapfb_color_key_type { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 135 | OMAPFB_COLOR_KEY_DISABLED = 0, | 
|  | 136 | OMAPFB_COLOR_KEY_GFX_DST, | 
|  | 137 | OMAPFB_COLOR_KEY_VID_SRC, | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 138 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 139 | struct omapfb_color_key { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 140 | __u8 channel_out; | 
|  | 141 | __u32 background; | 
|  | 142 | __u32 trans_key; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 143 | __u8 key_type; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 144 | }; | 
|  | 145 | enum omapfb_update_mode { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 146 | OMAPFB_UPDATE_DISABLED = 0, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 147 | OMAPFB_AUTO_UPDATE, | 
|  | 148 | OMAPFB_MANUAL_UPDATE | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 149 | }; | 
|  | 150 | struct omapfb_memory_read { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 151 | __u16 x; | 
|  | 152 | __u16 y; | 
|  | 153 | __u16 w; | 
|  | 154 | __u16 h; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 155 | size_t buffer_size; | 
|  | 156 | void __user * buffer; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 157 | }; | 
|  | 158 | struct omapfb_ovl_colormode { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 159 | __u8 overlay_idx; | 
|  | 160 | __u8 mode_idx; | 
|  | 161 | __u32 bits_per_pixel; | 
|  | 162 | __u32 nonstd; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 163 | struct fb_bitfield red; | 
|  | 164 | struct fb_bitfield green; | 
|  | 165 | struct fb_bitfield blue; | 
|  | 166 | struct fb_bitfield transp; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 167 | }; | 
|  | 168 | struct omapfb_vram_info { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 169 | __u32 total; | 
|  | 170 | __u32 free; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 171 | __u32 largest_free_block; | 
|  | 172 | __u32 reserved[5]; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 173 | }; | 
|  | 174 | struct omapfb_tearsync_info { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 175 | __u8 enabled; | 
|  | 176 | __u8 reserved1[3]; | 
|  | 177 | __u16 line; | 
|  | 178 | __u16 reserved2; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 179 | }; | 
|  | 180 | struct omapfb_display_info { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 181 | __u16 xres; | 
|  | 182 | __u16 yres; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 183 | __u32 width; | 
|  | 184 | __u32 height; | 
|  | 185 | __u32 reserved[5]; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 186 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 187 | #endif |