linux/drivers/video/fbdev/sis/init.h

/* $XFree86$ */
/* $XdotOrg$ */
/*
 * Data and prototypes for init.c
 *
 * Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria
 *
 * If distributed as part of the Linux kernel, the following license terms
 * apply:
 *
 * * This program is free software; you can redistribute it and/or modify
 * * it under the terms of the GNU General Public License as published by
 * * the Free Software Foundation; either version 2 of the named License,
 * * or any later version.
 * *
 * * This program is distributed in the hope that it will be useful,
 * * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * * GNU General Public License for more details.
 * *
 * * You should have received a copy of the GNU General Public License
 * * along with this program; if not, write to the Free Software
 * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
 *
 * Otherwise, the following license terms apply:
 *
 * * Redistribution and use in source and binary forms, with or without
 * * modification, are permitted provided that the following conditions
 * * are met:
 * * 1) Redistributions of source code must retain the above copyright
 * *    notice, this list of conditions and the following disclaimer.
 * * 2) 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.
 * * 3) The name of the author may not be used to endorse or promote products
 * *    derived from this software without specific prior written permission.
 * *
 * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * Author: 	Thomas Winischhofer <[email protected]>
 *
 */

#ifndef _INIT_H_
#define _INIT_H_

#include "initdef.h"

#include "vgatypes.h"
#include "vstruct.h"
#ifdef SIS_CP
#undef SIS_CP
#endif
#include <linux/types.h>
#include <asm/io.h>
#include <linux/fb.h>
#include "sis.h"
#include <video/sisfb.h>

/* Mode numbers */
static const unsigned short ModeIndex_320x200[]      =;
static const unsigned short ModeIndex_320x240[]      =;
static const unsigned short ModeIndex_320x240_FSTN[] =;  /* FSTN */
static const unsigned short ModeIndex_400x300[]      =;
static const unsigned short ModeIndex_512x384[]      =;
static const unsigned short ModeIndex_640x400[]      =;
static const unsigned short ModeIndex_640x480[]      =;
static const unsigned short ModeIndex_720x480[]      =;
static const unsigned short ModeIndex_720x576[]      =;
static const unsigned short ModeIndex_768x576[]      =;
static const unsigned short ModeIndex_800x480[]      =;
static const unsigned short ModeIndex_800x600[]      =;
static const unsigned short ModeIndex_848x480[]      =;
static const unsigned short ModeIndex_856x480[]      =;
static const unsigned short ModeIndex_960x540[]      =;  /* 315 series only */
static const unsigned short ModeIndex_960x600[]      =;  /* 315 series only */
static const unsigned short ModeIndex_1024x768[]     =;
static const unsigned short ModeIndex_1024x576[]     =;
static const unsigned short ModeIndex_1024x600[]     =;  /* 300 series only */
static const unsigned short ModeIndex_1280x1024[]    =;
static const unsigned short ModeIndex_1280x960[]     =;
static const unsigned short ModeIndex_1152x768[]     =;  /* 300 series only */
static const unsigned short ModeIndex_1152x864[]     =;
static const unsigned short ModeIndex_300_1280x768[] =;
static const unsigned short ModeIndex_310_1280x768[] =;
static const unsigned short ModeIndex_1280x720[]     =;
static const unsigned short ModeIndex_1280x800[]     =;
static const unsigned short ModeIndex_1280x854[]     =;
static const unsigned short ModeIndex_1360x768[]     =;
static const unsigned short ModeIndex_300_1360x1024[]=;  /* 300 series, BARCO only */
static const unsigned short ModeIndex_1400x1050[]    =;  /* 315 series only */
static const unsigned short ModeIndex_1680x1050[]    =;  /* 315 series only */
static const unsigned short ModeIndex_1600x1200[]    =;
static const unsigned short ModeIndex_1920x1080[]    =;  /* 315 series only */
static const unsigned short ModeIndex_1920x1440[]    =;
static const unsigned short ModeIndex_300_2048x1536[]=;
static const unsigned short ModeIndex_310_2048x1536[]=;

static const unsigned char SiS_MDA_DAC[] =;

static const unsigned char SiS_CGA_DAC[] =;

static const unsigned char SiS_EGA_DAC[] =;

static const unsigned char SiS_VGA_DAC[] =;

static const struct SiS_St SiS_SModeIDTable[] =;

