Linux Kernel
3.7.1
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
include
media
davinci
vpbe_osd.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2007-2009 Texas Instruments Inc
3
* Copyright (C) 2007 MontaVista Software, Inc.
4
*
5
* Andy Lowe (
[email protected]
), MontaVista Software
6
* - Initial version
7
* Murali Karicheri (
[email protected]
), Texas Instruments Ltd.
8
* - ported to sub device interface
9
*
10
* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation version 2..
13
*
14
* This program is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU General Public License for more details.
18
*
19
* You should have received a copy of the GNU General Public License
20
* along with this program; if not, write to the Free Software
21
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22
*
23
*/
24
#ifndef _OSD_H
25
#define _OSD_H
26
27
#include <
media/davinci/vpbe_types.h
>
28
29
#define VPBE_OSD_SUBDEV_NAME "vpbe-osd"
30
41
enum
osd_layer
{
42
WIN_OSD0
,
43
WIN_VID0
,
44
WIN_OSD1
,
45
WIN_VID1
,
46
};
47
56
enum
osd_win_layer
{
57
OSDWIN_OSD0
,
58
OSDWIN_OSD1
,
59
};
60
77
enum
osd_pix_format
{
78
PIXFMT_1BPP
= 0,
79
PIXFMT_2BPP
,
80
PIXFMT_4BPP
,
81
PIXFMT_8BPP
,
82
PIXFMT_RGB565
,
83
PIXFMT_YCbCrI
,
84
PIXFMT_RGB888
,
85
PIXFMT_YCrCbI
,
86
PIXFMT_NV12
,
87
PIXFMT_OSD_ATTR
,
88
};
89
99
enum
osd_h_exp_ratio
{
100
H_EXP_OFF
,
101
H_EXP_9_OVER_8
,
102
H_EXP_3_OVER_2
,
103
};
104
113
enum
osd_v_exp_ratio
{
114
V_EXP_OFF
,
115
V_EXP_6_OVER_5
,
116
};
117
127
enum
osd_zoom_factor
{
128
ZOOM_X1
,
129
ZOOM_X2
,
130
ZOOM_X4
,
131
};
132
141
enum
osd_clut
{
142
ROM_CLUT
,
143
RAM_CLUT
,
144
};
145
154
enum
osd_rom_clut
{
155
ROM_CLUT0
,
156
ROM_CLUT1
,
157
};
158
173
enum
osd_blending_factor
{
174
OSD_0_VID_8
,
175
OSD_1_VID_7
,
176
OSD_2_VID_6
,
177
OSD_3_VID_5
,
178
OSD_4_VID_4
,
179
OSD_5_VID_3
,
180
OSD_6_VID_2
,
181
OSD_8_VID_0
,
182
};
183
194
enum
osd_blink_interval
{
195
BLINK_X1
,
196
BLINK_X2
,
197
BLINK_X3
,
198
BLINK_X4
,
199
};
200
212
enum
osd_cursor_h_width
{
213
H_WIDTH_1
,
214
H_WIDTH_4
,
215
H_WIDTH_8
,
216
H_WIDTH_12
,
217
H_WIDTH_16
,
218
H_WIDTH_20
,
219
H_WIDTH_24
,
220
H_WIDTH_28
,
221
};
222
234
enum
osd_cursor_v_width
{
235
V_WIDTH_1
,
236
V_WIDTH_2
,
237
V_WIDTH_4
,
238
V_WIDTH_6
,
239
V_WIDTH_8
,
240
V_WIDTH_10
,
241
V_WIDTH_12
,
242
V_WIDTH_14
,
243
};
244
261
struct
osd_cursor_config
{
262
unsigned
xsize
;
263
unsigned
ysize
;
264
unsigned
xpos
;
265
unsigned
ypos
;
266
int
interlaced
;
267
enum
osd_cursor_h_width
h_width
;
268
enum
osd_cursor_v_width
v_width
;
269
enum
osd_clut
clut
;
270
unsigned
char
clut_index
;
271
};
272
288
struct
osd_layer_config
{
289
enum
osd_pix_format
pixfmt
;
290
unsigned
line_length
;
291
unsigned
xsize
;
292
unsigned
ysize
;
293
unsigned
xpos
;
294
unsigned
ypos
;
295
int
interlaced
;
296
};
297
298
/* parameters that apply on a per-window (OSD or video) basis */
299
struct
osd_window_state
{
300
int
is_allocated
;
301
int
is_enabled
;
302
unsigned
long
fb_base_phys
;
303
enum
osd_zoom_factor
h_zoom
;
304
enum
osd_zoom_factor
v_zoom
;
305
struct
osd_layer_config
lconfig
;
306
};
307
308
/* parameters that apply on a per-OSD-window basis */
309
struct
osd_osdwin_state
{
310
enum
osd_clut
clut
;
311
enum
osd_blending_factor
blend
;
312
int
colorkey_blending
;
313
unsigned
colorkey
;
314
int
rec601_attenuation
;
315
/* index is pixel value */
316
unsigned
char
palette_map
[16];
317
};
318
319
/* hardware rectangular cursor parameters */
320
struct
osd_cursor_state
{
321
int
is_enabled
;
322
struct
osd_cursor_config
config
;
323
};
324
325
struct
osd_state
;
326
327
struct
vpbe_osd_ops
{
328
int
(*
initialize
)(
struct
osd_state
*
sd
);
329
int
(*
request_layer
)(
struct
osd_state
*
sd
,
enum
osd_layer
layer);
330
void
(*
release_layer
)(
struct
osd_state
*
sd
,
enum
osd_layer
layer);
331
int
(*
enable_layer
)(
struct
osd_state
*
sd
,
enum
osd_layer
layer,
332
int
otherwin);
333
void
(*
disable_layer
)(
struct
osd_state
*
sd
,
enum
osd_layer
layer);
334
int
(*
set_layer_config
)(
struct
osd_state
*
sd
,
enum
osd_layer
layer,
335
struct
osd_layer_config
*lconfig);
336
void
(*
get_layer_config
)(
struct
osd_state
*
sd
,
enum
osd_layer
layer,
337
struct
osd_layer_config
*lconfig);
338
void
(*
start_layer
)(
struct
osd_state
*
sd
,
enum
osd_layer
layer,
339
unsigned
long
fb_base_phys,
340
unsigned
long
cbcr_ofst);
341
void
(*
set_left_margin
)(
struct
osd_state
*
sd
,
u32
val
);
342
void
(*
set_top_margin
)(
struct
osd_state
*
sd
,
u32
val
);
343
void
(*
set_interpolation_filter
)(
struct
osd_state
*
sd
,
int
filter
);
344
int
(*
set_vid_expansion
)(
struct
osd_state
*
sd
,
345
enum
osd_h_exp_ratio
h_exp,
346
enum
osd_v_exp_ratio
v_exp);
347
void
(*
get_vid_expansion
)(
struct
osd_state
*
sd
,
348
enum
osd_h_exp_ratio
*h_exp,
349
enum
osd_v_exp_ratio
*v_exp);
350
void
(*
set_zoom
)(
struct
osd_state
*
sd
,
enum
osd_layer
layer,
351
enum
osd_zoom_factor
h_zoom,
352
enum
osd_zoom_factor
v_zoom);
353
};
354
355
struct
osd_state
{
356
enum
vpbe_version
vpbe_type
;
357
spinlock_t
lock
;
358
struct
device
*
dev
;
359
dma_addr_t
osd_base_phys
;
360
unsigned
long
osd_base
;
361
unsigned
long
osd_size
;
362
/* 1-->the isr will toggle the VID0 ping-pong buffer */
363
int
pingpong
;
364
int
interpolation_filter
;
365
int
field_inversion
;
366
enum
osd_h_exp_ratio
osd_h_exp
;
367
enum
osd_v_exp_ratio
osd_v_exp
;
368
enum
osd_h_exp_ratio
vid_h_exp
;
369
enum
osd_v_exp_ratio
vid_v_exp
;
370
enum
osd_clut
backg_clut
;
371
unsigned
backg_clut_index
;
372
enum
osd_rom_clut
rom_clut
;
373
int
is_blinking
;
374
/* attribute window blinking enabled */
375
enum
osd_blink_interval
blink
;
376
/* YCbCrI or YCrCbI */
377
enum
osd_pix_format
yc_pixfmt
;
378
/* columns are Y, Cb, Cr */
379
unsigned
char
clut_ram
[256][3];
380
struct
osd_cursor_state
cursor
;
381
/* OSD0, VID0, OSD1, VID1 */
382
struct
osd_window_state
win
[4];
383
/* OSD0, OSD1 */
384
struct
osd_osdwin_state
osdwin
[2];
385
/* OSD device Operations */
386
struct
vpbe_osd_ops
ops
;
387
};
388
389
struct
osd_platform_data
{
390
enum
vpbe_version
vpbe_type
;
391
int
field_inv_wa_enable
;
392
};
393
394
#endif
Generated on Thu Jan 10 2013 14:52:54 for Linux Kernel by
1.8.2