summaryrefslogtreecommitdiff
path: root/src/CInt10FunProto.h
blob: bf1602d74693a8b1ca2761252f3cd8fe1a47dd07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
/* 
 * Copyright (C) 2009 RDC Semiconductor Co.,Ltd
 *
 * 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 3 of the License, or
 * (at your option) 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, see <http://www.gnu.org/licenses/>.
 *
 * For technical support : 
 *     <jason.lin@rdc.com.tw>
 */



void SetVBERerurnStatus(USHORT VBEReturnStatus, CBIOS_ARGUMENTS *pCBiosArguments);

void SetTimingRegs(UCHAR ucDisplayPath, MODE_INFO *pModeInfo, RRATE_TABLE *pRRateTable);
void SetHTotal(UCHAR DisplayPath, USHORT Value);
void SetHDisplayEnd(UCHAR DisplayPath, USHORT Value);
void SetHBlankingStart(UCHAR DisplayPath, USHORT Value);
void SetHBlankingEnd(UCHAR DisplayPath, USHORT Value);
void SetHSyncStart(UCHAR DisplayPath, USHORT Value);
void SetHSyncEnd(UCHAR DisplayPath, USHORT Value);
void SetVTotal(UCHAR DisplayPath, USHORT Value);
void SetVDisplayEnd(UCHAR DisplayPath, USHORT Value);
void SetVBlankingStart(UCHAR DisplayPath, USHORT Value);
void SetVBlankingEnd(UCHAR DisplayPath, USHORT Value);
void SetVSyncStart(UCHAR DisplayPath, USHORT Value);
void SetVSyncEnd(UCHAR DisplayPath, USHORT Value);
void SetPixelClock(UCHAR DisplayPath, ULONG Clock);
void SetHSource(UCHAR bDisplayPath, USHORT wValue);
PLL_Info ClockToPLLF9003A(ULONG Clock);
void SetDPLL(UCHAR DisplayPath, PLL_Info PLLInfo);
void SetPolarity(UCHAR DevicePort, UCHAR Value);
void SetFIFO(UCHAR DisplayPath);
void SetPitch(UCHAR DisplayPath, USHORT Value);
USHORT GetPitch(UCHAR DisplayPath);
USHORT GetVDisplayEnd(UCHAR DisplayPath);
void SetColorDepth(UCHAR DisplayPath, UCHAR Value);
void ConfigDigitalPort(UCHAR bDisplayPath);
void LoadTiming(UCHAR DisplayPath, USHORT ModeNum);
void LoadVESATiming(UCHAR bDisplayPath, USHORT wModeNum);
void LoadLCDTiming(UCHAR bDisplayPath, USHORT wModeNum);
void SetScalingFactor(UCHAR bDisplayPath, MODE_INFO *pUserModeInfo, MODE_INFO *pPanelModeInfo);
void SetHorScalingFactor(UCHAR bDisplayPath, USHORT wValue);
void SetVerScalingFactor(UCHAR bDisplayPath, USHORT wValue);
CI_STATUS isLCDFitMode(UCHAR bDeviceIndex, USHORT wModeNum);
CI_STATUS GetModePointerFromVESATable(USHORT wModeNum, UCHAR bRRIndex, MODE_INFO **ppModeInfo, RRATE_TABLE **ppRRateTable);
CI_STATUS GetModePointerFromLCDTable(UCHAR bDeviceIndex, MODE_INFO **ppModeInfo, PANEL_TABLE **ppPanelTable);
CI_STATUS Get_MODE_INFO(USHORT wModeNum, MODE_INFO **ppModeInfo);
CI_STATUS Get_MODE_INFO_From_LCD_Table(UCHAR bDeviceIndex, MODE_INFO **ppModeInfo);
CI_STATUS Get_MODE_INFO_From_VESA_Table(USHORT wModeNum, MODE_INFO **ppModeInfo);
CI_STATUS GetModeColorDepth(USHORT wModeNum, MODE_INFO *pModeInfo, UCHAR *pbColorDepth);

CI_STATUS GetModePitch(USHORT ModeNum, USHORT *pPitch);
USHORT ReadRegFromHW(REG_OP *pRegOp);
void WriteRegToHW(REG_OP *pRegOp, USHORT value);
void UnLockCR0ToCR7();
void LockCR0ToCR7();
CI_STATUS CheckForModeAvailable(USHORT ModeNum);
CI_STATUS CheckForNewDeviceAvailable(UCHAR bDeviceIndex);
void Display1TurnOnTX();
void Display1TurnOffTX();
void Display2TurnOnTX();
void Display2TurnOffTX();
void TurnOnDigitalPort(UCHAR bDeviceIndex);
void TurnOffDigitalPort(UCHAR bDeviceIndex);
UCHAR GetPortConnectPath(UCHAR PortType);
USHORT TransDevIDtoBit(UCHAR DeviceIndex);
void TurnOnCRTPad();
void TurnOffCRTPad();
void TurnOnDVP1Pad();
void TurnOffDVP1Pad();
void TurnOnDVP2Pad();
void TurnOffDVP2Pad();
void TurnOnDVP12Pad();
void TurnOffDVP12Pad();
void TurnOnScaler(UCHAR bDisplayPath);
void TurnOffScaler(UCHAR bDisplayPath);
void TurnOnHorScaler(UCHAR bDisplayPath);
void TurnOffHorScaler(UCHAR bDisplayPath);
void TurnOnVerScaler(UCHAR bDisplayPath);
void TurnOffVerScaler(UCHAR bDisplayPath);