static const struct SiS_StResInfo_S SiS_StResInfo[]=;

static const struct SiS_ModeResInfo_S SiS_ModeResInfo[] =;

#if defined(CONFIG_FB_SIS_300) || defined(CONFIG_FB_SIS_315)
static const struct SiS_StandTable_S SiS_StandTable[]=;
#endif

/**************************************************************/
/* SIS VIDEO BRIDGE ----------------------------------------- */
/**************************************************************/

static const unsigned char SiS_SoftSetting  =;   /* RAM setting */

static const unsigned char SiS_OutputSelect =;

static const unsigned char SiS_NTSCTiming[] =;

static const unsigned char SiS_PALTiming[] =;

static const unsigned char SiS_HiTVExtTiming[] =;

static const unsigned char SiS_HiTVSt1Timing[] =;

static const unsigned char SiS_HiTVSt2Timing[] =;

#if 0
static const unsigned char SiS_HiTVTextTiming[] = {
	0x32,0x65,0x2c,0x5f,0x08,0x31,0x3a,0x65,
	0x28,0x02,0x01,0x3d,0x06,0x3e,0x35,0x6d,
	0x06,0x14,0x3e,0x35,0x6d,0x00,0xc5,0x3f,
	0x65,0x90,0xe7,0xbc,0x03,0x0c,0x97,0x03,
	0x14,0x78,0x14,0x08,0x20,0x14,0x08,0x20,
	0xc8,0xc8,0x3b,0xd2,0x26,0x92,0x0f,0x40,
        0x60,0x80,0x14,0x90,0x8c,0x60,0x04,0x96,
	0x72,0x5c,0x11,0x00,0xfc,0xff,0x32,0x00
};
#endif

static const unsigned char SiS_HiTVGroup3Data[] =;

static const unsigned char SiS_HiTVGroup3Simu[] =;

#if 0
static const unsigned char SiS_HiTVGroup3Text[] = {
	0x00,0x1a,0x22,0x63,0x62,0x22,0x08,0xa7,
	0xf5,0x20,0xce,0xce,0x55,0x47,0x2a,0xa6,
	0x25,0x2f,0x47,0xfa,0xc8,0xff,0x8e,0x20,
	0x8c,0x6e,0x60,0x18,0x2c,0x0c,0x20,0x22,
	0x56,0x36,0x4f,0x6e,0x3f,0x80,0x00,0x80,
	0x93,0x3c,0x01,0x50,0x2f,0x10,0xf4,0xca,
	0x01,0x05,0x03,0x7e,0x65,0x31,0x14,0x75,
	0x18,0x05,0x18,0x05,0x4c,0xa8,0x01
};
#endif

static const struct SiS_TVData SiS_StPALData[] =;

static const struct SiS_TVData SiS_ExtPALData[] =;

static const struct SiS_TVData SiS_StNTSCData[] =;

static const struct SiS_TVData SiS_ExtNTSCData[] =;

static const struct SiS_TVData SiS_StHiTVData[] =/* Slave + TVSimu */
{};

static const struct SiS_TVData SiS_St2HiTVData[] =/* Slave */
{};

static const struct SiS_TVData SiS_ExtHiTVData[] =;

static const struct SiS_TVData SiS_St525pData[] =;

static const struct SiS_TVData SiS_St750pData[] =;

static const struct SiS_TVData SiS_Ext750pData[] =;

static const struct SiS_LCDData SiS_LCD1280x720Data[] =/* 2.03.00 */
{};

/* About 1280x768: For TMDS, Panel_1280x768 will only be set if
 * the panel is a Fujitsu 7911 (VL-17WDX8) (with clock 81, 1688x802)
 * Other TMDS panels of this resolution will be treated as custom.
 * For LVDS, we know another type (_2).
 * (Note: 1280x768_3 is now special for SiS301/NetVista
 */

static const struct SiS_LCDData SiS_StLCD1280x768_2Data[] =/* 2.03.00 */
{};

static const struct SiS_LCDData SiS_ExtLCD1280x768_2Data[] =/* 2.03.00 */
{};

