| 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_module.h $ |
|---|
| 39 | * $brcm_Revision: 117 $ |
|---|
| 40 | * $brcm_Date: 12/16/11 5:28p $ |
|---|
| 41 | * |
|---|
| 42 | * Module Description: |
|---|
| 43 | * |
|---|
| 44 | * Revision History: |
|---|
| 45 | * |
|---|
| 46 | * $brcm_Log: /nexus/modules/display/7400/src/nexus_display_module.h $ |
|---|
| 47 | * |
|---|
| 48 | * 117 12/16/11 5:28p erickson |
|---|
| 49 | * SW7425-1878: merge XUDlib support for video encoder userdata |
|---|
| 50 | * |
|---|
| 51 | * SW7425-1878/2 12/16/11 2:12p ajagmag |
|---|
| 52 | * SW7425-1878: Update based on discussions with David E. |
|---|
| 53 | * |
|---|
| 54 | * SW7425-1878/1 12/9/11 1:32p ajagmag |
|---|
| 55 | * SW7425-1878: Integrate XUDlib into nexus |
|---|
| 56 | * |
|---|
| 57 | * 116 11/15/11 3:27p erickson |
|---|
| 58 | * SW7425-1747: remove old code |
|---|
| 59 | * |
|---|
| 60 | * 115 10/19/11 4:59p hongtaoz |
|---|
| 61 | * SW7425-1546: update display refresh rate according to current display |
|---|
| 62 | * status; set stgIndex correctly for dual; |
|---|
| 63 | * |
|---|
| 64 | * 114 10/19/11 3:10p erickson |
|---|
| 65 | * SW7425-1546: call NEXUS_Display_P_VideoInputDisplayUpdate for display |
|---|
| 66 | * refresh rate changes, including drop-frame/non-drop-frame changes |
|---|
| 67 | * |
|---|
| 68 | * 113 10/6/11 3:42p erickson |
|---|
| 69 | * SW7420-2070: add NEXUS_VBI_ENCODER_QUEUE_SIZE macro to control vbilib |
|---|
| 70 | * allocations using (NEXUS_VBI_ENCODER_QUEUE_SIZE+1)*NEXUS_NUM_DISPLAYS |
|---|
| 71 | * formula. |
|---|
| 72 | * |
|---|
| 73 | * 112 7/21/11 4:13p gmohile |
|---|
| 74 | * SW7125-1014 : Rework power management |
|---|
| 75 | * |
|---|
| 76 | * 111 7/8/11 1:17p erickson |
|---|
| 77 | * SW7346-306: VideoImageInput must set eInterruptRefreshRate with display |
|---|
| 78 | * format |
|---|
| 79 | * |
|---|
| 80 | * 110 6/28/11 9:47a erickson |
|---|
| 81 | * SW7405-5366: add NEXUS_Display_GetStatus |
|---|
| 82 | * |
|---|
| 83 | * 109 5/27/11 2:42p erickson |
|---|
| 84 | * SW7425-652: add NEXUS_DisplayStgSettings |
|---|
| 85 | * |
|---|
| 86 | * 108 4/22/11 3:13p vsilyaev |
|---|
| 87 | * SW7425-416: Updated 3D display API |
|---|
| 88 | * |
|---|
| 89 | * 107 4/21/11 1:17p vsilyaev |
|---|
| 90 | * SW7425-404: Added API to override orientaion of 2D video format |
|---|
| 91 | * |
|---|
| 92 | * 106 3/31/11 3:58p gmohile |
|---|
| 93 | * SW7408-260 : Open/close VDC handles during resume/standby |
|---|
| 94 | * |
|---|
| 95 | * 105 3/28/11 3:45p vsilyaev |
|---|
| 96 | * SW7335-1214: Added NEXUS_CallbackHandler framework |
|---|
| 97 | * |
|---|
| 98 | * 104 3/11/11 4:13p erickson |
|---|
| 99 | * SW7346-103: add support for CMP CRC capture |
|---|
| 100 | * |
|---|
| 101 | * 103 2/25/11 4:37p erickson |
|---|
| 102 | * SW7422-255: add AMOL support |
|---|
| 103 | * |
|---|
| 104 | * 102 2/16/11 10:14a gmohile |
|---|
| 105 | * SW7408-210 : Fix kernel mode build |
|---|
| 106 | * |
|---|
| 107 | * 101 12/23/10 12:50p erickson |
|---|
| 108 | * SW7425-34: remove NEXUS_IS_ANALOG_DISPLAY. instead, use |
|---|
| 109 | * BAVC_VbiPath_eUnknown returned by BVDC_Display_GetVbiPath to determine |
|---|
| 110 | * if display is VBI capable |
|---|
| 111 | * |
|---|
| 112 | * 100 12/2/10 8:14p spothana |
|---|
| 113 | * SW7420-1177: Adding nexus hdmi dvo module. |
|---|
| 114 | * |
|---|
| 115 | * SW7420-1177/3 11/5/10 3:28p spothana |
|---|
| 116 | * SW7420-1177: Update nexus hdmi dvo. |
|---|
| 117 | * |
|---|
| 118 | * SW7420-1177/2 11/5/10 2:25p spothana |
|---|
| 119 | * SW7420-1177: Merging from latest |
|---|
| 120 | * |
|---|
| 121 | * 99 11/2/10 2:19p vsilyaev |
|---|
| 122 | * SW7422-64: Added API to set 3D framebuffer |
|---|
| 123 | * |
|---|
| 124 | * 98 10/22/10 12:11p erickson |
|---|
| 125 | * SW7422-69: remove condition |
|---|
| 126 | * |
|---|
| 127 | * 97 10/22/10 12:09p erickson |
|---|
| 128 | * SW7422-69: move hdmi input connection to 7400 for 7422 support |
|---|
| 129 | * |
|---|
| 130 | * 96 9/30/10 10:15a mbatchel |
|---|
| 131 | * SW35230-1452: Add VDEC tuning API. |
|---|
| 132 | * |
|---|
| 133 | * 95 9/9/10 12:33p petlee |
|---|
| 134 | * SW35230-1262: Add PQ customization templates and examples |
|---|
| 135 | * |
|---|
| 136 | * 94 9/3/10 5:08p mbatchel |
|---|
| 137 | * SW35230-878, SW35230-1206: Add progressive-cadence tuning parameters. |
|---|
| 138 | * |
|---|
| 139 | * 93 8/13/10 4:04p petlee |
|---|
| 140 | * SW35230-1001: Add tunig file for backlight dimming |
|---|
| 141 | * |
|---|
| 142 | * 92 8/5/10 4:29p petlee |
|---|
| 143 | * SW35230-764: Integrate raw VBI capture |
|---|
| 144 | * |
|---|
| 145 | * 91 7/15/10 8:26a mbatchel |
|---|
| 146 | * SW35230-577: Add VAFE and VINDECO to NEXUS Tuning extension. |
|---|
| 147 | * |
|---|
| 148 | * 90 7/8/10 1:22p mbatchel |
|---|
| 149 | * SW35230-577: Add tnt shim. |
|---|
| 150 | * |
|---|
| 151 | * 89 7/8/10 11:48a petlee |
|---|
| 152 | * SW35230-577: Add headers for the new Tuning Shim Nexus Extension |
|---|
| 153 | * |
|---|
| 154 | * 88 6/24/10 11:49a petlee |
|---|
| 155 | * SW35230-408: Add header for Nexus_AonAdc Interface |
|---|
| 156 | * |
|---|
| 157 | * 87 6/2/10 8:30p bandrews |
|---|
| 158 | * SW3548-2323: share nexus_video_window_tune.h; create others for 35230 |
|---|
| 159 | * |
|---|
| 160 | * 86 5/20/10 5:03p mphillip |
|---|
| 161 | * SW7335-666: Enable CGMSA and CGMSB to work together |
|---|
| 162 | * |
|---|
| 163 | * 85 5/13/10 10:37a erickson |
|---|
| 164 | * SW3548-2921: add pq_disabled=y support |
|---|
| 165 | * |
|---|
| 166 | * 84 4/23/10 5:33p petlee |
|---|
| 167 | * SW35230-183: Add the new Nexus_AdcConfiguration Interface |
|---|
| 168 | * |
|---|
| 169 | * 83 3/30/10 4:39p bandrews |
|---|
| 170 | * SW3548-2323: merge tuning api to main |
|---|
| 171 | * |
|---|
| 172 | * 82 3/26/10 2:19p erickson |
|---|
| 173 | * SW7405-3965: refactor mosaic to support hd/sd simul mode |
|---|
| 174 | * |
|---|
| 175 | * 81 3/23/10 3:25p petlee |
|---|
| 176 | * SW35230-106: Merging branch SW35230-106 to mainline |
|---|
| 177 | * |
|---|
| 178 | * 80 3/17/10 2:52p mward |
|---|
| 179 | * SW7125-230: Add 7125 to NEXUS_HAS_PEP. |
|---|
| 180 | * |
|---|
| 181 | * 79 3/12/10 4:05p erickson |
|---|
| 182 | * SW3548-2643: added NEXUS_PanelOutput_P_ApplyCurrentStatus |
|---|
| 183 | * |
|---|
| 184 | * SW35230-106a/3 3/8/10 3:29p petlee |
|---|
| 185 | * SW35230-106: Add #if for 35230 specific variable |
|---|
| 186 | * |
|---|
| 187 | * SW35230-106a/2 2/25/10 3:08p petlee |
|---|
| 188 | * SW35230-106: Remove obsolete comment |
|---|
| 189 | * |
|---|
| 190 | * SW35230-106a/1 2/25/10 3:02p petlee |
|---|
| 191 | * SW35230-106: Add new handle for the ANV PI |
|---|
| 192 | * |
|---|
| 193 | * 78 2/23/10 5:14p petlee |
|---|
| 194 | * SW35230-18: Add check for BCHP_CHIP == 35230 |
|---|
| 195 | * |
|---|
| 196 | * 77 2/16/10 4:47p erickson |
|---|
| 197 | * SW3548-2776: add |
|---|
| 198 | * NEXUS_PictureCtrlContrastStretch.dynamicBacklightScaleFactor |
|---|
| 199 | * |
|---|
| 200 | * 76 2/2/10 5:37p erickson |
|---|
| 201 | * SWGIGGS2S-254: revise dynamic backlight wiring. PanelOutput must store |
|---|
| 202 | * scalingFactor and scalingShift. |
|---|
| 203 | * NEXUS_PictureCtrl_SetCustomContrastStretch must clear. have display |
|---|
| 204 | * instance store the panel handle for easier and safer lookup. |
|---|
| 205 | * |
|---|
| 206 | * 75 1/11/10 9:44a erickson |
|---|
| 207 | * SW3556-979: rework VPS, CGMS, CGMS-B and WSS encoding. instead of |
|---|
| 208 | * trying to get into the VBIlib encoder queue, we just intercept the |
|---|
| 209 | * queue in the VEC isr. this removes the BKNI_Sleep and possible Set |
|---|
| 210 | * failure. |
|---|
| 211 | * |
|---|
| 212 | * 74 12/20/09 4:59p randyjew |
|---|
| 213 | * SW7468-6:Add 7468 support |
|---|
| 214 | * |
|---|
| 215 | * 73 11/12/09 10:50a erickson |
|---|
| 216 | * SW3548-2616: refactor NEXUS_Display_P_InitGraphics and related code |
|---|
| 217 | * |
|---|
| 218 | * 72 11/3/09 2:12p mward |
|---|
| 219 | * SW7125-51: Enable TNT for 7125 in Nexus. |
|---|
| 220 | * |
|---|
| 221 | * 71 9/17/09 4:10p erickson |
|---|
| 222 | * SW7405-3033: back out last change. fix datatype instead. |
|---|
| 223 | * |
|---|
| 224 | * 70 9/9/09 1:19p erickson |
|---|
| 225 | * SW7405-2977: allow build with no video decoder |
|---|
| 226 | * |
|---|
| 227 | * 69 8/12/09 10:09p jrubio |
|---|
| 228 | * PR55232: add 7342/7340 |
|---|
| 229 | * |
|---|
| 230 | * 68 8/10/09 8:17a gmohile |
|---|
| 231 | * PR 56400 : Merge legacy vdc support to main line |
|---|
| 232 | * |
|---|
| 233 | * 67 8/6/09 2:38p erickson |
|---|
| 234 | * PR56417: removed NEXUS_GraphicsSettings.gammaCorrection. feature should |
|---|
| 235 | * not be used. |
|---|
| 236 | * |
|---|
| 237 | * 66 7/23/09 10:50a erickson |
|---|
| 238 | * PR56969: fix DTV. all settops will expose the hddvi interface. no dtv |
|---|
| 239 | * chips will expose it. this could change in the future. |
|---|
| 240 | * |
|---|
| 241 | * 65 7/23/09 10:39a erickson |
|---|
| 242 | * PR56969: add hddvi input |
|---|
| 243 | * |
|---|
| 244 | * 64 7/22/09 11:40a erickson |
|---|
| 245 | * PR56997: separate AnalogVideoDecoder code |
|---|
| 246 | * |
|---|
| 247 | * 63 7/21/09 10:20a jrubio |
|---|
| 248 | * PR56906: add TNT for 7335/7325 |
|---|
| 249 | * |
|---|
| 250 | * 62 7/16/09 11:50a erickson |
|---|
| 251 | * PR56417: added NEXUS_GraphicsSettings.gammaCorrection |
|---|
| 252 | * |
|---|
| 253 | * 61 6/24/09 3:42p erickson |
|---|
| 254 | * PR56233: enable PEP for 7335 and 7325 |
|---|
| 255 | * |
|---|
| 256 | * 60 6/8/09 7:06a erickson |
|---|
| 257 | * PR55617: rename NEXUS_P_DisplayAspectRatio_ToMagnum |
|---|
| 258 | * |
|---|
| 259 | * 59 5/20/09 3:29p erickson |
|---|
| 260 | * PR54880: keep track of whether VDC heaps were created and only destroy |
|---|
| 261 | * what was created |
|---|
| 262 | * |
|---|
| 263 | * 58 5/20/09 11:29a erickson |
|---|
| 264 | * PR55292: call NEXUS_VideoOutput_P_DestroyLink in |
|---|
| 265 | * NEXUS_Display_RemoveOutput |
|---|
| 266 | * |
|---|
| 267 | * 57 5/19/09 10:59a erickson |
|---|
| 268 | * PR54880: fix heap handling. don't assume VideoDecoder will return NULL |
|---|
| 269 | * heap for default. |
|---|
| 270 | * |
|---|
| 271 | * 56 4/24/09 4:20p jgarrett |
|---|
| 272 | * PR 53506: Adapting to new VDB OSD structure, adding specialfeature to |
|---|
| 273 | * graphics |
|---|
| 274 | * |
|---|
| 275 | * 55 4/8/09 4:31p vsilyaev |
|---|
| 276 | * PR 54016: Added support for precompiled header |
|---|
| 277 | * |
|---|
| 278 | * 54 4/7/09 11:42a erickson |
|---|
| 279 | * PR53623: change #define to NEXUS_NUM_656_OUTPUTS |
|---|
| 280 | * |
|---|
| 281 | * 53 4/1/09 12:16p erickson |
|---|
| 282 | * PR53623: merge 656 output support |
|---|
| 283 | * |
|---|
| 284 | * PR53623/1 3/31/09 10:07a mward |
|---|
| 285 | * PR 53623: 656 output support. |
|---|
| 286 | * |
|---|
| 287 | * 52 3/23/09 1:44p erickson |
|---|
| 288 | * PR53425: add NEXUS_DisplaySettings.vsyncCallback |
|---|
| 289 | * |
|---|
| 290 | * 51 3/4/09 1:03p jgarrett |
|---|
| 291 | * PR 52618: Adding forcePcFormat option to HdmiInput |
|---|
| 292 | * |
|---|
| 293 | * 50 3/2/09 6:10p jgarrett |
|---|
| 294 | * PR 52520: Moving scaler settings to common functions for VDB support |
|---|
| 295 | * |
|---|
| 296 | * 49 2/26/09 2:32p jgarrett |
|---|
| 297 | * PR 52464: Adding RTS settings update on display format change |
|---|
| 298 | * |
|---|
| 299 | * 48 2/11/09 3:17p erickson |
|---|
| 300 | * PR52032: remove NEXUS_NUM_BYPASS_DISPLAYS |
|---|
| 301 | * |
|---|
| 302 | * 47 2/9/09 3:15p erickson |
|---|
| 303 | * PR50703: remove 7420 exception |
|---|
| 304 | * |
|---|
| 305 | * 46 1/26/09 11:07a erickson |
|---|
| 306 | * PR51468: global variable naming convention |
|---|
| 307 | * |
|---|
| 308 | * 45 1/14/09 12:33p erickson |
|---|
| 309 | * PR46300: fix non-DTV |
|---|
| 310 | * |
|---|
| 311 | * 44 1/13/09 6:15p erickson |
|---|
| 312 | * PR46300: added NEXUS_VideoWindow_SetSpecialFeature1Settings |
|---|
| 313 | * |
|---|
| 314 | * 43 1/6/09 11:32a jgarrett |
|---|
| 315 | * PR 48984: Merge dynamic RTS code to main branch |
|---|
| 316 | * |
|---|
| 317 | * 42 12/24/08 12:40p jgarrett |
|---|
| 318 | * PR 50703: Disabling VBI for 7420 |
|---|
| 319 | * |
|---|
| 320 | * 41 12/17/08 11:40p erickson |
|---|
| 321 | * PR50501: refactor HdmiOutput to remove double BVDC_ApplyChanges and 400 |
|---|
| 322 | * msec wait on format change |
|---|
| 323 | * |
|---|
| 324 | * PR48984/3 12/5/08 4:23p jgarrett |
|---|
| 325 | * PR 48984: Updating to latest baseline |
|---|
| 326 | * |
|---|
| 327 | * 40 11/28/08 1:04p nickh |
|---|
| 328 | * PR48963: Add 7420 PEP and TNT support |
|---|
| 329 | * |
|---|
| 330 | * PR48984/2 11/26/08 6:19p jgarrett |
|---|
| 331 | * PR 48984: Merging to latest baseline |
|---|
| 332 | * |
|---|
| 333 | * 39 11/24/08 10:15a erickson |
|---|
| 334 | * PR49623: allow vbi encoding on bypass display |
|---|
| 335 | * |
|---|
| 336 | * PR48984/1 11/20/08 6:46p jgarrett |
|---|
| 337 | * PR 48984: Adding VDB support |
|---|
| 338 | * |
|---|
| 339 | * 38 11/4/08 12:38p erickson |
|---|
| 340 | * PR47030: add NEXUS_Display_P_DestroyHeap, refactor so that all VDC |
|---|
| 341 | * Sources are created by NEXUS_VideoInput_P_CreateLink |
|---|
| 342 | * |
|---|
| 343 | * 37 10/30/08 8:55p erickson |
|---|
| 344 | * PR47030: manage VDC heap |
|---|
| 345 | * |
|---|
| 346 | * 36 10/22/08 11:40a erickson |
|---|
| 347 | * PR48216: allow display to compile with no HdmiInput module |
|---|
| 348 | * |
|---|
| 349 | * 35 9/22/08 12:10p erickson |
|---|
| 350 | * PR47190: added NEXUS_PictureCtrl_SetColorClipSettings |
|---|
| 351 | * |
|---|
| 352 | * 34 9/19/08 5:19p erickson |
|---|
| 353 | * PR46063: added NEXUS_Display_SetCustomFormatSettings |
|---|
| 354 | * |
|---|
| 355 | * 33 9/5/08 1:16p erickson |
|---|
| 356 | * PR45897: add dynamic backlight options for panels |
|---|
| 357 | * |
|---|
| 358 | * 32 8/22/08 7:06p erickson |
|---|
| 359 | * PR45795: replace enum with 2HD/HD/SD buffer settings. this allows user |
|---|
| 360 | * to fully configure VDC memory allocation. |
|---|
| 361 | * |
|---|
| 362 | * 31 8/21/08 3:02p erickson |
|---|
| 363 | * PR45959: add sample extension |
|---|
| 364 | * |
|---|
| 365 | * 30 8/4/08 2:31p erickson |
|---|
| 366 | * PR45271: keep track of AnalogVideoDecoder opens. prevent duplicates. |
|---|
| 367 | * auto-close when DisplayModule closes. |
|---|
| 368 | * |
|---|
| 369 | * 29 7/7/08 2:40p erickson |
|---|
| 370 | * PR44619: prevent duplicate NEXUS_PanelOutput_Open calls |
|---|
| 371 | * |
|---|
| 372 | * 28 7/3/08 5:07p erickson |
|---|
| 373 | * PR43699: Remove unnecessary VDC Get functions from Nexus to avoid race |
|---|
| 374 | * conditions |
|---|
| 375 | * |
|---|
| 376 | * 27 6/23/08 5:15p vsilyaev |
|---|
| 377 | * PR 40921: Fixed ADC mapping for scart |
|---|
| 378 | * |
|---|
| 379 | * 26 6/23/08 7:19a erickson |
|---|
| 380 | * PR43914: move BLVD_Open before BVDC_Open |
|---|
| 381 | * |
|---|
| 382 | * 25 6/19/08 2:32p vsilyaev |
|---|
| 383 | * PR 40921: There is no component output on the 93556 platform |
|---|
| 384 | * |
|---|
| 385 | * 24 6/11/08 12:46p vsilyaev |
|---|
| 386 | * PR 43491: Added support for CCIR-656 input |
|---|
| 387 | * |
|---|
| 388 | * 23 5/21/08 10:33a erickson |
|---|
| 389 | * PR42678: rename NEXUS_DvoOutput to NEXUS_PanelOutput |
|---|
| 390 | * |
|---|
| 391 | * 22 5/12/08 4:09p erickson |
|---|
| 392 | * PR42628: free NEXUS_VideoOutput_P_Link when DisplayModule closes |
|---|
| 393 | * |
|---|
| 394 | * 21 5/8/08 3:08p erickson |
|---|
| 395 | * PR42487: merge, with fix |
|---|
| 396 | * |
|---|
| 397 | * PR42487/1 5/7/08 3:04p gorgon |
|---|
| 398 | * PR42487:Support PC input HW auto raster in 3548 |
|---|
| 399 | * |
|---|
| 400 | * 20 4/30/08 3:08p erickson |
|---|
| 401 | * PR39453: add 3548/3556 features |
|---|
| 402 | * |
|---|
| 403 | * 19 4/30/08 11:14a erickson |
|---|
| 404 | * PR41371: add CGMS-B support |
|---|
| 405 | * |
|---|
| 406 | * 18 4/11/08 3:37p vsilyaev |
|---|
| 407 | * PR 40921: Added SCART input |
|---|
| 408 | * |
|---|
| 409 | * 17 4/11/08 11:06a vsilyaev |
|---|
| 410 | * PR 40410: Fixed naming typo |
|---|
| 411 | * |
|---|
| 412 | * 16 4/8/08 3:18p erickson |
|---|
| 413 | * PR39453: add 3548 & 3556 |
|---|
| 414 | * |
|---|
| 415 | * 15 4/8/08 1:53p erickson |
|---|
| 416 | * PR39453: add 3548 & 3556 |
|---|
| 417 | * |
|---|
| 418 | * 14 4/7/08 4:10p erickson |
|---|
| 419 | * PR32888: added NEXUS_CRC_CAPTURE |
|---|
| 420 | * |
|---|
| 421 | * 13 4/4/08 4:36p erickson |
|---|
| 422 | * PR39257: default NEXUS_NUM_BYPASS_DISPLAYS to 0 |
|---|
| 423 | * |
|---|
| 424 | * 12 4/4/08 4:06p erickson |
|---|
| 425 | * PR39257: add NEXUS_DisplayType_eBypass for DTV |
|---|
| 426 | * |
|---|
| 427 | * 11 4/3/08 10:17a erickson |
|---|
| 428 | * PR41122: move picture quality code to 7400 |
|---|
| 429 | * |
|---|
| 430 | * 10 4/2/08 3:16p erickson |
|---|
| 431 | * PR40950: 740x not ready for PQ yet |
|---|
| 432 | * |
|---|
| 433 | * 9 4/2/08 2:47p erickson |
|---|
| 434 | * PR40950: move PictureCtrl custom data into function params |
|---|
| 435 | * |
|---|
| 436 | * 8 4/1/08 1:46p jgarrett |
|---|
| 437 | * PR 40606: Caching rate information for HDMI |
|---|
| 438 | * |
|---|
| 439 | * 7 3/27/08 6:20p vsilyaev |
|---|
| 440 | * PR 40818: Added management of VDC heaps |
|---|
| 441 | * |
|---|
| 442 | * 6 3/26/08 11:44p vsilyaev |
|---|
| 443 | * PR 40410: Added more video settings for HDMI Input interface |
|---|
| 444 | * |
|---|
| 445 | * 5 3/24/08 5:35p vsilyaev |
|---|
| 446 | * PR 40755: Added implementation for colorkeying |
|---|
| 447 | * |
|---|
| 448 | * 4 3/21/08 12:17p vsilyaev |
|---|
| 449 | * PR 39986: Added VideoImageInput |
|---|
| 450 | * |
|---|
| 451 | * 3 2/1/08 3:20p erickson |
|---|
| 452 | * PR38679: add vbi support |
|---|
| 453 | * |
|---|
| 454 | * 2 1/31/08 9:55a erickson |
|---|
| 455 | * PR36808: added SyncChannel interface |
|---|
| 456 | * |
|---|
| 457 | * 1 1/18/08 2:20p jgarrett |
|---|
| 458 | * PR 38808: Merging to main branch |
|---|
| 459 | * |
|---|
| 460 | **************************************************************************/ |
|---|
| 461 | #ifndef NEXUS_DISPLAY_MODULE_H__ |
|---|
| 462 | #define NEXUS_DISPLAY_MODULE_H__ |
|---|
| 463 | |
|---|
| 464 | #include "nexus_base.h" |
|---|
| 465 | #include "nexus_platform_features.h" |
|---|
| 466 | |
|---|
| 467 | #define B_HAS_VBI 1 |
|---|
| 468 | #define B_HAS_VBI_ENCODE 1 |
|---|
| 469 | #ifndef NEXUS_VBI_ENCODER_QUEUE_SIZE |
|---|
| 470 | /* override NEXUS_VBI_ENCODER_QUEUE_SIZE in nexus_platform_features.h */ |
|---|
| 471 | #define NEXUS_VBI_ENCODER_QUEUE_SIZE 32 |
|---|
| 472 | #endif |
|---|
| 473 | |
|---|
| 474 | #if BCHP_CHIP==7401 |
|---|
| 475 | #define B_HAS_LEGACY_VDC 1 |
|---|
| 476 | #endif |
|---|
| 477 | |
|---|
| 478 | /** |
|---|
| 479 | PEP is picture enhancement processor |
|---|
| 480 | PEP has a CAB (color adjustment block) and LAB (luma adjustment block) |
|---|
| 481 | TNT is <> |
|---|
| 482 | TNT adjusts sharpness |
|---|
| 483 | CSC is color space convertor |
|---|
| 484 | CSC adjusts hue, saturation, brightness |
|---|
| 485 | All chips have a CSC |
|---|
| 486 | **/ |
|---|
| 487 | #if BCHP_CHIP == 7400 || BCHP_CHIP == 7420 || BCHP_CHIP == 7335 || BCHP_CHIP == 7325 || \ |
|---|
| 488 | BCHP_CHIP==7342 || BCHP_CHIP==7340 || BCHP_CHIP==7468 || BCHP_CHIP ==7125 |
|---|
| 489 | #define NEXUS_HAS_PEP 1 |
|---|
| 490 | #endif |
|---|
| 491 | #if BCHP_CHIP == 7400 || BCHP_CHIP == 7420 || BCHP_CHIP == 7335 || BCHP_CHIP ==7325 || BCHP_CHIP ==7125 |
|---|
| 492 | #define NEXUS_HAS_TNT 1 |
|---|
| 493 | #endif |
|---|
| 494 | #if BCHP_CHIP == 3548 || BCHP_CHIP == 3556 || BCHP_CHIP == 35230 |
|---|
| 495 | #define NEXUS_HAS_CM3D 1 |
|---|
| 496 | #endif |
|---|
| 497 | #if BCHP_CHIP == 3548 || BCHP_CHIP == 3556 |
|---|
| 498 | #define NEXUS_HAS_HW_AUTO_RASTER 1 |
|---|
| 499 | #endif |
|---|
| 500 | |
|---|
| 501 | |
|---|
| 502 | #define NEXUS_HAS_MOSAIC_MODE 1 |
|---|
| 503 | |
|---|
| 504 | #include "nexus_display_thunks.h" |
|---|
| 505 | #include "nexus_display.h" |
|---|
| 506 | #include "nexus_display_init.h" |
|---|
| 507 | #include "priv/nexus_display_standby_priv.h" |
|---|
| 508 | #include "nexus_display_vbi.h" |
|---|
| 509 | #include "nexus_video_window.h" |
|---|
| 510 | #include "nexus_video_window_tune.h" |
|---|
| 511 | #include "nexus_video_input_crc.h" |
|---|
| 512 | #include "priv/nexus_video_window_priv.h" |
|---|
| 513 | #include "priv/nexus_core.h" |
|---|
| 514 | #include "nexus_core_utils.h" |
|---|
| 515 | #include "nexus_picture_ctrl.h" |
|---|
| 516 | #include "nexus_video_adj.h" |
|---|
| 517 | #if NEXUS_HAS_CM3D |
|---|
| 518 | #include "nexus_video_window_cm3d.h" |
|---|
| 519 | #include "nexus_video_window_xvycc.h" |
|---|
| 520 | #endif |
|---|
| 521 | #include "nexus_display_extensions.h" |
|---|
| 522 | |
|---|
| 523 | #if BCHP_CHIP == 3563 |
|---|
| 524 | #include "nexus_display_3563.h" |
|---|
| 525 | #elif BCHP_CHIP == 3548 || BCHP_CHIP == 3556 |
|---|
| 526 | #include "nexus_display_3548.h" |
|---|
| 527 | #elif BCHP_CHIP == 35230 |
|---|
| 528 | #include "nexus_display_tune.h" |
|---|
| 529 | #include "nexus_video_input_tune.h" |
|---|
| 530 | #include "nexus_display_35230.h" |
|---|
| 531 | #endif |
|---|
| 532 | |
|---|
| 533 | #if NEXUS_HAS_MOSAIC_MODE |
|---|
| 534 | #include "nexus_mosaic_display.h" |
|---|
| 535 | #endif |
|---|
| 536 | |
|---|
| 537 | #if NEXUS_NUM_ANALOG_VIDEO_DECODERS |
|---|
| 538 | #include "nexus_analog_video_decoder.h" |
|---|
| 539 | #include "nexus_composite_input.h" |
|---|
| 540 | #include "nexus_component_input.h" |
|---|
| 541 | #include "nexus_svideo_input.h" |
|---|
| 542 | #include "nexus_pc_input.h" |
|---|
| 543 | #endif |
|---|
| 544 | |
|---|
| 545 | #include "nexus_video_output.h" |
|---|
| 546 | #include "nexus_video_input.h" |
|---|
| 547 | #include "priv/nexus_video_input_priv.h" |
|---|
| 548 | #include "nexus_video_input_vbi.h" |
|---|
| 549 | #include "nexus_component_output.h" |
|---|
| 550 | #include "nexus_svideo_output.h" |
|---|
| 551 | #include "nexus_composite_output.h" |
|---|
| 552 | #include "nexus_ccir656_output.h" |
|---|
| 553 | #include "nexus_video_output.h" |
|---|
| 554 | #include "nexus_video_image_input.h" |
|---|
| 555 | #include "nexus_video_hdmi_input.h" |
|---|
| 556 | /* all settops expose the HD_DVI interface, even if HW does not support */ |
|---|
| 557 | #include "nexus_hddvi_input.h" |
|---|
| 558 | |
|---|
| 559 | #if NEXUS_NUM_SCART_INPUTS |
|---|
| 560 | #include "nexus_scart_input.h" |
|---|
| 561 | #endif |
|---|
| 562 | #if defined(NEXUS_NUM_656_INPUTS) |
|---|
| 563 | /* due to way how thunk layer works, if header file present in the module |
|---|
| 564 | include directory, it should be included here, and .C file with implementation must be compiled */ |
|---|
| 565 | #include "nexus_ccir656_input.h" |
|---|
| 566 | #endif |
|---|
| 567 | |
|---|
| 568 | #include "blst_list.h" |
|---|
| 569 | #include "bvdc.h" |
|---|
| 570 | #if B_HAS_VBI |
|---|
| 571 | #include "bvbi.h" |
|---|
| 572 | #include "bvbilib.h" |
|---|
| 573 | #endif |
|---|
| 574 | #include "priv/nexus_core_video.h" |
|---|
| 575 | #if NEXUS_HAS_VIDEO_DECODER |
|---|
| 576 | #include "priv/nexus_video_decoder_priv.h" |
|---|
| 577 | #endif |
|---|
| 578 | |
|---|
| 579 | #if NEXUS_HAS_VIDEO_ENCODER |
|---|
| 580 | #include "bxudlib.h" |
|---|
| 581 | #endif |
|---|
| 582 | |
|---|
| 583 | #include "nexus_display_impl.h" |
|---|
| 584 | #include "nexus_video_window_impl.h" |
|---|
| 585 | #include "nexus_video_output_impl.h" |
|---|
| 586 | #include "nexus_video_input_impl.h" |
|---|
| 587 | #include "nexus_vdb_impl.h" |
|---|
| 588 | #if NEXUS_NUM_ANALOG_VIDEO_DECODERS |
|---|
| 589 | #include "nexus_analog_video_decoder_impl.h" |
|---|
| 590 | #endif |
|---|
| 591 | |
|---|
| 592 | #ifdef __cplusplus |
|---|
| 593 | extern "C" { |
|---|
| 594 | #endif |
|---|
| 595 | |
|---|
| 596 | BDBG_OBJECT_ID_DECLARE(NEXUS_Display); |
|---|
| 597 | |
|---|
| 598 | typedef struct NEXUS_DisplayModule_State { |
|---|
| 599 | BVDC_Handle vdc; |
|---|
| 600 | BRDC_Handle rdc; |
|---|
| 601 | NEXUS_DisplayModuleSettings moduleSettings; |
|---|
| 602 | NEXUS_HeapHandle heap; /* main heap used in BVDC_Open */ |
|---|
| 603 | NEXUS_DisplayModuleDependencies modules; |
|---|
| 604 | NEXUS_DisplayHandle displays[NEXUS_NUM_DISPLAYS]; |
|---|
| 605 | BLST_S_HEAD(NEXUS_DisplayModule_P_Inputs, NEXUS_VideoInput_P_Link) inputs; |
|---|
| 606 | NEXUS_DisplayUpdateMode updateMode; |
|---|
| 607 | bool lastUpdateFailed; |
|---|
| 608 | |
|---|
| 609 | /* mapping of nexus to vdc heap */ |
|---|
| 610 | #define MAX_VDC_HEAPS 4 |
|---|
| 611 | struct { |
|---|
| 612 | NEXUS_HeapHandle nexusHeap; |
|---|
| 613 | #ifndef B_HAS_LEGACY_VDC |
|---|
| 614 | BVDC_Heap_Handle vdcHeap; |
|---|
| 615 | #endif |
|---|
| 616 | NEXUS_DisplayHeapSettings settings; |
|---|
| 617 | unsigned refcnt; |
|---|
| 618 | } vdcHeapMap[MAX_VDC_HEAPS]; |
|---|
| 619 | |
|---|
| 620 | struct { |
|---|
| 621 | #if NEXUS_NUM_COMPONENT_OUTPUTS |
|---|
| 622 | struct NEXUS_ComponentOutput component[NEXUS_NUM_COMPONENT_OUTPUTS]; |
|---|
| 623 | #endif |
|---|
| 624 | #if NEXUS_NUM_COMPOSITE_OUTPUTS |
|---|
| 625 | struct NEXUS_CompositeOutput composite[NEXUS_NUM_COMPOSITE_OUTPUTS]; |
|---|
| 626 | #endif |
|---|
| 627 | #if NEXUS_NUM_SVIDEO_OUTPUTS |
|---|
| 628 | struct NEXUS_SvideoOutput svideo[NEXUS_NUM_SVIDEO_OUTPUTS]; |
|---|
| 629 | #endif |
|---|
| 630 | #if NEXUS_NUM_656_OUTPUTS |
|---|
| 631 | struct NEXUS_Ccir656Output ccir656[NEXUS_NUM_656_OUTPUTS]; |
|---|
| 632 | #endif |
|---|
| 633 | int dummy; |
|---|
| 634 | } outputs; |
|---|
| 635 | #if B_HAS_VBI |
|---|
| 636 | BVBI_Handle vbi; |
|---|
| 637 | BVBIlib_Handle vbilib; |
|---|
| 638 | BVBIlib_List_Handle vbilist; |
|---|
| 639 | #endif |
|---|
| 640 | |
|---|
| 641 | #if NEXUS_NUM_HDMI_OUTPUTS |
|---|
| 642 | /* Some HdmiOutput changes must be deferred until after the master ApplyChanges. This stores that state. */ |
|---|
| 643 | struct { |
|---|
| 644 | NEXUS_DisplayHandle display; |
|---|
| 645 | void *hdmiOutput; |
|---|
| 646 | BAVC_MatrixCoefficients colorimetry; |
|---|
| 647 | NEXUS_VideoFormat format; |
|---|
| 648 | NEXUS_DisplayAspectRatio aspectRatio; |
|---|
| 649 | } hdmiOutput; |
|---|
| 650 | #endif |
|---|
| 651 | |
|---|
| 652 | #if NEXUS_NUM_HDMI_DVO |
|---|
| 653 | /* Some HdmiDvo changes must be deferred until after the master ApplyChanges. This stores that state. */ |
|---|
| 654 | struct { |
|---|
| 655 | NEXUS_DisplayHandle display; |
|---|
| 656 | void *hdmiDvo; |
|---|
| 657 | BAVC_MatrixCoefficients colorimetry; |
|---|
| 658 | NEXUS_VideoFormat format; |
|---|
| 659 | NEXUS_DisplayAspectRatio aspectRatio; |
|---|
| 660 | } hdmiDvo; |
|---|
| 661 | #endif |
|---|
| 662 | |
|---|
| 663 | #if NEXUS_NUM_MOSAIC_DECODES |
|---|
| 664 | /* NEXUS_NUM_MOSAIC_DECODE_SETS corresponds to the # of AVD cores that can be put into mosaic mode. */ |
|---|
| 665 | #define NEXUS_NUM_MOSAIC_DECODE_SETS 2 |
|---|
| 666 | struct { |
|---|
| 667 | NEXUS_VideoInputObject input; |
|---|
| 668 | unsigned parentIndex; /* cache the lookup of the videodecoder's parentIndex */ |
|---|
| 669 | } mosaicInput[NEXUS_NUM_MOSAIC_DECODE_SETS]; |
|---|
| 670 | #endif |
|---|
| 671 | |
|---|
| 672 | bool pqDisabled; /* export pq_disabled=y provides a divide-and-conquer method of isolating PQ-related problems. */ |
|---|
| 673 | } NEXUS_DisplayModule_State; |
|---|
| 674 | |
|---|
| 675 | struct NEXUS_DisplayGraphics { |
|---|
| 676 | BVDC_Source_Handle source; |
|---|
| 677 | BVDC_Window_Handle windowVdc;/* it indicates that graphics is active, e.g. it both enabled in settings and frambuffer was assigned */ |
|---|
| 678 | BSUR_Surface_Handle queuedSurface; /* surface queued for display in hardware */ |
|---|
| 679 | NEXUS_GraphicsFramebuffer3D frameBuffer3D; |
|---|
| 680 | uint16_t frameBufferWidth; /* width of the frame buffer */ |
|---|
| 681 | uint16_t frameBufferHeight; /* height of the frame buffer */ |
|---|
| 682 | NEXUS_PixelFormat frameBufferPixelFormat; /* pixelFormat of the frame buffer */ |
|---|
| 683 | NEXUS_IsrCallbackHandle frameBufferCallback; |
|---|
| 684 | NEXUS_GraphicsSettings cfg; |
|---|
| 685 | NEXUS_ColorMatrix colorMatrix; |
|---|
| 686 | unsigned validCount; |
|---|
| 687 | }; |
|---|
| 688 | |
|---|
| 689 | |
|---|
| 690 | struct NEXUS_Display { |
|---|
| 691 | BDBG_OBJECT(NEXUS_Display) |
|---|
| 692 | BVDC_Compositor_Handle compositor; |
|---|
| 693 | BVDC_Display_Handle displayVdc; |
|---|
| 694 | BFMT_VideoInfo *customFormatInfo; |
|---|
| 695 | #if B_HAS_VBI_ENCODE |
|---|
| 696 | struct { |
|---|
| 697 | BVBI_Encode_Handle enc_core; /* must be NULL if not created */ |
|---|
| 698 | BVBIlib_Encode_Handle enc; /* this is VBI encode handle destination for VBI data */ |
|---|
| 699 | BINT_CallbackHandle tf_isr, bf_isr; |
|---|
| 700 | bool progressive; /* need fast way in isr to know if display is progressive and modify tf/bf_isr field parameter */ |
|---|
| 701 | NEXUS_DisplayVbiSettings settings; |
|---|
| 702 | BVBI_AMOL_Type amolType; |
|---|
| 703 | |
|---|
| 704 | struct { |
|---|
| 705 | bool wssSet; |
|---|
| 706 | uint16_t wssData; |
|---|
| 707 | |
|---|
| 708 | bool cgmsTopSet; |
|---|
| 709 | bool cgmsBottomSet; |
|---|
| 710 | uint32_t cgmsData; |
|---|
| 711 | |
|---|
| 712 | bool cgmsBTopSet; |
|---|
| 713 | bool cgmsBBottomSet; |
|---|
| 714 | BVBI_CGMSB_Datum cgmsBData; |
|---|
| 715 | |
|---|
| 716 | bool vpsSet; |
|---|
| 717 | BVBI_VPSData vpsData; |
|---|
| 718 | } pending; |
|---|
| 719 | } vbi; |
|---|
| 720 | #endif |
|---|
| 721 | unsigned index; |
|---|
| 722 | NEXUS_DisplaySettings cfg; |
|---|
| 723 | NEXUS_DisplayStatus status; |
|---|
| 724 | NEXUS_PictureCtrlColorClipSettings colorClipSettings; |
|---|
| 725 | NEXUS_DisplayStgSettings stgSettings; |
|---|
| 726 | unsigned stgIndex; |
|---|
| 727 | |
|---|
| 728 | struct NEXUS_VideoWindow windows[NEXUS_NUM_VIDEO_WINDOWS]; |
|---|
| 729 | struct NEXUS_DisplayGraphics graphics; |
|---|
| 730 | BLST_D_HEAD(NEXUS_Display_P_Outputs, NEXUS_VideoOutput_P_Link) outputs; |
|---|
| 731 | NEXUS_Rect displayRect; |
|---|
| 732 | #if NEXUS_NUM_HDMI_OUTPUTS |
|---|
| 733 | struct |
|---|
| 734 | { |
|---|
| 735 | NEXUS_CallbackHandler outputNotifyDisplay; |
|---|
| 736 | /* NEXUS_HdmiOutputHandle */ void *outputNotify; |
|---|
| 737 | void (*rateChangeCb_isr)(NEXUS_DisplayHandle display, void *pParam); |
|---|
| 738 | void *pCbParam; |
|---|
| 739 | BAVC_VdcDisplay_Info rateInfo; |
|---|
| 740 | bool rateInfoValid; |
|---|
| 741 | } hdmi; |
|---|
| 742 | #endif |
|---|
| 743 | |
|---|
| 744 | #if NEXUS_NUM_HDMI_DVO |
|---|
| 745 | struct |
|---|
| 746 | { |
|---|
| 747 | void (*rateChangeCb_isr)(NEXUS_DisplayHandle display, void *pParam); |
|---|
| 748 | void *pCbParam; |
|---|
| 749 | BAVC_VdcDisplay_Info rateInfo; |
|---|
| 750 | bool rateInfoValid; |
|---|
| 751 | } hdmiDvo; |
|---|
| 752 | #endif |
|---|
| 753 | |
|---|
| 754 | struct |
|---|
| 755 | { |
|---|
| 756 | unsigned gfxWidth, gfxHeight, gfxBpp; |
|---|
| 757 | uint32_t specialFeature1; |
|---|
| 758 | } restrictions; |
|---|
| 759 | bool formatChanged; |
|---|
| 760 | struct { |
|---|
| 761 | BINT_CallbackHandle intCallback[3]; /* top, bot, frame */ |
|---|
| 762 | NEXUS_IsrCallbackHandle isrCallback; |
|---|
| 763 | } vsyncCallback; |
|---|
| 764 | struct { |
|---|
| 765 | NEXUS_DisplayCrcData *queue; |
|---|
| 766 | unsigned size; /* num entries, not num bytes */ |
|---|
| 767 | unsigned rptr, wptr; |
|---|
| 768 | } crc; |
|---|
| 769 | struct { |
|---|
| 770 | BKNI_EventHandle event; |
|---|
| 771 | NEXUS_EventCallbackHandle handler; |
|---|
| 772 | } refreshRate; |
|---|
| 773 | |
|---|
| 774 | #if NEXUS_HAS_VIDEO_ENCODER |
|---|
| 775 | BXUDlib_Handle hXud; |
|---|
| 776 | bool encodeUserData; |
|---|
| 777 | BXUDlib_Settings userDataEncodeSettings; |
|---|
| 778 | #endif |
|---|
| 779 | }; |
|---|
| 780 | |
|---|
| 781 | /* |
|---|
| 782 | Display module global variables |
|---|
| 783 | **/ |
|---|
| 784 | extern NEXUS_DisplayModule_State g_NEXUS_DisplayModule_State; |
|---|
| 785 | extern NEXUS_ModuleHandle g_NEXUS_displayModuleHandle; |
|---|
| 786 | |
|---|
| 787 | /** |
|---|
| 788 | Conversion and helper functions |
|---|
| 789 | **/ |
|---|
| 790 | BERR_Code NEXUS_P_DisplayAspectRatio_ToMagnum(NEXUS_DisplayAspectRatio aspectRatio, BFMT_AspectRatio *maspectRatio); |
|---|
| 791 | bool NEXUS_P_Display_RectEqual(const NEXUS_Rect *r1, const NEXUS_Rect *r2); |
|---|
| 792 | |
|---|
| 793 | BERR_Code NEXUS_Display_P_InitGraphics(NEXUS_DisplayHandle display); |
|---|
| 794 | void NEXUS_Display_P_UninitGraphics(NEXUS_DisplayHandle display); |
|---|
| 795 | void NEXUS_Display_P_ResetGraphics(NEXUS_DisplayHandle display); |
|---|
| 796 | void NEXUS_Display_P_DestroyGraphicsSource(NEXUS_DisplayHandle display); |
|---|
| 797 | |
|---|
| 798 | NEXUS_Error NEXUS_Display_P_GetScalerRect(const NEXUS_VideoWindowSettings *pSettings, NEXUS_Rect *pRect); |
|---|
| 799 | |
|---|
| 800 | /* Performs apply changes after checking updateMode */ |
|---|
| 801 | NEXUS_Error NEXUS_Display_P_ApplyChanges(void); |
|---|
| 802 | |
|---|
| 803 | /** |
|---|
| 804 | Display VBI functions |
|---|
| 805 | **/ |
|---|
| 806 | BERR_Code NEXUS_Display_P_ConnectVbi(NEXUS_DisplayHandle display); |
|---|
| 807 | void NEXUS_Display_P_DisconnectVbi(NEXUS_DisplayHandle display); |
|---|
| 808 | void NEXUS_Display_P_DisableVbi(NEXUS_DisplayHandle display); |
|---|
| 809 | BERR_Code NEXUS_Display_P_EnableVbi(NEXUS_DisplayHandle display, NEXUS_VideoFormat format); |
|---|
| 810 | BERR_Code NEXUS_Display_P_VbiData_isr(NEXUS_DisplayHandle display, BVBI_Field_Handle vbiData); |
|---|
| 811 | #ifndef B_HAS_LEGACY_VDC |
|---|
| 812 | BVDC_Heap_Handle NEXUS_Display_P_CreateHeap(NEXUS_HeapHandle heap); |
|---|
| 813 | void NEXUS_Display_P_DestroyHeap(BVDC_Heap_Handle vdcHeap); |
|---|
| 814 | #endif |
|---|
| 815 | |
|---|
| 816 | /* Find the window that this input is connected to */ |
|---|
| 817 | NEXUS_VideoWindowHandle NEXUS_Display_P_FindWindow(NEXUS_VideoInput input); |
|---|
| 818 | |
|---|
| 819 | /* Create VideoInputLink for the videoImage input */ |
|---|
| 820 | NEXUS_VideoInput_P_Link *NEXUS_VideoImageInput_P_OpenInput(NEXUS_VideoInput input); |
|---|
| 821 | void NEXUS_VideoImageInput_P_UpdateDisplayInformation(NEXUS_VideoImageInputHandle imageInput, const NEXUS_DisplaySettings *pSettings); |
|---|
| 822 | |
|---|
| 823 | |
|---|
| 824 | #define NEXUS_MODULE_SELF g_NEXUS_displayModuleHandle |
|---|
| 825 | |
|---|
| 826 | #ifdef __cplusplus |
|---|
| 827 | } |
|---|
| 828 | #endif |
|---|
| 829 | |
|---|
| 830 | #endif /* NEXUS_DISPLAY_MODULE_H__ */ |
|---|
| 831 | |
|---|
| 832 | |
|---|