void Set12BitDVP();
void Set24BitDVP();
void TurnOnDAC();
void TurnOffDAC();
void SerialLoadTable(UCHAR **ppucDisplay1VESAModeInitRegs, UCHAR ucI2Cport, UCHAR ucI2CAddr);
void SerialLoadRegBits(UCHAR **ppucDisplay1VESAModeInitRegs, UCHAR ucRegGroup, UCHAR ucI2Cport, UCHAR ucI2CAddr);
void SerialLoadReg(UCHAR **ppucDisplay1VESAModeInitRegs, UCHAR ucRegGroup, UCHAR ucI2Cport, UCHAR ucI2CAddr);
void LoadDisplay1VESAModeInitRegs();
void VESASetBIOSData(USHORT ModeNum);
void DisableDisplayPathAndDevice(UCHAR DisplayPath);
CI_STATUS GetDevicePortConfig(UCHAR bDeviceIndex, PORT_CONFIG **ppPortConfig);
void PowerSequenceOn();
void PowerSequenceOff();
void SequencerOn(UCHAR DisplayPath);
void SequencerOff(UCHAR bDisplayPath);
void ControlPwrSeqOn(UCHAR bDeviceIndex);
void ControlPwrSeqOff(UCHAR bDeviceIndex);
void LongWait();
UCHAR Get_DEV_ID(UCHAR DisplayPath);
void Set_DEV_ID(UCHAR DeviceID, UCHAR DisplayPath);
UCHAR Get_NEW_DEV_ID(UCHAR DisplayPath);
void Set_NEW_DEV_ID(UCHAR DeviceID, UCHAR DisplayPath);
USHORT Get_LCD_H_SIZE();
USHORT Get_LCD_V_SIZE();
ULONG Get_LCD_SIZE();
USHORT Get_LCD2_H_SIZE();
USHORT Get_LCD2_V_SIZE();
ULONG Get_LCD2_SIZE();
UCHAR Get_RRATE_ID(UCHAR DisplayPath);
void Set_RRATE_ID(UCHAR RRateID, UCHAR DisplayPath);
UCHAR Get_LCD_TABLE_INDEX(void);
UCHAR Get_LCD2_TABLE_INDEX(void);
void Set_LCD_TABLE_INDEX(UCHAR bLCDIndex);
USHORT Get_VESA_MODE(UCHAR DisplayPath);
void Set_VESA_MODE(USHORT ModeNum, UCHAR DisplayPath);
void ResetATTR();
void EnableATTR();
void SetCRReg(UCHAR bRegIndex, UCHAR bRegValue, UCHAR bMask);
UCHAR GetCRReg(UCHAR bRegIndex);
void SetSRReg(UCHAR bRegIndex, UCHAR bRegValue, UCHAR bMask);
UCHAR GetSRReg(UCHAR bRegIndex);
void SetARReg(UCHAR index,UCHAR value);
UCHAR GetARReg(UCHAR index);
void SetGRReg(UCHAR bRegIndex, UCHAR bRegValue, UCHAR bMask);
void SetMSReg(UCHAR bRegValue);
UCHAR GetIS1Reg();
void ClearFrameBuffer(UCHAR DisplayPath,ULONG *pFrameBufferBase,MODE_INFO *pModeInfo, UCHAR bColorDepth);
ULONG Difference(ULONG Value1, ULONG Value2);
UCHAR ReadScratch(USHORT IndexMask);
void WriteScratch(USHORT IndexMask, UCHAR Data);
UCHAR AlignDataToLSB(UCHAR bData, UCHAR bMask);
UCHAR AlignDataToMask(UCHAR bData, UCHAR bMask);
void SetDPMS(UCHAR DPMSState, UCHAR DisplayPath);
CI_STATUS DetectMonitor();
void WaitDisplayPeriod();
void WaitPowerSequenceDone();
CI_STATUS CheckForDSTNPanel(UCHAR bDeviceIndex);
USHORT GetVESAMEMSize();
void SetDeviceSupport();


void I2CWriteClock(UCHAR I2CPort, UCHAR data);
void I2CDelay(UCHAR I2CPort);
void I2CWriteData(UCHAR I2CPort, UCHAR data);
void I2CStart(UCHAR I2CPort);
void SendI2CDataByte(UCHAR I2CPort, UCHAR Data);
bool CheckACK(UCHAR I2CPort);
UCHAR ReceiveI2CDataByte(UCHAR I2CPort, UCHAR I2CSlave);
void SendNACK(UCHAR I2CPort);
void I2CStop(UCHAR I2CPort);
UCHAR ReadI2C(UCHAR I2CPort, UCHAR I2CSlave, UCHAR RegIdx, UCHAR* RegData);
UCHAR WriteI2C(UCHAR I2CPort, UCHAR I2CSlave, UCHAR RegIdx, UCHAR RegData);