source: svn/trunk/newcon3bcm2_21bu/magnum/portinginterface/vdc/7552/bvdc_dbg.h

Last change on this file was 2, checked in by jglee, 11 years ago

first commit

  • Property svn:executable set to *
File size: 10.8 KB
Line 
1/***************************************************************************
2 *     Copyright (c) 2006-2011, Broadcom Corporation
3 *     All Rights Reserved
4 *     Confidential Property of Broadcom Corporation
5 *
6 *  THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE
7 *  AGREEMENT  BETWEEN THE USER AND BROADCOM.  YOU HAVE NO RIGHT TO USE OR
8 *  EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT.
9 *
10 * $brcm_Workfile: bvdc_dbg.h $
11 * $brcm_Revision: Hydra_Software_Devel/8 $
12 * $brcm_Date: 8/15/11 4:21p $
13 *
14 * Module Description:
15 *   This module print out helpful information to debug BVN
16 *
17 * Revision History:
18 *
19 * $brcm_Log: /magnum/portinginterface/vdc/7038/bvdc_dbg.h $
20 *
21 * Hydra_Software_Devel/8   8/15/11 4:21p tdo
22 * SW7420-2017: Add debug function to get SCL status register
23 *
24 * Hydra_Software_Devel/7   3/15/11 4:23p yuxiaz
25 * SW7400-2882: Added support to enable / disable multi-buffering logging
26 * for a specific window.
27 *
28 * Hydra_Software_Devel/6   2/9/11 3:59p yuxiaz
29 * SW7400-2882: Ported multi-buffing event logging scheme to VDC. Move
30 * related APIs to bvdc_dbg.h
31 *
32 * Hydra_Software_Devel/3   11/7/08 6:39p darnstein
33 * PR46484: move new diagnostic commands into bvdc_dbg.h, where they
34 * belong.
35 *
36 * Hydra_Software_Devel/2   1/29/08 6:08p pntruong
37 * PR34870: Added get handle debug functions for video tool library.
38 *
39 * Hydra_Software_Devel/1   4/25/06 4:30p pntruong
40 * PR20252: Develope a program/function that dumps out BVN
41 * configuration/status to aid debugging.
42 *
43 ***************************************************************************/
44#ifndef BVDC_DBG_H__
45#define BVDC_DBG_H__
46
47#include "bstd.h"
48#include "bvdc.h"
49
50
51/***************************************************************************
52 * Output VDC Debug information
53 *
54 */
55BERR_Code BVDC_Dbg_Dump
56        ( BVDC_Handle                      hVdc );
57
58
59/***************************************************************************
60Summary:
61        This function gets a source handle.
62
63Description:
64        Get the current active source by id.
65
66        DBG function for VTLib (Video Tool Library) getting vdc handles
67        that was created _bsp_ software that already abstract these handles from
68        VTLib but only expose thru hVdc main handle.  For eId there are eAuto, but
69        these are for the _Create() function.  BVDC_Dbg_GetXXXHandle functions will
70        accept these and treat them as invalid parameter.  If the handle is not
71        active it will return NULL.
72
73        WARNING: It's expected that APPLICATION/DRIVER does not call of any of these
74        get handle function.  These get handle function only return what the current
75        state VDC.  Caller expted to be VTLib equivalent, and caller must ensure
76        the synchronization between APPLICATION/DRIVER and VTLib.
77
78Input:
79        hVdc - The VDC handle that application created earlier.
80
81        eSourceId - Specify what source Id should VDC tries to get. eId must
82        be a valid source id for this chip set.
83
84Returns:
85        Return current active handle if success.  Otherwise return NULL.
86
87See Also:
88        BVDC_Source_Create.
89**************************************************************************/
90BVDC_Source_Handle BVDC_Dbg_GetSourceHandle
91        ( const BVDC_Handle                hVdc,
92          BAVC_SourceId                    eSourceId );
93
94/***************************************************************************
95Summary:
96        This function gets a compositor handle.
97
98Description:
99        Get the current active compositor by id.
100
101Input:
102        hVdc - The VDC handle that application created earlier.
103
104        eCompositorId - Specify what compositor Id should VDC tries to get.
105        eCompositorId must be a valid compositor id for this chip set.
106
107Returns:
108        Return current active handle if success.  Otherwise return NULL.
109
110See Also:
111        BVDC_Compositor_Create.
112**************************************************************************/
113BVDC_Compositor_Handle BVDC_Dbg_GetCompositorHandle
114        ( const BVDC_Handle                hVdc,
115          BVDC_CompositorId                eCompositorId );
116
117/***************************************************************************
118Summary:
119        This function gets a window handle.
120
121Description:
122        Get the current active window by id.
123
124Input:
125        hVdc - The VDC handle that application created earlier.
126
127        eCompositorId - Specify what compositor Id should VDC tries to get the
128        window from.
129
130        eWindowId - Specify what compositor Id should VDC tries to get.  eWindowId
131        must be a valid window id for this chip set.
132
133Returns:
134        Return current active handle if success.  Otherwise return NULL.
135
136See Also:
137        BVDC_Window_Create.
138**************************************************************************/
139BVDC_Window_Handle BVDC_Dbg_GetWindowHandle
140        ( const BVDC_Handle                hVdc,
141          BVDC_CompositorId                eCompositorId,
142          BVDC_WindowId                    eWindowId );
143
144/***************************************************************************
145Summary:
146        This function gets a source handle.
147
148Description:
149        Get the current active source from a given window.
150
151Input:
152        hWindow - The VDC handle that application created earlier.
153
154Returns:
155        Return current active handle if success.  Otherwise return NULL.
156
157See Also:
158        BVDC_Dbg_GetWindowHandle.
159**************************************************************************/
160BVDC_Source_Handle BVDC_Dbg_Window_GetSourceHandle
161        ( const BVDC_Window_Handle         hWindow );
162
163/***************************************************************************
164Summary:
165        This function gets a compositor handle.
166
167Description:
168        Get the current active compositor from a given window.
169
170Input:
171        hWindow - The VDC handle that application created earlier.
172
173Returns:
174        Return current active handle if success.  Otherwise return NULL.
175
176See Also:
177        BVDC_Dbg_GetWindowHandle.
178**************************************************************************/
179BVDC_Compositor_Handle BVDC_Dbg_Window_GetCompositorHandle
180        ( const BVDC_Window_Handle         hWindow );
181
182/***************************************************************************
183Summary:
184        This function gets Scaler Status.
185
186Description:
187        Get the status register value of the Scaler associate with the current
188        window.
189
190Input:
191        hWindow - The VDC handle that application created earlier.
192
193Returns:
194        Return the SCL BVB status register value.  0 if window not created.
195
196See Also:
197**************************************************************************/
198uint32_t BVDC_Dbg_Window_GetScalerStatus
199        ( const BVDC_Window_Handle         hWindow );
200
201/***************************************************************************
202Summary:
203        This function gets a display handle.
204
205Description:
206        Get the current active display from a given compositor.
207
208Input:
209        hCompositor - The VDC handle that application created earlier.
210
211Returns:
212        Return current active handle if success.  Otherwise return NULL.
213
214See Also:
215        BVDC_Dbg_GetCompositorHandle.
216**************************************************************************/
217BVDC_Display_Handle BVDC_Dbg_Compositor_GetDisplayHandle
218        ( const BVDC_Compositor_Handle     hCompositor );
219
220#if (BVDC_BUF_LOG == 1)
221/*****************************************************************************
222Summary:
223    Enum for users to specify how they want the multi-buffering events
224    be logged and dumped.
225
226See Also:
227    BVDC_SetBufLogStateAndDumpTrigger
228*****************************************************************************/
229
230typedef enum    {
231    BVDC_BufLogState_eReset=0,           /* Reset/inactive */
232    BVDC_BufLogState_eManual,            /* Manually trigger the dump */
233    BVDC_BufLogState_eAutomatic,         /* Automatic trigger - whenever a skip/repeat event occurs */
234    BVDC_BufLogState_eAutomaticReduced   /* Automatic trigger - whenever a skip/repeat event occurs, only shows skip/repeat */
235} BVDC_BufLogState;
236
237/***************************************************************************
238Summary:
239        Set when to start logging multi-buffering events and how to notify user
240        the log can be dumped.
241
242Description:
243        This function allows user to specify how the log can be dumped.
244        If BVDC_BufLogState_eAutomatic or BVDC_BufLogState_eAutomaticReduced is
245        chosen, a user callback function must be registered.
246
247Inputs:
248        eLogState               - Log and dump trigger state
249        pfCallback      - User callback function
250        pvParam1        - User defined data structure casted to void.
251        iParam2         - Additional user defined value.
252
253Returns:
254
255        BERR_SUCCESS                      - The function call succeeded.
256        BERR_INVALID_PARAMETER    - A supplied parameter was invalid,
257                                                                possibly NULL.
258
259See Also:
260        BVDC_P_BufLogState
261****************************************************************************/
262BERR_Code BVDC_SetBufLogStateAndDumpTrigger
263        ( BVDC_BufLogState                 eLogState,
264          const BVDC_CallbackFunc_isr      pfCallback,
265          void                                                     *pvParm1,
266          int                                                      iParm2 );
267
268
269/***************************************************************************
270Summary:
271        Print out the captured multi-buffering events log.
272
273Description:
274        This function dumps the captured multi-buffering events log.
275
276Inputs:
277
278Returns:
279
280See Also:
281
282****************************************************************************/
283void BVDC_DumpBufLog (void );
284
285/***************************************************************************
286Summary:
287        Prepares the manual trigger of the multi-buffering event log
288
289Description:
290        This function prepares the multi-buffering log internals such that
291    the next BVDC_DumpBufLog() dumps up to the most recent events,
292    regardless any skip/repeat event have been logged in the recent past.
293
294Inputs:
295
296Returns:
297
298See Also:
299
300****************************************************************************/
301void BVDC_SetBufLogManualTrigger(void);
302
303/***************************************************************************
304Summary:
305        Enable/Disable multi-buffering logging for a specific window
306
307Description:
308        This function allows user to specify whether to enable or disable
309        multi-buffering logging for a specific window. Multi-buffering logging
310        is enabled for all video window by default.
311
312Inputs:
313        hWindow      - The VDC handle that application created earlier.
314        bEnable      - flag to indicate whether to enable or disable multi-buffering
315                       logging.
316
317Returns:
318
319        BERR_SUCCESS                      - The function call succeeded.
320
321See Also:
322        BVDC_P_BufLogState
323
324****************************************************************************/
325BERR_Code BVDC_Window_EnableBufLog
326        ( const BVDC_Window_Handle         hWindow,
327          bool                             bEnable );
328
329#endif
330
331#ifdef BVDC_P_DISPLAY_DUMP
332void BVDC_Display_DumpAll_aulVfTable (void);
333void BVDC_Display_DumpAll_aulChFilterTbl (void);
334void BVDC_Display_DumpAll_aulRmTable (void);
335void BVDC_Display_DumpAll_aulItTable (void);
336void BVDC_Display_DumpAll_ulItConfig (void);
337void BVDC_Display_DumpAll_aulSmTable (void);
338void BVDC_Display_DumpTables (void);
339
340void BVDC_Display_MV_DumpAll_aulVfTable (void);
341void BVDC_Display_MV_DumpAll_aulItTable (void);
342void BVDC_Display_MV_DumpAll_ulItConfig (void);
343void BVDC_Display_MV_DumpTables (void);
344#endif
345
346#endif /* #ifndef BVDC_DBG_H__ */
347
348/* end of file */
Note: See TracBrowser for help on using the repository browser.