1f29dbc25Smrg/* Copyright (c) 2005 Advanced Micro Devices, Inc. 2f29dbc25Smrg * 3f29dbc25Smrg * Permission is hereby granted, free of charge, to any person obtaining a copy 4f29dbc25Smrg * of this software and associated documentation files (the "Software"), to 5f29dbc25Smrg * deal in the Software without restriction, including without limitation the 6f29dbc25Smrg * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 7f29dbc25Smrg * sell copies of the Software, and to permit persons to whom the Software is 8f29dbc25Smrg * furnished to do so, subject to the following conditions: 9f29dbc25Smrg * 10f29dbc25Smrg * The above copyright notice and this permission notice shall be included in 11f29dbc25Smrg * all copies or substantial portions of the Software. 12f29dbc25Smrg * 13f29dbc25Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14f29dbc25Smrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15f29dbc25Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16f29dbc25Smrg * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17f29dbc25Smrg * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18f29dbc25Smrg * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 19f29dbc25Smrg * IN THE SOFTWARE. 20f29dbc25Smrg * 21f29dbc25Smrg * Neither the name of the Advanced Micro Devices, Inc. nor the names of its 22f29dbc25Smrg * contributors may be used to endorse or promote products derived from this 23f29dbc25Smrg * software without specific prior written permission. 24f29dbc25Smrg * */ 25f29dbc25Smrg 26f29dbc25Smrg/* 27f29dbc25Smrg * This file contains routines to control the video input port (VIP). 28f29dbc25Smrg * 29f29dbc25Smrg * gfx_set_vip_enable 30f29dbc25Smrg * gfx_set_vip_capture_run_mode 31f29dbc25Smrg * gfx_set_vip_base 32f29dbc25Smrg * gfx_set_vip_pitch 33f29dbc25Smrg * gfx_set_vip_mode 34f29dbc25Smrg * gfx_set_vbi_enable 35f29dbc25Smrg * gfx_set_vbi_mode 36f29dbc25Smrg * gfx_set_vbi_base 37f29dbc25Smrg * gfx_set_vbi_pitch 38f29dbc25Smrg * gfx_set_vbi_direct 39f29dbc25Smrg * gfx_set_vbi_interrupt 40f29dbc25Smrg * gfx_set_vip_bus_request_threshold_high 41f29dbc25Smrg * gfx_set_vip_last_line 42f29dbc25Smrg * gfx_test_vip_odd_field 43f29dbc25Smrg * gfx_test_vip_bases_updated 44f29dbc25Smrg * gfx_test_vip_fifo_overflow 45f29dbc25Smrg * gfx_get_vip_line 46f29dbc25Smrg * gfx_get_vip_base 47f29dbc25Smrg * gfx_get_vbi_pitch 48f29dbc25Smrg * 49f29dbc25Smrg * And the following routines if GFX_READ_ROUTINES is set: 50f29dbc25Smrg * 51f29dbc25Smrg * gfx_get_vip_enable 52f29dbc25Smrg * gfx_get_vip_pitch 53f29dbc25Smrg * gfx_get_vip_mode 54f29dbc25Smrg * gfx_get_vbi_enable 55f29dbc25Smrg * gfx_get_vbi_mode 56f29dbc25Smrg * gfx_get_vbi_base 57f29dbc25Smrg * gfx_get_vbi_direct 58f29dbc25Smrg * gfx_get_vbi_interrupt 59f29dbc25Smrg * gfx_get_vip_bus_request_threshold_high 60f29dbc25Smrg * */ 61f29dbc25Smrg 62f29dbc25Smrg/* INCLUDE SUPPORT FOR SC1200, IF SPECIFIED. */ 63f29dbc25Smrg 64f29dbc25Smrg#if GFX_VIP_SC1200 65f29dbc25Smrg#include "vip_1200.c" 66f29dbc25Smrg#endif 67f29dbc25Smrg 68f29dbc25Smrg/* WRAPPERS IF DYNAMIC SELECTION */ 69f29dbc25Smrg/* Extra layer to call either CS5530 or SC1200 routines. */ 70f29dbc25Smrg 71f29dbc25Smrg#if GFX_VIP_DYNAMIC 72f29dbc25Smrg 73f29dbc25Smrg/*--------------------------------------------------------------------------- 74f29dbc25Smrg * gfx_set_vip_enable 75f29dbc25Smrg *---------------------------------------------------------------------------- 76f29dbc25Smrg */ 77f29dbc25Smrgint 78f29dbc25Smrggfx_set_vip_enable(int enable) 79f29dbc25Smrg{ 80f29dbc25Smrg int status = GFX_STATUS_UNSUPPORTED; 81f29dbc25Smrg 82f29dbc25Smrg#if GFX_VIP_SC1200 83f29dbc25Smrg if (gfx_vip_type == GFX_VIP_TYPE_SC1200) 84f29dbc25Smrg status = sc1200_set_vip_enable(enable); 85f29dbc25Smrg#endif 86f29dbc25Smrg return (status); 87f29dbc25Smrg} 88f29dbc25Smrg 89f29dbc25Smrg/*---------------------------------------------------------------------------- 90f29dbc25Smrg * gfx_set_vip_capture_run_mode 91f29dbc25Smrg *---------------------------------------------------------------------------- 92f29dbc25Smrg */ 93f29dbc25Smrgint 94f29dbc25Smrggfx_set_vip_capture_run_mode(int mode) 95f29dbc25Smrg{ 96f29dbc25Smrg int status = GFX_STATUS_UNSUPPORTED; 97f29dbc25Smrg 98f29dbc25Smrg#if GFX_VIP_SC1200 99f29dbc25Smrg if (gfx_vip_type == GFX_VIP_TYPE_SC1200) 100f29dbc25Smrg status = sc1200_set_vip_capture_run_mode(mode); 101f29dbc25Smrg#endif 102f29dbc25Smrg return (status); 103f29dbc25Smrg} 104f29dbc25Smrg 105f29dbc25Smrg/*---------------------------------------------------------------------------- 106f29dbc25Smrg * gfx_set_vip_base 107f29dbc25Smrg *---------------------------------------------------------------------------- 108f29dbc25Smrg */ 109f29dbc25Smrgint 110f29dbc25Smrggfx_set_vip_base(unsigned long even, unsigned long odd) 111f29dbc25Smrg{ 112f29dbc25Smrg int status = GFX_STATUS_UNSUPPORTED; 113f29dbc25Smrg 114f29dbc25Smrg#if GFX_VIP_SC1200 115f29dbc25Smrg if (gfx_vip_type == GFX_VIP_TYPE_SC1200) 116f29dbc25Smrg status = sc1200_set_vip_base(even, odd); 117f29dbc25Smrg#endif 118f29dbc25Smrg return (status); 119f29dbc25Smrg} 120f29dbc25Smrg 121f29dbc25Smrg/*---------------------------------------------------------------------------- 122f29dbc25Smrg * gfx_set_vip_pitch 123f29dbc25Smrg *---------------------------------------------------------------------------- 124f29dbc25Smrg */ 125f29dbc25Smrgint 126f29dbc25Smrggfx_set_vip_pitch(unsigned long pitch) 127f29dbc25Smrg{ 128f29dbc25Smrg int status = GFX_STATUS_UNSUPPORTED; 129f29dbc25Smrg 130f29dbc25Smrg#if GFX_VIP_SC1200 131f29dbc25Smrg if (gfx_vip_type == GFX_VIP_TYPE_SC1200) 132f29dbc25Smrg status = sc1200_set_vip_pitch(pitch); 133f29dbc25Smrg#endif 134f29dbc25Smrg return (status); 135f29dbc25Smrg} 136f29dbc25Smrg 137f29dbc25Smrg/*---------------------------------------------------------------------------- 138f29dbc25Smrg * gfx_set_vip_mode 139f29dbc25Smrg *---------------------------------------------------------------------------- 140f29dbc25Smrg */ 141f29dbc25Smrgint 142f29dbc25Smrggfx_set_vip_mode(int mode) 143f29dbc25Smrg{ 144f29dbc25Smrg int status = GFX_STATUS_UNSUPPORTED; 145f29dbc25Smrg 146f29dbc25Smrg#if GFX_VIP_SC1200 147f29dbc25Smrg if (gfx_vip_type == GFX_VIP_TYPE_SC1200) 148f29dbc25Smrg status = sc1200_set_vip_mode(mode); 149f29dbc25Smrg#endif 150f29dbc25Smrg return (status); 151f29dbc25Smrg} 152f29dbc25Smrg 153f29dbc25Smrg/*---------------------------------------------------------------------------- 154f29dbc25Smrg * gfx_set_vbi_enable 155f29dbc25Smrg *---------------------------------------------------------------------------- 156f29dbc25Smrg */ 157f29dbc25Smrgint 158f29dbc25Smrggfx_set_vbi_enable(int enable) 159f29dbc25Smrg{ 160f29dbc25Smrg int status = GFX_STATUS_UNSUPPORTED; 161f29dbc25Smrg 162f29dbc25Smrg#if GFX_VIP_SC1200 163f29dbc25Smrg if (gfx_vip_type == GFX_VIP_TYPE_SC1200) 164f29dbc25Smrg status = sc1200_set_vbi_enable(enable); 165f29dbc25Smrg#endif 166f29dbc25Smrg return (status); 167f29dbc25Smrg} 168f29dbc25Smrg 169f29dbc25Smrg/*---------------------------------------------------------------------------- 170f29dbc25Smrg * gfx_set_vbi_mode 171f29dbc25Smrg *---------------------------------------------------------------------------- 172f29dbc25Smrg */ 173f29dbc25Smrgint 174f29dbc25Smrggfx_set_vbi_mode(int mode) 175f29dbc25Smrg{ 176f29dbc25Smrg int status = GFX_STATUS_UNSUPPORTED; 177f29dbc25Smrg 178f29dbc25Smrg#if GFX_VIP_SC1200 179f29dbc25Smrg if (gfx_vip_type == GFX_VIP_TYPE_SC1200) 180f29dbc25Smrg status = sc1200_set_vbi_mode(mode); 181f29dbc25Smrg#endif 182f29dbc25Smrg return (status); 183f29dbc25Smrg} 184f29dbc25Smrg 185f29dbc25Smrg/*---------------------------------------------------------------------------- 186f29dbc25Smrg * gfx_set_vbi_base 187f29dbc25Smrg *---------------------------------------------------------------------------- 188f29dbc25Smrg */ 189f29dbc25Smrgint 190f29dbc25Smrggfx_set_vbi_base(unsigned long even, unsigned long odd) 191f29dbc25Smrg{ 192f29dbc25Smrg int status = GFX_STATUS_UNSUPPORTED; 193f29dbc25Smrg 194f29dbc25Smrg#if GFX_VIP_SC1200 195f29dbc25Smrg if (gfx_vip_type == GFX_VIP_TYPE_SC1200) 196f29dbc25Smrg status = sc1200_set_vbi_base(even, odd); 197f29dbc25Smrg#endif 198f29dbc25Smrg return (status); 199f29dbc25Smrg} 200f29dbc25Smrg 201f29dbc25Smrg/*---------------------------------------------------------------------------- 202f29dbc25Smrg * gfx_set_vbi_pitch 203f29dbc25Smrg *---------------------------------------------------------------------------- 204f29dbc25Smrg */ 205f29dbc25Smrgint 206f29dbc25Smrggfx_set_vbi_pitch(unsigned long pitch) 207f29dbc25Smrg{ 208f29dbc25Smrg int status = GFX_STATUS_UNSUPPORTED; 209f29dbc25Smrg 210f29dbc25Smrg#if GFX_VIP_SC1200 211f29dbc25Smrg if (gfx_vip_type == GFX_VIP_TYPE_SC1200) 212f29dbc25Smrg status = sc1200_set_vbi_pitch(pitch); 213f29dbc25Smrg#endif 214f29dbc25Smrg return (status); 215f29dbc25Smrg} 216f29dbc25Smrg 217f29dbc25Smrg/*---------------------------------------------------------------------------- 218f29dbc25Smrg * gfx_set_vbi_direct 219f29dbc25Smrg *---------------------------------------------------------------------------- 220f29dbc25Smrg */ 221f29dbc25Smrgint 222f29dbc25Smrggfx_set_vbi_direct(unsigned long even_lines, unsigned long odd_lines) 223f29dbc25Smrg{ 224f29dbc25Smrg int status = GFX_STATUS_UNSUPPORTED; 225f29dbc25Smrg 226f29dbc25Smrg#if GFX_VIP_SC1200 227f29dbc25Smrg if (gfx_vip_type == GFX_VIP_TYPE_SC1200) 228f29dbc25Smrg status = sc1200_set_vbi_direct(even_lines, odd_lines); 229f29dbc25Smrg#endif 230f29dbc25Smrg return (status); 231f29dbc25Smrg} 232f29dbc25Smrg 233f29dbc25Smrg/*---------------------------------------------------------------------------- 234f29dbc25Smrg * gfx_set_vbi_interrupt 235f29dbc25Smrg *---------------------------------------------------------------------------- 236f29dbc25Smrg */ 237f29dbc25Smrgint 238f29dbc25Smrggfx_set_vbi_interrupt(int enable) 239f29dbc25Smrg{ 240f29dbc25Smrg int status = GFX_STATUS_UNSUPPORTED; 241f29dbc25Smrg 242f29dbc25Smrg#if GFX_VIP_SC1200 243f29dbc25Smrg if (gfx_vip_type == GFX_VIP_TYPE_SC1200) 244f29dbc25Smrg status = sc1200_set_vbi_interrupt(enable); 245f29dbc25Smrg#endif 246f29dbc25Smrg return (status); 247f29dbc25Smrg} 248f29dbc25Smrg 249f29dbc25Smrg/*---------------------------------------------------------------------------- 250f29dbc25Smrg * gfx_set_vip_bus_request_threshold_high 251f29dbc25Smrg *---------------------------------------------------------------------------- 252f29dbc25Smrg */ 253f29dbc25Smrgint 254f29dbc25Smrggfx_set_vip_bus_request_threshold_high(int enable) 255f29dbc25Smrg{ 256f29dbc25Smrg int status = GFX_STATUS_UNSUPPORTED; 257f29dbc25Smrg 258f29dbc25Smrg#if GFX_VIP_SC1200 259f29dbc25Smrg if (gfx_vip_type == GFX_VIP_TYPE_SC1200) 260f29dbc25Smrg status = sc1200_set_vip_bus_request_threshold_high(enable); 261f29dbc25Smrg#endif 262f29dbc25Smrg return (status); 263f29dbc25Smrg} 264f29dbc25Smrg 265f29dbc25Smrg/*---------------------------------------------------------------------------- 266f29dbc25Smrg * gfx_set_vip_last_line 267f29dbc25Smrg *---------------------------------------------------------------------------- 268f29dbc25Smrg */ 269f29dbc25Smrgint 270f29dbc25Smrggfx_set_vip_last_line(int last_line) 271f29dbc25Smrg{ 272f29dbc25Smrg int status = GFX_STATUS_UNSUPPORTED; 273f29dbc25Smrg 274f29dbc25Smrg#if GFX_VIP_SC1200 275f29dbc25Smrg if (gfx_vip_type == GFX_VIP_TYPE_SC1200) 276f29dbc25Smrg status = sc1200_set_vip_last_line(last_line); 277f29dbc25Smrg#endif 278f29dbc25Smrg return (status); 279f29dbc25Smrg} 280f29dbc25Smrg 281f29dbc25Smrg/*---------------------------------------------------------------------------- 282f29dbc25Smrg * gfx_test_vip_odd_field 283f29dbc25Smrg *---------------------------------------------------------------------------- 284f29dbc25Smrg */ 285f29dbc25Smrgint 286f29dbc25Smrggfx_test_vip_odd_field(void) 287f29dbc25Smrg{ 288f29dbc25Smrg int status = GFX_STATUS_UNSUPPORTED; 289f29dbc25Smrg 290f29dbc25Smrg#if GFX_VIP_SC1200 291f29dbc25Smrg if (gfx_vip_type == GFX_VIP_TYPE_SC1200) 292f29dbc25Smrg status = sc1200_test_vip_odd_field(); 293f29dbc25Smrg#endif 294f29dbc25Smrg return (status); 295f29dbc25Smrg} 296f29dbc25Smrg 297f29dbc25Smrg/*---------------------------------------------------------------------------- 298f29dbc25Smrg * gfx_test_vip_bases_updated 299f29dbc25Smrg *---------------------------------------------------------------------------- 300f29dbc25Smrg */ 301f29dbc25Smrgint 302f29dbc25Smrggfx_test_vip_bases_updated(void) 303f29dbc25Smrg{ 304f29dbc25Smrg int status = GFX_STATUS_UNSUPPORTED; 305f29dbc25Smrg 306f29dbc25Smrg#if GFX_VIP_SC1200 307f29dbc25Smrg if (gfx_vip_type == GFX_VIP_TYPE_SC1200) 308f29dbc25Smrg status = sc1200_test_vip_bases_updated(); 309f29dbc25Smrg#endif 310f29dbc25Smrg return (status); 311f29dbc25Smrg} 312f29dbc25Smrg 313f29dbc25Smrg/*---------------------------------------------------------------------------- 314f29dbc25Smrg * gfx_test_vip_fifo_overflow 315f29dbc25Smrg *---------------------------------------------------------------------------- 316f29dbc25Smrg */ 317f29dbc25Smrgint 318f29dbc25Smrggfx_test_vip_fifo_overflow(void) 319f29dbc25Smrg{ 320f29dbc25Smrg int status = GFX_STATUS_UNSUPPORTED; 321f29dbc25Smrg 322f29dbc25Smrg#if GFX_VIP_SC1200 323f29dbc25Smrg if (gfx_vip_type == GFX_VIP_TYPE_SC1200) 324f29dbc25Smrg status = sc1200_test_vip_fifo_overflow(); 325f29dbc25Smrg#endif 326f29dbc25Smrg return (status); 327f29dbc25Smrg} 328f29dbc25Smrg 329f29dbc25Smrg/*---------------------------------------------------------------------------- 330f29dbc25Smrg * gfx_get_vip_line 331f29dbc25Smrg *---------------------------------------------------------------------------- 332f29dbc25Smrg */ 333f29dbc25Smrgint 334f29dbc25Smrggfx_get_vip_line(void) 335f29dbc25Smrg{ 336f29dbc25Smrg int status = GFX_STATUS_UNSUPPORTED; 337f29dbc25Smrg 338f29dbc25Smrg#if GFX_VIP_SC1200 339f29dbc25Smrg if (gfx_vip_type == GFX_VIP_TYPE_SC1200) 340f29dbc25Smrg status = sc1200_get_vip_line(); 341f29dbc25Smrg#endif 342f29dbc25Smrg return (status); 343f29dbc25Smrg} 344f29dbc25Smrg 345f29dbc25Smrg/*---------------------------------------------------------------------------- 346f29dbc25Smrg * gfx_get_vip_base 347f29dbc25Smrg *---------------------------------------------------------------------------- 348f29dbc25Smrg */ 349f29dbc25Smrgunsigned long 350f29dbc25Smrggfx_get_vip_base(int odd) 351f29dbc25Smrg{ 352f29dbc25Smrg unsigned long base = 0; 353f29dbc25Smrg 354f29dbc25Smrg#if GFX_VIP_SC1200 355f29dbc25Smrg if (gfx_vip_type == GFX_VIP_TYPE_SC1200) 356f29dbc25Smrg base = sc1200_get_vip_base(odd); 357f29dbc25Smrg#endif 358f29dbc25Smrg return (base); 359f29dbc25Smrg} 360f29dbc25Smrg 361f29dbc25Smrg/*---------------------------------------------------------------------------- 362f29dbc25Smrg * gfx_get_vbi_pitch 363f29dbc25Smrg *---------------------------------------------------------------------------- 364f29dbc25Smrg */ 365f29dbc25Smrgunsigned long 366f29dbc25Smrggfx_get_vbi_pitch(void) 367f29dbc25Smrg{ 368f29dbc25Smrg unsigned long pitch = 0; 369f29dbc25Smrg 370f29dbc25Smrg#if GFX_VIP_SC1200 371f29dbc25Smrg if (gfx_vip_type == GFX_VIP_TYPE_SC1200) 372f29dbc25Smrg pitch = sc1200_get_vbi_pitch(); 373f29dbc25Smrg#endif 374f29dbc25Smrg return (pitch); 375f29dbc25Smrg} 376f29dbc25Smrg 377f29dbc25Smrg/*************************************************************/ 378f29dbc25Smrg/* READ ROUTINES | INCLUDED FOR DIAGNOSTIC PURPOSES ONLY */ 379f29dbc25Smrg/*************************************************************/ 380f29dbc25Smrg 381f29dbc25Smrg#if GFX_READ_ROUTINES 382f29dbc25Smrg 383f29dbc25Smrg/*---------------------------------------------------------------------------- 384f29dbc25Smrg * gfx_get_vip_enable 385f29dbc25Smrg *---------------------------------------------------------------------------- 386f29dbc25Smrg */ 387f29dbc25Smrgint 388f29dbc25Smrggfx_get_vip_enable(void) 389f29dbc25Smrg{ 390f29dbc25Smrg int enable = 0; 391f29dbc25Smrg 392f29dbc25Smrg#if GFX_VIP_SC1200 393f29dbc25Smrg if (gfx_vip_type == GFX_VIP_TYPE_SC1200) 394f29dbc25Smrg enable = sc1200_get_vip_enable(); 395f29dbc25Smrg#endif 396f29dbc25Smrg return (enable); 397f29dbc25Smrg} 398f29dbc25Smrg 399f29dbc25Smrg/*---------------------------------------------------------------------------- 400f29dbc25Smrg * gfx_get_vip_pitch 401f29dbc25Smrg *---------------------------------------------------------------------------- 402f29dbc25Smrg */ 403f29dbc25Smrgunsigned long 404f29dbc25Smrggfx_get_vip_pitch(void) 405f29dbc25Smrg{ 406f29dbc25Smrg unsigned long pitch = 0; 407f29dbc25Smrg 408f29dbc25Smrg#if GFX_VIP_SC1200 409f29dbc25Smrg if (gfx_vip_type == GFX_VIP_TYPE_SC1200) 410f29dbc25Smrg pitch = sc1200_get_vip_pitch(); 411f29dbc25Smrg#endif 412f29dbc25Smrg return (pitch); 413f29dbc25Smrg} 414f29dbc25Smrg 415f29dbc25Smrg/*---------------------------------------------------------------------------- 416f29dbc25Smrg * gfx_get_vip_mode 417f29dbc25Smrg *---------------------------------------------------------------------------- 418f29dbc25Smrg */ 419f29dbc25Smrgint 420f29dbc25Smrggfx_get_vip_mode(void) 421f29dbc25Smrg{ 422f29dbc25Smrg int mode = 0; 423f29dbc25Smrg 424f29dbc25Smrg#if GFX_VIP_SC1200 425f29dbc25Smrg if (gfx_vip_type == GFX_VIP_TYPE_SC1200) 426f29dbc25Smrg mode = sc1200_get_vip_mode(); 427f29dbc25Smrg#endif 428f29dbc25Smrg return (mode); 429f29dbc25Smrg} 430f29dbc25Smrg 431f29dbc25Smrg/*---------------------------------------------------------------------------- 432f29dbc25Smrg * gfx_get_vbi_enable 433f29dbc25Smrg *---------------------------------------------------------------------------- 434f29dbc25Smrg */ 435f29dbc25Smrgint 436f29dbc25Smrggfx_get_vbi_enable(void) 437f29dbc25Smrg{ 438f29dbc25Smrg int enable = 0; 439f29dbc25Smrg 440f29dbc25Smrg#if GFX_VIP_SC1200 441f29dbc25Smrg if (gfx_vip_type == GFX_VIP_TYPE_SC1200) 442f29dbc25Smrg enable = sc1200_get_vbi_enable(); 443f29dbc25Smrg#endif 444f29dbc25Smrg return (enable); 445f29dbc25Smrg} 446f29dbc25Smrg 447f29dbc25Smrg/*---------------------------------------------------------------------------- 448f29dbc25Smrg * gfx_get_vbi_mode 449f29dbc25Smrg *---------------------------------------------------------------------------- 450f29dbc25Smrg */ 451f29dbc25Smrgint 452f29dbc25Smrggfx_get_vbi_mode(void) 453f29dbc25Smrg{ 454f29dbc25Smrg int mode = 0; 455f29dbc25Smrg 456f29dbc25Smrg#if GFX_VIP_SC1200 457f29dbc25Smrg if (gfx_vip_type == GFX_VIP_TYPE_SC1200) 458f29dbc25Smrg mode = sc1200_get_vbi_mode(); 459f29dbc25Smrg#endif 460f29dbc25Smrg return (mode); 461f29dbc25Smrg} 462f29dbc25Smrg 463f29dbc25Smrg/*---------------------------------------------------------------------------- 464f29dbc25Smrg * gfx_get_vbi_base 465f29dbc25Smrg *---------------------------------------------------------------------------- 466f29dbc25Smrg */ 467f29dbc25Smrgunsigned long 468f29dbc25Smrggfx_get_vbi_base(int odd) 469f29dbc25Smrg{ 470f29dbc25Smrg unsigned long base = 0; 471f29dbc25Smrg 472f29dbc25Smrg#if GFX_VIP_SC1200 473f29dbc25Smrg if (gfx_vip_type == GFX_VIP_TYPE_SC1200) 474f29dbc25Smrg base = sc1200_get_vbi_base(odd); 475f29dbc25Smrg#endif 476f29dbc25Smrg return (base); 477f29dbc25Smrg} 478f29dbc25Smrg 479f29dbc25Smrg/*---------------------------------------------------------------------------- 480f29dbc25Smrg * gfx_get_vbi_direct 481f29dbc25Smrg *---------------------------------------------------------------------------- 482f29dbc25Smrg */ 483f29dbc25Smrgunsigned long 484f29dbc25Smrggfx_get_vbi_direct(int odd) 485f29dbc25Smrg{ 486f29dbc25Smrg unsigned long vbi_direct_lines = 0; 487f29dbc25Smrg 488f29dbc25Smrg#if GFX_VIP_SC1200 489f29dbc25Smrg if (gfx_vip_type == GFX_VIP_TYPE_SC1200) 490f29dbc25Smrg vbi_direct_lines = sc1200_get_vbi_direct(odd); 491f29dbc25Smrg#endif 492f29dbc25Smrg return (vbi_direct_lines); 493f29dbc25Smrg} 494f29dbc25Smrg 495f29dbc25Smrg/*---------------------------------------------------------------------------- 496f29dbc25Smrg * gfx_get_vbi_interrupt 497f29dbc25Smrg *---------------------------------------------------------------------------- 498f29dbc25Smrg */ 499f29dbc25Smrgint 500f29dbc25Smrggfx_get_vbi_interrupt(void) 501f29dbc25Smrg{ 502f29dbc25Smrg int enable = 0; 503f29dbc25Smrg 504f29dbc25Smrg#if GFX_VIP_SC1200 505f29dbc25Smrg if (gfx_vip_type == GFX_VIP_TYPE_SC1200) 506f29dbc25Smrg enable = sc1200_get_vbi_interrupt(); 507f29dbc25Smrg#endif 508f29dbc25Smrg return (enable); 509f29dbc25Smrg} 510f29dbc25Smrg 511f29dbc25Smrg/*---------------------------------------------------------------------------- 512f29dbc25Smrg * gfx_get_vip_bus_request_threshold_high 513f29dbc25Smrg *---------------------------------------------------------------------------- 514f29dbc25Smrg */ 515f29dbc25Smrgint 516f29dbc25Smrggfx_get_vip_bus_request_threshold_high(void) 517f29dbc25Smrg{ 518f29dbc25Smrg int enable = 0; 519f29dbc25Smrg 520f29dbc25Smrg#if GFX_VIP_SC1200 521f29dbc25Smrg if (gfx_vip_type == GFX_VIP_TYPE_SC1200) 522f29dbc25Smrg enable = sc1200_get_vip_bus_request_threshold_high(); 523f29dbc25Smrg#endif 524f29dbc25Smrg return (enable); 525f29dbc25Smrg} 526f29dbc25Smrg 52704007ebaSmrg#endif /* GFX_READ_ROUTINES */ 528f29dbc25Smrg 52904007ebaSmrg#endif /* GFX_VIP_DYNAMIC */ 530f29dbc25Smrg 531f29dbc25Smrg/* END OF FILE */ 532