#if 0  /* Not used; _3 now reserved for NetVista (SiS301) */
static const struct SiS_LCDData SiS_LCD1280x768_3Data[] =
{
	{  64,   25, 1056,  422, 1664,  798 },			/* 640x400 */
	{ 128,   39,  884,  396, 1408,  806 }, /* ,640 */
	{  64,   25, 1056,  422, 1664,  798 },			/* 640x400 */
	{ 128,   39,  884,  396, 1408,  806 }, /* ,640 */
	{  32,   15, 1056,  513, 1408,  806 }, /* ,664 */	/* 640x480 */
	{ 176,  125, 1280,  640, 1408,  806 }, /* ,768 */	/* 800x600 */
	{  64,   61, 1342,  806, 1408,  806 },			/* 1024x768 */
	{   0,    0,    0,    0,    0,    0 },
	{   1,    1, 1408,  806, 1408,  806 },			/* 1280x768 */
	{   0,    0,    0,    0,    0,    0 },
	{  16,   15, 1600,  750, 1600,  806 }  /* 1280x720  from above */
};
#endif

static const struct SiS_LCDData SiS_LCD1280x800Data[] =/* 0.93.12a (TMDS) */
{};

static const struct SiS_LCDData SiS_LCD1280x800_2Data[] =/* 2.03.00 (LVDS) */
{};

#if 0
static const struct SiS_LCDData SiS_LCD1280x800_3Data[] = /* 2.02.05a (LVDS); m250 */
{
	{ 128,   51, 1122,  412, 1408,  816 }, /* 640x400 */
	{ 128,   49, 1232,  361, 1408,  816 },
	{ 128,   51, 1122,  412, 1408,  816 },
	{ 128,   49, 1232,  361, 1408,  816 },
	{   8,    3,  880,  491, 1408,  816 }, /* 640x480 */
	{  11,    6, 1024,  612, 1408,  816 }, /* 800x600 */
	{  22,   21, 1400,  784, 1408,  816 }, /* 1024x768 */
	{   0,    0,    0,    0,    0,    0 }, /* 1280x1024 */
	{   1,    1, 1408,  816, 1408,  816 }, /* 1280x800 */
	{   0,    0,    0,    0,    0,    0 }, /* 1280x768 - patch index */
	{   0,    0,    0,    0,    0,    0 }  /* 1280x720 */
};
#endif

static const struct SiS_LCDData SiS_LCD1280x854Data[] =/* 2.21.00CS (LVDS) */
{};

static const struct SiS_LCDData SiS_LCD1280x960Data[] =;

static const struct SiS_LCDData SiS_StLCD1400x1050Data[] =;

static const struct SiS_LCDData SiS_ExtLCD1400x1050Data[] =;

static const struct SiS_LCDData SiS_LCD1680x1050Data[] =;

static const struct SiS_LCDData SiS_StLCD1600x1200Data[] =;

static const struct SiS_LCDData SiS_ExtLCD1600x1200Data[] =;

static const struct SiS_LCDData SiS_NoScaleData[] =;

/**************************************************************/
/* LVDS ----------------------------------------------------- */
/**************************************************************/

/* FSTN/DSTN 320x240, 2 variants */
static const struct SiS_LVDSData SiS_LVDS320x240Data_1[]=;

static const struct SiS_LVDSData SiS_LVDS320x240Data_2[]=;

static const struct SiS_LVDSData SiS_LVDS640x480Data_1[]=;

static const struct SiS_LVDSData SiS_LVDS800x600Data_1[]=;

static const struct SiS_LVDSData SiS_LVDS1024x600Data_1[] =;

static const struct SiS_LVDSData SiS_LVDS1024x768Data_1[]=;

static const struct SiS_LVDSData SiS_CHTVUNTSCData[]=;

static const struct SiS_LVDSData SiS_CHTVONTSCData[]=;

/* CRT1 CRTC data for slave modes */

static const struct SiS_LVDSCRT1Data SiS_LVDSCRT1320x240_1[] =;

static const struct SiS_LVDSCRT1Data SiS_LVDSCRT1320x240_2[] =;

static const struct SiS_LVDSCRT1Data SiS_LVDSCRT1320x240_2_H[] =;

static const struct SiS_LVDSCRT1Data SiS_LVDSCRT1320x240_3[] =;

static const struct SiS_LVDSCRT1Data SiS_LVDSCRT1320x240_3_H[] =;

static const struct SiS_LVDSCRT1Data SiS_LVDSCRT1640x480_1[] =;

static const struct SiS_LVDSCRT1Data SiS_LVDSCRT1640x480_1_H[] =;

#endif