source: svn/newcon3bcm2_21bu/nexus/modules/display/7552/include/nexus_display_init.h

Last change on this file was 76, checked in by megakiss, 10 years ago

1W 대기전력을 만족시키기 위하여 POWEROFF시 튜너를 Standby 상태로 함

  • Property svn:executable set to *
File size: 13.7 KB
Line 
1/***************************************************************************
2 *     (c)2007-2011 Broadcom Corporation
3 *
4 *  This program is the proprietary software of Broadcom Corporation and/or its licensors,
5 *  and may only be used, duplicated, modified or distributed pursuant to the terms and
6 *  conditions of a separate, written license agreement executed between you and Broadcom
7 *  (an "Authorized License").  Except as set forth in an Authorized License, Broadcom grants
8 *  no license (express or implied), right to use, or waiver of any kind with respect to the
9 *  Software, and Broadcom expressly reserves all rights in and to the Software and all
10 *  intellectual property rights therein.  IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU
11 *  HAVE NO RIGHT TO USE THIS SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY
12 *  NOTIFY BROADCOM AND DISCONTINUE ALL USE OF THE SOFTWARE.
13 *
14 *  Except as expressly set forth in the Authorized License,
15 *
16 *  1.     This program, including its structure, sequence and organization, constitutes the valuable trade
17 *  secrets of Broadcom, and you shall use all reasonable efforts to protect the confidentiality thereof,
18 *  and to use this information only in connection with your use of Broadcom integrated circuit products.
19 *
20 *  2.     TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
21 *  AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, REPRESENTATIONS OR
22 *  WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO
23 *  THE SOFTWARE.  BROADCOM SPECIFICALLY DISCLAIMS ANY AND ALL IMPLIED WARRANTIES
24 *  OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE,
25 *  LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION
26 *  OR CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT OF
27 *  USE OR PERFORMANCE OF THE SOFTWARE.
28 *
29 *  3.     TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR ITS
30 *  LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR
31 *  EXEMPLARY DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO YOUR
32 *  USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM HAS BEEN ADVISED OF
33 *  THE POSSIBILITY OF SUCH DAMAGES; OR (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT
34 *  ACTUALLY PAID FOR THE SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE
35 *  LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF
36 *  ANY LIMITED REMEDY.
37 *
38 * $brcm_Workfile: nexus_display_init.h $
39 * $brcm_Revision: 35 $
40 * $brcm_Date: 11/15/11 3:27p $
41 *
42 * Module Description:
43 *
44 * Revision History:
45 *
46 * $brcm_Log: /nexus/modules/display/7400/include/nexus_display_init.h $
47 *
48 * 35   11/15/11 3:27p erickson
49 * SW7425-1747: remove old code
50 *
51 * 34   10/31/11 7:49p bandrews
52 * SW7231-391: merge to main
53 *
54 * SW7420-2078/1   10/31/11 7:34p bandrews
55 * SW7231-391: added dependency on transport module for timebase calls
56 *
57 * 33   10/27/11 3:32p erickson
58 * SW7425-1581: move crcQueueSize to NEXUS_DisplaySettings
59 *
60 * 32   3/11/11 4:13p erickson
61 * SW7346-103: add support for CMP CRC capture
62 *
63 * 31   2/25/11 4:37p erickson
64 * SW7422-255: add AMOL support
65 *
66 * 30   12/9/10 5:16p erickson
67 * SW7420-1177: add hdmiDvo
68 *
69 * 29   11/18/10 4:27p erickson
70 * SW7420-1078: SW7420-1078
71 *
72 * SW7420-1078/2   11/12/10 4:39p spothana
73 * SW7420-1078 : Add APIs to modify the display heap parameters.
74 *
75 * SW7420-1078/1   11/11/10 6:26p spothana
76 * SW7420-1078: assign heap index per video window and per graphics frame
77 *  buffer
78 *
79 * 28   8/19/10 2:15p jhaberf
80 * SW35230-760: Added ability to disable FRC
81 *
82 * 27   1/8/10 3:16p erickson
83 * SW3556-979: add NEXUS_DisplayModuleSettings.vbi booleans to alloc
84 *  memory for CGMS-B and gemstar VBI types
85 *
86 * 26   10/15/09 4:30p erickson
87 * SWDEPRECATED-3881: remove comments on struct members which are
88 *  deprecated and are now unused
89 *
90 * 25   9/1/09 4:23p erickson
91 * SWDEPRECATED-2425: update comments
92 *
93 * 24   7/24/09 10:48a erickson
94 * PR51648: add NEXUS_DisplayModuleSettings.dacBandGapAdjust[]. move env
95 *  variable to Settop API shim.
96 *
97 * 23   7/10/09 3:57p erickson
98 * PR56558: add NEXUS_DisplayModule_SetVideoDecoderModule to allow faster
99 *  start up time
100 *
101 * 22   6/15/09 5:01p erickson
102 * PR56022: deprecated numWindows and numDisplays
103 *
104 * 21   6/15/09 12:18p erickson
105 * PR55928: added NEXUS_DisplaySettings.vecIndex
106 *
107 * 20   6/12/09 10:50a erickson
108 * PR55967: convert NEXUS_DisplayModuleSettings heap settings to integers.
109 *  This makes them settable in the application.
110 *
111 * 19   3/27/09 2:34p erickson
112 * PR53453: add ccir656InputBufferSize
113 *
114 * 18   3/27/09 10:31a erickson
115 * PR48963: add heap and pipHeap to NEXUS_DisplayModuleSettings. allows
116 *  for more platform configurability.
117 *
118 * 17   2/20/09 4:49p jgarrett
119 * PR 52266: Adding memory requirements interface
120 *
121 * 16   2/12/09 5:34p jgarrett
122 * PR 51958: Adding vecSwap option
123 *
124 * 15   2/10/09 11:47a jgarrett
125 * PR 48984: Incorporating comments from vdb review
126 *
127 * 14   1/6/09 11:32a jgarrett
128 * PR 48984: Merge dynamic RTS code to main branch
129 *
130 * PR48984/1   11/20/08 6:46p jgarrett
131 * PR 48984: Adding VDB support
132 *
133 * 13   10/30/08 8:54p erickson
134 * PR47030: refactor nested structures for reuse with NEXUS_HeapHandle
135 *
136 * 12   10/24/08 1:38p erickson
137 * PR47030: added fullHd/hd/sd buffer settings for digital when
138 *  analog/digital memory sharing is enabled
139 *
140 * 11   9/12/08 9:14a erickson
141 * PR46824: added NEXUS_DisplayModuleSettings.vbi.tteShiftDirMsb2Lsb
142 *
143 * 10   9/5/08 1:16p erickson
144 * PR45897: add dynamic backlight options for panels
145 *
146 * 9   9/2/08 4:56p erickson
147 * PR46457: added runtime params for max resources
148 *
149 * 8   8/22/08 7:06p erickson
150 * PR45795: replace enum with 2HD/HD/SD buffer settings. this allows user
151 *  to fully configure VDC memory allocation.
152 *
153 * 7   8/14/08 9:51a erickson
154 * PR45647: add NEXUS_PanelOutputLinkMode_eCustom and related settings
155 *
156 * 6   7/10/08 4:46p erickson
157 * PR44598: added LVD link settings to NEXUS_DisplayModuleSettings.panel
158 *
159 * 5   6/23/08 7:19a erickson
160 * PR43914: move BLVD_Open before BVDC_Open
161 *
162 * 4   5/5/08 4:48p erickson
163 * PR42445: provide API's for better display frame rate control
164 *
165 * 3   2/20/08 1:33p erickson
166 * PR39405: added RFM output
167 *
168 * 2   2/1/08 5:25p jgarrett
169 * PR 39017: Adding HdmiOutput
170 *
171 * 1   1/18/08 2:20p jgarrett
172 * PR 38808: Merging to main branch
173 *
174 * Nexus_Devel/8   11/30/07 10:52a erickson
175 * PR35457: api update
176 *
177 * Nexus_Devel/7   11/8/07 2:42p erickson
178 * PR36814: added hdmiInput. only used on 3563, but harmless on other
179 * platforms.
180 *
181 * Nexus_Devel/6   11/6/07 1:04p erickson
182 * PR36570: added NEXUS_DisplayModuleBufferType
183 *
184 * Nexus_Devel/5   9/28/07 11:55a vsilyaev
185 * PR 34662: Fixed API after review
186 *
187 * Nexus_Devel/4   9/26/07 1:43p vsilyaev
188 * PR 34662: Implementation of display framebuffer
189 *
190 * Nexus_Devel/3   9/24/07 12:21p vsilyaev
191 * PR 34662: Added connection of window and source
192 *
193 * Nexus_Devel/2   9/13/07 4:21p vsilyaev
194 * PR 34419: Fixed typos
195 *
196 * Nexus_Devel/1   9/13/07 4:01p vsilyaev
197 * PR 34419: Added module operations
198 *
199 **************************************************************************/
200#ifndef NEXUS_DISPLAY_INIT_H__
201#define NEXUS_DISPLAY_INIT_H__
202
203#include "nexus_platform_features.h"
204#include "nexus_memory.h"
205#ifdef __cplusplus
206extern "C" {
207#endif
208
209/**
210Summary:
211The Display module's down modules
212**/
213typedef struct NEXUS_DisplayModuleDependencies
214{
215    NEXUS_ModuleHandle videoDecoder;
216    NEXUS_ModuleHandle surface;
217    NEXUS_ModuleHandle hdmiInput;
218    NEXUS_ModuleHandle hdmiDvo;
219    NEXUS_ModuleHandle hdmiOutput;
220    NEXUS_ModuleHandle rfm;
221    NEXUS_ModuleHandle pwm; /* needed for panel backlight control */
222    NEXUS_ModuleHandle transport;
223} NEXUS_DisplayModuleDependencies;
224
225#define NEXUS_MAX_VIDEO_DACS 7
226
227/**
228Summary:
229Settings used in NEXUS_DisplayModule_Init
230**/
231typedef struct NEXUS_DisplayModuleSettings
232{
233    NEXUS_DisplayModuleDependencies modules;
234
235    /* These determine the creation of a Display Module heap (i.e. the internal VDC heap) from device heap[0].
236       This is used if NEXUS_VideoWindowSettings.heap or NEXUS_VideoInputSettings.heap is set.
237       If you are always using per-VideoWindow and per-VideoInput heaps, then buffers should be all zeros. */
238    NEXUS_DisplayBufferTypeSettings fullHdBuffers; /* double-sized HD buffers used for 1080p output */
239    NEXUS_DisplayBufferTypeSettings hdBuffers;     /* HD buffers used for 1080i or 720p output */
240    NEXUS_DisplayBufferTypeSettings sdBuffers;     /* SD buffers used for 480i/576i output */
241
242
243    /* displayHeapSettings[] will default to all zero.
244    If the platform code detects this is all zero, it will set its defaults.
245    If the display module code detects this is all zero, it will use the legacy settings. */
246    NEXUS_DisplayHeapSettings displayHeapSettings[NEXUS_MAX_HEAPS];
247    unsigned videoWindowHeapIndex[NEXUS_NUM_DISPLAYS][NEXUS_NUM_VIDEO_WINDOWS]; /* Set the heap index per video window */
248    unsigned primaryDisplayHeapIndex;        /* The heap given to BVDC_Open for general use.
249                                                This is usually the heap index for videoWindowHeapIndex[0][0] i.e HD Main Video window */
250    bool dropFrame;                      /* If NEXUS_DisplaySettings.frameRateMaster is not set and NEXUS_VideoWindowSettings.autoMaster is
251                                            not set, then this boolean determines if a VEC is drop-frame or non-drop-frame. */
252
253    uint32_t dacBandGapAdjust[NEXUS_MAX_VIDEO_DACS];  /*Adjustment to the video TDAC and QDAC bandgap setting.
254                                            The default value is correct for most chipsets. However, there are
255                                            some production runs that require an adjustment for correct amplitude,
256                                            depends on the particular fab line that manufactured the chip. */
257
258    struct {
259        bool allowGemStar;               /* allocate extra memory for gemstar VBI */
260        bool allowCgmsB;                 /* allocate extra memory for CGMS-B VBI */
261        bool allowAmol;                  /* allocate extra memory for AMOL VBI */
262        bool tteShiftDirMsb2Lsb;         /* If true, teletext encoder shift direction will be set to MSBToLSB. Otherwise, it
263                                            will be set to LSBToMSB. The default value is FALSE. */
264        unsigned ccir656InputBufferSize; /* Size of 656 VBI buffer in bytes. The default value is 0. */
265    } vbi;
266
267    bool vecSwap;                       /* Default = true.  If you require more than three SD outputs with concurrent HD output, you may need to set this to false.
268                                           This is used only if NEXUS_DisplaySettings.vecIndex is -1. */
269    bool handleDynamicRts;              /* Default = true on DTV platforms.  Set to false if you want to manage dynamic RTS in the application instead.
270                                           You will need to set the system into NEXUS_VideoInputResumeMode_eNow to handle dynamic RTS. See
271                                           NEXUS_VideoInput_SetResumeMode for more details. */
272    unsigned configurationId;           /* The BVN configuration # from the RTS spreadsheet.  Currently only applicable to DTV chipsets.
273                                           If this value is not set, the application will be responsible for handling source pending callbacks
274                                           and making the necessary adjustments to settings and RTS values. */
275    bool disableFrc;                    /* Default = false. Set to true to disable loading and running of FRC. */
276} NEXUS_DisplayModuleSettings;
277
278/**
279Summary:
280Get defaults before calling NEXUS_DisplayModule_Init
281**/
282void NEXUS_DisplayModule_GetDefaultSettings(
283    NEXUS_DisplayModuleSettings *pSettings /* [out] */
284    );
285
286/**
287Summary:
288Initialize the Display module
289**/
290NEXUS_ModuleHandle NEXUS_DisplayModule_Init(
291    const NEXUS_DisplayModuleSettings *pSettings
292    );
293
294/**
295Summary:
296Uninitialize the Display module
297**/
298void NEXUS_DisplayModule_Uninit(void);
299
300/**
301Summary:
302Get the settings that were used in NEXUS_DisplayModule_Init.
303
304Description:
305These cannot be changed without calling NEXUS_DisplayModule_Uninit then NEXUS_DisplayModule_Init.
306This is for informational purposes.
307**/
308void NEXUS_DisplayModule_GetSettings(
309    NEXUS_DisplayModuleSettings *pSettings /* [out] */
310    );
311
312#define NEXUS_DISPLAY_WINDOW_MAIN (0x1)
313#define NEXUS_DISPLAY_WINDOW_PIP  (0x2)
314#define NEXUS_DISPLAY_WINDOW_MONITOR (0x4)
315
316#define NEXUS_DISPLAY_INPUT_DIGITAL (0x1000)
317#define NEXUS_DISPLAY_INPUT_ANALOG  (0x2000)
318
319/**
320Summary:
321Get the settings that were used in NEXUS_DisplayModule_Init.
322
323Description:
324These cannot be changed without calling NEXUS_DisplayModule_Uninit then NEXUS_DisplayModule_Init.
325This is for informational purposes.
326**/
327NEXUS_Error NEXUS_DisplayModule_GetMemorySettings(
328    unsigned configurationId,                           /* Configuration ID */
329    uint32_t mask,                                      /* Must contain at least one window and at least one input */
330    NEXUS_DisplayBufferTypeSettings *pFullHdBuffers,    /* [out] Full HD buffer requirements */
331    NEXUS_DisplayBufferTypeSettings *pHdBuffers,        /* [out] HD buffer requirements */
332    NEXUS_DisplayBufferTypeSettings *pSdBuffers,        /* [out] SD buffer requirements */
333    unsigned *pHeapSize                                 /* [out] Heap size in bytes */
334    );
335
336/**
337Summary:
338Set the VideoDecoder module dependency
339
340Description:
341This allows for faster system boot time. The Display module and VideoDecoder module can init separately, then the link can be made after both are initialized.
342**/
343void NEXUS_DisplayModule_SetVideoDecoderModule(
344    NEXUS_ModuleHandle videoDecoder /* Set to NULL or to the VideoDecoder module */
345    );
346
347#ifdef __cplusplus
348}
349#endif
350
351#endif /* NEXUS_DISPLAY_INIT_H__ */
Note: See TracBrowser for help on using the repository browser.