📄 nsc_galproto.h
字号:
/* * $Workfile: nsc_galproto.h $ * $Revision: 1.3 $ * * File Contents: This file contains the main functions of the Geode * frame buffer device drivers GAL function prototypes and * data structures. * * Project: Geode Frame buffer device driver * *//* NSC_LIC_ALTERNATIVE_PREAMBLE * * Revision 1.0 * * National Semiconductor Alternative GPL-BSD License * * National Semiconductor Corporation licenses this software * ("Software"): * * National Xfree frame buffer driver * * under one of the two following licenses, depending on how the * Software is received by the Licensee. * * If this Software is received as part of the Linux Framebuffer or * other GPL licensed software, then the GPL license designated * NSC_LIC_GPL applies to this Software; in all other circumstances * then the BSD-style license designated NSC_LIC_BSD shall apply. * * END_NSC_LIC_ALTERNATIVE_PREAMBLE *//* NSC_LIC_BSD * * National Semiconductor Corporation Open Source License for * * National Xfree frame buffer driver * * (BSD License with Export Notice) * * Copyright (c) 1999-2001 * National Semiconductor Corporation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * * * Neither the name of the National Semiconductor Corporation nor * the names of its contributors may be used to endorse or promote * products derived from this software without specific prior * written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * NATIONAL SEMICONDUCTOR CORPORATION OR CONTRIBUTORS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE, * INTELLECTUAL PROPERTY INFRINGEMENT, OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY * OF SUCH DAMAGE. * * EXPORT LAWS: THIS LICENSE ADDS NO RESTRICTIONS TO THE EXPORT LAWS OF * YOUR JURISDICTION. It is licensee's responsibility to comply with * any export regulations applicable in licensee's jurisdiction. Under * CURRENT (2001) U.S. export regulations this software * is eligible for export from the U.S. and can be downloaded by or * otherwise exported or reexported worldwide EXCEPT to U.S. embargoed * destinations which include Cuba, Iraq, Libya, North Korea, Iran, * Syria, Sudan, Afghanistan and any other country to which the U.S. * has embargoed goods and services. * * END_NSC_LIC_BSD *//* NSC_LIC_GPL * * National Semiconductor Corporation Gnu General Public License for * * National Xfree frame buffer driver * * (GPL License with Export Notice) * * Copyright (c) 1999-2001 * National Semiconductor Corporation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted under the terms of the GNU General * Public License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version * * In addition to the terms of the GNU General Public License, neither * the name of the National Semiconductor Corporation nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * NATIONAL SEMICONDUCTOR CORPORATION OR CONTRIBUTORS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE, * INTELLECTUAL PROPERTY INFRINGEMENT, OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY * OF SUCH DAMAGE. See the GNU General Public License for more details. * * EXPORT LAWS: THIS LICENSE ADDS NO RESTRICTIONS TO THE EXPORT LAWS OF * YOUR JURISDICTION. It is licensee's responsibility to comply with * any export regulations applicable in licensee's jurisdiction. Under * CURRENT (2001) U.S. export regulations this software * is eligible for export from the U.S. and can be downloaded by or * otherwise exported or reexported worldwide EXCEPT to U.S. embargoed * destinations which include Cuba, Iraq, Libya, North Korea, Iran, * Syria, Sudan, Afghanistan and any other country to which the U.S. * has embargoed goods and services. * * You should have received a copy of the GNU General Public License * along with this file; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * END_NSC_LIC_GPL */#ifndef __GALPROTO_SEP_20_2000#define __GALPROTO_SEP_20_2000/* durango reg definitions and type's */#include <gfx_type.h>#include <gfx_regs.h>/* Panel related definition */#include <pnl_defs.h>typedef int SWORD;typedef unsigned int DWORD;typedef unsigned short WORD;typedef unsigned char CHAR;typedef unsigned char BOOLEAN;typedef unsigned int *PDWORD;/***************************************//* Applications/User mode drivers use this ioctl to * send a graphics device request to the frame buffer * driver */#define FBIOGAL_API 0x4700/* * Applications must sign the I/O packet with this value */#define FBGAL_SIGNATURE 0xC0C0BABE/* * Version is a 16:16 fixed value * Current version is 1.0000 */#define FBGAL_VERSION 0x10000/* * Definitions for Graphics Subfunctions * */typedef enum GALFN_CODES{/* General Adapter level functions */ GALFN_GETADAPTERINFO = 0, GALFN_SETSOFTVGASTATE, GALFN_GETSOFTVGASTATE, GALFN_WAITUNTILIDLE, GALFN_WAITVERTICALBLANK, GALFN_SETCRTENABLE, GALFN_WRITEREG, GALFN_READREG,/* Change/Get Display hardware state */ GALFN_ISDISPLAYMODESUPPORTED, GALFN_SETDISPLAYMODE, GALFN_GETDISPLAYMODE, GALFN_SETBPP, GALFN_SETDISPLAYBPP, GALFN_GETDISPLAYBPP, GALFN_SETDISPLAYPITCH, GALFN_GETDISPLAYPITCH, GALFN_SETDISPLAYOFFSET, GALFN_GETDISPLAYOFFSET, GALFN_DOTCLKTOREFRESH, GALFN_GETDISPLAYTIMINGS, GALFN_SETDISPLAYTIMINGS, GALFN_SETPALETTE, GALFN_GETPALETTE, GALFN_SETPALETTE_ENTRY, GALFN_GETPALETTE_ENTRY, GALFN_SETFIXEDTIMINGS,/* Hardware cursor funtions */ GALFN_SETCURSORENABLE, GALFN_GETCURSORENABLE, GALFN_SETCURSORPOSITION, GALFN_GETCURSORPOSITION, GALFN_SETCURSORCOLORS, GALFN_GETCURSORCOLORS, GALFN_SETCURSORSHAPE, GALFN_SETCURSORSHAPE_RCLD,/* grafix rendering funtions */ GALFN_SETSOLIDPATTERN, GALFN_SETRASTEROPERATION, GALFN_SETSOLIDSOURCE, GALFN_PATTERNFILL, GALFN_SETMONOSOURCE, GALFN_SETMONOPATTERN, GALFN_SCREENTOSCREENBLT, GALFN_SCREENTOSCREENXBLT, GALFN_BRESENHAMLINE, GALFN_COLOR_PATTERNFILL, GALFN_COLOR_BITMAP_TO_SCREEN_BLT, GALFN_COLOR_BITMAP_TO_SCREEN_XBLT, GALFN_MONO_BITMAP_TO_SCREEN_BLT, GALFN_TEXT_BLT,/* VGA Support functions */ GALFN_VGAMODESWITCH, GALFN_VGACLEARCRTEXT, GALFN_VGASETPITCH, GALFN_VGARESTORE, GALFN_VGASAVE, GALFN_VGASETMODE,/* Compression functions */ GALFN_SETCOMPRESSIONSTATE, GALFN_GETCOMPRESSIONSTATE, GALFN_SETCOMPRESSIONPARAMS, GALFN_GETCOMPRESSIONPARAMS,/* Panel Support functions */ GALFN_PNLSETPARAMS, GALFN_PNLGETPARAMS, GALFN_PNLINITPANEL, GALFN_PNLSAVESTATE, GALFN_PNLRESTORESTATE, GALFN_PNLPOWERUP, GALFN_PNLPOWERDOWN, GALFN_PNLBIOSENABLE, GALFN_PNLBIOSINFO, GALFN_ENABLEPANNING,/* TV Support functions */ GALFN_SETTVPARAMS, GALFN_GETTVPARAMS, GALFN_SETTVTIMING, GALFN_GETTVTIMING, GALFN_SETENABLE, GALFN_GETENABLE, GALFN_ISTVMODESUPPORTED,/* Video Support functions */ GALFN_SETVIDEOENABLE, GALFN_SETVIDEOFORMAT, GALFN_SETVIDEOSIZE, GALFN_SETVIDEOOFFSET, GALFN_SETVIDEOWINDOW, GALFN_SETVIDEOSCALE, GALFN_SETVIDEOFILTER, GALFN_SETVIDEOCOLORKEY, GALFN_SETVIDEODOWNSCALEENABLE, GALFN_SETVIDEODOWNSCALECONFIG, GALFN_SETVIDEODOWNSCALECOEFF, GALFN_SETVIDEOSOURCE, GALFN_SETVIDEOINTERLACED, GALFN_SETVIDEOCURSOR, GALFN_SETVIDEOREQUEST, GALFN_SETALPHAENABLE, GALFN_SETALPHAWINDOW, GALFN_SETALPHAVALUE, GALFN_SETALPHAPRIORITY, GALFN_SETALPHACOLOR, GALFN_SETALPHAREGION, GALFN_SETVIDEOOUTSIDEALPHA, GALFN_SETVIDEOPALETTE, GALFN_GETVIDEOINFO, GALFN_SETVIDEOCOLORSPACE,/* VIP Supported functions */ GALFN_SETVIPENABLE, GALFN_SETVIPCAPTURERUNMODE, GALFN_SETVIPBASE, GALFN_SETVIPPITCH, GALFN_SETVIPMODE, GALFN_SETVIPBRTH, GALFN_SETVIPLASTLINE, GALFN_TESTVIPODDFIELD, GALFN_TESTVIPBASESUPDATED, GALFN_SETVBIENABLE, GALFN_SETVBIMODE, GALFN_SETVBIBASE, GALFN_SETVBIPITCH, GALFN_SETVBIDIRECT, GALFN_SETVBIINTERRUPT, GALFN_SETGENLOCKENABLE, GALFN_SETTOPLINEINODD, GALFN_SETGENLOCKDELAY, GALFN_SETMACROVISIONENABLE, GALFN_GETVIPENABLE, GALFN_GETVIPBASE, GALFN_GETVIPPITCH, GALFN_GETVIPMODE, GALFN_GETVIPBRTH, GALFN_GETVIPLINE, GALFN_GETVBIENABLE, GALFN_GETVBIBASE, GALFN_GETVBIPITCH, GALFN_GETVBIMODE, GALFN_GETVBIDIRECT, GALFN_GETVBIINTERRUPT, GALFN_TESTVIPFIFOOVERFLOW,/* Second generation rendering routines */ GALFN_SETICONENABLE, GALFN_SETICONCOLORS, GALFN_SETICONPOSITION, GALFN_SETICONSHAPE64, GALFN_SETSOURCESTRIDE, GALFN_SETDESTINATIONSTRIDE, GALFN_SETSOURCETRANSPARENCY, GALFN_SETPATTERNORIGIN, GALFN_GFX2SETALPHAMODE, GALFN_GFX2SETALPHAVALUE, GALFN_GFX2PATTERNFILL, GALFN_GFX2COLORPATTERNFILL, GALFN_GFX2SCREENTOSCREENBLT, GALFN_GFX2MONOEXPANDBLT, GALFN_GFX2COLORBMPTOSCRBLT, GALFN_GFX2MONOBMPTOSCRBLT, GALFN_GFX2TEXTBLT, GALFN_GFX2BRESENHAMLINE, GALFN_GFX2SYNCTOVBLANK,/* Change/Get Video routines */ GALFN_SETCOLORSPACEYUV, GALFN_SETVIDEOYUVPITCH, GALFN_SETVIDEOYUVOFFSETS, GALFN_SETVIDEOLEFTCROP, GALFN_SETVIDEOVERTICALDOWNSCALE, GALFN_SETVBISOURCE, GALFN_SETVBILINES, GALFN_SETVBITOTAL, GALFN_SETVSCALEROFFSET, GALFN_GETVBISOURCE, GALFN_GETVBILINES, GALFN_GETVBITOTAL, GALFN_GETVSCALEROFFSET, GALFN_GETVIDEOINTERLACED, GALFN_GETCOLORSPACEYUV, GALFN_GETGENLOCKENABLE, GALFN_GETGENLOCKDELAY, GALFN_GETVIDEOCURSOR, GALFN_READCRC, GALFN_READWINDOWCRC, GALFN_GETMACROVISIONENABLE, GALFN_GETALPHAENABLE, GALFN_GETALPHASIZE, GALFN_GETALPHAVALUE, GALFN_GETALPHAPRIORITY, GALFN_GETALPHACOLOR, GALFN_GETVIDEOYUVPITCH, GALFN_GETVIDEOYUVOFFSETS,/* Additional VGA Support functions */ GALFN_VGATESTPCI, GALFN_VGAGETPCICOMMAND, GALFN_VGASEQRESET, GALFN_VGASETGRAPHICSBITS,/* This is last function supported. * If you want to define ioctl function. * You should define before this function. * Update that the lastfunction supported to new value. */ GALFN_LASTFUNCTION_SUPPORTED}GALFN_CODES;/* end of GAL function list */#define GAL_HEADER\ DWORD dwSignature; /* Sign all structs with FBGAL_SIGNATURE */\ DWORD dwSize; /* Size of struct for that subfunction */\ DWORD dwVersion; /* Current version of the API */\ DWORD dwSubfunction; /* GAL subfunction */\ DWORD dwReturnValue; /* Return value from subfunction *//* * #define GALFN_PNLPOWERUP * #define GALFN_PNLPOWERDOWN */typedef struct __GAL_BASE{GAL_HEADER}GAL_BASE, *PGAL_BASE;/* * #define GALFN_GETADAPTERINFO */typedef struct __GAL_GETADAPTERINFO{ GAL_HEADER DWORD dwCPUVersion; DWORD dwCPUType; DWORD dwFrameBufferBase; DWORD dwFrameBufferSize; DWORD dwGfxRegisterBase; DWORD dwGpsRegisterBase; DWORD dwVidRegisterBase; DWORD dwVipRegisterBase; DWORD dwVideoVersion; DWORD dwMaxSupportedPixelClock;}GAL_ADAPTERINFO, *PGAL_ADAPTERINFO;#define GAL_SOFTVGASTATE_ENABLE 1#define GAL_SOFTVGASTATE_DISABLE 0/* * #define GALFN_SOFTVGASTATE */typedef struct __GAL_SOFTVGASTATE{ GAL_HEADER BOOLEAN bSoftVgaEnable;}GAL_SOFTVGASTATE, *PGAL_SOFTVGASTATE;/* * #define GALFN_WAITUNTILIDLE */typedef struct __GAL_WAITUNTILIDLE{GAL_HEADER}GAL_WAITUNTILIDLE, *PGAL_WAITUNTILIDLE;/* * #define GALFN_WAITVERTICALBLANK */typedef struct __GAL_WAITVERTICALBLANK{GAL_HEADER}GAL_WAITVERTICALBLANK, *PGAL_WAITVERTICALBLANK;#define GAL_REG 0x1#define GAL_VID 0x2#define GAL_VIP 0x4/* * #define GALFN_WRITEREG * #define GALFN_READREG */typedef struct __GAL_HWACCESS{ GAL_HEADER DWORD dwType; DWORD dwOffset; DWORD dwValue; DWORD dwByteCount;}GAL_HWACCESS, *PGAL_HWACCESS;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -