Dr Andrew Scott G7VAV

My photo
 
June 2025
Mo Tu We Th Fr Sa Su
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 1 2 3 4 5 6


omapfb.h
001: /*
002:  * File: include/linux/omapfb.h
003:  *
004:  * Framebuffer driver for TI OMAP boards
005:  *
006:  * Copyright (C) 2004 Nokia Corporation
007:  * Author: Imre Deak <imre.deak@nokia.com>
008:  *
009:  * This program is free software; you can redistribute it and/or modify it
010:  * under the terms of the GNU General Public License as published by the
011:  * Free Software Foundation; either version 2 of the License, or (at your
012:  * option) any later version.
013:  *
014:  * This program is distributed in the hope that it will be useful, but
015:  * WITHOUT ANY WARRANTY; without even the implied warranty of
016:  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
017:  * General Public License for more details.
018:  *
019:  * You should have received a copy of the GNU General Public License along
020:  * with this program; if not, write to the Free Software Foundation, Inc.,
021:  * 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
022:  */
023: 
024: #ifndef __LINUX_OMAPFB_H__
025: #define __LINUX_OMAPFB_H__
026: 
027: #include <linux/fb.h>
028: #include <linux/ioctl.h>
029: #include <linux/types.h>
030: 
031: /* IOCTL commands. */
032: 
033: #define OMAP_IOW(num, dtype)    _IOW('O', num, dtype)
034: #define OMAP_IOR(num, dtype)    _IOR('O', num, dtype)
035: #define OMAP_IOWR(num, dtype)   _IOWR('O', num, dtype)
036: #define OMAP_IO(num)            _IO('O', num)
037: 
038: #define OMAPFB_MIRROR           OMAP_IOW(31, int)
039: #define OMAPFB_SYNC_GFX         OMAP_IO(37)
040: #define OMAPFB_VSYNC            OMAP_IO(38)
041: #define OMAPFB_SET_UPDATE_MODE  OMAP_IOW(40, int)
042: #define OMAPFB_GET_CAPS         OMAP_IOR(42, struct omapfb_caps)
043: #define OMAPFB_GET_UPDATE_MODE  OMAP_IOW(43, int)
044: #define OMAPFB_LCD_TEST         OMAP_IOW(45, int)
045: #define OMAPFB_CTRL_TEST        OMAP_IOW(46, int)
046: #define OMAPFB_UPDATE_WINDOW_OLD OMAP_IOW(47, struct omapfb_update_window_old)
047: #define OMAPFB_SET_COLOR_KEY    OMAP_IOW(50, struct omapfb_color_key)
048: #define OMAPFB_GET_COLOR_KEY    OMAP_IOW(51, struct omapfb_color_key)
049: #define OMAPFB_SETUP_PLANE      OMAP_IOW(52, struct omapfb_plane_info)
050: #define OMAPFB_QUERY_PLANE      OMAP_IOW(53, struct omapfb_plane_info)
051: #define OMAPFB_UPDATE_WINDOW    OMAP_IOW(54, struct omapfb_update_window)
052: #define OMAPFB_SETUP_MEM        OMAP_IOW(55, struct omapfb_mem_info)
053: #define OMAPFB_QUERY_MEM        OMAP_IOW(56, struct omapfb_mem_info)
054: #define OMAPFB_WAITFORVSYNC     OMAP_IO(57)
055: #define OMAPFB_MEMORY_READ      OMAP_IOR(58, struct omapfb_memory_read)
056: #define OMAPFB_GET_OVERLAY_COLORMODE OMAP_IOR(59, struct omapfb_ovl_colormode)
057: #define OMAPFB_WAITFORGO        OMAP_IO(60)
058: #define OMAPFB_GET_VRAM_INFO    OMAP_IOR(61, struct omapfb_vram_info)
059: #define OMAPFB_SET_TEARSYNC     OMAP_IOW(62, struct omapfb_tearsync_info)
060: #define OMAPFB_GET_DISPLAY_INFO OMAP_IOR(63, struct omapfb_display_info)
061: 
062: #define OMAPFB_CAPS_GENERIC_MASK        0x00000fff
063: #define OMAPFB_CAPS_LCDC_MASK           0x00fff000
064: #define OMAPFB_CAPS_PANEL_MASK          0xff000000
065: 
066: #define OMAPFB_CAPS_MANUAL_UPDATE       0x00001000
067: #define OMAPFB_CAPS_TEARSYNC            0x00002000
068: #define OMAPFB_CAPS_PLANE_RELOCATE_MEM  0x00004000
069: #define OMAPFB_CAPS_PLANE_SCALE         0x00008000
070: #define OMAPFB_CAPS_WINDOW_PIXEL_DOUBLE 0x00010000
071: #define OMAPFB_CAPS_WINDOW_SCALE        0x00020000
072: #define OMAPFB_CAPS_WINDOW_OVERLAY      0x00040000
073: #define OMAPFB_CAPS_WINDOW_ROTATE       0x00080000
074: #define OMAPFB_CAPS_SET_BACKLIGHT       0x01000000
075: 
076: /* Values from DSP must map to lower 16-bits */
077: #define OMAPFB_FORMAT_MASK              0x00ff
078: #define OMAPFB_FORMAT_FLAG_DOUBLE       0x0100
079: #define OMAPFB_FORMAT_FLAG_TEARSYNC     0x0200
080: #define OMAPFB_FORMAT_FLAG_FORCE_VSYNC  0x0400
081: #define OMAPFB_FORMAT_FLAG_ENABLE_OVERLAY       0x0800
082: #define OMAPFB_FORMAT_FLAG_DISABLE_OVERLAY      0x1000
083: 
084: #define OMAPFB_MEMTYPE_SDRAM            0
085: #define OMAPFB_MEMTYPE_SRAM             1
086: #define OMAPFB_MEMTYPE_MAX              1
087: 
088: #define OMAPFB_MEM_IDX_ENABLED  0x80
089: #define OMAPFB_MEM_IDX_MASK     0x7f
090: 
091: enum omapfb_color_format {
092:         OMAPFB_COLOR_RGB565 = 0,
093:         OMAPFB_COLOR_YUV422,
094:         OMAPFB_COLOR_YUV420,
095:         OMAPFB_COLOR_CLUT_8BPP,
096:         OMAPFB_COLOR_CLUT_4BPP,
097:         OMAPFB_COLOR_CLUT_2BPP,
098:         OMAPFB_COLOR_CLUT_1BPP,
099:         OMAPFB_COLOR_RGB444,
100:         OMAPFB_COLOR_YUY422,
101: 
102:         OMAPFB_COLOR_ARGB16,
103:         OMAPFB_COLOR_RGB24U,    /* RGB24, 32-bit container */
104:         OMAPFB_COLOR_RGB24P,    /* RGB24, 24-bit container */
105:         OMAPFB_COLOR_ARGB32,
106:         OMAPFB_COLOR_RGBA32,
107:         OMAPFB_COLOR_RGBX32,
108: };
109: 
110: struct omapfb_update_window {
111:         __u32 x, y;
112:         __u32 width, height;
113:         __u32 format;
114:         __u32 out_x, out_y;
115:         __u32 out_width, out_height;
116:         __u32 reserved[8];
117: };
118: 
119: struct omapfb_update_window_old {
120:         __u32 x, y;
121:         __u32 width, height;
122:         __u32 format;
123: };
124: 
125: enum omapfb_plane {
126:         OMAPFB_PLANE_GFX = 0,
127:         OMAPFB_PLANE_VID1,
128:         OMAPFB_PLANE_VID2,
129: };
130: 
131: enum omapfb_channel_out {
132:         OMAPFB_CHANNEL_OUT_LCD = 0,
133:         OMAPFB_CHANNEL_OUT_DIGIT,
134: };
135: 
136: struct omapfb_plane_info {
137:         __u32 pos_x;
138:         __u32 pos_y;
139:         __u8  enabled;
140:         __u8  channel_out;
141:         __u8  mirror;
142:         __u8  mem_idx;
143:         __u32 out_width;
144:         __u32 out_height;
145:         __u32 reserved2[12];
146: };
147: 
148: struct omapfb_mem_info {
149:         __u32 size;
150:         __u8  type;
151:         __u8  reserved[3];
152: };
153: 
154: struct omapfb_caps {
155:         __u32 ctrl;
156:         __u32 plane_color;
157:         __u32 wnd_color;
158: };
159: 
160: enum omapfb_color_key_type {
161:         OMAPFB_COLOR_KEY_DISABLED = 0,
162:         OMAPFB_COLOR_KEY_GFX_DST,
163:         OMAPFB_COLOR_KEY_VID_SRC,
164: };
165: 
166: struct omapfb_color_key {
167:         __u8  channel_out;
168:         __u32 background;
169:         __u32 trans_key;
170:         __u8  key_type;
171: };
172: 
173: enum omapfb_update_mode {
174:         OMAPFB_UPDATE_DISABLED = 0,
175:         OMAPFB_AUTO_UPDATE,
176:         OMAPFB_MANUAL_UPDATE
177: };
178: 
179: struct omapfb_memory_read {
180:         __u16 x;
181:         __u16 y;
182:         __u16 w;
183:         __u16 h;
184:         size_t buffer_size;
185:         void *buffer;
186: };
187: 
188: struct omapfb_ovl_colormode {
189:         __u8 overlay_idx;
190:         __u8 mode_idx;
191:         __u32 bits_per_pixel;
192:         __u32 nonstd;
193:         struct fb_bitfield red;
194:         struct fb_bitfield green;
195:         struct fb_bitfield blue;
196:         struct fb_bitfield transp;
197: };
198: 
199: struct omapfb_vram_info {
200:         __u32 total;
201:         __u32 free;
202:         __u32 largest_free_block;
203:         __u32 reserved[5];
204: };
205: 
206: struct omapfb_tearsync_info {
207:         __u8 enabled;
208:         __u8 reserved1[3];
209:         __u16 line;
210:         __u16 reserved2;
211: };
212: 
213: struct omapfb_display_info {
214:         __u16 xres;
215:         __u16 yres;
216:         __u32 width;    /* phys width of the display in micrometers */
217:         __u32 height;   /* phys height of the display in micrometers */
218:         __u32 reserved[5];
219: };
220: 
221: 
222: #endif /* __OMAPFB_H */
223: 


for client (none)
© Andrew Scott 2006 - 2025,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/