1 /* 2 * $Workfile: nsc_galproto.h $ 3 * $Revision: 1.3 $ 4 * 5 * File Contents: This file contains the main functions of the Geode 6 * frame buffer device drivers GAL function prototypes and 7 * data structures. 8 * 9 * Project: Geode Frame buffer device driver 10 * 11 */ 12 13 /* NSC_LIC_ALTERNATIVE_PREAMBLE 14 * 15 * Revision 1.0 16 * 17 * National Semiconductor Alternative GPL-BSD License 18 * 19 * National Semiconductor Corporation licenses this software 20 * ("Software"): 21 * 22 * National Xfree frame buffer driver 23 * 24 * under one of the two following licenses, depending on how the 25 * Software is received by the Licensee. 26 * 27 * If this Software is received as part of the Linux Framebuffer or 28 * other GPL licensed software, then the GPL license designated 29 * NSC_LIC_GPL applies to this Software; in all other circumstances 30 * then the BSD-style license designated NSC_LIC_BSD shall apply. 31 * 32 * END_NSC_LIC_ALTERNATIVE_PREAMBLE */ 33 34 /* NSC_LIC_BSD 35 * 36 * National Semiconductor Corporation Open Source License for 37 * 38 * National Xfree frame buffer driver 39 * 40 * (BSD License with Export Notice) 41 * 42 * Copyright (c) 1999-2001 43 * National Semiconductor Corporation. 44 * All rights reserved. 45 * 46 * Redistribution and use in source and binary forms, with or without 47 * modification, are permitted provided that the following conditions 48 * are met: 49 * 50 * * Redistributions of source code must retain the above copyright 51 * notice, this list of conditions and the following disclaimer. 52 * 53 * * Redistributions in binary form must reproduce the above 54 * copyright notice, this list of conditions and the following 55 * disclaimer in the documentation and/or other materials provided 56 * with the distribution. 57 * 58 * * Neither the name of the National Semiconductor Corporation nor 59 * the names of its contributors may be used to endorse or promote 60 * products derived from this software without specific prior 61 * written permission. 62 * 63 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 64 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 65 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 66 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 67 * NATIONAL SEMICONDUCTOR CORPORATION OR CONTRIBUTORS BE LIABLE FOR ANY 68 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 69 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 70 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 71 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 72 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE, 73 * INTELLECTUAL PROPERTY INFRINGEMENT, OR OTHERWISE) ARISING IN ANY WAY 74 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 75 * OF SUCH DAMAGE. 76 * 77 * EXPORT LAWS: THIS LICENSE ADDS NO RESTRICTIONS TO THE EXPORT LAWS OF 78 * YOUR JURISDICTION. It is licensee's responsibility to comply with 79 * any export regulations applicable in licensee's jurisdiction. Under 80 * CURRENT (2001) U.S. export regulations this software 81 * is eligible for export from the U.S. and can be downloaded by or 82 * otherwise exported or reexported worldwide EXCEPT to U.S. embargoed 83 * destinations which include Cuba, Iraq, Libya, North Korea, Iran, 84 * Syria, Sudan, Afghanistan and any other country to which the U.S. 85 * has embargoed goods and services. 86 * 87 * END_NSC_LIC_BSD */ 88 89 /* NSC_LIC_GPL 90 * 91 * National Semiconductor Corporation Gnu General Public License for 92 * 93 * National Xfree frame buffer driver 94 * 95 * (GPL License with Export Notice) 96 * 97 * Copyright (c) 1999-2001 98 * National Semiconductor Corporation. 99 * All rights reserved. 100 * 101 * Redistribution and use in source and binary forms, with or without 102 * modification, are permitted under the terms of the GNU General 103 * Public License as published by the Free Software Foundation; either 104 * version 2 of the License, or (at your option) any later version 105 * 106 * In addition to the terms of the GNU General Public License, neither 107 * the name of the National Semiconductor Corporation nor the names of 108 * its contributors may be used to endorse or promote products derived 109 * from this software without specific prior written permission. 110 * 111 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 112 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 113 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 114 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 115 * NATIONAL SEMICONDUCTOR CORPORATION OR CONTRIBUTORS BE LIABLE FOR ANY 116 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 117 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 118 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 119 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 120 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE, 121 * INTELLECTUAL PROPERTY INFRINGEMENT, OR OTHERWISE) ARISING IN ANY WAY 122 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 123 * OF SUCH DAMAGE. See the GNU General Public License for more details. 124 * 125 * EXPORT LAWS: THIS LICENSE ADDS NO RESTRICTIONS TO THE EXPORT LAWS OF 126 * YOUR JURISDICTION. It is licensee's responsibility to comply with 127 * any export regulations applicable in licensee's jurisdiction. Under 128 * CURRENT (2001) U.S. export regulations this software 129 * is eligible for export from the U.S. and can be downloaded by or 130 * otherwise exported or reexported worldwide EXCEPT to U.S. embargoed 131 * destinations which include Cuba, Iraq, Libya, North Korea, Iran, 132 * Syria, Sudan, Afghanistan and any other country to which the U.S. 133 * has embargoed goods and services. 134 * 135 * You should have received a copy of the GNU General Public License 136 * along with this file; if not, write to the Free Software Foundation, 137 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 138 * 139 * END_NSC_LIC_GPL */ 140 141 #ifndef __GALPROTO_SEP_20_2000 142 #define __GALPROTO_SEP_20_2000 143 144 /* durango reg definitions and type's */ 145 #include <gfx_type.h> 146 #include <gfx_regs.h> 147 148 /* Panel related definition */ 149 #include <pnl_defs.h> 150 151 typedef int SWORD; 152 typedef unsigned int DWORD; 153 typedef unsigned short WORD; 154 typedef unsigned char CHAR; 155 typedef unsigned char BOOLEAN; 156 typedef unsigned int *PDWORD; 157 158 /***************************************/ 159 /* Applications/User mode drivers use this ioctl to 160 * send a graphics device request to the frame buffer 161 * driver 162 */ 163 #define FBIOGAL_API 0x4700 164 165 /* 166 * Applications must sign the I/O packet with this value 167 */ 168 169 #define FBGAL_SIGNATURE 0xC0C0BABE 170 171 /* 172 * Version is a 16:16 fixed value 173 * Current version is 1.0000 174 */ 175 176 #define FBGAL_VERSION 0x10000 177 178 /* 179 * Definitions for Graphics Subfunctions 180 * 181 */ 182 183 typedef enum GALFN_CODES 184 { 185 /* General Adapter level functions */ 186 GALFN_GETADAPTERINFO = 0, 187 GALFN_SETSOFTVGASTATE, 188 GALFN_GETSOFTVGASTATE, 189 GALFN_WAITUNTILIDLE, 190 GALFN_WAITVERTICALBLANK, 191 GALFN_SETCRTENABLE, 192 GALFN_WRITEREG, 193 GALFN_READREG, 194 195 /* Change/Get Display hardware state */ 196 197 GALFN_ISDISPLAYMODESUPPORTED, 198 GALFN_SETDISPLAYMODE, 199 GALFN_GETDISPLAYMODE, 200 GALFN_SETBPP, 201 GALFN_SETDISPLAYBPP, 202 GALFN_GETDISPLAYBPP, 203 GALFN_SETDISPLAYPITCH, 204 GALFN_GETDISPLAYPITCH, 205 GALFN_SETDISPLAYOFFSET, 206 GALFN_GETDISPLAYOFFSET, 207 GALFN_DOTCLKTOREFRESH, 208 GALFN_GETDISPLAYTIMINGS, 209 GALFN_SETDISPLAYTIMINGS, 210 GALFN_SETPALETTE, 211 GALFN_GETPALETTE, 212 GALFN_SETPALETTE_ENTRY, 213 GALFN_GETPALETTE_ENTRY, 214 GALFN_SETFIXEDTIMINGS, 215 216 /* Hardware cursor funtions */ 217 218 GALFN_SETCURSORENABLE, 219 GALFN_GETCURSORENABLE, 220 GALFN_SETCURSORPOSITION, 221 GALFN_GETCURSORPOSITION, 222 GALFN_SETCURSORCOLORS, 223 GALFN_GETCURSORCOLORS, 224 GALFN_SETCURSORSHAPE, 225 GALFN_SETCURSORSHAPE_RCLD, 226 227 /* grafix rendering funtions */ 228 GALFN_SETSOLIDPATTERN, 229 GALFN_SETRASTEROPERATION, 230 GALFN_SETSOLIDSOURCE, 231 GALFN_PATTERNFILL, 232 GALFN_SETMONOSOURCE, 233 GALFN_SETMONOPATTERN, 234 GALFN_SCREENTOSCREENBLT, 235 GALFN_SCREENTOSCREENXBLT, 236 GALFN_BRESENHAMLINE, 237 GALFN_COLOR_PATTERNFILL, 238 GALFN_COLOR_BITMAP_TO_SCREEN_BLT, 239 GALFN_COLOR_BITMAP_TO_SCREEN_XBLT, 240 GALFN_MONO_BITMAP_TO_SCREEN_BLT, 241 GALFN_TEXT_BLT, 242 243 /* VGA Support functions */ 244 245 GALFN_VGAMODESWITCH, 246 GALFN_VGACLEARCRTEXT, 247 GALFN_VGASETPITCH, 248 GALFN_VGARESTORE, 249 GALFN_VGASAVE, 250 GALFN_VGASETMODE, 251 252 /* Compression functions */ 253 GALFN_SETCOMPRESSIONSTATE, 254 GALFN_GETCOMPRESSIONSTATE, 255 GALFN_SETCOMPRESSIONPARAMS, 256 GALFN_GETCOMPRESSIONPARAMS, 257 258 /* Panel Support functions */ 259 260 GALFN_PNLSETPARAMS, 261 GALFN_PNLGETPARAMS, 262 GALFN_PNLINITPANEL, 263 GALFN_PNLSAVESTATE, 264 GALFN_PNLRESTORESTATE, 265 GALFN_PNLPOWERUP, 266 GALFN_PNLPOWERDOWN, 267 GALFN_PNLBIOSENABLE, 268 GALFN_PNLBIOSINFO, 269 GALFN_ENABLEPANNING, 270 271 /* TV Support functions */ 272 273 GALFN_SETTVPARAMS, 274 GALFN_GETTVPARAMS, 275 GALFN_SETTVTIMING, 276 GALFN_GETTVTIMING, 277 GALFN_SETENABLE, 278 GALFN_GETENABLE, 279 GALFN_ISTVMODESUPPORTED, 280 281 /* Video Support functions */ 282 283 GALFN_SETVIDEOENABLE, 284 GALFN_SETVIDEOFORMAT, 285 GALFN_SETVIDEOSIZE, 286 GALFN_SETVIDEOOFFSET, 287 GALFN_SETVIDEOWINDOW, 288 GALFN_SETVIDEOSCALE, 289 GALFN_SETVIDEOFILTER, 290 GALFN_SETVIDEOCOLORKEY, 291 GALFN_SETVIDEODOWNSCALEENABLE, 292 GALFN_SETVIDEODOWNSCALECONFIG, 293 GALFN_SETVIDEODOWNSCALECOEFF, 294 GALFN_SETVIDEOSOURCE, 295 GALFN_SETVIDEOINTERLACED, 296 GALFN_SETVIDEOCURSOR, 297 GALFN_SETVIDEOREQUEST, 298 GALFN_SETALPHAENABLE, 299 GALFN_SETALPHAWINDOW, 300 GALFN_SETALPHAVALUE, 301 GALFN_SETALPHAPRIORITY, 302 GALFN_SETALPHACOLOR, 303 GALFN_SETALPHAREGION, 304 GALFN_SETVIDEOOUTSIDEALPHA, 305 GALFN_SETVIDEOPALETTE, 306 GALFN_GETVIDEOINFO, 307 GALFN_SETVIDEOCOLORSPACE, 308 309 /* VIP Supported functions */ 310 311 GALFN_SETVIPENABLE, 312 GALFN_SETVIPCAPTURERUNMODE, 313 GALFN_SETVIPBASE, 314 GALFN_SETVIPPITCH, 315 GALFN_SETVIPMODE, 316 GALFN_SETVIPBRTH, 317 GALFN_SETVIPLASTLINE, 318 GALFN_TESTVIPODDFIELD, 319 GALFN_TESTVIPBASESUPDATED, 320 GALFN_SETVBIENABLE, 321 GALFN_SETVBIMODE, 322 GALFN_SETVBIBASE, 323 GALFN_SETVBIPITCH, 324 GALFN_SETVBIDIRECT, 325 GALFN_SETVBIINTERRUPT, 326 GALFN_SETGENLOCKENABLE, 327 GALFN_SETTOPLINEINODD, 328 GALFN_SETGENLOCKDELAY, 329 GALFN_SETMACROVISIONENABLE, 330 331 GALFN_GETVIPENABLE, 332 GALFN_GETVIPBASE, 333 GALFN_GETVIPPITCH, 334 GALFN_GETVIPMODE, 335 GALFN_GETVIPBRTH, 336 GALFN_GETVIPLINE, 337 GALFN_GETVBIENABLE, 338 GALFN_GETVBIBASE, 339 GALFN_GETVBIPITCH, 340 GALFN_GETVBIMODE, 341 GALFN_GETVBIDIRECT, 342 GALFN_GETVBIINTERRUPT, 343 GALFN_TESTVIPFIFOOVERFLOW, 344 345 /* Second generation rendering routines */ 346 347 GALFN_SETICONENABLE, 348 GALFN_SETICONCOLORS, 349 GALFN_SETICONPOSITION, 350 GALFN_SETICONSHAPE64, 351 352 GALFN_SETSOURCESTRIDE, 353 GALFN_SETDESTINATIONSTRIDE, 354 GALFN_SETSOURCETRANSPARENCY, 355 GALFN_SETPATTERNORIGIN, 356 GALFN_GFX2SETALPHAMODE, 357 GALFN_GFX2SETALPHAVALUE, 358 GALFN_GFX2PATTERNFILL, 359 GALFN_GFX2COLORPATTERNFILL, 360 GALFN_GFX2SCREENTOSCREENBLT, 361 GALFN_GFX2MONOEXPANDBLT, 362 GALFN_GFX2COLORBMPTOSCRBLT, 363 GALFN_GFX2MONOBMPTOSCRBLT, 364 GALFN_GFX2TEXTBLT, 365 GALFN_GFX2BRESENHAMLINE, 366 GALFN_GFX2SYNCTOVBLANK, 367 368 /* Change/Get Video routines */ 369 370 GALFN_SETCOLORSPACEYUV, 371 GALFN_SETVIDEOYUVPITCH, 372 GALFN_SETVIDEOYUVOFFSETS, 373 GALFN_SETVIDEOLEFTCROP, 374 GALFN_SETVIDEOVERTICALDOWNSCALE, 375 GALFN_SETVBISOURCE, 376 GALFN_SETVBILINES, 377 GALFN_SETVBITOTAL, 378 GALFN_SETVSCALEROFFSET, 379 380 GALFN_GETVBISOURCE, 381 GALFN_GETVBILINES, 382 GALFN_GETVBITOTAL, 383 GALFN_GETVSCALEROFFSET, 384 GALFN_GETVIDEOINTERLACED, 385 GALFN_GETCOLORSPACEYUV, 386 GALFN_GETGENLOCKENABLE, 387 GALFN_GETGENLOCKDELAY, 388 GALFN_GETVIDEOCURSOR, 389 GALFN_READCRC, 390 GALFN_READWINDOWCRC, 391 GALFN_GETMACROVISIONENABLE, 392 GALFN_GETALPHAENABLE, 393 GALFN_GETALPHASIZE, 394 GALFN_GETALPHAVALUE, 395 GALFN_GETALPHAPRIORITY, 396 GALFN_GETALPHACOLOR, 397 GALFN_GETVIDEOYUVPITCH, 398 GALFN_GETVIDEOYUVOFFSETS, 399 400 /* Additional VGA Support functions */ 401 402 GALFN_VGATESTPCI, 403 GALFN_VGAGETPCICOMMAND, 404 GALFN_VGASEQRESET, 405 GALFN_VGASETGRAPHICSBITS, 406 407 /* This is last function supported. 408 * If you want to define ioctl function. 409 * You should define before this function. 410 * Update that the lastfunction supported to new value. 411 */ 412 GALFN_LASTFUNCTION_SUPPORTED 413 } 414 GALFN_CODES; 415 416 /* end of GAL function list */ 417 418 #define GAL_HEADER\ 419 DWORD dwSignature; /* Sign all structs with FBGAL_SIGNATURE */\ 420 DWORD dwSize; /* Size of struct for that subfunction */\ 421 DWORD dwVersion; /* Current version of the API */\ 422 DWORD dwSubfunction; /* GAL subfunction */\ 423 DWORD dwReturnValue; /* Return value from subfunction */ 424 425 /* 426 * #define GALFN_PNLPOWERUP 427 * #define GALFN_PNLPOWERDOWN 428 */ 429 typedef struct __GAL_BASE 430 { 431 GAL_HEADER} 432 GAL_BASE, *PGAL_BASE; 433 434 /* 435 * #define GALFN_GETADAPTERINFO 436 */ 437 typedef struct __GAL_GETADAPTERINFO 438 { 439 GAL_HEADER DWORD dwCPUVersion; 440 DWORD dwCPUType; 441 DWORD dwFrameBufferBase; 442 DWORD dwFrameBufferSize; 443 DWORD dwGfxRegisterBase; 444 DWORD dwGpsRegisterBase; 445 DWORD dwVidRegisterBase; 446 DWORD dwVipRegisterBase; 447 DWORD dwVideoVersion; 448 DWORD dwMaxSupportedPixelClock; 449 450 } 451 GAL_ADAPTERINFO, *PGAL_ADAPTERINFO; 452 453 #define GAL_SOFTVGASTATE_ENABLE 1 454 #define GAL_SOFTVGASTATE_DISABLE 0 455 /* 456 * #define GALFN_SOFTVGASTATE 457 */ 458 typedef struct __GAL_SOFTVGASTATE 459 { 460 GAL_HEADER BOOLEAN bSoftVgaEnable; 461 462 } 463 GAL_SOFTVGASTATE, *PGAL_SOFTVGASTATE; 464 465 /* 466 * #define GALFN_WAITUNTILIDLE 467 */ 468 typedef struct __GAL_WAITUNTILIDLE 469 { 470 GAL_HEADER} 471 GAL_WAITUNTILIDLE, *PGAL_WAITUNTILIDLE; 472 473 /* 474 * #define GALFN_WAITVERTICALBLANK 475 */ 476 typedef struct __GAL_WAITVERTICALBLANK 477 { 478 GAL_HEADER} 479 GAL_WAITVERTICALBLANK, *PGAL_WAITVERTICALBLANK; 480 481 #define GAL_REG 0x1 482 #define GAL_VID 0x2 483 #define GAL_VIP 0x4 484 /* 485 * #define GALFN_WRITEREG 486 * #define GALFN_READREG 487 */ 488 typedef struct __GAL_HWACCESS 489 { 490 GAL_HEADER DWORD dwType; 491 DWORD dwOffset; 492 DWORD dwValue; 493 DWORD dwByteCount; 494 495 } 496 GAL_HWACCESS, *PGAL_HWACCESS; 497 498 /* 499 * #define GALFN_ISDISPLAYMODESUPPORTED 500 * #define GALFN_SETDISPLAYMODE 501 * #define GALFN_GETDISPLAYMODE 502 */ 503 typedef struct __GAL_DISPLAYMODE 504 { 505 GAL_HEADER WORD wXres; 506 WORD wYres; 507 WORD wBpp; 508 WORD wRefresh; 509 DWORD dwSupported; 510 511 } 512 GAL_DISPLAYMODE, *PGAL_DISPLAYMODE; 513 514 /* 515 * #define GALFN_SETBPP 516 * #define GALFN_GETBPP 517 * #define GALFN_SETPITCH 518 * #define GALFN_GETPITCH 519 * #define GALFN_SETOFFSET 520 * #define GALFN_GETOFFSET 521 */ 522 typedef struct __GAL_DISPLAYPARAMS 523 { 524 GAL_HEADER DWORD dwOffset; 525 WORD wBpp; 526 WORD wPitch; 527 528 } 529 GAL_DISPLAYPARAMS, *PGAL_DISPLAYPARAMS; 530 531 /* 532 * #define GALFN_DOTCLKTOREFRESH 533 */ 534 typedef struct __GAL_DOTCLKTOREFRESH 535 { 536 GAL_HEADER DWORD dwDotClock; 537 WORD wXres; 538 WORD wYres; 539 WORD wBpp; 540 WORD wRefreshRate; 541 542 } 543 GAL_DOTCLKTOREFRESH, *PGAL_DOTCLKTOREFRESH; 544 545 /* 546 * #define GALFN_GETDISPLAYTIMINGS 547 * #define GALFN_SETDISPLAYTIMINGS 548 */ 549 typedef struct __GAL_DISPLAYTIMING 550 { 551 GAL_HEADER DWORD dwDotClock; 552 WORD wPitch; 553 WORD wBpp; 554 WORD wHTotal; 555 WORD wHActive; 556 WORD wHSyncStart; 557 WORD wHSyncEnd; 558 WORD wHBlankStart; 559 WORD wHBlankEnd; 560 WORD wVTotal; 561 WORD wVActive; 562 WORD wVSyncStart; 563 WORD wVSyncEnd; 564 WORD wVBlankStart; 565 WORD wVBlankEnd; 566 WORD wPolarity; 567 568 } 569 GAL_DISPLAYTIMING, *PGAL_DISPLAYTIMING; 570 571 /* 572 * #define GALFN_SETPALETTE_ENTRY 573 * #define GALFN_GETPALETTE_ENTRY 574 */ 575 typedef struct __GAL_PALETTE_ENTRY 576 { 577 GAL_HEADER DWORD dwIndex; 578 DWORD dwPalette; 579 } 580 GAL_PALETTE_ENTRY, *PGAL_PALETTE_ENTRY; 581 582 /* 583 * #define GALFN_SETPALETTE 584 * #define GALFN_GETPALETTE 585 */ 586 typedef struct __GAL_PALETTE 587 { 588 GAL_HEADER DWORD dwColors[256]; 589 } 590 GAL_PALETTE, *PGAL_PALETTE; 591 592 /* 593 * #define GALFN_COMPRESSIONSTATE 594 */ 595 typedef struct __GAL_COMPRESSIONSTATE 596 { 597 GAL_HEADER BOOLEAN bCompressionState; 598 } 599 GAL_COMPRESSIONSTATE, *PGAL_COMPRESSIONSTATE; 600 601 #define GAL_COMPRESSION_ENABLE 1 602 #define GAL_COMPRESSION_DISABLE 0 603 604 #define GAL_COMPRESSION_OFFSET 1 605 #define GAL_COMPRESSION_PITCH 2 606 #define GAL_COMPRESSION_SIZE 4 607 #define GAL_COMPRESSION_ALL 7 608 609 /* 610 * #define GALFN_COMPRESSIONPARAMS 611 */ 612 typedef struct __GAL_COMPRESSIONPARAMS 613 { 614 GAL_HEADER DWORD dwFlags; 615 DWORD dwCompOffset; 616 WORD dwCompPitch; 617 WORD dwCompSize; 618 } 619 GAL_COMPRESSIONPARAMS, *PGAL_COMPRESSIONPARAMS; 620 621 #define GAL_SETCURSORENABLE_ENABLE 1 622 #define GAL_SETCURSORENABLE_DISABLE 0 623 /* 624 * #define GALFN_CURSORENABLE 625 */ 626 typedef struct __GAL_CURSORENABLE 627 { 628 GAL_HEADER BOOLEAN bCursorEnable; 629 } 630 GAL_CURSORENABLE, *PGAL_CURSORENABLE; 631 632 /* 633 * #define GALFN_CURSORPOSITION 634 */ 635 typedef struct __GAL_CURSORPOSITION 636 { 637 GAL_HEADER DWORD dwMemOffset; 638 WORD wXPos; 639 WORD wYPos; 640 WORD wXHot; 641 WORD wYHot; 642 } 643 GAL_CURSORPOSITION, *PGAL_CURSORPOSITION; 644 645 /* 646 * #define GALFN_SETCURSORSHAPE 647 */ 648 typedef struct __GAL_SETCURSORSHAPE 649 { 650 GAL_HEADER DWORD dwMemOffset; 651 DWORD dwAndMask[32]; /* Most gfx hardware support only 32x32 */ 652 DWORD dwXorMask[32]; 653 } 654 GAL_SETCURSORSHAPE, *PGAL_SETCURSORSHAPE; 655 656 /* 657 * #define GALFN_SETCURSORCOLORS 658 */ 659 typedef struct __GAL_CURSORCOLORS 660 { 661 GAL_HEADER DWORD dwBgColor; 662 DWORD dwFgColor; 663 } 664 GAL_CURSORCOLORS, *PGAL_CURSORCOLORS; 665 666 /* 667 * #define GALFN_SETSOLIDPATTERN 668 */ 669 typedef struct __GAL_SETSOLIDPATTERN 670 { 671 GAL_HEADER DWORD dwColor; 672 } 673 GAL_SETSOLIDPATTERN, *PGAL_SETSOLIDPATTERN; 674 675 /* 676 * #define GALFN_SETRASTEROPERATION 677 */ 678 typedef struct __GAL_SETRASTEROPERATION 679 { 680 GAL_HEADER CHAR cRop; 681 } 682 GAL_RASTEROPERATION, *PGAL_RASTEROPERATION; 683 684 /* 685 * #define GALFN_SETSOLIDSOURCE 686 */ 687 typedef struct __GAL_SETSOLIDSOURCE 688 { 689 GAL_HEADER DWORD dwColor; 690 } 691 GAL_SETSOLIDSOURCE, *PGAL_SETSOLIDSOURCE; 692 693 /* 694 * #define GALFN_PATTERNFILL 695 */ 696 typedef struct __GAL_PATTERNFILL 697 { 698 GAL_HEADER WORD wXPos; 699 WORD wYPos; 700 WORD wWidth; 701 WORD wHeight; 702 } 703 GAL_PATTERNFILL, *PGAL_PATTERNFILL; 704 705 /* 706 * #define GALFN_SETMONOSOURCE 707 */ 708 typedef struct __GAL_SETMONOSOURCE 709 { 710 GAL_HEADER DWORD dwBgColor; 711 DWORD dwFgColor; 712 CHAR cTransparency; 713 } 714 GAL_SETMONOSOURCE, *PGAL_SETMONOSOURCE; 715 716 /* 717 * #define GALFN_SETMONOPATTERN 718 */ 719 typedef struct __GAL_SETMONOPATTERN 720 { 721 GAL_HEADER DWORD dwBgColor; 722 DWORD dwFgColor; 723 DWORD dwData0; 724 DWORD dwData1; 725 CHAR cTransparency; 726 } 727 GAL_SETMONOPATTERN, *PGAL_SETMONOPATTERN; 728 729 /* 730 * #define GALFN_SCREENTOSCREENBLT 731 */ 732 typedef struct __GAL_SCREENTOSCREENBLT 733 { 734 GAL_HEADER WORD wXStart; 735 WORD wYStart; 736 WORD wXEnd; 737 WORD wYEnd; 738 WORD wWidth; 739 WORD wHeight; 740 } 741 GAL_SCREENTOSCREENBLT, *PGAL_SCREENTOSCREENBLT; 742 743 /* 744 * #define GALFN_SCREENTOSCREENXBLT 745 */ 746 typedef struct __GAL_SCREENTOSCREENXBLT 747 { 748 GAL_HEADER WORD wXStart; 749 WORD wYStart; 750 WORD wXEnd; 751 WORD wYEnd; 752 WORD wWidth; 753 WORD wHeight; 754 DWORD dwColor; 755 } 756 GAL_SCREENTOSCREENXBLT, *PGAL_SCREENTOSCREENXBLT; 757 758 /* 759 * #define GALFN_BRESENHAMLINE 760 */ 761 typedef struct __GAL_BRESENHAMLINE 762 { 763 GAL_HEADER WORD wX1; 764 WORD wY1; 765 WORD wLength; 766 WORD wErr; 767 WORD wE1; 768 WORD wE2; 769 WORD wFlags; 770 } 771 GAL_BRESENHAMLINE, *PGAL_BRESENHAMLINE; 772 773 /* 774 * #define GALFN_COLOR_PATTERNFILL 775 */ 776 typedef struct __GAL_COLOR_PATTERNFILL 777 { 778 GAL_HEADER WORD wDsty; 779 WORD wDstx; 780 WORD wWidth; 781 WORD wHeight; 782 DWORD dwPattern; 783 } 784 GAL_COLOR_PATTERNFILL, *PGAL_COLOR_PATTERNFILL; 785 786 /* 787 * #define GALFN_COLOR_BITMAP_TO_SCREEN_BLT 788 */ 789 typedef struct __GAL_COLOR_BITMAP_TO_SCREEN_BLT 790 { 791 GAL_HEADER WORD wSrcx; 792 WORD wSrcy; 793 WORD wDstx; 794 WORD wDsty; 795 WORD wWidth; 796 WORD wHeight; 797 DWORD dwData; 798 WORD wPitch; 799 } 800 GAL_COLOR_BITMAP_TO_SCREEN_BLT, *PGAL_COLOR_BITMAP_TO_SCREEN_BLT; 801 802 /* 803 * #define GALFN_COLOR_BITMAP_TO_SCREEN_XBLT 804 */ 805 typedef struct __GAL_COLOR_BITMAP_TO_SCREEN_XBLT 806 { 807 GAL_HEADER WORD wSrcx; 808 WORD wSrcy; 809 WORD wDstx; 810 WORD wDsty; 811 WORD wWidth; 812 WORD wHeight; 813 DWORD dwData; 814 WORD wPitch; 815 DWORD dwColor; 816 } 817 GAL_COLOR_BITMAP_TO_SCREEN_XBLT, *PGAL_COLOR_BITMAP_TO_SCREEN_XBLT; 818 819 /* 820 * #define GALFN_MONO_BITMAP_TO_SCREEN_BLT 821 */ 822 typedef struct __GAL_MONO_BITMAP_TO_SCREEN_BLT 823 { 824 GAL_HEADER WORD wSrcx; 825 WORD wSrcy; 826 WORD wDstx; 827 WORD wDsty; 828 WORD wWidth; 829 WORD wHeight; 830 DWORD dwData; 831 WORD wPitch; 832 } 833 GAL_MONO_BITMAP_TO_SCREEN_BLT, *PGAL_MONO_BITMAP_TO_SCREEN_BLT; 834 835 /* 836 * #define GALFN_TEXT_BLT 837 */ 838 typedef struct __GAL_TEXT_BLT 839 { 840 GAL_HEADER WORD wDstx; 841 WORD wDsty; 842 WORD wWidth; 843 WORD wHeight; 844 DWORD dwData; 845 } 846 GAL_TEXT_BLT, *PGAL_TEXT_BLT; 847 848 /* 849 * * #define GALFN_VGAMODESWITCH 850 * * #define GALFN_VGACLEARCRTEXT 851 * * #define GALFN_VGASETPITCH 852 * * #define GALFN_VGARESTORE 853 * * #define GALFN_VGASAVE 854 * * #define GALFN_VGASETMODE 855 */ 856 857 typedef struct __GAL_VGAREGS 858 { 859 int xsize; 860 int ysize; 861 int hz; 862 int clock; 863 unsigned char miscOutput; 864 unsigned char stdCRTCregs[GFX_STD_CRTC_REGS]; 865 unsigned char extCRTCregs[GFX_EXT_CRTC_REGS]; 866 } 867 GAL_VGAREGS, *PGAL_VGAREGS; 868 869 typedef struct __GAL_VGAMODEDATA 870 { 871 GAL_HEADER DWORD dwFlags; /* Flags for this subfunction */ 872 GAL_VGAREGS sVgaRegs; /* CRT+SEQ+SEQ register data block */ 873 WORD wXres; 874 WORD wYres; 875 WORD wBpp; 876 WORD wRefresh; 877 } 878 GAL_VGAMODEDATA, *PGAL_VGAMODEDATA; 879 880 typedef struct __GAL_VGATESTPCI 881 { 882 GAL_HEADER SWORD softvga; 883 } 884 GAL_VGATESTPCI, *PGAL_VGATESTPCI; 885 886 typedef struct __GAL_VGAGETPCICOMMAND 887 { 888 GAL_HEADER unsigned char value; 889 } 890 GAL_VGAGETPCICOMMAND, *PGAL_VGAGETPCICOMMAND; 891 892 typedef struct __GAL_VGASEQRESET 893 { 894 GAL_HEADER SWORD reset; 895 SWORD statusok; 896 } 897 GAL_VGASEQRESET, *PGAL_VGASEQRESET; 898 899 typedef struct __GAL_VGASETGRAPHICSBITS 900 { 901 GAL_HEADER SWORD statusok; 902 } 903 GAL_VGASETGRAPHICSBITS, *PGAL_VGASETGRAPHICSBITS; 904 905 /******** Panel Support functions *********************/ 906 /* 907 * #define GALFN_PNLSETPARAMS 908 * #define GALFN_PNLGETPARAMS 909 * #define GALFN_PNLINITPANEL 910 * #define GALFN_PNLSAVESTATE 911 * #define GALFN_PNLRESTORESTATE 912 */ 913 typedef struct __GAL_PNLPARAMS 914 { 915 GAL_HEADER Pnl_PanelParams PanelParams; 916 } 917 GAL_PNLPARAMS, *PGAL_PNLPARAMS; 918 919 /* 920 * #define GALFN_PNLBIOSENABLE 921 * #define GALFN_PNLBIOSINFO 922 */ 923 typedef struct __GAL_PNLBIOS 924 { 925 GAL_HEADER int state; 926 int XRes; 927 int YRes; 928 int Bpp; 929 int Freq; 930 } 931 GAL_PNLBIOS, *PGAL_PNLBIOS; 932 933 typedef struct __GAL_ENABLEPANNING 934 { 935 GAL_HEADER int x; 936 int y; 937 } 938 GAL_ENABLEPANNING, *PGAL_ENABLEPANNING; 939 940 /* 941 * #define GALFN_SETCRTENABLE 942 * #define GALFN_GETCRTENABLE 943 */ 944 typedef struct __GAL_CRTENABLE 945 { 946 GAL_HEADER WORD wCrtEnable; 947 } 948 GAL_CRTENABLE, *PGAL_CRTENABLE; 949 950 #define GAL_TVSTATE 0x01 951 #define GAL_TVOUTPUT 0x02 952 #define GAL_TVFORMAT 0x04 953 #define GAL_TVRESOLUTION 0x08 954 #define GAL_TVALL 0x0F 955 /* 956 * #define GALFN_SETTVPARAMS 957 * #define GALFN_GETTVPARAMS 958 * #define GALFN_SETENABLE 959 * #define GALFN_GETENABLE 960 * #define GALFN_ISTVMODESUPPORTED 961 */ 962 typedef struct __GAL_TVPARAMS 963 { 964 GAL_HEADER DWORD dwFlags; 965 WORD wWidth; 966 WORD wHeight; 967 WORD wStandard; 968 WORD wType; 969 WORD wOutput; 970 WORD wResolution; 971 BOOLEAN bState; 972 973 } 974 GAL_TVPARAMS, *PGAL_TVPARAMS; 975 976 /* 977 * #define GALFN_SETTVTIMING 978 * #define GALFN_GETTVTIMING 979 */ 980 typedef struct __GAL_TVTIMING 981 { 982 GAL_HEADER DWORD dwFlags; /* not used currently */ 983 unsigned long HorzTim; 984 unsigned long HorzSync; 985 unsigned long VertSync; 986 unsigned long LineEnd; 987 unsigned long VertDownscale; 988 unsigned long HorzScaling; 989 unsigned long TimCtrl1; 990 unsigned long TimCtrl2; 991 unsigned long Subfreq; 992 unsigned long DispPos; 993 unsigned long DispSize; 994 unsigned long Debug; 995 unsigned long DacCtrl; 996 unsigned long DotClock; 997 } 998 GAL_TVTIMING, *PGAL_TVTIMING; 999 1000 /******** Video Support functions *********************/ 1001 1002 typedef struct __GAL_SETVIDEOENABLE 1003 { 1004 GAL_HEADER BOOLEAN enable; 1005 } 1006 GAL_VIDEOENABLE, *PGAL_VIDEOENABLE; 1007 1008 typedef struct __GAL_SETVIDEOFORMAT 1009 { 1010 GAL_HEADER int format; 1011 } 1012 GAL_VIDEOFORMAT, *PGAL_VIDEOFORMAT; 1013 1014 typedef struct __GAL_SETVIDEOSIZE 1015 { 1016 GAL_HEADER unsigned short width; 1017 unsigned short height; 1018 } 1019 GAL_VIDEOSIZE, *PGAL_VIDEOSIZE; 1020 1021 typedef struct __GAL_SETVIDEOOFFSET 1022 { 1023 GAL_HEADER unsigned long offset; 1024 } 1025 GAL_VIDEOOFFSET, *PGAL_VIDEOOFFSET; 1026 1027 typedef struct __GAL_SETVIDEOWINDOW 1028 { 1029 GAL_HEADER short x; 1030 short y; 1031 short w; 1032 short h; 1033 } 1034 GAL_VIDEOWINDOW, *PGAL_VIDEOWINDOW; 1035 1036 typedef struct __GAL_SETVIDEOSCALE 1037 { 1038 GAL_HEADER unsigned short srcw; 1039 unsigned short srch; 1040 unsigned short dstw; 1041 unsigned short dsth; 1042 } 1043 GAL_VIDEOSCALE, *PGAL_VIDEOSCALE; 1044 1045 typedef struct __GAL_SETVIDEOFILTER 1046 { 1047 GAL_HEADER int xfilter; 1048 int yfilter; 1049 } 1050 GAL_VIDEOFILTER, *PGAL_VIDEOFILTER; 1051 1052 typedef struct __GAL_SETVIDEOCOLORKEY 1053 { 1054 GAL_HEADER unsigned long key; 1055 unsigned long mask; 1056 int bluescreen; 1057 } 1058 GAL_VIDEOCOLORKEY, *PGAL_VIDEOCOLORKEY; 1059 1060 typedef struct __GAL_SETVIDEODOWNSCALEENABLE 1061 { 1062 GAL_HEADER int enable; 1063 } 1064 GAL_VIDEODOWNSCALEENABLE, *PGAL_VIDEODOWNSCALEENABLE; 1065 1066 typedef struct __GAL_SETVIDEODOWNSCALECONFIG 1067 { 1068 GAL_HEADER unsigned short type; 1069 unsigned short m; 1070 } 1071 GAL_VIDEODOWNSCALECONFIG, *PGAL_VIDEODOWNSCALECONFIG; 1072 1073 typedef struct __GAL_SETVIDEODOWNSCALECOEFF 1074 { 1075 GAL_HEADER unsigned short coef1; 1076 unsigned short coef2; 1077 unsigned short coef3; 1078 unsigned short coef4; 1079 } 1080 GAL_VIDEODOWNSCALECOEFF, *PGAL_VIDEODOWNSCALECOEFF; 1081 1082 #define GAL_VIDEO_SOURCE_MEMORY 0x0 1083 #define GAL_VIDEO_SOURCE_DVIP 0x1 1084 typedef struct __GAL_SETVIDEOSOURCE 1085 { 1086 GAL_HEADER int source; 1087 } 1088 GAL_VIDEOSOURCE, *PGAL_VIDEOSOURCE; 1089 1090 typedef struct __GAL_SETVIDEOINTERLACED 1091 { 1092 GAL_HEADER int enable; 1093 } 1094 GAL_SETVIDEOINTERLACED, *PGAL_SETVIDEOINTERLACED; 1095 1096 typedef struct __GAL_GETVIDEOINTERLACED 1097 { 1098 GAL_HEADER int interlaced; 1099 } 1100 GAL_GETVIDEOINTERLACED, *PGAL_GETVIDEOINTERLACED; 1101 1102 typedef struct __GAL_COLORSPACEYUV 1103 { 1104 GAL_HEADER int colorspace; 1105 } 1106 GAL_COLORSPACEYUV, *PGAL_COLORSPACEYUV; 1107 1108 typedef struct __GAL_SETGENLOCKENABLE 1109 { 1110 GAL_HEADER int enable; 1111 } 1112 GAL_GENLOCKENABLE, *PGAL_GENLOCKENABLE; 1113 1114 typedef struct __GAL_SETGENLOCKDELAY 1115 { 1116 GAL_HEADER int delay; 1117 } 1118 GAL_GENLOCKDELAY, *PGAL_GENLOCKDELAY; 1119 1120 typedef struct __GAL_SETTOPLINEINODD 1121 { 1122 GAL_HEADER int enable; 1123 } 1124 GAL_TOPLINEINODD, *PGAL_TOPLINEINODD; 1125 1126 typedef struct __GAL_SETVIDEOCURSOR 1127 { 1128 GAL_HEADER unsigned long key; 1129 unsigned long mask; 1130 unsigned short select_color2; 1131 unsigned long color1; 1132 unsigned long color2; 1133 } 1134 GAL_VIDEOCURSOR, *PGAL_VIDEOCURSOR; 1135 1136 typedef struct __GAL_READCRC 1137 { 1138 GAL_HEADER DWORD crc; 1139 } 1140 GAL_READCRC, *PGAL_READCRC; 1141 1142 typedef struct __GAL_READWINDOWCRC 1143 { 1144 GAL_HEADER SWORD source; 1145 WORD x; 1146 WORD y; 1147 WORD width; 1148 WORD height; 1149 SWORD crc32; 1150 DWORD crc; 1151 } 1152 GAL_READWINDOWCRC, *PGAL_READWINDOWCRC; 1153 1154 typedef struct __GAL_GETALPHASIZE 1155 { 1156 GAL_HEADER WORD * x; 1157 WORD *y; 1158 WORD *width; 1159 WORD *height; 1160 } 1161 GAL_ALPHASIZE, *PGAL_ALPHASIZE; 1162 1163 typedef struct __GAL_SETMACROVISIONENABLE 1164 { 1165 GAL_HEADER SWORD enable; 1166 } 1167 GAL_MACROVISIONENABLE, *PGAL_MACROVISIONENABLE; 1168 1169 typedef struct __GAL_SETVIDEOREQUEST 1170 { 1171 GAL_HEADER short x; 1172 short y; 1173 } 1174 GAL_VIDEOREQUEST, *PGAL_VIDEOREQUEST; 1175 1176 typedef struct __GAL_ALPHAENABLE 1177 { 1178 GAL_HEADER int enable; 1179 } 1180 GAL_ALPHAENABLE, *PGAL_ALPHAENABLE; 1181 1182 typedef struct __GAL_SETALPHAWINDOW 1183 { 1184 GAL_HEADER short x; 1185 short y; 1186 unsigned short width; 1187 unsigned short height; 1188 } 1189 GAL_ALPHAWINDOW, *PGAL_ALPHAWINDOW; 1190 1191 typedef struct __GAL_ALPHAVALUE 1192 { 1193 GAL_HEADER unsigned char alpha; 1194 char delta; 1195 } 1196 GAL_ALPHAVALUE, *PGAL_ALPHAVALUE; 1197 1198 typedef struct __GAL_ALPHAPRIORITY 1199 { 1200 GAL_HEADER int priority; 1201 } 1202 GAL_ALPHAPRIORITY, *PGAL_ALPHAPRIORITY; 1203 1204 typedef struct __GAL_ALPHACOLOR 1205 { 1206 GAL_HEADER unsigned long color; 1207 } 1208 GAL_ALPHACOLOR, *PGAL_ALPHACOLOR; 1209 1210 typedef struct __GAL_SETALPHAREGION 1211 { 1212 GAL_HEADER int region; 1213 } 1214 GAL_ALPHAREGION, *PGAL_ALPHAREGION; 1215 1216 typedef struct __GAL_SETVIDEOOUTSIDEALPHA 1217 { 1218 GAL_HEADER int enable; 1219 } 1220 GAL_VIDEOOUTSIDEALPHA, *PGAL_VIDEOOUTSIDEALPHA; 1221 1222 typedef struct __GAL_SETVIDEOPALETTE 1223 { 1224 GAL_HEADER int identity; 1225 unsigned long palette[256]; 1226 } 1227 GAL_VIDEOPALETTE, *PGAL_VIDEOPALETTE; 1228 1229 typedef struct __GAL_VIDEOINFO 1230 { 1231 GAL_HEADER int enable; 1232 int format; 1233 int filter; 1234 1235 unsigned long src_size; 1236 unsigned long dst_size; 1237 unsigned long line_size; 1238 unsigned long xclip; 1239 unsigned long offset; 1240 unsigned long scale; 1241 unsigned long position; 1242 1243 int color_key_src; 1244 unsigned long color_key; 1245 unsigned long color_key_mask; 1246 1247 int downscale_enable; 1248 1249 unsigned short downscale_type; 1250 1251 unsigned short downscale_mask; 1252 unsigned short downscale_coef1; 1253 unsigned short downscale_coef2; 1254 unsigned short downscale_coef3; 1255 unsigned short downscale_coef4; 1256 } 1257 GAL_VIDEOINFO, *PGAL_VIDEOINFO; 1258 1259 /* ICON related data strucures */ 1260 typedef struct __GAL_SETICONENABLE 1261 { 1262 GAL_HEADER SWORD enable; 1263 } 1264 GAL_ICONENABLE, *PGAL_ICONENABLE; 1265 1266 typedef struct __GAL_SETICONCOLORS 1267 { 1268 GAL_HEADER DWORD color0; 1269 DWORD color1; 1270 DWORD color2; 1271 } 1272 GAL_ICONCOLORS, *PGAL_ICONCOLORS; 1273 1274 typedef struct __GAL_SETICONPOSITION 1275 { 1276 GAL_HEADER DWORD memoffset; 1277 WORD xpos; 1278 } 1279 GAL_ICONPOSITION, *PGAL_ICONPOSITION; 1280 1281 typedef struct __GAL_SETICONSHAPE64 1282 { 1283 GAL_HEADER DWORD memoffset; 1284 DWORD *andmask; 1285 DWORD *xormask; 1286 DWORD lines; 1287 } 1288 GAL_ICONSHAPE64, *PGAL_ICONSHAPE64; 1289 1290 /* VIP related data strucures */ 1291 1292 typedef struct __GAL_SETVIPENABLE 1293 { 1294 GAL_HEADER SWORD enable; 1295 } 1296 GAL_VIPENABLE, *PGAL_VIPENABLE; 1297 1298 typedef struct __GAL_SETVIPCAPTURERUNMODE 1299 { 1300 GAL_HEADER SWORD mode; 1301 } 1302 GAL_VIPCAPTURERUNMODE, *PGAL_VIPCAPTURERUNMODE; 1303 1304 typedef struct __GAL_SETVIPBASE 1305 { 1306 GAL_HEADER DWORD even; 1307 DWORD odd; 1308 DWORD address; 1309 } 1310 GAL_VIPBASE, *PGAL_VIPBASE; 1311 1312 typedef struct __GAL_SETVIPPITCH 1313 { 1314 GAL_HEADER DWORD pitch; 1315 } 1316 GAL_VIPPITCH, *PGAL_VIPPITCH; 1317 1318 typedef struct __GAL_SETVIPMODE 1319 { 1320 GAL_HEADER SWORD mode; 1321 } 1322 GAL_VIPMODE, *PGAL_VIPMODE; 1323 1324 typedef struct __GAL_SETVIPBUS_RTH 1325 { 1326 GAL_HEADER SWORD enable; 1327 } 1328 GAL_VIPBUS_RTH, *PGAL_VIPBUS_RTH; 1329 1330 typedef struct __GAL_SETVIPLASTLINE 1331 { 1332 GAL_HEADER SWORD last_line; 1333 } 1334 GAL_VIPLASTLINE, *PGAL_VIPLASTLINE; 1335 1336 typedef struct __GAL_TESTVIPODDFIELD 1337 { 1338 GAL_HEADER SWORD status; 1339 } 1340 GAL_TESTVIPODDFIELD, *PGAL_TESTVIPODDFIELD; 1341 1342 typedef struct __GAL_TESTVIPBASESUPDATED 1343 { 1344 GAL_HEADER SWORD status; 1345 } 1346 GAL_TESTVIPBASESUPDATED, *PGAL_TESTVIPBASESUPDATED; 1347 1348 typedef struct __GAL_TESTVIPFIFOOVERFLOW 1349 { 1350 GAL_HEADER SWORD status; 1351 } 1352 GAL_TESTVIPOVERFLOW, *PGAL_TESTVIPOVERFLOW; 1353 1354 typedef struct __GAL_GETVIPLINE 1355 { 1356 GAL_HEADER SWORD status; 1357 } 1358 GAL_VIPLINE, *PGAL_VIPLINE; 1359 1360 /* VBI related data strucures */ 1361 1362 typedef struct __GAL_VBIENABLE 1363 { 1364 GAL_HEADER SWORD enable; 1365 } 1366 GAL_VBIENABLE, *PGAL_VBIENABLE; 1367 1368 typedef struct __GAL_VBIBASE 1369 { 1370 GAL_HEADER DWORD even; 1371 DWORD odd; 1372 DWORD address; 1373 } 1374 GAL_VBIBASE, *PGAL_VBIBASE; 1375 1376 typedef struct __GAL_VBIPITCH 1377 { 1378 GAL_HEADER DWORD pitch; 1379 } 1380 GAL_VBIPITCH, *PGAL_VBIPITCH; 1381 1382 typedef struct __GAL_VBIMODE 1383 { 1384 GAL_HEADER SWORD mode; 1385 } 1386 GAL_VBIMODE, *PGAL_VBIMODE; 1387 1388 typedef struct __GAL_SETVBIDIRECT 1389 { 1390 GAL_HEADER DWORD even_lines; 1391 DWORD odd_lines; 1392 } 1393 GAL_SETVBIDIRECT, *PGAL_SETVBIDIRECT; 1394 1395 typedef struct __GAL_GETVBIDIRECT 1396 { 1397 GAL_HEADER SWORD odd; 1398 DWORD direct_lines; 1399 } 1400 GAL_GETVBIDIRECT, *PGAL_GETVBIDIRECT; 1401 1402 typedef struct __GAL_VBIINTERRUPT 1403 { 1404 GAL_HEADER SWORD enable; 1405 } 1406 GAL_VBIINTERRUPT, *PGAL_VBIINTERRUPT; 1407 1408 /* Second generation rendering routines data structures */ 1409 1410 typedef struct __GAL_SETSTRIDE 1411 { 1412 GAL_HEADER WORD stride; 1413 } 1414 GAL_STRIDE, *PGAL_STRIDE; 1415 1416 typedef struct __GAL_SETPATTERNORIGIN 1417 { 1418 GAL_HEADER int x; 1419 int y; 1420 } 1421 GAL_PATTERNORIGIN, *PGAL_PATTERNORIGIN; 1422 1423 typedef struct __GAL_SETSOURCETRANSPARENCY 1424 { 1425 GAL_HEADER DWORD color; 1426 DWORD mask; 1427 } 1428 GAL_SOURCETRANSPARENCY, *PGAL_SOURCETRANSPARENCY; 1429 1430 typedef struct __GAL_GFX2SETALPHAMODE 1431 { 1432 GAL_HEADER SWORD mode; 1433 } 1434 GAL_GFX2ALPHAMODE, *PGAL_GFX2ALPHAMODE; 1435 1436 typedef struct __GAL_GFX2SETALPHAVALUE 1437 { 1438 GAL_HEADER CHAR value; 1439 } 1440 GAL_GFX2ALPHAVALUE, *PGAL_GFX2ALPHAVALUE; 1441 1442 typedef struct __GAL_GFX2PATTERNFILL 1443 { 1444 GAL_HEADER DWORD dstoffset; 1445 WORD width; 1446 WORD height; 1447 } 1448 GAL_GFX2PATTERNFILL, *PGAL_GFX2PATTERNFILL; 1449 1450 typedef struct __GAL_GFX2COLORPATTERNFILL 1451 { 1452 GAL_HEADER DWORD dstoffset; 1453 WORD width; 1454 WORD height; 1455 DWORD pattern; 1456 } 1457 GAL_GFX2COLORPATTERNFILL, *PGAL_GFX2COLORPATTERNFILL; 1458 1459 typedef struct __GAL_GFX2SCREENTOSCREENBLT 1460 { 1461 GAL_HEADER DWORD srcoffset; 1462 DWORD dstoffset; 1463 WORD width; 1464 WORD height; 1465 SWORD flags; 1466 } 1467 GAL_GFX2SCREENTOSCREENBLT, *PGAL_GFX2SCREENTOSCREENBLT; 1468 1469 typedef struct __GAL_GFX2MONOEXPANDBLT 1470 { 1471 GAL_HEADER unsigned long srcbase; 1472 WORD srcx; 1473 WORD srcy; 1474 DWORD dstoffset; 1475 WORD width; 1476 WORD height; 1477 WORD byte_packed; 1478 } 1479 GAL_GFX2MONOEXPANDBLT, *PGAL_GFX2MONOEXPANDBLT; 1480 1481 typedef struct __GAL_GFX2COLORBMPTOSCRBLT 1482 { 1483 GAL_HEADER WORD srcx; 1484 WORD srcy; 1485 DWORD dstoffset; 1486 WORD width; 1487 WORD height; 1488 DWORD data; 1489 WORD pitch; 1490 } 1491 GAL_GFX2COLORBMPTOSCRBLT, *PGAL_GFX2COLORBMPTOSCRBLT; 1492 1493 typedef struct __GAL_GFX2MONOBMPTOSCRBLT 1494 { 1495 GAL_HEADER WORD srcbase; 1496 WORD srcx; 1497 WORD srcy; 1498 DWORD dstoffset; 1499 WORD width; 1500 WORD height; 1501 DWORD data; 1502 WORD pitch; 1503 } 1504 GAL_GFX2MONOBMPTOSCRBLT, *PGAL_GFX2MONOBMPTOSCRBLT; 1505 1506 typedef struct __GAL_GFX2TEXTBLT 1507 { 1508 GAL_HEADER DWORD dstoffset; 1509 WORD width; 1510 WORD height; 1511 DWORD data; 1512 } 1513 GAL_GFX2TEXTBLT, *PGAL_GFX2TEXTBLT; 1514 1515 typedef struct __GAL_GFX2BRESENHAMLINE 1516 { 1517 GAL_HEADER DWORD dstoffset; 1518 WORD length; 1519 WORD initerr; 1520 WORD axialerr; 1521 WORD diagerr; 1522 WORD flags; 1523 } 1524 GAL_GFX2BRESENHAMLINE, *PGAL_GFX2BRESENHAMLINE; 1525 1526 typedef struct __GAL_GFX2SYNCTOVBLANK 1527 { 1528 GAL_HEADER} 1529 GAL_GFX2SYNCTOVBLANK, *PGAL_GFX2SYNCTOVBLANK; 1530 1531 /* 1532 GALFN_SETVIDEOYUVPITCH 1533 */ 1534 typedef struct _GAL_SETVIDEOYUVPITCH 1535 { 1536 GAL_HEADER unsigned long y_pitch; 1537 unsigned long uv_pitch; 1538 } 1539 GAL_VIDEOYUVPITCH, *PGAL_VIDEOYUVPITCH; 1540 1541 /* 1542 GALFN_SETVIDEOYUVOFFSETS 1543 */ 1544 typedef struct _GAL_VIDEOYUVOFFSETS 1545 { 1546 GAL_HEADER unsigned long dwYoffset; 1547 unsigned long dwUoffset; 1548 unsigned long dwVoffset; 1549 } 1550 GAL_VIDEOYUVOFFSETS, *PGAL_VIDEOYUVOFFSETS; 1551 1552 typedef struct __GAL_SETVIDEOLEFTCROP 1553 { 1554 GAL_HEADER WORD x; 1555 SWORD status; 1556 } 1557 GAL_VIDEOLEFTCROP, *PGAL_VIDEOLEFTCROP; 1558 1559 typedef struct __GAL_SETVIDEOVERTICALDOWNSCALE 1560 { 1561 GAL_HEADER WORD srch; 1562 WORD dsth; 1563 SWORD status; 1564 } 1565 GAL_VIDEOVERTICALDOWNSCALE, *PGAL_VIDEOVERTICALDOWNSCALE; 1566 1567 typedef struct __GAL_VBISOURCE 1568 { 1569 GAL_HEADER VideoSourceType source; 1570 SWORD status; 1571 } 1572 GAL_VBISOURCE, *PGAL_VBISOURCE; 1573 1574 typedef struct __GAL_VBILINES 1575 { 1576 GAL_HEADER DWORD even; 1577 DWORD odd; 1578 SWORD status; 1579 DWORD lines; 1580 } 1581 GAL_VBILINES, *PGAL_VBILINES; 1582 1583 typedef struct __GAL_VBITOTAL 1584 { 1585 GAL_HEADER DWORD even; 1586 DWORD odd; 1587 SWORD status; 1588 DWORD total; 1589 } 1590 GAL_VBITOTAL, *PGAL_VBITOTAL; 1591 1592 typedef struct __GAL_VSCALEROFFSET 1593 { 1594 GAL_HEADER char offset; 1595 SWORD status; 1596 } 1597 GAL_VSCALEROFFSET, *PGAL_VSCALEROFFSET; 1598 1599 /* MSR data strucures */ 1600 1601 typedef struct __GAL_IDMSRDEVICE 1602 { 1603 GAL_HEADER MSR * pDev; 1604 DWORD address; 1605 DEV_STATUS dev_status; 1606 } 1607 GAL_IDMSRDEVICE, *PGAL_IDMSRDEVICE; 1608 1609 typedef struct __GAL_GETMSRDEVADDRESS 1610 { 1611 GAL_HEADER WORD device; 1612 unsigned long address; 1613 DEV_STATUS dev_status; 1614 } 1615 GAL_GETMSRDEVADDRESS, *PGAL_GETMSRDEVADDRESS; 1616 1617 typedef struct __GAL_GETMBUSIDATADDRESS 1618 { 1619 GAL_HEADER unsigned int device; 1620 unsigned long address; 1621 DEV_STATUS dev_status; 1622 } 1623 GAL_GETMBUSIDATADDRESS, *PGAL_GETMBUSIDATADDRESS; 1624 1625 /* Gal device function's prototye declarations */ 1626 1627 /** Init **********************************************************/ 1628 BOOLEAN Gal_initialize_interface(void); 1629 BOOLEAN Gal_cleanup_interface(void); 1630 BOOLEAN Gal_get_adapter_info(PGAL_ADAPTERINFO pAdapterInfo); 1631 BOOLEAN Gal_set_softvga_state(BOOLEAN); 1632 BOOLEAN Gal_get_softvga_state(int *bState); 1633 BOOLEAN Gal_set_crt_enable(int); 1634 BOOLEAN Gal_wait_until_idle(void); 1635 BOOLEAN Gal_wait_vertical_blank(void); 1636 BOOLEAN Gal_write_register(int type, unsigned long offset, 1637 unsigned long value, int size); 1638 1639 BOOLEAN Gal_read_register(int type, unsigned long offset, 1640 unsigned long *value, int size); 1641 /** Display Engine ******************************************************/ 1642 BOOLEAN Gal_is_display_mode_supported(int xres, int yres, int bpp, int hz, 1643 int *supported); 1644 BOOLEAN Gal_set_display_mode(int xres, int yres, int bpp, int hz); 1645 BOOLEAN Gal_get_display_mode(int *xres, int *yres, int *bpp, int *hz); 1646 BOOLEAN Gal_set_bpp(unsigned short bpp); 1647 BOOLEAN Gal_set_display_bpp(unsigned short bpp); 1648 BOOLEAN Gal_get_display_bpp(unsigned short *bpp); 1649 BOOLEAN Gal_set_display_pitch(unsigned short pitch); 1650 BOOLEAN Gal_get_display_pitch(unsigned short *pitch); 1651 BOOLEAN Gal_set_display_offset(unsigned long offset); 1652 BOOLEAN Gal_get_display_offset(unsigned long *offset); 1653 BOOLEAN Gal_get_refreshrate_from_dotclock(int xres, int yres, int bpp, 1654 int *hz, unsigned long frequency); 1655 BOOLEAN Gal_get_display_timing(PGAL_DISPLAYTIMING pDisplayTiming); 1656 BOOLEAN Gal_set_display_timing(PGAL_DISPLAYTIMING pDisplayTiming); 1657 BOOLEAN Gal_set_fixed_timings(int pnlXres, int pnlYres, int totXres, 1658 int totYres, int bpp); 1659 BOOLEAN Gal_set_display_palette_entry(unsigned long index, 1660 unsigned long palette); 1661 BOOLEAN Gal_get_display_palette_entry(unsigned long index, 1662 unsigned long *palette); 1663 BOOLEAN Gal_set_display_palette(PGAL_PALETTE); 1664 BOOLEAN Gal_get_display_palette(PGAL_PALETTE); 1665 BOOLEAN Gal_set_cursor_enable(int enable); 1666 BOOLEAN Gal_get_cursor_enable(int *enable); 1667 BOOLEAN Gal_set_cursor_colors(unsigned long bkcolor, unsigned long fgcolor); 1668 BOOLEAN Gal_get_cursor_colors(unsigned long *bkcolor, unsigned long *fgcolor); 1669 BOOLEAN Gal_set_cursor_position(unsigned long memoffset, 1670 unsigned short xpos, unsigned short ypos, 1671 unsigned short xhotspot, 1672 unsigned short yhotspot); 1673 BOOLEAN Gal_get_cursor_position(unsigned long *memoffset, 1674 unsigned short *xpos, unsigned short *ypos, 1675 unsigned short *xhotspot, 1676 unsigned short *yhotspot); 1677 BOOLEAN Gal_set_cursor_shape32(unsigned long memoffset, 1678 unsigned long *andmask, 1679 unsigned long *xormask); 1680 1681 BOOLEAN Gal_set_cursor_shape64(unsigned long memoffset, 1682 unsigned long *andmask, 1683 unsigned long *xormask); 1684 1685 /** Render ********************************************************/ 1686 BOOLEAN Gal_set_solid_pattern(unsigned long color); 1687 1688 BOOLEAN Gal_set_mono_source(unsigned long bgcolor, unsigned long fgcolor, 1689 unsigned char transparency); 1690 BOOLEAN Gal_set_mono_pattern(unsigned long bgcolor, unsigned long fgcolor, 1691 unsigned long data0, unsigned long data1, 1692 unsigned char transparency); 1693 1694 BOOLEAN Gal_set_raster_operation(unsigned char rop); 1695 1696 BOOLEAN Gal_pattern_fill(unsigned short x, unsigned short y, 1697 unsigned short width, unsigned short height); 1698 1699 BOOLEAN Gal_set_solid_source(unsigned long color); 1700 1701 BOOLEAN Gal_screen_to_screen_blt(unsigned short srcx, unsigned short srcy, 1702 unsigned short dstx, unsigned short dsty, 1703 unsigned short width, unsigned short height); 1704 1705 BOOLEAN Gal_screen_to_screen_xblt(unsigned short srcx, 1706 unsigned short srcy, 1707 unsigned short dstx, 1708 unsigned short dsty, 1709 unsigned short width, 1710 unsigned short height, unsigned long color); 1711 1712 BOOLEAN Gal_bresenham_line(unsigned short x, unsigned short y, 1713 unsigned short length, unsigned short initerr, 1714 unsigned short axialerr, unsigned short diagerr, 1715 unsigned short flags); 1716 1717 BOOLEAN Gal_color_pattern_fill(unsigned short x, unsigned short y, 1718 unsigned short width, unsigned short height, 1719 unsigned long pattern); 1720 1721 BOOLEAN Gal_color_bitmap_to_screen_blt(unsigned short srcx, 1722 unsigned short srcy, 1723 unsigned short dstx, 1724 unsigned short dsty, 1725 unsigned short width, 1726 unsigned short height, 1727 unsigned long data, long pitch); 1728 1729 BOOLEAN Gal_color_bitmap_to_screen_xblt(unsigned short srcx, 1730 unsigned short srcy, 1731 unsigned short dstx, 1732 unsigned short dsty, 1733 unsigned short width, 1734 unsigned short height, 1735 unsigned long data, long pitch, 1736 unsigned long color); 1737 1738 BOOLEAN Gal_mono_bitmap_to_screen_blt(unsigned short srcx, 1739 unsigned short srcy, 1740 unsigned short dstx, 1741 unsigned short dsty, 1742 unsigned short width, 1743 unsigned short height, 1744 unsigned long data, short pitch); 1745 1746 BOOLEAN Gal_text_blt(unsigned short dstx, unsigned short dsty, 1747 unsigned short width, unsigned short height, 1748 unsigned long data); 1749 1750 /** Compression*******************************************************/ 1751 BOOLEAN Gal_set_compression_enable(BOOLEAN); 1752 BOOLEAN Gal_get_compression_enable(int *flag); 1753 BOOLEAN Gal_set_compression_parameters(unsigned long flags, 1754 unsigned long offset, 1755 unsigned short pitch, 1756 unsigned short size); 1757 BOOLEAN Gal_get_compression_parameters(unsigned long flags, 1758 unsigned long *offset, 1759 unsigned short *pitch, 1760 unsigned short *size); 1761 1762 /** VGA **********************************************************/ 1763 BOOLEAN Gal_vga_mode_switch(int active); 1764 BOOLEAN Gal_vga_clear_extended(void); 1765 BOOLEAN Gal_vga_pitch(PGAL_VGAMODEDATA pvregs, unsigned short pitch); 1766 BOOLEAN Gal_vga_restore(PGAL_VGAMODEDATA pvregs); 1767 BOOLEAN Gal_vga_save(PGAL_VGAMODEDATA pvregs); 1768 BOOLEAN Gal_vga_mode(PGAL_VGAMODEDATA pvregs); 1769 BOOLEAN Gal_vga_test_pci(int *softvga); 1770 BOOLEAN Gal_vga_get_pci_command(unsigned char *value); 1771 BOOLEAN Gal_vga_seq_reset(int reset); 1772 BOOLEAN Gal_vga_set_graphics_bits(void); 1773 1774 /** Panel **********************************************************/ 1775 BOOLEAN Gal_pnl_set_params(unsigned long flags, PPnl_PanelParams pParam); 1776 BOOLEAN Gal_pnl_get_params(unsigned long flags, PPnl_PanelParams pParam); 1777 BOOLEAN Gal_pnl_init(PPnl_PanelParams pParam); 1778 BOOLEAN Gal_pnl_save(void); 1779 BOOLEAN Gal_pnl_restore(void); 1780 BOOLEAN Gal_pnl_powerup(void); 1781 BOOLEAN Gal_pnl_powerdown(void); 1782 BOOLEAN Gal_enable_panning(int x, int y); 1783 BOOLEAN Gal_pnl_enabled_in_bios(int *state); 1784 BOOLEAN Gal_pnl_info_from_bios(int *xres, int *yres, int *bpp, int *hz); 1785 1786 /** TV **********************************************************/ 1787 BOOLEAN Gal_tv_set_params(unsigned long flags, PGAL_TVPARAMS pTV); 1788 BOOLEAN Gal_tv_get_params(unsigned long flags, PGAL_TVPARAMS pTV); 1789 BOOLEAN Gal_tv_set_timings(unsigned long flags, PGAL_TVTIMING pTV); 1790 BOOLEAN Gal_tv_get_timings(unsigned long flags, PGAL_TVTIMING pTV); 1791 BOOLEAN Gal_set_tv_enable(int bState); 1792 BOOLEAN Gal_get_tv_enable(unsigned int *bState); 1793 BOOLEAN Gal_is_tv_mode_supported(unsigned long flags, PGAL_TVPARAMS pTV, 1794 int *bState); 1795 1796 /** Video **********************************************************/ 1797 BOOLEAN Gal_set_video_enable(int enable); 1798 BOOLEAN Gal_set_video_format(int format); 1799 BOOLEAN Gal_set_video_size(unsigned short width, unsigned short height); 1800 BOOLEAN Gal_set_video_offset(unsigned long offset); 1801 BOOLEAN Gal_set_video_yuv_offsets(unsigned long yoffset, 1802 unsigned long uoffset, 1803 unsigned long voffset); 1804 BOOLEAN Gal_set_video_yuv_pitch(unsigned long ypitch, unsigned long uvpitch); 1805 1806 BOOLEAN Gal_set_video_window(short x, short y, short w, short h); 1807 BOOLEAN Gal_set_video_scale(unsigned short srcw, unsigned short srch, 1808 unsigned short dstw, unsigned short dsth); 1809 BOOLEAN Gal_set_video_filter(int xfilter, int yfilter); 1810 BOOLEAN Gal_set_video_color_key(unsigned long key, 1811 unsigned long mask, int bluescreen); 1812 BOOLEAN Gal_set_video_downscale_enable(int enable); 1813 BOOLEAN Gal_set_video_downscale_config(unsigned short type, unsigned short m); 1814 BOOLEAN Gal_set_video_downscale_coefficients(unsigned short coef1, 1815 unsigned short coef2, 1816 unsigned short coef3, 1817 unsigned short coef4); 1818 BOOLEAN Gal_set_video_source(int source); 1819 BOOLEAN Gal_set_video_interlaced(int enable); 1820 BOOLEAN Gal_get_video_interlaced(int *interlaced); 1821 BOOLEAN Gal_set_color_space_YUV(int enable); 1822 BOOLEAN Gal_get_color_space_YUV(int *colorspace); 1823 BOOLEAN Gal_set_video_cursor(unsigned long key, 1824 unsigned long mask, 1825 unsigned short select_color2, 1826 unsigned long color1, unsigned long color2); 1827 BOOLEAN Gal_get_video_cursor(unsigned long *key, 1828 unsigned long *mask, 1829 unsigned short *select_color2, 1830 unsigned long *color1, unsigned long *color2); 1831 BOOLEAN Gal_set_video_request(short x, short y); 1832 BOOLEAN Gal_set_alpha_enable(int enable); 1833 BOOLEAN Gal_get_alpha_enable(int *enable); 1834 BOOLEAN Gal_get_alpha_size(unsigned short *x, unsigned short *y, 1835 unsigned short *width, unsigned short *height); 1836 1837 BOOLEAN Gal_set_video_request(short x, short y); 1838 BOOLEAN Gal_set_alpha_window(short x, short y, 1839 unsigned short width, unsigned short height); 1840 BOOLEAN Gal_set_alpha_value(unsigned char alpha, char delta); 1841 BOOLEAN Gal_get_alpha_value(unsigned char *alpha, char *delta); 1842 BOOLEAN Gal_set_alpha_priority(int priority); 1843 BOOLEAN Gal_get_alpha_priority(int *priority); 1844 BOOLEAN Gal_set_alpha_color(unsigned long color); 1845 BOOLEAN Gal_get_alpha_color(unsigned long *color); 1846 BOOLEAN Gal_select_alpha_region(int region); 1847 BOOLEAN Gal_set_video_outside_alpha(int enable); 1848 BOOLEAN Gal_set_video_palette(unsigned long *palette); 1849 1850 /* Icon related prototypes */ 1851 1852 BOOLEAN Gal_set_icon_enable(int enable); 1853 BOOLEAN Gal_set_icon_colors(unsigned long color0, unsigned long color1, 1854 unsigned long color2); 1855 1856 BOOLEAN Gal_set_icon_position(unsigned long memoffset, unsigned short xpos); 1857 BOOLEAN Gal_set_icon_shape64(unsigned long memoffset, unsigned long *andmask, 1858 unsigned long *xormask, unsigned int lines); 1859 1860 /* Icon related prototypes */ 1861 1862 BOOLEAN Gal_set_vip_enable(int enable); 1863 BOOLEAN Gal_get_vip_enable(int *enable); 1864 BOOLEAN Gal_set_vip_capture_run_mode(int mode); 1865 BOOLEAN Gal_set_vip_base(unsigned long even, unsigned long odd); 1866 BOOLEAN Gal_get_vip_base(unsigned long *address, int odd); 1867 BOOLEAN Gal_set_vip_pitch(unsigned long pitch); 1868 BOOLEAN Gal_get_vip_pitch(unsigned long *pitch); 1869 BOOLEAN Gal_set_vip_mode(int mode); 1870 BOOLEAN Gal_get_vip_mode(int *mode); 1871 BOOLEAN Gal_set_vbi_enable(int enable); 1872 BOOLEAN Gal_get_vbi_enable(int *enable); 1873 BOOLEAN Gal_set_vbi_mode(int mode); 1874 BOOLEAN Gal_get_vbi_mode(int *mode); 1875 BOOLEAN Gal_set_vbi_base(unsigned long even, unsigned long odd); 1876 BOOLEAN Gal_get_vbi_base(unsigned long *address, int odd); 1877 BOOLEAN Gal_set_vbi_pitch(unsigned long pitch); 1878 BOOLEAN Gal_get_vbi_pitch(unsigned long *pitch); 1879 BOOLEAN Gal_set_vbi_direct(unsigned long even_lines, unsigned long odd_lines); 1880 BOOLEAN Gal_get_vbi_direct(int odd, unsigned long *vbi_direct); 1881 BOOLEAN Gal_set_vbi_interrupt(int enable); 1882 BOOLEAN Gal_get_vbi_interrupt(int *enable); 1883 BOOLEAN Gal_set_vip_bus_request_threshold_high(int enable); 1884 BOOLEAN Gal_get_vip_bus_request_threshold_high(int *enable); 1885 BOOLEAN Gal_set_vip_last_line(int last_line); 1886 BOOLEAN Gal_test_vip_odd_field(int *status); 1887 BOOLEAN Gal_test_vip_bases_updated(int *status); 1888 BOOLEAN Gal_test_vip_fifo_overflow(int *status); 1889 BOOLEAN Gal_get_vip_line(int *status); 1890 1891 /* Second generation rendering routines */ 1892 1893 BOOLEAN Gal_set_source_stride(unsigned short stride); 1894 BOOLEAN Gal_set_destination_stride(unsigned short stride); 1895 BOOLEAN Gal_set_source_transparency(unsigned long color, unsigned long mask); 1896 BOOLEAN Gal2_set_source_transparency(unsigned long color, unsigned long mask); 1897 BOOLEAN Gal2_set_source_stride(unsigned short stride); 1898 BOOLEAN Gal2_set_destination_stride(unsigned short stride); 1899 BOOLEAN Gal2_set_pattern_origin(int x, int y); 1900 BOOLEAN Gal2_set_alpha_mode(int mode); 1901 BOOLEAN Gal2_set_alpha_value(unsigned char value); 1902 BOOLEAN Gal2_pattern_fill(unsigned long dstoffset, unsigned short width, 1903 unsigned short height); 1904 BOOLEAN Gal2_color_pattern_fill(unsigned long dstoffset, unsigned short width, 1905 unsigned short height, unsigned long pattern); 1906 BOOLEAN Gal2_screen_to_screen_blt(unsigned long srcoffset, 1907 unsigned long dstoffset, 1908 unsigned short width, unsigned short height, 1909 int flags); 1910 1911 BOOLEAN Gal2_mono_expand_blt(unsigned long srcbase, unsigned short srcx, 1912 unsigned short srcy, unsigned long dstoffset, 1913 unsigned short width, unsigned short height, 1914 int byte_packed); 1915 1916 BOOLEAN Gal2_color_bitmap_to_screen_blt(unsigned short srcx, 1917 unsigned short srcy, 1918 unsigned long dstoffset, 1919 unsigned short width, 1920 unsigned short height, 1921 unsigned char *data, 1922 unsigned short pitch); 1923 BOOLEAN Gal2_mono_bitmap_to_screen_blt(unsigned short srcx, 1924 unsigned short srcy, 1925 unsigned long dstoffset, 1926 unsigned short width, 1927 unsigned short height, 1928 unsigned char *data, 1929 unsigned short pitch); 1930 1931 BOOLEAN Gal2_text_blt(unsigned long dstoffset, 1932 unsigned short width, 1933 unsigned short height, unsigned long data); 1934 BOOLEAN Gal2_bresenham_line(unsigned long dstoffset, 1935 unsigned short length, unsigned short initerr, 1936 unsigned short axialerr, unsigned short diagerr, 1937 unsigned short flags); 1938 BOOLEAN Gal2_sync_to_vblank(void); 1939 1940 /* Video routines */ 1941 1942 BOOLEAN Gal_set_video_yuv_pitch(unsigned long ypitch, unsigned long uvpitch); 1943 BOOLEAN Gal_get_video_yuv_pitch(unsigned long *ypitch, 1944 unsigned long *uvpitch); 1945 1946 BOOLEAN Gal_set_video_yuv_offsets(unsigned long yoffset, 1947 unsigned long uoffset, 1948 unsigned long voffset); 1949 BOOLEAN Gal_get_video_yuv_offsets(unsigned long *yoffset, 1950 unsigned long *uoffset, 1951 unsigned long *voffset); 1952 1953 BOOLEAN Gal_set_video_left_crop(unsigned short x); 1954 BOOLEAN Gal_set_video_vertical_downscale(unsigned short srch, 1955 unsigned short dsth); 1956 1957 BOOLEAN Gal_set_vbi_source(VbiSourceType source); 1958 BOOLEAN Gal_get_vbi_source(VbiSourceType * source); 1959 1960 BOOLEAN Gal_set_vbi_lines(unsigned long even, unsigned long odd); 1961 BOOLEAN Gal_get_vbi_lines(int odd, unsigned long *lines); 1962 1963 BOOLEAN Gal_set_vbi_total(unsigned long even, unsigned long odd); 1964 BOOLEAN Gal_get_vbi_total(int odd, unsigned long *total); 1965 1966 BOOLEAN Gal_set_vertical_scaler_offset(char offset); 1967 BOOLEAN Gal_get_vertical_scaler_offset(char *offset); 1968 BOOLEAN Gal_get_genlock_enable(int *enable); 1969 BOOLEAN Gal_set_genlock_enable(int flags); 1970 BOOLEAN Gal_get_genlock_delay(unsigned long *delay); 1971 BOOLEAN Gal_set_genlock_delay(unsigned long delay); 1972 BOOLEAN Gal_set_top_line_in_odd(int enable); 1973 1974 BOOLEAN Gal_read_crc(unsigned long *crc); 1975 BOOLEAN Gal_read_window_crc(int source, unsigned short x, unsigned short y, 1976 unsigned short width, unsigned short height, 1977 int crc32, unsigned long *crc); 1978 1979 BOOLEAN Gal_set_macrovision_enable(int enable); 1980 BOOLEAN Gal_get_macrovision_enable(int *enable); 1981 1982 /* MSR routines */ 1983 1984 BOOLEAN Gal_id_msr_dev_address(MSR * pDev, unsigned long address); 1985 BOOLEAN Gal_get_msr_dev_address(unsigned int device, unsigned long *address); 1986 1987 #endif 1988