1/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/gfx/gfx_mode.h,v 1.1 2002/12/10 15:12:25 alanh Exp $ */ 2/* 3 * $Workfile: gfx_mode.h $ 4 * 5 * This header file contains the mode tables. It is used by the "gfx_disp.c" 6 * file to set a display mode. 7 * 8 * NSC_LIC_ALTERNATIVE_PREAMBLE 9 * 10 * Revision 1.0 11 * 12 * National Semiconductor Alternative GPL-BSD License 13 * 14 * National Semiconductor Corporation licenses this software 15 * ("Software"): 16 * 17 * Durango 18 * 19 * under one of the two following licenses, depending on how the 20 * Software is received by the Licensee. 21 * 22 * If this Software is received as part of the Linux Framebuffer or 23 * other GPL licensed software, then the GPL license designated 24 * NSC_LIC_GPL applies to this Software; in all other circumstances 25 * then the BSD-style license designated NSC_LIC_BSD shall apply. 26 * 27 * END_NSC_LIC_ALTERNATIVE_PREAMBLE */ 28 29/* NSC_LIC_BSD 30 * 31 * National Semiconductor Corporation Open Source License for Durango 32 * 33 * (BSD License with Export Notice) 34 * 35 * Copyright (c) 1999-2001 36 * National Semiconductor Corporation. 37 * All rights reserved. 38 * 39 * Redistribution and use in source and binary forms, with or without 40 * modification, are permitted provided that the following conditions 41 * are met: 42 * 43 * * Redistributions of source code must retain the above copyright 44 * notice, this list of conditions and the following disclaimer. 45 * 46 * * Redistributions in binary form must reproduce the above 47 * copyright notice, this list of conditions and the following 48 * disclaimer in the documentation and/or other materials provided 49 * with the distribution. 50 * 51 * * Neither the name of the National Semiconductor Corporation nor 52 * the names of its contributors may be used to endorse or promote 53 * products derived from this software without specific prior 54 * written permission. 55 * 56 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 57 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 58 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 59 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 60 * NATIONAL SEMICONDUCTOR CORPORATION OR CONTRIBUTORS BE LIABLE FOR ANY 61 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 62 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 63 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 64 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 65 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE, 66 * INTELLECTUAL PROPERTY INFRINGEMENT, OR OTHERWISE) ARISING IN ANY WAY 67 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 68 * OF SUCH DAMAGE. 69 * 70 * EXPORT LAWS: THIS LICENSE ADDS NO RESTRICTIONS TO THE EXPORT LAWS OF 71 * YOUR JURISDICTION. It is licensee's responsibility to comply with 72 * any export regulations applicable in licensee's jurisdiction. Under 73 * CURRENT (2001) U.S. export regulations this software 74 * is eligible for export from the U.S. and can be downloaded by or 75 * otherwise exported or reexported worldwide EXCEPT to U.S. embargoed 76 * destinations which include Cuba, Iraq, Libya, North Korea, Iran, 77 * Syria, Sudan, Afghanistan and any other country to which the U.S. 78 * has embargoed goods and services. 79 * 80 * END_NSC_LIC_BSD */ 81 82/* NSC_LIC_GPL 83 * 84 * National Semiconductor Corporation Gnu General Public License for Durango 85 * 86 * (GPL License with Export Notice) 87 * 88 * Copyright (c) 1999-2001 89 * National Semiconductor Corporation. 90 * All rights reserved. 91 * 92 * Redistribution and use in source and binary forms, with or without 93 * modification, are permitted under the terms of the GNU General 94 * Public License as published by the Free Software Foundation; either 95 * version 2 of the License, or (at your option) any later version 96 * 97 * In addition to the terms of the GNU General Public License, neither 98 * the name of the National Semiconductor Corporation nor the names of 99 * its contributors may be used to endorse or promote products derived 100 * from this software without specific prior written permission. 101 * 102 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 103 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 104 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 105 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 106 * NATIONAL SEMICONDUCTOR CORPORATION OR CONTRIBUTORS BE LIABLE FOR ANY 107 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 108 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 109 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 110 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 111 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE, 112 * INTELLECTUAL PROPERTY INFRINGEMENT, OR OTHERWISE) ARISING IN ANY WAY 113 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 114 * OF SUCH DAMAGE. See the GNU General Public License for more details. 115 * 116 * EXPORT LAWS: THIS LICENSE ADDS NO RESTRICTIONS TO THE EXPORT LAWS OF 117 * YOUR JURISDICTION. It is licensee's responsibility to comply with 118 * any export regulations applicable in licensee's jurisdiction. Under 119 * CURRENT (2001) U.S. export regulations this software 120 * is eligible for export from the U.S. and can be downloaded by or 121 * otherwise exported or reexported worldwide EXCEPT to U.S. embargoed 122 * destinations which include Cuba, Iraq, Libya, North Korea, Iran, 123 * Syria, Sudan, Afghanistan and any other country to which the U.S. 124 * has embargoed goods and services. 125 * 126 * You should have received a copy of the GNU General Public License 127 * along with this file; if not, write to the Free Software Foundation, 128 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 129 * 130 * END_NSC_LIC_GPL */ 131 132#ifndef _gfx_mode_h 133#define _gfx_mode_h 134 135/* MODE FLAGS (BITWISE-OR) */ 136 137#define GFX_MODE_8BPP 0x00000001 138#define GFX_MODE_12BPP 0x00000002 139#define GFX_MODE_15BPP 0x00000004 140#define GFX_MODE_16BPP 0x00000008 141#define GFX_MODE_24BPP 0x00000010 142#define GFX_MODE_56HZ 0x00000020 143#define GFX_MODE_60HZ 0x00000040 144#define GFX_MODE_70HZ 0x00000080 145#define GFX_MODE_72HZ 0x00000100 146#define GFX_MODE_75HZ 0x00000200 147#define GFX_MODE_85HZ 0x00000400 148#define GFX_MODE_NEG_HSYNC 0x00000800 149#define GFX_MODE_NEG_VSYNC 0x00001000 150#define GFX_MODE_PIXEL_DOUBLE 0x00002000 151#define GFX_MODE_LINE_DOUBLE 0x00004000 152#define GFX_MODE_TV_NTSC 0x00008000 153#define GFX_MODE_TV_PAL 0x00010000 154 155#define GFX_MODE_LOCK_TIMING 0x10000000 156 157/* STRUCTURE DEFINITION */ 158 159typedef struct tagDISPLAYMODE 160{ 161 /* DISPLAY MODE FLAGS */ 162 /* Specify valid color depths and the refresh rate. */ 163 164 unsigned long flags; 165 166 /* TIMINGS */ 167 168 unsigned short hactive; 169 unsigned short hblankstart; 170 unsigned short hsyncstart; 171 unsigned short hsyncend; 172 unsigned short hblankend; 173 unsigned short htotal; 174 175 unsigned short vactive; 176 unsigned short vblankstart; 177 unsigned short vsyncstart; 178 unsigned short vsyncend; 179 unsigned short vblankend; 180 unsigned short vtotal; 181 182 /* CLOCK FREQUENCY */ 183 184 unsigned long frequency; 185 186} 187DISPLAYMODE; 188 189/* For Fixed timings */ 190typedef struct tagFIXEDTIMINGS 191{ 192 /* DISPLAY MODE FLAGS */ 193 /* Specify valid color depths and the refresh rate. */ 194 195 int panelresx; 196 int panelresy; 197 unsigned short xres; 198 unsigned short yres; 199 200 /* TIMINGS */ 201 202 unsigned short hactive; 203 unsigned short hblankstart; 204 unsigned short hsyncstart; 205 unsigned short hsyncend; 206 unsigned short hblankend; 207 unsigned short htotal; 208 209 unsigned short vactive; 210 unsigned short vblankstart; 211 unsigned short vsyncstart; 212 unsigned short vsyncend; 213 unsigned short vblankend; 214 unsigned short vtotal; 215 216 /* CLOCK FREQUENCY */ 217 218 unsigned long frequency; 219 220} 221FIXEDTIMINGS; 222 223#endif /* !_gfx_mode_h */ 224 225/* END OF FILE */ 226 227