2 * Copyright (C) 2010 Texas Instruments Inc
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation version 2.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 /* vpbe_timing_type - Timing types used in vpbe device */
27 enum vpbe_enc_timings_type
{
29 VPBE_ENC_DV_PRESET
= 0x2,
30 VPBE_ENC_CUSTOM_TIMINGS
= 0x4,
31 /* Used when set timings through FB device interface */
32 VPBE_ENC_TIMINGS_INVALID
= 0x8,
37 unsigned int dv_preset
;
41 * struct vpbe_enc_mode_info
42 * @name: ptr to name string of the standard, "NTSC", "PAL" etc
43 * @std: standard or non-standard mode. 1 - standard, 0 - nonstandard
44 * @interlaced: 1 - interlaced, 0 - non interlaced/progressive
45 * @xres: x or horizontal resolution of the display
46 * @yres: y or vertical resolution of the display
47 * @fps: frame per second
48 * @left_margin: left margin of the display
49 * @right_margin: right margin of the display
50 * @upper_margin: upper margin of the display
51 * @lower_margin: lower margin of the display
52 * @hsync_len: h-sync length
53 * @vsync_len: v-sync length
54 * @flags: bit field: bit usage is documented below
57 * Structure holding timing and resolution information of a standard.
58 * Used by vpbe_device to set required non-standard timing in the
59 * venc when lcd controller output is connected to a external encoder.
60 * A table of timings is maintained in vpbe device to set this in
61 * venc when external encoder is connected to lcd controller output.
62 * Encoder may provide a g_dv_timings() API to override these values
67 * if_type should be used only by encoder manager and encoder.
69 * b0 (LSB) - hsync polarity, 0 - negative, 1 - positive
70 * b1 - vsync polarity, 0 - negative, 1 - positive
71 * b2 - field id polarity, 0 - negative, 1 - positive
73 struct vpbe_enc_mode_info
{
75 enum vpbe_enc_timings_type timings_type
;
76 union vpbe_timings timings
;
77 unsigned int interlaced
;
80 struct v4l2_fract aspect
;
81 struct v4l2_fract fps
;
82 unsigned int left_margin
;
83 unsigned int right_margin
;
84 unsigned int upper_margin
;
85 unsigned int lower_margin
;
86 unsigned int hsync_len
;
87 unsigned int vsync_len
;