Subversion Repositories Kolibri OS

Rev

Rev 1403 | Rev 1963 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1403 Rev 1430
Line 18... Line 18...
18
 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
18
 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
19
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20
 * OTHER DEALINGS IN THE SOFTWARE.
20
 * OTHER DEALINGS IN THE SOFTWARE.
21
 */
21
 */
Line -... Line 22...
-
 
22
 
22
 
23
 
23
/****************************************************************************/
24
/****************************************************************************/
24
/*Portion I: Definitions  shared between VBIOS and Driver                   */
25
/*Portion I: Definitions  shared between VBIOS and Driver                   */
Line -... Line 26...
-
 
26
/****************************************************************************/
25
/****************************************************************************/
27
 
26
 
28
 
Line 27... Line 29...
27
#ifndef _ATOMBIOS_H
29
#ifndef _ATOMBIOS_H
28
#define _ATOMBIOS_H
30
#define _ATOMBIOS_H
Line 57... Line 59...
57
#define ATOM_DAC_B            1
59
#define ATOM_DAC_B            1
58
#define ATOM_EXT_DAC          2
60
#define ATOM_EXT_DAC          2
Line 59... Line 61...
59
 
61
 
60
#define ATOM_CRTC1            0
62
#define ATOM_CRTC1            0
-
 
63
#define ATOM_CRTC2            1
-
 
64
#define ATOM_CRTC3            2
-
 
65
#define ATOM_CRTC4            3
-
 
66
#define ATOM_CRTC5            4
-
 
67
#define ATOM_CRTC6            5
Line 61... Line 68...
61
#define ATOM_CRTC2            1
68
#define ATOM_CRTC_INVALID     0xFF
62
 
69
 
Line 63... Line 70...
63
#define ATOM_DIGA             0
70
#define ATOM_DIGA             0
64
#define ATOM_DIGB             1
71
#define ATOM_DIGB             1
-
 
72
 
-
 
73
#define ATOM_PPLL1            0
Line 65... Line 74...
65
 
74
#define ATOM_PPLL2            1
66
#define ATOM_PPLL1            0
75
#define ATOM_DCPLL            2
Line 67... Line 76...
67
#define ATOM_PPLL2            1
76
#define ATOM_PPLL_INVALID     0xFF
Line 80... Line 89...
80
#define ATOM_LCD_BLON                           (ATOM_ENABLE+2)
89
#define ATOM_LCD_BLON                           (ATOM_ENABLE+2)
81
#define ATOM_LCD_BL_BRIGHTNESS_CONTROL          (ATOM_ENABLE+3)
90
#define ATOM_LCD_BL_BRIGHTNESS_CONTROL          (ATOM_ENABLE+3)
82
#define ATOM_LCD_SELFTEST_START									(ATOM_DISABLE+5)
91
#define ATOM_LCD_SELFTEST_START									(ATOM_DISABLE+5)
83
#define ATOM_LCD_SELFTEST_STOP									(ATOM_ENABLE+5)
92
#define ATOM_LCD_SELFTEST_STOP									(ATOM_ENABLE+5)
84
#define ATOM_ENCODER_INIT			                  (ATOM_DISABLE+7)
93
#define ATOM_ENCODER_INIT			                  (ATOM_DISABLE+7)
-
 
94
#define ATOM_GET_STATUS                         (ATOM_DISABLE+8)
Line 85... Line 95...
85
 
95
 
86
#define ATOM_BLANKING         1
96
#define ATOM_BLANKING         1
Line 87... Line 97...
87
#define ATOM_BLANKING_OFF     0
97
#define ATOM_BLANKING_OFF     0
Line 132... Line 142...
132
#define ATOM_PANEL_MISC_GREY_LEVEL_SHIFT   2
142
#define ATOM_PANEL_MISC_GREY_LEVEL_SHIFT   2
133
#define ATOM_PANEL_MISC_SPATIAL            0x00000020
143
#define ATOM_PANEL_MISC_SPATIAL            0x00000020
134
#define ATOM_PANEL_MISC_TEMPORAL           0x00000040
144
#define ATOM_PANEL_MISC_TEMPORAL           0x00000040
135
#define ATOM_PANEL_MISC_API_ENABLED        0x00000080
145
#define ATOM_PANEL_MISC_API_ENABLED        0x00000080
Line -... Line 146...
-
 
146
 
136
 
147
 
137
#define MEMTYPE_DDR1              "DDR1"
148
#define MEMTYPE_DDR1              "DDR1"
138
#define MEMTYPE_DDR2              "DDR2"
149
#define MEMTYPE_DDR2              "DDR2"
139
#define MEMTYPE_DDR3              "DDR3"
150
#define MEMTYPE_DDR3              "DDR3"
Line 143... Line 154...
143
#define ASIC_BUS_TYPE_AGP         "AGP"
154
#define ASIC_BUS_TYPE_AGP         "AGP"
144
#define ASIC_BUS_TYPE_PCIE        "PCI_EXPRESS"
155
#define ASIC_BUS_TYPE_PCIE        "PCI_EXPRESS"
Line 145... Line 156...
145
 
156
 
Line 146... Line 157...
146
/* Maximum size of that FireGL flag string */
157
/* Maximum size of that FireGL flag string */
147
 
158
 
Line 148... Line 159...
148
#define ATOM_FIREGL_FLAG_STRING     "FGL"	/* Flag used to enable FireGL Support */
159
#define ATOM_FIREGL_FLAG_STRING     "FGL"             //Flag used to enable FireGL Support
149
#define ATOM_MAX_SIZE_OF_FIREGL_FLAG_STRING  3	/* sizeof( ATOM_FIREGL_FLAG_STRING ) */
160
#define ATOM_MAX_SIZE_OF_FIREGL_FLAG_STRING  3        //sizeof( ATOM_FIREGL_FLAG_STRING )
Line 150... Line 161...
150
 
161
 
151
#define ATOM_FAKE_DESKTOP_STRING    "DSK"	/* Flag used to enable mobile ASIC on Desktop */
162
#define ATOM_FAKE_DESKTOP_STRING    "DSK"             //Flag used to enable mobile ASIC on Desktop
Line 152... Line 163...
152
#define ATOM_MAX_SIZE_OF_FAKE_DESKTOP_STRING  ATOM_MAX_SIZE_OF_FIREGL_FLAG_STRING
163
#define ATOM_MAX_SIZE_OF_FAKE_DESKTOP_STRING  ATOM_MAX_SIZE_OF_FIREGL_FLAG_STRING
153
 
164
 
Line 154... Line 165...
154
#define ATOM_M54T_FLAG_STRING       "M54T"	/* Flag used to enable M54T Support */
165
#define ATOM_M54T_FLAG_STRING       "M54T"            //Flag used to enable M54T Support
Line 171... Line 182...
171
 
182
 
172
/* Common header for all ROM Data tables.
183
/* Common header for all ROM Data tables.
173
  Every table pointed  _ATOM_MASTER_DATA_TABLE has this common header.
184
  Every table pointed  _ATOM_MASTER_DATA_TABLE has this common header.
Line 174... Line 185...
174
  And the pointer actually points to this header. */
185
  And the pointer actually points to this header. */
-
 
186
 
175
 
187
typedef struct _ATOM_COMMON_TABLE_HEADER
176
typedef struct _ATOM_COMMON_TABLE_HEADER {
188
{
177
	USHORT usStructureSize;
189
	USHORT usStructureSize;
178
	UCHAR ucTableFormatRevision;	/*Change it when the Parser is not backward compatible */
190
	UCHAR ucTableFormatRevision;	/*Change it when the Parser is not backward compatible */
179
	UCHAR ucTableContentRevision;	/*Change it only when the table needs to change but the firmware */
191
	UCHAR ucTableContentRevision;	/*Change it only when the table needs to change but the firmware */
Line 180... Line 192...
180
	/*Image can't be updated, while Driver needs to carry the new table! */
192
	/*Image can't be updated, while Driver needs to carry the new table! */
-
 
193
}ATOM_COMMON_TABLE_HEADER;
181
} ATOM_COMMON_TABLE_HEADER;
194
 
182
 
195
typedef struct _ATOM_ROM_HEADER
183
typedef struct _ATOM_ROM_HEADER {
196
{
184
	ATOM_COMMON_TABLE_HEADER sHeader;
197
	ATOM_COMMON_TABLE_HEADER sHeader;
185
	UCHAR uaFirmWareSignature[4];	/*Signature to distinguish between Atombios and non-atombios,
198
	UCHAR uaFirmWareSignature[4];	/*Signature to distinguish between Atombios and non-atombios,
Line 207... Line 220...
207
#define	UTEMP	USHORT
220
	#define	UTEMP	USHORT
208
#define	USHORT	void*
221
	#define	USHORT	void*
209
#endif
222
#endif
Line 210... Line 223...
210
 
223
 
211
typedef struct _ATOM_MASTER_LIST_OF_COMMAND_TABLES {
224
typedef struct _ATOM_MASTER_LIST_OF_COMMAND_TABLES{
212
	USHORT ASIC_Init;	/* Function Table, used by various SW components,latest version 1.1 */
225
  USHORT ASIC_Init;                              //Function Table, used by various SW components,latest version 1.1
213
	USHORT GetDisplaySurfaceSize;	/* Atomic Table,  Used by Bios when enabling HW ICON */
226
  USHORT GetDisplaySurfaceSize;                  //Atomic Table,  Used by Bios when enabling HW ICON
214
	USHORT ASIC_RegistersInit;	/* Atomic Table,  indirectly used by various SW components,called from ASIC_Init */
227
  USHORT ASIC_RegistersInit;                     //Atomic Table,  indirectly used by various SW components,called from ASIC_Init
215
	USHORT VRAM_BlockVenderDetection;	/* Atomic Table,  used only by Bios */
228
  USHORT VRAM_BlockVenderDetection;              //Atomic Table,  used only by Bios
216
	USHORT DIGxEncoderControl;	/* Only used by Bios */
229
  USHORT DIGxEncoderControl;										 //Only used by Bios
217
	USHORT MemoryControllerInit;	/* Atomic Table,  indirectly used by various SW components,called from ASIC_Init */
230
  USHORT MemoryControllerInit;                   //Atomic Table,  indirectly used by various SW components,called from ASIC_Init
218
	USHORT EnableCRTCMemReq;	/* Function Table,directly used by various SW components,latest version 2.1 */
231
  USHORT EnableCRTCMemReq;                       //Function Table,directly used by various SW components,latest version 2.1
219
	USHORT MemoryParamAdjust;	/* Atomic Table,  indirectly used by various SW components,called from SetMemoryClock if needed */
232
  USHORT MemoryParamAdjust; 										 //Atomic Table,  indirectly used by various SW components,called from SetMemoryClock if needed
220
	USHORT DVOEncoderControl;	/* Function Table,directly used by various SW components,latest version 1.2 */
233
  USHORT DVOEncoderControl;                      //Function Table,directly used by various SW components,latest version 1.2
221
	USHORT GPIOPinControl;	/* Atomic Table,  only used by Bios */
234
  USHORT GPIOPinControl;												 //Atomic Table,  only used by Bios
222
	USHORT SetEngineClock;	/*Function Table,directly used by various SW components,latest version 1.1 */
235
  USHORT SetEngineClock;                         //Function Table,directly used by various SW components,latest version 1.1
223
	USHORT SetMemoryClock;	/* Function Table,directly used by various SW components,latest version 1.1 */
236
  USHORT SetMemoryClock;                         //Function Table,directly used by various SW components,latest version 1.1
224
	USHORT SetPixelClock;	/*Function Table,directly used by various SW components,latest version 1.2 */
237
  USHORT SetPixelClock;                          //Function Table,directly used by various SW components,latest version 1.2  
225
	USHORT DynamicClockGating;	/* Atomic Table,  indirectly used by various SW components,called from ASIC_Init */
238
  USHORT DynamicClockGating;                     //Atomic Table,  indirectly used by various SW components,called from ASIC_Init
226
	USHORT ResetMemoryDLL;	/* Atomic Table,  indirectly used by various SW components,called from SetMemoryClock */
239
  USHORT ResetMemoryDLL;                         //Atomic Table,  indirectly used by various SW components,called from SetMemoryClock
227
	USHORT ResetMemoryDevice;	/* Atomic Table,  indirectly used by various SW components,called from SetMemoryClock */
240
  USHORT ResetMemoryDevice;                      //Atomic Table,  indirectly used by various SW components,called from SetMemoryClock
228
	USHORT MemoryPLLInit;
241
	USHORT MemoryPLLInit;
229
	USHORT AdjustDisplayPll;	/* only used by Bios */
242
  USHORT AdjustDisplayPll;												//only used by Bios
230
	USHORT AdjustMemoryController;	/* Atomic Table,  indirectly used by various SW components,called from SetMemoryClock */
243
  USHORT AdjustMemoryController;                 //Atomic Table,  indirectly used by various SW components,called from SetMemoryClock                
231
	USHORT EnableASIC_StaticPwrMgt;	/* Atomic Table,  only used by Bios */
244
  USHORT EnableASIC_StaticPwrMgt;                //Atomic Table,  only used by Bios
232
	USHORT ASIC_StaticPwrMgtStatusChange;	/* Obsolete, only used by Bios */
245
  USHORT ASIC_StaticPwrMgtStatusChange;          //Obsolete ,     only used by Bios   
233
	USHORT DAC_LoadDetection;	/* Atomic Table,  directly used by various SW components,latest version 1.2 */
246
  USHORT DAC_LoadDetection;                      //Atomic Table,  directly used by various SW components,latest version 1.2  
234
	USHORT LVTMAEncoderControl;	/* Atomic Table,directly used by various SW components,latest version 1.3 */
247
  USHORT LVTMAEncoderControl;                    //Atomic Table,directly used by various SW components,latest version 1.3
235
	USHORT LCD1OutputControl;	/* Atomic Table,  directly used by various SW components,latest version 1.1 */
248
  USHORT LCD1OutputControl;                      //Atomic Table,  directly used by various SW components,latest version 1.1 
236
	USHORT DAC1EncoderControl;	/* Atomic Table,  directly used by various SW components,latest version 1.1 */
249
  USHORT DAC1EncoderControl;                     //Atomic Table,  directly used by various SW components,latest version 1.1  
237
	USHORT DAC2EncoderControl;	/* Atomic Table,  directly used by various SW components,latest version 1.1 */
250
  USHORT DAC2EncoderControl;                     //Atomic Table,  directly used by various SW components,latest version 1.1 
238
	USHORT DVOOutputControl;	/* Atomic Table,  directly used by various SW components,latest version 1.1 */
251
  USHORT DVOOutputControl;                       //Atomic Table,  directly used by various SW components,latest version 1.1 
239
	USHORT CV1OutputControl;	/* Atomic Table,  directly used by various SW components,latest version 1.1 */
252
  USHORT CV1OutputControl;                       //Atomic Table,  Atomic Table,  Obsolete from Ry6xx, use DAC2 Output instead 
240
	USHORT GetConditionalGoldenSetting;	/* only used by Bios */
253
  USHORT GetConditionalGoldenSetting;            //only used by Bios
241
	USHORT TVEncoderControl;	/* Function Table,directly used by various SW components,latest version 1.1 */
254
  USHORT TVEncoderControl;                       //Function Table,directly used by various SW components,latest version 1.1
242
	USHORT TMDSAEncoderControl;	/* Atomic Table,  directly used by various SW components,latest version 1.3 */
255
  USHORT TMDSAEncoderControl;                    //Atomic Table,  directly used by various SW components,latest version 1.3
243
	USHORT LVDSEncoderControl;	/* Atomic Table,  directly used by various SW components,latest version 1.3 */
256
  USHORT LVDSEncoderControl;                     //Atomic Table,  directly used by various SW components,latest version 1.3
244
	USHORT TV1OutputControl;	/* Atomic Table,  directly used by various SW components,latest version 1.1 */
257
  USHORT TV1OutputControl;                       //Atomic Table,  Obsolete from Ry6xx, use DAC2 Output instead
245
	USHORT EnableScaler;	/* Atomic Table,  used only by Bios */
258
  USHORT EnableScaler;                           //Atomic Table,  used only by Bios
246
	USHORT BlankCRTC;	/* Atomic Table,  directly used by various SW components,latest version 1.1 */
259
  USHORT BlankCRTC;                              //Atomic Table,  directly used by various SW components,latest version 1.1 
247
	USHORT EnableCRTC;	/* Atomic Table,  directly used by various SW components,latest version 1.1 */
260
  USHORT EnableCRTC;                             //Atomic Table,  directly used by various SW components,latest version 1.1 
248
	USHORT GetPixelClock;	/* Atomic Table,  directly used by various SW components,latest version 1.1 */
261
  USHORT GetPixelClock;                          //Atomic Table,  directly used by various SW components,latest version 1.1 
249
	USHORT EnableVGA_Render;	/* Function Table,directly used by various SW components,latest version 1.1 */
262
  USHORT EnableVGA_Render;                       //Function Table,directly used by various SW components,latest version 1.1
250
	USHORT EnableVGA_Access;	/* Obsolete ,     only used by Bios */
263
  USHORT GetSCLKOverMCLKRatio;                   //Atomic Table,  only used by Bios
251
	USHORT SetCRTC_Timing;	/* Atomic Table,  directly used by various SW components,latest version 1.1 */
264
  USHORT SetCRTC_Timing;                         //Atomic Table,  directly used by various SW components,latest version 1.1
252
	USHORT SetCRTC_OverScan;	/* Atomic Table,  used by various SW components,latest version 1.1 */
265
  USHORT SetCRTC_OverScan;                       //Atomic Table,  used by various SW components,latest version 1.1 
253
	USHORT SetCRTC_Replication;	/* Atomic Table,  used only by Bios */
266
  USHORT SetCRTC_Replication;                    //Atomic Table,  used only by Bios
254
	USHORT SelectCRTC_Source;	/* Atomic Table,  directly used by various SW components,latest version 1.1 */
267
  USHORT SelectCRTC_Source;                      //Atomic Table,  directly used by various SW components,latest version 1.1 
255
	USHORT EnableGraphSurfaces;	/* Atomic Table,  used only by Bios */
268
  USHORT EnableGraphSurfaces;                    //Atomic Table,  used only by Bios
256
	USHORT UpdateCRTC_DoubleBufferRegisters;
269
	USHORT UpdateCRTC_DoubleBufferRegisters;
257
	USHORT LUT_AutoFill;	/* Atomic Table,  only used by Bios */
270
  USHORT LUT_AutoFill;                           //Atomic Table,  only used by Bios
258
	USHORT EnableHW_IconCursor;	/* Atomic Table,  only used by Bios */
271
  USHORT EnableHW_IconCursor;                    //Atomic Table,  only used by Bios
259
	USHORT GetMemoryClock;	/* Atomic Table,  directly used by various SW components,latest version 1.1 */
272
  USHORT GetMemoryClock;                         //Atomic Table,  directly used by various SW components,latest version 1.1 
260
	USHORT GetEngineClock;	/* Atomic Table,  directly used by various SW components,latest version 1.1 */
273
  USHORT GetEngineClock;                         //Atomic Table,  directly used by various SW components,latest version 1.1 
261
	USHORT SetCRTC_UsingDTDTiming;	/* Atomic Table,  directly used by various SW components,latest version 1.1 */
274
  USHORT SetCRTC_UsingDTDTiming;                 //Atomic Table,  directly used by various SW components,latest version 1.1
262
	USHORT ExternalEncoderControl;	/* Atomic Table,  directly used by various SW components,latest version 2.1 */
275
  USHORT ExternalEncoderControl;                 //Atomic Table,  directly used by various SW components,latest version 2.1
263
	USHORT LVTMAOutputControl;	/* Atomic Table,  directly used by various SW components,latest version 1.1 */
276
  USHORT LVTMAOutputControl;                     //Atomic Table,  directly used by various SW components,latest version 1.1
264
	USHORT VRAM_BlockDetectionByStrap;	/* Atomic Table,  used only by Bios */
277
  USHORT VRAM_BlockDetectionByStrap;             //Atomic Table,  used only by Bios
265
	USHORT MemoryCleanUp;	/* Atomic Table,  only used by Bios */
278
  USHORT MemoryCleanUp;                          //Atomic Table,  only used by Bios    
266
	USHORT ProcessI2cChannelTransaction;	/* Function Table,only used by Bios */
279
  USHORT ProcessI2cChannelTransaction;           //Function Table,only used by Bios
267
	USHORT WriteOneByteToHWAssistedI2C;	/* Function Table,indirectly used by various SW components */
280
  USHORT WriteOneByteToHWAssistedI2C;            //Function Table,indirectly used by various SW components 
268
	USHORT ReadHWAssistedI2CStatus;	/* Atomic Table,  indirectly used by various SW components */
281
  USHORT ReadHWAssistedI2CStatus;                //Atomic Table,  indirectly used by various SW components
269
	USHORT SpeedFanControl;	/* Function Table,indirectly used by various SW components,called from ASIC_Init */
282
  USHORT SpeedFanControl;                        //Function Table,indirectly used by various SW components,called from ASIC_Init
270
	USHORT PowerConnectorDetection;	/* Atomic Table,  directly used by various SW components,latest version 1.1 */
283
  USHORT PowerConnectorDetection;                //Atomic Table,  directly used by various SW components,latest version 1.1
271
	USHORT MC_Synchronization;	/* Atomic Table,  indirectly used by various SW components,called from SetMemoryClock */
284
  USHORT MC_Synchronization;                     //Atomic Table,  indirectly used by various SW components,called from SetMemoryClock
272
	USHORT ComputeMemoryEnginePLL;	/* Atomic Table,  indirectly used by various SW components,called from SetMemory/EngineClock */
285
  USHORT ComputeMemoryEnginePLL;                 //Atomic Table,  indirectly used by various SW components,called from SetMemory/EngineClock
273
	USHORT MemoryRefreshConversion;	/* Atomic Table,  indirectly used by various SW components,called from SetMemory or SetEngineClock */
286
  USHORT MemoryRefreshConversion;                //Atomic Table,  indirectly used by various SW components,called from SetMemory or SetEngineClock
274
	USHORT VRAM_GetCurrentInfoBlock;	/* Atomic Table,  used only by Bios */
287
  USHORT VRAM_GetCurrentInfoBlock;               //Atomic Table,  used only by Bios
275
	USHORT DynamicMemorySettings;	/* Atomic Table,  indirectly used by various SW components,called from SetMemoryClock */
288
  USHORT DynamicMemorySettings;                  //Atomic Table,  indirectly used by various SW components,called from SetMemoryClock
276
	USHORT MemoryTraining;	/* Atomic Table,  used only by Bios */
289
  USHORT MemoryTraining;                         //Atomic Table,  used only by Bios
277
	USHORT EnableSpreadSpectrumOnPPLL;	/* Atomic Table,  directly used by various SW components,latest version 1.2 */
290
  USHORT EnableSpreadSpectrumOnPPLL;             //Atomic Table,  directly used by various SW components,latest version 1.2
278
	USHORT TMDSAOutputControl;	/* Atomic Table,  directly used by various SW components,latest version 1.1 */
291
  USHORT TMDSAOutputControl;                     //Atomic Table,  directly used by various SW components,latest version 1.1
279
	USHORT SetVoltage;	/* Function Table,directly and/or indirectly used by various SW components,latest version 1.1 */
292
  USHORT SetVoltage;                             //Function Table,directly and/or indirectly used by various SW components,latest version 1.1
280
	USHORT DAC1OutputControl;	/* Atomic Table,  directly used by various SW components,latest version 1.1 */
293
  USHORT DAC1OutputControl;                      //Atomic Table,  directly used by various SW components,latest version 1.1
281
	USHORT DAC2OutputControl;	/* Atomic Table,  directly used by various SW components,latest version 1.1 */
294
  USHORT DAC2OutputControl;                      //Atomic Table,  directly used by various SW components,latest version 1.1
282
	USHORT SetupHWAssistedI2CStatus;	/* Function Table,only used by Bios, obsolete soon.Switch to use "ReadEDIDFromHWAssistedI2C" */
295
  USHORT SetupHWAssistedI2CStatus;               //Function Table,only used by Bios, obsolete soon.Switch to use "ReadEDIDFromHWAssistedI2C"
283
	USHORT ClockSource;	/* Atomic Table,  indirectly used by various SW components,called from ASIC_Init */
296
  USHORT ClockSource;                            //Atomic Table,  indirectly used by various SW components,called from ASIC_Init
284
	USHORT MemoryDeviceInit;	/* Atomic Table,  indirectly used by various SW components,called from SetMemoryClock */
297
  USHORT MemoryDeviceInit;                       //Atomic Table,  indirectly used by various SW components,called from SetMemoryClock
285
	USHORT EnableYUV;	/* Atomic Table,  indirectly used by various SW components,called from EnableVGARender */
298
  USHORT EnableYUV;                              //Atomic Table,  indirectly used by various SW components,called from EnableVGARender
286
	USHORT DIG1EncoderControl;	/* Atomic Table,directly used by various SW components,latest version 1.1 */
299
  USHORT DIG1EncoderControl;                     //Atomic Table,directly used by various SW components,latest version 1.1
287
	USHORT DIG2EncoderControl;	/* Atomic Table,directly used by various SW components,latest version 1.1 */
300
  USHORT DIG2EncoderControl;                     //Atomic Table,directly used by various SW components,latest version 1.1
288
	USHORT DIG1TransmitterControl;	/* Atomic Table,directly used by various SW components,latest version 1.1 */
301
  USHORT DIG1TransmitterControl;                 //Atomic Table,directly used by various SW components,latest version 1.1
289
	USHORT DIG2TransmitterControl;	/* Atomic Table,directly used by various SW components,latest version 1.1 */
302
  USHORT DIG2TransmitterControl;	               //Atomic Table,directly used by various SW components,latest version 1.1 
290
	USHORT ProcessAuxChannelTransaction;	/* Function Table,only used by Bios */
303
  USHORT ProcessAuxChannelTransaction;					 //Function Table,only used by Bios
291
	USHORT DPEncoderService;	/* Function Table,only used by Bios */
304
  USHORT DPEncoderService;											 //Function Table,only used by Bios
Line 292... Line 305...
292
} ATOM_MASTER_LIST_OF_COMMAND_TABLES;
305
}ATOM_MASTER_LIST_OF_COMMAND_TABLES;   
293
 
306
 
294
/*  For backward compatible */
307
// For backward compatible 
295
#define ReadEDIDFromHWAssistedI2C                ProcessI2cChannelTransaction
308
#define ReadEDIDFromHWAssistedI2C                ProcessI2cChannelTransaction
296
#define UNIPHYTransmitterControl						     DIG1TransmitterControl
309
#define UNIPHYTransmitterControl						     DIG1TransmitterControl
297
#define LVTMATransmitterControl							     DIG2TransmitterControl
310
#define LVTMATransmitterControl							     DIG2TransmitterControl
-
 
311
#define SetCRTC_DPM_State                        GetConditionalGoldenSetting
-
 
312
#define SetUniphyInstance                        ASIC_StaticPwrMgtStatusChange
Line 298... Line 313...
298
#define SetCRTC_DPM_State                        GetConditionalGoldenSetting
313
#define HPDInterruptService                      ReadHWAssistedI2CStatus
-
 
314
#define EnableVGA_Access                         GetSCLKOverMCLKRatio
299
#define SetUniphyInstance                        ASIC_StaticPwrMgtStatusChange
315
 
300
 
316
typedef struct _ATOM_MASTER_COMMAND_TABLE
301
typedef struct _ATOM_MASTER_COMMAND_TABLE {
317
{
Line 302... Line 318...
302
	ATOM_COMMON_TABLE_HEADER sHeader;
318
	ATOM_COMMON_TABLE_HEADER sHeader;
303
	ATOM_MASTER_LIST_OF_COMMAND_TABLES ListOfCommandTables;
319
	ATOM_MASTER_LIST_OF_COMMAND_TABLES ListOfCommandTables;
304
} ATOM_MASTER_COMMAND_TABLE;
320
}ATOM_MASTER_COMMAND_TABLE;
305
 
321
 
-
 
322
/****************************************************************************/
306
/****************************************************************************/
323
// Structures used in every command table
307
/*  Structures used in every command table */
324
/****************************************************************************/
308
/****************************************************************************/
325
typedef struct _ATOM_TABLE_ATTRIBUTE
309
typedef struct _ATOM_TABLE_ATTRIBUTE {
326
{
310
#if ATOM_BIG_ENDIAN
327
#if ATOM_BIG_ENDIAN
311
	USHORT UpdatedByUtility:1;	/* [15]=Table updated by utility flag */
328
  USHORT  UpdatedByUtility:1;         //[15]=Table updated by utility flag
312
	USHORT PS_SizeInBytes:7;	/* [14:8]=Size of parameter space in Bytes (multiple of a dword), */
329
  USHORT  PS_SizeInBytes:7;           //[14:8]=Size of parameter space in Bytes (multiple of a dword), 
313
	USHORT WS_SizeInBytes:8;	/* [7:0]=Size of workspace in Bytes (in multiple of a dword), */
330
  USHORT  WS_SizeInBytes:8;           //[7:0]=Size of workspace in Bytes (in multiple of a dword), 
314
#else
331
#else
315
	USHORT WS_SizeInBytes:8;	/* [7:0]=Size of workspace in Bytes (in multiple of a dword), */
332
  USHORT  WS_SizeInBytes:8;           //[7:0]=Size of workspace in Bytes (in multiple of a dword), 
Line 316... Line 333...
316
	USHORT PS_SizeInBytes:7;	/* [14:8]=Size of parameter space in Bytes (multiple of a dword), */
333
  USHORT  PS_SizeInBytes:7;           //[14:8]=Size of parameter space in Bytes (multiple of a dword), 
-
 
334
  USHORT  UpdatedByUtility:1;         //[15]=Table updated by utility flag
317
	USHORT UpdatedByUtility:1;	/* [15]=Table updated by utility flag */
335
#endif
318
#endif
336
}ATOM_TABLE_ATTRIBUTE;
319
} ATOM_TABLE_ATTRIBUTE;
337
 
Line 320... Line 338...
320
 
338
typedef union _ATOM_TABLE_ATTRIBUTE_ACCESS
321
typedef union _ATOM_TABLE_ATTRIBUTE_ACCESS {
339
{
322
	ATOM_TABLE_ATTRIBUTE sbfAccess;
340
	ATOM_TABLE_ATTRIBUTE sbfAccess;
323
	USHORT susAccess;
341
	USHORT susAccess;
324
} ATOM_TABLE_ATTRIBUTE_ACCESS;
342
}ATOM_TABLE_ATTRIBUTE_ACCESS;
325
 
343
 
-
 
344
/****************************************************************************/
326
/****************************************************************************/
345
// Common header for all command tables.
327
/*  Common header for all command tables. */
346
// Every table pointed by _ATOM_MASTER_COMMAND_TABLE has this common header. 
328
/*  Every table pointed by _ATOM_MASTER_COMMAND_TABLE has this common header. */
347
// And the pointer actually points to this header.
Line 329... Line 348...
329
/*  And the pointer actually points to this header. */
348
/****************************************************************************/
330
/****************************************************************************/
349
typedef struct _ATOM_COMMON_ROM_COMMAND_TABLE_HEADER
331
typedef struct _ATOM_COMMON_ROM_COMMAND_TABLE_HEADER {
350
{
332
	ATOM_COMMON_TABLE_HEADER CommonHeader;
351
	ATOM_COMMON_TABLE_HEADER CommonHeader;
333
	ATOM_TABLE_ATTRIBUTE TableAttribute;
352
	ATOM_TABLE_ATTRIBUTE TableAttribute;
Line 334... Line 353...
334
} ATOM_COMMON_ROM_COMMAND_TABLE_HEADER;
353
}ATOM_COMMON_ROM_COMMAND_TABLE_HEADER;
-
 
354
 
335
 
355
/****************************************************************************/
336
/****************************************************************************/
356
// Structures used by ComputeMemoryEnginePLLTable
337
/*  Structures used by ComputeMemoryEnginePLLTable */
357
/****************************************************************************/
338
/****************************************************************************/
358
#define COMPUTE_MEMORY_PLL_PARAM        1
339
#define COMPUTE_MEMORY_PLL_PARAM        1
359
#define COMPUTE_ENGINE_PLL_PARAM        2
340
#define COMPUTE_ENGINE_PLL_PARAM        2
360
 
Line 341... Line 361...
341
 
361
typedef struct _COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS
-
 
362
{
342
typedef struct _COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS {
363
  ULONG   ulClock;        //When returen, it's the re-calculated clock based on given Fb_div Post_Div and ref_div
343
	ULONG ulClock;		/* When returen, it's the re-calculated clock based on given Fb_div Post_Div and ref_div */
364
  UCHAR   ucAction;       //0:reserved //1:Memory //2:Engine  
344
	UCHAR ucAction;		/* 0:reserved //1:Memory //2:Engine */
365
  UCHAR   ucReserved;     //may expand to return larger Fbdiv later
345
	UCHAR ucReserved;	/* may expand to return larger Fbdiv later */
366
  UCHAR   ucFbDiv;        //return value
346
	UCHAR ucFbDiv;		/* return value */
367
  UCHAR   ucPostDiv;      //return value
347
	UCHAR ucPostDiv;	/* return value */
368
}COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS;
Line -... Line 369...
-
 
369
 
348
} COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS;
370
typedef struct _COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V2
349
 
371
{
350
typedef struct _COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V2 {
372
  ULONG   ulClock;        //When return, [23:0] return real clock 
351
	ULONG ulClock;		/* When return, [23:0] return real clock */
373
  UCHAR   ucAction;       //0:reserved;COMPUTE_MEMORY_PLL_PARAM:Memory;COMPUTE_ENGINE_PLL_PARAM:Engine. it return ref_div to be written to register
352
	UCHAR ucAction;		/* 0:reserved;COMPUTE_MEMORY_PLL_PARAM:Memory;COMPUTE_ENGINE_PLL_PARAM:Engine. it return ref_div to be written to register */
374
  USHORT  usFbDiv;		    //return Feedback value to be written to register
353
	USHORT usFbDiv;		/* return Feedback value to be written to register */
375
  UCHAR   ucPostDiv;      //return post div to be written to register
354
	UCHAR ucPostDiv;	/* return post div to be written to register */
376
}COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V2;
Line 355... Line 377...
355
} COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V2;
377
#define COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_PS_ALLOCATION   COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS
356
#define COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_PS_ALLOCATION   COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS
378
 
357
 
379
 
358
#define SET_CLOCK_FREQ_MASK                     0x00FFFFFF	/* Clock change tables only take bit [23:0] as the requested clock value */
380
#define SET_CLOCK_FREQ_MASK                     0x00FFFFFF  //Clock change tables only take bit [23:0] as the requested clock value
359
#define USE_NON_BUS_CLOCK_MASK                  0x01000000	/* Applicable to both memory and engine clock change, when set, it uses another clock as the temporary clock (engine uses memory and vice versa) */
381
#define USE_NON_BUS_CLOCK_MASK                  0x01000000  //Applicable to both memory and engine clock change, when set, it uses another clock as the temporary clock (engine uses memory and vice versa)
Line 360... Line 382...
360
#define USE_MEMORY_SELF_REFRESH_MASK            0x02000000	/* Only applicable to memory clock change, when set, using memory self refresh during clock transition */
382
#define USE_MEMORY_SELF_REFRESH_MASK            0x02000000	//Only applicable to memory clock change, when set, using memory self refresh during clock transition
-
 
383
#define SKIP_INTERNAL_MEMORY_PARAMETER_CHANGE   0x04000000  //Only applicable to memory clock change, when set, the table will skip predefined internal memory parameter change
361
#define SKIP_INTERNAL_MEMORY_PARAMETER_CHANGE   0x04000000	/* Only applicable to memory clock change, when set, the table will skip predefined internal memory parameter change */
384
#define FIRST_TIME_CHANGE_CLOCK									0x08000000	//Applicable to both memory and engine clock change,when set, it means this is 1st time to change clock after ASIC bootup
362
#define FIRST_TIME_CHANGE_CLOCK									0x08000000	/* Applicable to both memory and engine clock change,when set, it means this is 1st time to change clock after ASIC bootup */
385
#define SKIP_SW_PROGRAM_PLL											0x10000000	//Applicable to both memory and engine clock change, when set, it means the table will not program SPLL/MPLL
363
#define SKIP_SW_PROGRAM_PLL											0x10000000	/* Applicable to both memory and engine clock change, when set, it means the table will not program SPLL/MPLL */
386
#define USE_SS_ENABLED_PIXEL_CLOCK  USE_NON_BUS_CLOCK_MASK
364
#define USE_SS_ENABLED_PIXEL_CLOCK  USE_NON_BUS_CLOCK_MASK
387
 
365
 
388
#define b3USE_NON_BUS_CLOCK_MASK                  0x01       //Applicable to both memory and engine clock change, when set, it uses another clock as the temporary clock (engine uses memory and vice versa)
366
#define b3USE_NON_BUS_CLOCK_MASK                  0x01	/* Applicable to both memory and engine clock change, when set, it uses another clock as the temporary clock (engine uses memory and vice versa) */
389
#define b3USE_MEMORY_SELF_REFRESH                 0x02	     //Only applicable to memory clock change, when set, using memory self refresh during clock transition
367
#define b3USE_MEMORY_SELF_REFRESH                 0x02	/* Only applicable to memory clock change, when set, using memory self refresh during clock transition */
390
#define b3SKIP_INTERNAL_MEMORY_PARAMETER_CHANGE   0x04       //Only applicable to memory clock change, when set, the table will skip predefined internal memory parameter change
368
#define b3SKIP_INTERNAL_MEMORY_PARAMETER_CHANGE   0x04	/* Only applicable to memory clock change, when set, the table will skip predefined internal memory parameter change */
391
#define b3FIRST_TIME_CHANGE_CLOCK									0x08       //Applicable to both memory and engine clock change,when set, it means this is 1st time to change clock after ASIC bootup
Line 369... Line 392...
369
#define b3FIRST_TIME_CHANGE_CLOCK									0x08	/* Applicable to both memory and engine clock change,when set, it means this is 1st time to change clock after ASIC bootup */
392
#define b3SKIP_SW_PROGRAM_PLL											0x10			 //Applicable to both memory and engine clock change, when set, it means the table will not program SPLL/MPLL
-
 
393
 
370
#define b3SKIP_SW_PROGRAM_PLL											0x10	/* Applicable to both memory and engine clock change, when set, it means the table will not program SPLL/MPLL */
394
typedef struct _ATOM_COMPUTE_CLOCK_FREQ
371
 
395
{
372
typedef struct _ATOM_COMPUTE_CLOCK_FREQ {
396
#if ATOM_BIG_ENDIAN
Line 373... Line 397...
373
#if ATOM_BIG_ENDIAN
397
  ULONG ulComputeClockFlag:8;                 // =1: COMPUTE_MEMORY_PLL_PARAM, =2: COMPUTE_ENGINE_PLL_PARAM
-
 
398
  ULONG ulClockFreq:24;                       // in unit of 10kHz
374
	ULONG ulComputeClockFlag:8;	/*  =1: COMPUTE_MEMORY_PLL_PARAM, =2: COMPUTE_ENGINE_PLL_PARAM */
399
#else
-
 
400
  ULONG ulClockFreq:24;                       // in unit of 10kHz
375
	ULONG ulClockFreq:24;	/*  in unit of 10kHz */
401
  ULONG ulComputeClockFlag:8;                 // =1: COMPUTE_MEMORY_PLL_PARAM, =2: COMPUTE_ENGINE_PLL_PARAM
376
#else
402
#endif
377
	ULONG ulClockFreq:24;	/*  in unit of 10kHz */
403
}ATOM_COMPUTE_CLOCK_FREQ;
378
	ULONG ulComputeClockFlag:8;	/*  =1: COMPUTE_MEMORY_PLL_PARAM, =2: COMPUTE_ENGINE_PLL_PARAM */
404
 
379
#endif
405
typedef struct _ATOM_S_MPLL_FB_DIVIDER
380
} ATOM_COMPUTE_CLOCK_FREQ;
406
{
381
 
407
	USHORT usFbDivFrac;
382
typedef struct _ATOM_S_MPLL_FB_DIVIDER {
408
	USHORT usFbDiv;
Line 383... Line 409...
383
	USHORT usFbDivFrac;
409
}ATOM_S_MPLL_FB_DIVIDER;
384
	USHORT usFbDiv;
410
 
385
} ATOM_S_MPLL_FB_DIVIDER;
411
typedef struct _COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V3
386
 
412
{
-
 
413
  union
-
 
414
  {
Line -... Line 415...
-
 
415
    ATOM_COMPUTE_CLOCK_FREQ  ulClock;         //Input Parameter
-
 
416
    ATOM_S_MPLL_FB_DIVIDER   ulFbDiv;         //Output Parameter
-
 
417
	};
-
 
418
  UCHAR   ucRefDiv;                           //Output Parameter      
-
 
419
  UCHAR   ucPostDiv;                          //Output Parameter      
-
 
420
  UCHAR   ucCntlFlag;                         //Output Parameter      
-
 
421
	UCHAR ucReserved;
-
 
422
}COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V3;
-
 
423
 
-
 
424
// ucCntlFlag
-
 
425
#define ATOM_PLL_CNTL_FLAG_PLL_POST_DIV_EN          1
-
 
426
#define ATOM_PLL_CNTL_FLAG_MPLL_VCO_MODE            2
387
typedef struct _COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V3 {
427
#define ATOM_PLL_CNTL_FLAG_FRACTION_DISABLE         4
-
 
428
#define ATOM_PLL_CNTL_FLAG_SPLL_ISPARE_9						8
388
	union {
429
 
389
		ATOM_COMPUTE_CLOCK_FREQ ulClock;	/* Input Parameter */
430
 
390
		ATOM_S_MPLL_FB_DIVIDER ulFbDiv;	/* Output Parameter */
431
// V4 are only used for APU which PLL outside GPU
Line 391... Line 432...
391
	};
432
typedef struct _COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V4
-
 
433
{
392
	UCHAR ucRefDiv;		/* Output Parameter */
434
#if ATOM_BIG_ENDIAN
393
	UCHAR ucPostDiv;	/* Output Parameter */
435
  ULONG  ucPostDiv;          //return parameter: post divider which is used to program to register directly
394
	UCHAR ucCntlFlag;	/* Output Parameter */
436
  ULONG  ulClock:24;         //Input= target clock, output = actual clock 
395
	UCHAR ucReserved;
437
#else
Line 396... Line 438...
396
} COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V3;
438
  ULONG  ulClock:24;         //Input= target clock, output = actual clock 
397
 
439
  ULONG  ucPostDiv;          //return parameter: post divider which is used to program to register directly
398
/*  ucCntlFlag */
440
#endif
399
#define ATOM_PLL_CNTL_FLAG_PLL_POST_DIV_EN          1
441
}COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V4;
-
 
442
 
400
#define ATOM_PLL_CNTL_FLAG_MPLL_VCO_MODE            2
443
typedef struct _DYNAMICE_MEMORY_SETTINGS_PARAMETER
401
#define ATOM_PLL_CNTL_FLAG_FRACTION_DISABLE         4
444
{
Line 402... Line 445...
402
 
445
	ATOM_COMPUTE_CLOCK_FREQ ulClock;
-
 
446
	ULONG ulReserved[2];
403
typedef struct _DYNAMICE_MEMORY_SETTINGS_PARAMETER {
447
}DYNAMICE_MEMORY_SETTINGS_PARAMETER;
404
	ATOM_COMPUTE_CLOCK_FREQ ulClock;
448
 
405
	ULONG ulReserved[2];
449
typedef struct _DYNAMICE_ENGINE_SETTINGS_PARAMETER
Line 406... Line 450...
406
} DYNAMICE_MEMORY_SETTINGS_PARAMETER;
450
{
407
 
451
	ATOM_COMPUTE_CLOCK_FREQ ulClock;
408
typedef struct _DYNAMICE_ENGINE_SETTINGS_PARAMETER {
452
	ULONG ulMemoryClock;
409
	ATOM_COMPUTE_CLOCK_FREQ ulClock;
453
	ULONG ulReserved;
-
 
454
}DYNAMICE_ENGINE_SETTINGS_PARAMETER;
410
	ULONG ulMemoryClock;
455
 
411
	ULONG ulReserved;
456
/****************************************************************************/
Line 412... Line 457...
412
} DYNAMICE_ENGINE_SETTINGS_PARAMETER;
457
// Structures used by SetEngineClockTable
-
 
458
/****************************************************************************/
413
 
459
typedef struct _SET_ENGINE_CLOCK_PARAMETERS
414
/****************************************************************************/
460
{
415
/*  Structures used by SetEngineClockTable */
461
  ULONG ulTargetEngineClock;          //In 10Khz unit
Line 416... Line 462...
416
/****************************************************************************/
462
}SET_ENGINE_CLOCK_PARAMETERS;
417
typedef struct _SET_ENGINE_CLOCK_PARAMETERS {
463
 
418
	ULONG ulTargetEngineClock;	/* In 10Khz unit */
464
typedef struct _SET_ENGINE_CLOCK_PS_ALLOCATION
419
} SET_ENGINE_CLOCK_PARAMETERS;
465
{
-
 
466
  ULONG ulTargetEngineClock;          //In 10Khz unit
420
 
467
	COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_PS_ALLOCATION sReserved;
421
typedef struct _SET_ENGINE_CLOCK_PS_ALLOCATION {
468
}SET_ENGINE_CLOCK_PS_ALLOCATION;
422
	ULONG ulTargetEngineClock;	/* In 10Khz unit */
469
 
Line 423... Line 470...
423
	COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_PS_ALLOCATION sReserved;
470
/****************************************************************************/
-
 
471
// Structures used by SetMemoryClockTable
424
} SET_ENGINE_CLOCK_PS_ALLOCATION;
472
/****************************************************************************/
425
 
473
typedef struct _SET_MEMORY_CLOCK_PARAMETERS
426
/****************************************************************************/
474
{
Line 427... Line 475...
427
/*  Structures used by SetMemoryClockTable */
475
  ULONG ulTargetMemoryClock;          //In 10Khz unit
428
/****************************************************************************/
476
}SET_MEMORY_CLOCK_PARAMETERS;
429
typedef struct _SET_MEMORY_CLOCK_PARAMETERS {
477
 
430
	ULONG ulTargetMemoryClock;	/* In 10Khz unit */
478
typedef struct _SET_MEMORY_CLOCK_PS_ALLOCATION
-
 
479
{
431
} SET_MEMORY_CLOCK_PARAMETERS;
480
  ULONG ulTargetMemoryClock;          //In 10Khz unit
432
 
481
	COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_PS_ALLOCATION sReserved;
433
typedef struct _SET_MEMORY_CLOCK_PS_ALLOCATION {
482
}SET_MEMORY_CLOCK_PS_ALLOCATION;
434
	ULONG ulTargetMemoryClock;	/* In 10Khz unit */
483
 
Line 435... Line 484...
435
	COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_PS_ALLOCATION sReserved;
484
/****************************************************************************/
436
} SET_MEMORY_CLOCK_PS_ALLOCATION;
485
// Structures used by ASIC_Init.ctb
437
 
486
/****************************************************************************/
438
/****************************************************************************/
487
typedef struct _ASIC_INIT_PARAMETERS
-
 
488
{
439
/*  Structures used by ASIC_Init.ctb */
489
  ULONG ulDefaultEngineClock;         //In 10Khz unit
440
/****************************************************************************/
490
  ULONG ulDefaultMemoryClock;         //In 10Khz unit
441
typedef struct _ASIC_INIT_PARAMETERS {
491
}ASIC_INIT_PARAMETERS;
442
	ULONG ulDefaultEngineClock;	/* In 10Khz unit */
492
 
Line 443... Line 493...
443
	ULONG ulDefaultMemoryClock;	/* In 10Khz unit */
493
typedef struct _ASIC_INIT_PS_ALLOCATION
444
} ASIC_INIT_PARAMETERS;
494
{
445
 
495
	ASIC_INIT_PARAMETERS sASICInitClocks;
446
typedef struct _ASIC_INIT_PS_ALLOCATION {
496
  SET_ENGINE_CLOCK_PS_ALLOCATION sReserved; //Caller doesn't need to init this structure
-
 
497
}ASIC_INIT_PS_ALLOCATION;
447
	ASIC_INIT_PARAMETERS sASICInitClocks;
498
 
448
	SET_ENGINE_CLOCK_PS_ALLOCATION sReserved;	/* Caller doesn't need to init this structure */
499
/****************************************************************************/
449
} ASIC_INIT_PS_ALLOCATION;
500
// Structure used by DynamicClockGatingTable.ctb
450
 
501
/****************************************************************************/
Line 451... Line 502...
451
/****************************************************************************/
502
typedef struct _DYNAMIC_CLOCK_GATING_PARAMETERS 
452
/*  Structure used by DynamicClockGatingTable.ctb */
503
{
Line 453... Line 504...
453
/****************************************************************************/
504
  UCHAR ucEnable;                     // ATOM_ENABLE or ATOM_DISABLE
-
 
505
	UCHAR ucPadding[3];
454
typedef struct _DYNAMIC_CLOCK_GATING_PARAMETERS {
506
}DYNAMIC_CLOCK_GATING_PARAMETERS;
455
	UCHAR ucEnable;		/*  ATOM_ENABLE or ATOM_DISABLE */
507
#define  DYNAMIC_CLOCK_GATING_PS_ALLOCATION  DYNAMIC_CLOCK_GATING_PARAMETERS
456
	UCHAR ucPadding[3];
508
 
Line 457... Line 509...
457
} DYNAMIC_CLOCK_GATING_PARAMETERS;
509
/****************************************************************************/
458
#define  DYNAMIC_CLOCK_GATING_PS_ALLOCATION  DYNAMIC_CLOCK_GATING_PARAMETERS
510
// Structure used by EnableASIC_StaticPwrMgtTable.ctb
459
 
511
/****************************************************************************/
460
/****************************************************************************/
512
typedef struct _ENABLE_ASIC_STATIC_PWR_MGT_PARAMETERS
-
 
513
{
461
/*  Structure used by EnableASIC_StaticPwrMgtTable.ctb */
514
  UCHAR ucEnable;                     // ATOM_ENABLE or ATOM_DISABLE
462
/****************************************************************************/
515
	UCHAR ucPadding[3];
463
typedef struct _ENABLE_ASIC_STATIC_PWR_MGT_PARAMETERS {
516
}ENABLE_ASIC_STATIC_PWR_MGT_PARAMETERS;
464
	UCHAR ucEnable;		/*  ATOM_ENABLE or ATOM_DISABLE */
517
#define ENABLE_ASIC_STATIC_PWR_MGT_PS_ALLOCATION  ENABLE_ASIC_STATIC_PWR_MGT_PARAMETERS
465
	UCHAR ucPadding[3];
518
 
466
} ENABLE_ASIC_STATIC_PWR_MGT_PARAMETERS;
519
/****************************************************************************/
Line 467... Line 520...
467
#define ENABLE_ASIC_STATIC_PWR_MGT_PS_ALLOCATION  ENABLE_ASIC_STATIC_PWR_MGT_PARAMETERS
520
// Structures used by DAC_LoadDetectionTable.ctb
Line 468... Line 521...
468
 
521
/****************************************************************************/
469
/****************************************************************************/
522
typedef struct _DAC_LOAD_DETECTION_PARAMETERS
470
/*  Structures used by DAC_LoadDetectionTable.ctb */
523
{
471
/****************************************************************************/
524
  USHORT usDeviceID;                  //{ATOM_DEVICE_CRTx_SUPPORT,ATOM_DEVICE_TVx_SUPPORT,ATOM_DEVICE_CVx_SUPPORT}
472
typedef struct _DAC_LOAD_DETECTION_PARAMETERS {
525
  UCHAR  ucDacType;                   //{ATOM_DAC_A,ATOM_DAC_B, ATOM_EXT_DAC}
473
	USHORT usDeviceID;	/* {ATOM_DEVICE_CRTx_SUPPORT,ATOM_DEVICE_TVx_SUPPORT,ATOM_DEVICE_CVx_SUPPORT} */
526
  UCHAR  ucMisc;											//Valid only when table revision =1.3 and above
-
 
527
}DAC_LOAD_DETECTION_PARAMETERS;
474
	UCHAR ucDacType;	/* {ATOM_DAC_A,ATOM_DAC_B, ATOM_EXT_DAC} */
528
 
475
	UCHAR ucMisc;		/* Valid only when table revision =1.3 and above */
529
// DAC_LOAD_DETECTION_PARAMETERS.ucMisc
476
} DAC_LOAD_DETECTION_PARAMETERS;
530
#define DAC_LOAD_MISC_YPrPb						0x01
477
 
531
 
478
/*  DAC_LOAD_DETECTION_PARAMETERS.ucMisc */
532
typedef struct _DAC_LOAD_DETECTION_PS_ALLOCATION
479
#define DAC_LOAD_MISC_YPrPb						0x01
533
{
480
 
534
	DAC_LOAD_DETECTION_PARAMETERS sDacload;
481
typedef struct _DAC_LOAD_DETECTION_PS_ALLOCATION {
535
  ULONG                                    Reserved[2];// Don't set this one, allocation for EXT DAC
482
	DAC_LOAD_DETECTION_PARAMETERS sDacload;
536
}DAC_LOAD_DETECTION_PS_ALLOCATION;
483
	ULONG Reserved[2];	/*  Don't set this one, allocation for EXT DAC */
537
 
484
} DAC_LOAD_DETECTION_PS_ALLOCATION;
538
/****************************************************************************/
485
 
539
// Structures used by DAC1EncoderControlTable.ctb and DAC2EncoderControlTable.ctb
486
/****************************************************************************/
540
/****************************************************************************/
487
/*  Structures used by DAC1EncoderControlTable.ctb and DAC2EncoderControlTable.ctb */
541
typedef struct _DAC_ENCODER_CONTROL_PARAMETERS 
488
/****************************************************************************/
542
{
489
typedef struct _DAC_ENCODER_CONTROL_PARAMETERS {
543
  USHORT usPixelClock;                // in 10KHz; for bios convenient
490
	USHORT usPixelClock;	/*  in 10KHz; for bios convenient */
544
  UCHAR  ucDacStandard;               // See definition of ATOM_DACx_xxx, For DEC3.0, bit 7 used as internal flag to indicate DAC2 (==1) or DAC1 (==0)
491
	UCHAR ucDacStandard;	/*  See definition of ATOM_DACx_xxx, For DEC3.0, bit 7 used as internal flag to indicate DAC2 (==1) or DAC1 (==0) */
545
  UCHAR  ucAction;                    // 0: turn off encoder
492
	UCHAR ucAction;		/*  0: turn off encoder */
546
                                      // 1: setup and turn on encoder
493
	/*  1: setup and turn on encoder */
547
                                      // 7: ATOM_ENCODER_INIT Initialize DAC
494
	/*  7: ATOM_ENCODER_INIT Initialize DAC */
548
}DAC_ENCODER_CONTROL_PARAMETERS;
495
} DAC_ENCODER_CONTROL_PARAMETERS;
549
 
Line 496... Line 550...
496
 
550
#define DAC_ENCODER_CONTROL_PS_ALLOCATION  DAC_ENCODER_CONTROL_PARAMETERS
497
#define DAC_ENCODER_CONTROL_PS_ALLOCATION  DAC_ENCODER_CONTROL_PARAMETERS
551
 
498
 
552
/****************************************************************************/
499
/****************************************************************************/
553
// Structures used by DIG1EncoderControlTable
500
/*  Structures used by DIG1EncoderControlTable */
554
//                    DIG2EncoderControlTable
501
/*                     DIG2EncoderControlTable */
555
//                    ExternalEncoderControlTable
Line 537... Line 591...
537
#define ATOM_ENCODER_CONFIG_TRANSMITTER_SEL_MASK	0x08
591
#define ATOM_ENCODER_CONFIG_TRANSMITTER_SEL_MASK	0x08
538
#define ATOM_ENCODER_CONFIG_UNIPHY							  0x00
592
#define ATOM_ENCODER_CONFIG_UNIPHY							  0x00
539
#define ATOM_ENCODER_CONFIG_LVTMA								  0x08
593
#define ATOM_ENCODER_CONFIG_LVTMA								  0x08
540
#define ATOM_ENCODER_CONFIG_TRANSMITTER1				  0x00
594
#define ATOM_ENCODER_CONFIG_TRANSMITTER1				  0x00
541
#define ATOM_ENCODER_CONFIG_TRANSMITTER2				  0x08
595
#define ATOM_ENCODER_CONFIG_TRANSMITTER2				  0x08
542
#define ATOM_ENCODER_CONFIG_DIGB								  0x80	/*  VBIOS Internal use, outside SW should set this bit=0 */
596
#define ATOM_ENCODER_CONFIG_DIGB								  0x80			// VBIOS Internal use, outside SW should set this bit=0
543
/*  ucAction */
597
// ucAction
544
/*  ATOM_ENABLE:  Enable Encoder */
598
// ATOM_ENABLE:  Enable Encoder
545
/*  ATOM_DISABLE: Disable Encoder */
599
// ATOM_DISABLE: Disable Encoder
Line 546... Line 600...
546
 
600
 
547
/* ucEncoderMode */
601
//ucEncoderMode
548
#define ATOM_ENCODER_MODE_DP											0
602
#define ATOM_ENCODER_MODE_DP											0
549
#define ATOM_ENCODER_MODE_LVDS										1
603
#define ATOM_ENCODER_MODE_LVDS										1
550
#define ATOM_ENCODER_MODE_DVI											2
604
#define ATOM_ENCODER_MODE_DVI											2
551
#define ATOM_ENCODER_MODE_HDMI										3
605
#define ATOM_ENCODER_MODE_HDMI										3
-
 
606
#define ATOM_ENCODER_MODE_SDVO										4
552
#define ATOM_ENCODER_MODE_SDVO										4
607
#define ATOM_ENCODER_MODE_DP_AUDIO                5
553
#define ATOM_ENCODER_MODE_TV											13
608
#define ATOM_ENCODER_MODE_TV											13
554
#define ATOM_ENCODER_MODE_CV											14
609
#define ATOM_ENCODER_MODE_CV											14
Line 555... Line 610...
555
#define ATOM_ENCODER_MODE_CRT											15
610
#define ATOM_ENCODER_MODE_CRT											15
-
 
611
 
556
 
612
typedef struct _ATOM_DIG_ENCODER_CONFIG_V2
557
typedef struct _ATOM_DIG_ENCODER_CONFIG_V2 {
613
{
558
#if ATOM_BIG_ENDIAN
614
#if ATOM_BIG_ENDIAN
559
	UCHAR ucReserved1:2;
615
	UCHAR ucReserved1:2;
560
	UCHAR ucTransmitterSel:2;	/*  =0: UniphyAB, =1: UniphyCD  =2: UniphyEF */
616
    UCHAR ucTransmitterSel:2;     // =0: UniphyAB, =1: UniphyCD  =2: UniphyEF
561
	UCHAR ucLinkSel:1;	/*  =0: linkA/C/E =1: linkB/D/F */
617
    UCHAR ucLinkSel:1;            // =0: linkA/C/E =1: linkB/D/F
562
	UCHAR ucReserved:1;
618
	UCHAR ucReserved:1;
563
	UCHAR ucDPLinkRate:1;	/*  =0: 1.62Ghz, =1: 2.7Ghz */
619
    UCHAR ucDPLinkRate:1;         // =0: 1.62Ghz, =1: 2.7Ghz
564
#else
620
#else
565
	UCHAR ucDPLinkRate:1;	/*  =0: 1.62Ghz, =1: 2.7Ghz */
621
    UCHAR ucDPLinkRate:1;         // =0: 1.62Ghz, =1: 2.7Ghz
566
	UCHAR ucReserved:1;
622
	UCHAR ucReserved:1;
567
	UCHAR ucLinkSel:1;	/*  =0: linkA/C/E =1: linkB/D/F */
623
    UCHAR ucLinkSel:1;            // =0: linkA/C/E =1: linkB/D/F
568
	UCHAR ucTransmitterSel:2;	/*  =0: UniphyAB, =1: UniphyCD  =2: UniphyEF */
624
    UCHAR ucTransmitterSel:2;     // =0: UniphyAB, =1: UniphyCD  =2: UniphyEF
569
	UCHAR ucReserved1:2;
625
	UCHAR ucReserved1:2;
Line -... Line 626...
-
 
626
#endif
570
#endif
627
}ATOM_DIG_ENCODER_CONFIG_V2;
-
 
628
 
571
} ATOM_DIG_ENCODER_CONFIG_V2;
629
 
572
 
630
typedef struct _DIG_ENCODER_CONTROL_PARAMETERS_V2
573
typedef struct _DIG_ENCODER_CONTROL_PARAMETERS_V2 {
631
{
574
	USHORT usPixelClock;	/*  in 10KHz; for bios convenient */
632
  USHORT usPixelClock;      // in 10KHz; for bios convenient
575
	ATOM_DIG_ENCODER_CONFIG_V2 acConfig;
633
	ATOM_DIG_ENCODER_CONFIG_V2 acConfig;
576
	UCHAR ucAction;
634
	UCHAR ucAction;
577
	UCHAR ucEncoderMode;
635
	UCHAR ucEncoderMode;
578
	/*  =0: DP   encoder */
636
                            // =0: DP   encoder      
579
	/*  =1: LVDS encoder */
637
                            // =1: LVDS encoder          
580
	/*  =2: DVI  encoder */
638
                            // =2: DVI  encoder  
-
 
639
                            // =3: HDMI encoder
581
	/*  =3: HDMI encoder */
640
                            // =4: SDVO encoder
582
	/*  =4: SDVO encoder */
641
  UCHAR ucLaneNum;          // how many lanes to enable
Line 583... Line 642...
583
	UCHAR ucLaneNum;	/*  how many lanes to enable */
642
  UCHAR ucStatus;           // = DP_LINK_TRAINING_COMPLETE or DP_LINK_TRAINING_INCOMPLETE, only used by VBIOS with command ATOM_ENCODER_CMD_QUERY_DP_LINK_TRAINING_STATUS
584
	UCHAR ucReserved[2];
643
  UCHAR ucReserved;
585
} DIG_ENCODER_CONTROL_PARAMETERS_V2;
644
}DIG_ENCODER_CONTROL_PARAMETERS_V2;
586
 
645
 
587
/* ucConfig */
646
//ucConfig
588
#define ATOM_ENCODER_CONFIG_V2_DPLINKRATE_MASK				0x01
647
#define ATOM_ENCODER_CONFIG_V2_DPLINKRATE_MASK				0x01
Line 594... Line 653...
594
#define ATOM_ENCODER_CONFIG_V2_TRANSMITTER_SEL_MASK	  0x18
653
#define ATOM_ENCODER_CONFIG_V2_TRANSMITTER_SEL_MASK	  0x18
595
#define ATOM_ENCODER_CONFIG_V2_TRANSMITTER1				    0x00
654
#define ATOM_ENCODER_CONFIG_V2_TRANSMITTER1				    0x00
596
#define ATOM_ENCODER_CONFIG_V2_TRANSMITTER2				    0x08
655
#define ATOM_ENCODER_CONFIG_V2_TRANSMITTER2				    0x08
597
#define ATOM_ENCODER_CONFIG_V2_TRANSMITTER3				    0x10
656
#define ATOM_ENCODER_CONFIG_V2_TRANSMITTER3				    0x10
Line -... Line 657...
-
 
657
 
-
 
658
// ucAction:
-
 
659
// ATOM_DISABLE
-
 
660
// ATOM_ENABLE
-
 
661
#define ATOM_ENCODER_CMD_DP_LINK_TRAINING_START       0x08
-
 
662
#define ATOM_ENCODER_CMD_DP_LINK_TRAINING_PATTERN1    0x09
-
 
663
#define ATOM_ENCODER_CMD_DP_LINK_TRAINING_PATTERN2    0x0a
-
 
664
#define ATOM_ENCODER_CMD_DP_LINK_TRAINING_COMPLETE    0x0b
-
 
665
#define ATOM_ENCODER_CMD_DP_VIDEO_OFF                 0x0c
-
 
666
#define ATOM_ENCODER_CMD_DP_VIDEO_ON                  0x0d
-
 
667
#define ATOM_ENCODER_CMD_QUERY_DP_LINK_TRAINING_STATUS    0x0e
-
 
668
#define ATOM_ENCODER_CMD_SETUP                        0x0f
-
 
669
 
-
 
670
// ucStatus
-
 
671
#define ATOM_ENCODER_STATUS_LINK_TRAINING_COMPLETE    0x10
-
 
672
#define ATOM_ENCODER_STATUS_LINK_TRAINING_INCOMPLETE  0x00
-
 
673
 
-
 
674
// Following function ENABLE sub-function will be used by driver when TMDS/HDMI/LVDS is used, disable function will be used by driver
-
 
675
typedef struct _ATOM_DIG_ENCODER_CONFIG_V3
-
 
676
{
-
 
677
#if ATOM_BIG_ENDIAN
-
 
678
    UCHAR ucReserved1:1;
-
 
679
    UCHAR ucDigSel:3;             // =0: DIGA/B/C/D/E/F
-
 
680
    UCHAR ucReserved:3;
-
 
681
    UCHAR ucDPLinkRate:1;         // =0: 1.62Ghz, =1: 2.7Ghz
-
 
682
#else
-
 
683
    UCHAR ucDPLinkRate:1;         // =0: 1.62Ghz, =1: 2.7Ghz
-
 
684
    UCHAR ucReserved:3;
-
 
685
    UCHAR ucDigSel:3;             // =0: DIGA/B/C/D/E/F
-
 
686
    UCHAR ucReserved1:1;
-
 
687
#endif
-
 
688
}ATOM_DIG_ENCODER_CONFIG_V3;
-
 
689
 
-
 
690
#define ATOM_ENCODER_CONFIG_V3_ENCODER_SEL					  0x70
-
 
691
 
-
 
692
 
-
 
693
typedef struct _DIG_ENCODER_CONTROL_PARAMETERS_V3
-
 
694
{
-
 
695
  USHORT usPixelClock;      // in 10KHz; for bios convenient
-
 
696
  ATOM_DIG_ENCODER_CONFIG_V3 acConfig;
-
 
697
  UCHAR ucAction;                              
-
 
698
  UCHAR ucEncoderMode;
-
 
699
                            // =0: DP   encoder      
-
 
700
                            // =1: LVDS encoder          
-
 
701
                            // =2: DVI  encoder  
-
 
702
                            // =3: HDMI encoder
-
 
703
                            // =4: SDVO encoder
-
 
704
                            // =5: DP audio
-
 
705
  UCHAR ucLaneNum;          // how many lanes to enable
-
 
706
  UCHAR ucBitPerColor;      // only valid for DP mode when ucAction = ATOM_ENCODER_CMD_SETUP
-
 
707
  UCHAR ucReserved;
-
 
708
}DIG_ENCODER_CONTROL_PARAMETERS_V3;
-
 
709
 
-
 
710
 
-
 
711
// define ucBitPerColor: 
-
 
712
#define PANEL_BPC_UNDEFINE                               0x00
-
 
713
#define PANEL_6BIT_PER_COLOR                             0x01 
-
 
714
#define PANEL_8BIT_PER_COLOR                             0x02
-
 
715
#define PANEL_10BIT_PER_COLOR                            0x03
-
 
716
#define PANEL_12BIT_PER_COLOR                            0x04
-
 
717
#define PANEL_16BIT_PER_COLOR                            0x05
598
 
718
 
599
/****************************************************************************/
719
/****************************************************************************/
600
/*  Structures used by UNIPHYTransmitterControlTable */
720
// Structures used by UNIPHYTransmitterControlTable
601
/*                     LVTMATransmitterControlTable */
721
//                    LVTMATransmitterControlTable
602
/*                     DVOOutputControlTable */
722
//                    DVOOutputControlTable
603
/****************************************************************************/
723
/****************************************************************************/
-
 
724
typedef struct _ATOM_DP_VS_MODE
604
typedef struct _ATOM_DP_VS_MODE {
725
{
605
	UCHAR ucLaneSel;
726
	UCHAR ucLaneSel;
606
	UCHAR ucLaneSet;
727
	UCHAR ucLaneSet;
Line 607... Line 728...
607
} ATOM_DP_VS_MODE;
728
}ATOM_DP_VS_MODE;
-
 
729
 
608
 
730
typedef struct _DIG_TRANSMITTER_CONTROL_PARAMETERS
-
 
731
{
609
typedef struct _DIG_TRANSMITTER_CONTROL_PARAMETERS {
732
	union
610
	union {
733
	{
611
		USHORT usPixelClock;	/*  in 10KHz; for bios convenient */
734
  USHORT usPixelClock;		// in 10KHz; for bios convenient
612
		USHORT usInitInfo;	/*  when init uniphy,lower 8bit is used for connector type defined in objectid.h */
735
	USHORT usInitInfo;			// when init uniphy,lower 8bit is used for connector type defined in objectid.h
613
		ATOM_DP_VS_MODE asMode;	/*  DP Voltage swing mode */
736
  ATOM_DP_VS_MODE asMode; // DP Voltage swing mode
614
	};
737
	};
615
	UCHAR ucConfig;
738
	UCHAR ucConfig;
616
	/*  [0]=0: 4 lane Link, */
739
													// [0]=0: 4 lane Link,      
617
	/*     =1: 8 lane Link ( Dual Links TMDS ) */
740
													//    =1: 8 lane Link ( Dual Links TMDS ) 
618
	/*  [1]=0: InCoherent mode */
741
                          // [1]=0: InCoherent mode   
619
	/*     =1: Coherent Mode */
742
													//    =1: Coherent Mode										
620
	/*  [2] Link Select: */
743
													// [2] Link Select:
621
	/*  =0: PHY linkA   if bfLane<3 */
744
  												// =0: PHY linkA   if bfLane<3
622
	/*  =1: PHY linkB   if bfLanes<3 */
745
													// =1: PHY linkB   if bfLanes<3
623
	/*  =0: PHY linkA+B if bfLanes=3 */
746
		  										// =0: PHY linkA+B if bfLanes=3		
624
	/*  [5:4]PCIE lane Sel */
747
                          // [5:4]PCIE lane Sel
625
	/*  =0: lane 0~3 or 0~7 */
748
                          // =0: lane 0~3 or 0~7
626
	/*  =1: lane 4~7 */
749
                          // =1: lane 4~7
627
	/*  =2: lane 8~11 or 8~15 */
750
                          // =2: lane 8~11 or 8~15
628
	/*  =3: lane 12~15 */
751
                          // =3: lane 12~15 
629
	UCHAR ucAction;		/*  =0: turn off encoder */
752
	UCHAR ucAction;				  // =0: turn off encoder					
630
	/*  =1: turn on encoder */
753
	                        // =1: turn on encoder			
Line 631... Line 754...
631
	UCHAR ucReserved[4];
754
	UCHAR ucReserved[4];
Line 632... Line 755...
632
} DIG_TRANSMITTER_CONTROL_PARAMETERS;
755
}DIG_TRANSMITTER_CONTROL_PARAMETERS;
633
 
756
 
Line 634... Line 757...
634
#define DIG_TRANSMITTER_CONTROL_PS_ALLOCATION		DIG_TRANSMITTER_CONTROL_PARAMETERS
757
#define DIG_TRANSMITTER_CONTROL_PS_ALLOCATION		DIG_TRANSMITTER_CONTROL_PARAMETERS
635
 
758
 
636
/* ucInitInfo */
759
//ucInitInfo
637
#define ATOM_TRAMITTER_INITINFO_CONNECTOR_MASK	0x00ff
760
#define ATOM_TRAMITTER_INITINFO_CONNECTOR_MASK	0x00ff
638
 
761
 
639
/* ucConfig */
762
//ucConfig 
640
#define ATOM_TRANSMITTER_CONFIG_8LANE_LINK			0x01
763
#define ATOM_TRANSMITTER_CONFIG_8LANE_LINK			0x01
641
#define ATOM_TRANSMITTER_CONFIG_COHERENT				0x02
764
#define ATOM_TRANSMITTER_CONFIG_COHERENT				0x02
Line 642... Line 765...
642
#define ATOM_TRANSMITTER_CONFIG_LINK_SEL_MASK		0x04
765
#define ATOM_TRANSMITTER_CONFIG_LINK_SEL_MASK		0x04
643
#define ATOM_TRANSMITTER_CONFIG_LINKA						0x00
766
#define ATOM_TRANSMITTER_CONFIG_LINKA						0x00
644
#define ATOM_TRANSMITTER_CONFIG_LINKB						0x04
767
#define ATOM_TRANSMITTER_CONFIG_LINKB						0x04
Line 645... Line 768...
645
#define ATOM_TRANSMITTER_CONFIG_LINKA_B					0x00
768
#define ATOM_TRANSMITTER_CONFIG_LINKA_B					0x00
646
#define ATOM_TRANSMITTER_CONFIG_LINKB_A					0x04
769
#define ATOM_TRANSMITTER_CONFIG_LINKB_A					0x04
647
 
770
 
648
#define ATOM_TRANSMITTER_CONFIG_ENCODER_SEL_MASK	0x08	/*  only used when ATOM_TRANSMITTER_ACTION_ENABLE */
771
#define ATOM_TRANSMITTER_CONFIG_ENCODER_SEL_MASK	0x08			// only used when ATOM_TRANSMITTER_ACTION_ENABLE
Line 659... Line 782...
659
#define ATOM_TRANSMITTER_CONFIG_LANE_4_7				0x40
782
#define ATOM_TRANSMITTER_CONFIG_LANE_4_7				0x40
660
#define ATOM_TRANSMITTER_CONFIG_LANE_8_11				0x80
783
#define ATOM_TRANSMITTER_CONFIG_LANE_8_11				0x80
661
#define ATOM_TRANSMITTER_CONFIG_LANE_8_15				0x80
784
#define ATOM_TRANSMITTER_CONFIG_LANE_8_15				0x80
662
#define ATOM_TRANSMITTER_CONFIG_LANE_12_15			0xc0
785
#define ATOM_TRANSMITTER_CONFIG_LANE_12_15			0xc0
Line 663... Line 786...
663
 
786
 
664
/* ucAction */
787
//ucAction
665
#define ATOM_TRANSMITTER_ACTION_DISABLE					       0
788
#define ATOM_TRANSMITTER_ACTION_DISABLE					       0
666
#define ATOM_TRANSMITTER_ACTION_ENABLE					       1
789
#define ATOM_TRANSMITTER_ACTION_ENABLE					       1
667
#define ATOM_TRANSMITTER_ACTION_LCD_BLOFF				       2
790
#define ATOM_TRANSMITTER_ACTION_LCD_BLOFF				       2
668
#define ATOM_TRANSMITTER_ACTION_LCD_BLON				       3
791
#define ATOM_TRANSMITTER_ACTION_LCD_BLON				       3
Line 672... Line 795...
672
#define ATOM_TRANSMITTER_ACTION_INIT						       7
795
#define ATOM_TRANSMITTER_ACTION_INIT						       7
673
#define ATOM_TRANSMITTER_ACTION_DISABLE_OUTPUT	       8
796
#define ATOM_TRANSMITTER_ACTION_DISABLE_OUTPUT	       8
674
#define ATOM_TRANSMITTER_ACTION_ENABLE_OUTPUT		       9
797
#define ATOM_TRANSMITTER_ACTION_ENABLE_OUTPUT		       9
675
#define ATOM_TRANSMITTER_ACTION_SETUP						       10
798
#define ATOM_TRANSMITTER_ACTION_SETUP						       10
676
#define ATOM_TRANSMITTER_ACTION_SETUP_VSEMPH           11
799
#define ATOM_TRANSMITTER_ACTION_SETUP_VSEMPH           11
-
 
800
#define ATOM_TRANSMITTER_ACTION_POWER_ON               12
-
 
801
#define ATOM_TRANSMITTER_ACTION_POWER_OFF              13
Line 677... Line 802...
677
 
802
 
678
/*  Following are used for DigTransmitterControlTable ver1.2 */
803
// Following are used for DigTransmitterControlTable ver1.2
-
 
804
typedef struct _ATOM_DIG_TRANSMITTER_CONFIG_V2
679
typedef struct _ATOM_DIG_TRANSMITTER_CONFIG_V2 {
805
{
680
#if ATOM_BIG_ENDIAN
806
#if ATOM_BIG_ENDIAN
681
	UCHAR ucTransmitterSel:2;	/* bit7:6: =0 Dig Transmitter 1 ( Uniphy AB ) */
807
  UCHAR ucTransmitterSel:2;         //bit7:6: =0 Dig Transmitter 1 ( Uniphy AB )
682
	/*         =1 Dig Transmitter 2 ( Uniphy CD ) */
808
                                    //        =1 Dig Transmitter 2 ( Uniphy CD )
683
	/*         =2 Dig Transmitter 3 ( Uniphy EF ) */
809
                                    //        =2 Dig Transmitter 3 ( Uniphy EF )
684
	UCHAR ucReserved:1;
810
	UCHAR ucReserved:1;
685
	UCHAR fDPConnector:1;	/* bit4=0: DP connector  =1: None DP connector */
811
  UCHAR fDPConnector:1;             //bit4=0: DP connector  =1: None DP connector
686
	UCHAR ucEncoderSel:1;	/* bit3=0: Data/Clk path source from DIGA( DIG inst0 ). =1: Data/clk path source from DIGB ( DIG inst1 ) */
812
  UCHAR ucEncoderSel:1;             //bit3=0: Data/Clk path source from DIGA( DIG inst0 ). =1: Data/clk path source from DIGB ( DIG inst1 )
687
	UCHAR ucLinkSel:1;	/* bit2=0: Uniphy LINKA or C or E when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is A or C or E */
813
  UCHAR ucLinkSel:1;                //bit2=0: Uniphy LINKA or C or E when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is A or C or E
Line 688... Line 814...
688
	/*     =1: Uniphy LINKB or D or F when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is B or D or F */
814
                                    //    =1: Uniphy LINKB or D or F when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is B or D or F
689
 
815
 
690
	UCHAR fCoherentMode:1;	/* bit1=1: Coherent Mode ( for DVI/HDMI mode ) */
816
  UCHAR fCoherentMode:1;            //bit1=1: Coherent Mode ( for DVI/HDMI mode )
691
	UCHAR fDualLinkConnector:1;	/* bit0=1: Dual Link DVI connector */
817
  UCHAR fDualLinkConnector:1;       //bit0=1: Dual Link DVI connector
692
#else
818
#else
693
	UCHAR fDualLinkConnector:1;	/* bit0=1: Dual Link DVI connector */
819
  UCHAR fDualLinkConnector:1;       //bit0=1: Dual Link DVI connector
694
	UCHAR fCoherentMode:1;	/* bit1=1: Coherent Mode ( for DVI/HDMI mode ) */
820
  UCHAR fCoherentMode:1;            //bit1=1: Coherent Mode ( for DVI/HDMI mode )
695
	UCHAR ucLinkSel:1;	/* bit2=0: Uniphy LINKA or C or E when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is A or C or E */
821
  UCHAR ucLinkSel:1;                //bit2=0: Uniphy LINKA or C or E when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is A or C or E
696
	/*     =1: Uniphy LINKB or D or F when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is B or D or F */
822
                                    //    =1: Uniphy LINKB or D or F when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is B or D or F
697
	UCHAR ucEncoderSel:1;	/* bit3=0: Data/Clk path source from DIGA( DIG inst0 ). =1: Data/clk path source from DIGB ( DIG inst1 ) */
823
  UCHAR ucEncoderSel:1;             //bit3=0: Data/Clk path source from DIGA( DIG inst0 ). =1: Data/clk path source from DIGB ( DIG inst1 )
698
	UCHAR fDPConnector:1;	/* bit4=0: DP connector  =1: None DP connector */
824
  UCHAR fDPConnector:1;             //bit4=0: DP connector  =1: None DP connector
699
	UCHAR ucReserved:1;
825
	UCHAR ucReserved:1;
700
	UCHAR ucTransmitterSel:2;	/* bit7:6: =0 Dig Transmitter 1 ( Uniphy AB ) */
826
  UCHAR ucTransmitterSel:2;         //bit7:6: =0 Dig Transmitter 1 ( Uniphy AB )
701
	/*         =1 Dig Transmitter 2 ( Uniphy CD ) */
827
                                    //        =1 Dig Transmitter 2 ( Uniphy CD )
702
	/*         =2 Dig Transmitter 3 ( Uniphy EF ) */
828
                                    //        =2 Dig Transmitter 3 ( Uniphy EF )
Line 703... Line 829...
703
#endif
829
#endif
704
} ATOM_DIG_TRANSMITTER_CONFIG_V2;
830
}ATOM_DIG_TRANSMITTER_CONFIG_V2;
705
 
831
 
Line 706... Line 832...
706
/* ucConfig */
832
//ucConfig 
707
/* Bit0 */
833
//Bit0
Line 708... Line 834...
708
#define ATOM_TRANSMITTER_CONFIG_V2_DUAL_LINK_CONNECTOR			0x01
834
#define ATOM_TRANSMITTER_CONFIG_V2_DUAL_LINK_CONNECTOR			0x01
709
 
835
 
710
/* Bit1 */
836
//Bit1
711
#define ATOM_TRANSMITTER_CONFIG_V2_COHERENT				          0x02
837
#define ATOM_TRANSMITTER_CONFIG_V2_COHERENT				          0x02
Line 712... Line 838...
712
 
838
 
713
/* Bit2 */
839
//Bit2
714
#define ATOM_TRANSMITTER_CONFIG_V2_LINK_SEL_MASK		        0x04
840
#define ATOM_TRANSMITTER_CONFIG_V2_LINK_SEL_MASK		        0x04
715
#define ATOM_TRANSMITTER_CONFIG_V2_LINKA			            0x00
841
#define ATOM_TRANSMITTER_CONFIG_V2_LINKA			            0x00
Line 716... Line 842...
716
#define ATOM_TRANSMITTER_CONFIG_V2_LINKB				            0x04
842
#define ATOM_TRANSMITTER_CONFIG_V2_LINKB				            0x04
717
 
843
 
Line 718... Line 844...
718
/*  Bit3 */
844
// Bit3
719
#define ATOM_TRANSMITTER_CONFIG_V2_ENCODER_SEL_MASK	        0x08
845
#define ATOM_TRANSMITTER_CONFIG_V2_ENCODER_SEL_MASK	        0x08
720
#define ATOM_TRANSMITTER_CONFIG_V2_DIG1_ENCODER		          0x00	/*  only used when ucAction == ATOM_TRANSMITTER_ACTION_ENABLE or ATOM_TRANSMITTER_ACTION_SETUP */
846
#define ATOM_TRANSMITTER_CONFIG_V2_DIG1_ENCODER		          0x00				// only used when ucAction == ATOM_TRANSMITTER_ACTION_ENABLE or ATOM_TRANSMITTER_ACTION_SETUP
721
#define ATOM_TRANSMITTER_CONFIG_V2_DIG2_ENCODER		          0x08	/*  only used when ucAction == ATOM_TRANSMITTER_ACTION_ENABLE or ATOM_TRANSMITTER_ACTION_SETUP */
847
#define ATOM_TRANSMITTER_CONFIG_V2_DIG2_ENCODER		          0x08				// only used when ucAction == ATOM_TRANSMITTER_ACTION_ENABLE or ATOM_TRANSMITTER_ACTION_SETUP
722
 
848
 
Line 723... Line 849...
723
/*  Bit4 */
849
// Bit4
-
 
850
#define ATOM_TRASMITTER_CONFIG_V2_DP_CONNECTOR			        0x10
724
#define ATOM_TRASMITTER_CONFIG_V2_DP_CONNECTOR			        0x10
851
 
-
 
852
// Bit7:6
725
 
853
#define ATOM_TRANSMITTER_CONFIG_V2_TRANSMITTER_SEL_MASK     0xC0
726
/*  Bit7:6 */
854
#define ATOM_TRANSMITTER_CONFIG_V2_TRANSMITTER1           	0x00	//AB
727
#define ATOM_TRANSMITTER_CONFIG_V2_TRANSMITTER_SEL_MASK     0xC0
855
#define ATOM_TRANSMITTER_CONFIG_V2_TRANSMITTER2           	0x40	//CD
728
#define ATOM_TRANSMITTER_CONFIG_V2_TRANSMITTER1			0x00	/* AB */
856
#define ATOM_TRANSMITTER_CONFIG_V2_TRANSMITTER3           	0x80	//EF
729
#define ATOM_TRANSMITTER_CONFIG_V2_TRANSMITTER2			0x40	/* CD */
857
 
730
#define ATOM_TRANSMITTER_CONFIG_V2_TRANSMITTER3			0x80	/* EF */
858
typedef struct _DIG_TRANSMITTER_CONTROL_PARAMETERS_V2
731
 
859
{
732
typedef struct _DIG_TRANSMITTER_CONTROL_PARAMETERS_V2 {
860
	union
Line -... Line 861...
-
 
861
	{
-
 
862
  USHORT usPixelClock;		// in 10KHz; for bios convenient
-
 
863
	USHORT usInitInfo;			// when init uniphy,lower 8bit is used for connector type defined in objectid.h
-
 
864
  ATOM_DP_VS_MODE asMode; // DP Voltage swing mode
-
 
865
	};
-
 
866
	ATOM_DIG_TRANSMITTER_CONFIG_V2 acConfig;
-
 
867
	UCHAR ucAction;				  // define as ATOM_TRANSMITER_ACTION_XXX
-
 
868
	UCHAR ucReserved[4];
-
 
869
}DIG_TRANSMITTER_CONTROL_PARAMETERS_V2;
-
 
870
 
-
 
871
typedef struct _ATOM_DIG_TRANSMITTER_CONFIG_V3
-
 
872
{
-
 
873
#if ATOM_BIG_ENDIAN
-
 
874
  UCHAR ucTransmitterSel:2;         //bit7:6: =0 Dig Transmitter 1 ( Uniphy AB )
-
 
875
                                    //        =1 Dig Transmitter 2 ( Uniphy CD )
-
 
876
                                    //        =2 Dig Transmitter 3 ( Uniphy EF )
-
 
877
  UCHAR ucRefClkSource:2;           //bit5:4: PPLL1 =0, PPLL2=1, EXT_CLK=2
-
 
878
  UCHAR ucEncoderSel:1;             //bit3=0: Data/Clk path source from DIGA/C/E. =1: Data/clk path source from DIGB/D/F
-
 
879
  UCHAR ucLinkSel:1;                //bit2=0: Uniphy LINKA or C or E when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is A or C or E
-
 
880
                                    //    =1: Uniphy LINKB or D or F when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is B or D or F
-
 
881
  UCHAR fCoherentMode:1;            //bit1=1: Coherent Mode ( for DVI/HDMI mode )
-
 
882
  UCHAR fDualLinkConnector:1;       //bit0=1: Dual Link DVI connector
-
 
883
#else
-
 
884
  UCHAR fDualLinkConnector:1;       //bit0=1: Dual Link DVI connector
-
 
885
  UCHAR fCoherentMode:1;            //bit1=1: Coherent Mode ( for DVI/HDMI mode )
-
 
886
  UCHAR ucLinkSel:1;                //bit2=0: Uniphy LINKA or C or E when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is A or C or E
-
 
887
                                    //    =1: Uniphy LINKB or D or F when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is B or D or F
-
 
888
  UCHAR ucEncoderSel:1;             //bit3=0: Data/Clk path source from DIGA/C/E. =1: Data/clk path source from DIGB/D/F
-
 
889
  UCHAR ucRefClkSource:2;           //bit5:4: PPLL1 =0, PPLL2=1, EXT_CLK=2
-
 
890
  UCHAR ucTransmitterSel:2;         //bit7:6: =0 Dig Transmitter 1 ( Uniphy AB )
-
 
891
                                    //        =1 Dig Transmitter 2 ( Uniphy CD )
-
 
892
                                    //        =2 Dig Transmitter 3 ( Uniphy EF )
-
 
893
#endif
-
 
894
}ATOM_DIG_TRANSMITTER_CONFIG_V3;
-
 
895
 
-
 
896
typedef struct _DIG_TRANSMITTER_CONTROL_PARAMETERS_V3
-
 
897
{
-
 
898
	union
-
 
899
	{
-
 
900
    USHORT usPixelClock;		// in 10KHz; for bios convenient
-
 
901
	  USHORT usInitInfo;			// when init uniphy,lower 8bit is used for connector type defined in objectid.h
-
 
902
    ATOM_DP_VS_MODE asMode; // DP Voltage swing mode
-
 
903
	};
-
 
904
  ATOM_DIG_TRANSMITTER_CONFIG_V3 acConfig;
-
 
905
	UCHAR ucAction;				    // define as ATOM_TRANSMITER_ACTION_XXX
-
 
906
  UCHAR ucLaneNum;
-
 
907
  UCHAR ucReserved[3];
-
 
908
}DIG_TRANSMITTER_CONTROL_PARAMETERS_V3;
-
 
909
 
-
 
910
//ucConfig 
-
 
911
//Bit0
-
 
912
#define ATOM_TRANSMITTER_CONFIG_V3_DUAL_LINK_CONNECTOR			0x01
-
 
913
 
-
 
914
//Bit1
-
 
915
#define ATOM_TRANSMITTER_CONFIG_V3_COHERENT				          0x02
-
 
916
 
-
 
917
//Bit2
-
 
918
#define ATOM_TRANSMITTER_CONFIG_V3_LINK_SEL_MASK		        0x04
-
 
919
#define ATOM_TRANSMITTER_CONFIG_V3_LINKA  			            0x00
-
 
920
#define ATOM_TRANSMITTER_CONFIG_V3_LINKB				            0x04
-
 
921
 
-
 
922
// Bit3
-
 
923
#define ATOM_TRANSMITTER_CONFIG_V3_ENCODER_SEL_MASK	        0x08
-
 
924
#define ATOM_TRANSMITTER_CONFIG_V3_DIG1_ENCODER		          0x00
-
 
925
#define ATOM_TRANSMITTER_CONFIG_V3_DIG2_ENCODER		          0x08
-
 
926
 
-
 
927
// Bit5:4
-
 
928
#define ATOM_TRASMITTER_CONFIG_V3_REFCLK_SEL_MASK 	        0x30
-
 
929
#define ATOM_TRASMITTER_CONFIG_V3_P1PLL          		        0x00
-
 
930
#define ATOM_TRASMITTER_CONFIG_V3_P2PLL		                  0x10
-
 
931
#define ATOM_TRASMITTER_CONFIG_V3_REFCLK_SRC_EXT            0x20
-
 
932
 
-
 
933
// Bit7:6
733
	union {
934
#define ATOM_TRANSMITTER_CONFIG_V3_TRANSMITTER_SEL_MASK     0xC0
734
		USHORT usPixelClock;	/*  in 10KHz; for bios convenient */
-
 
735
		USHORT usInitInfo;	/*  when init uniphy,lower 8bit is used for connector type defined in objectid.h */
-
 
736
		ATOM_DP_VS_MODE asMode;	/*  DP Voltage swing mode */
-
 
737
	};
-
 
738
	ATOM_DIG_TRANSMITTER_CONFIG_V2 acConfig;
-
 
739
	UCHAR ucAction;		/*  define as ATOM_TRANSMITER_ACTION_XXX */
935
#define ATOM_TRANSMITTER_CONFIG_V3_TRANSMITTER1           	0x00	//AB
-
 
936
#define ATOM_TRANSMITTER_CONFIG_V3_TRANSMITTER2           	0x40	//CD
740
	UCHAR ucReserved[4];
937
#define ATOM_TRANSMITTER_CONFIG_V3_TRANSMITTER3           	0x80	//EF
741
} DIG_TRANSMITTER_CONTROL_PARAMETERS_V2;
938
 
742
 
939
/****************************************************************************/	
743
/****************************************************************************/
940
// Structures used by DAC1OuputControlTable
Line 744... Line 941...
744
/*  Structures used by DAC1OuputControlTable */
941
//                    DAC2OuputControlTable
745
/*                     DAC2OuputControlTable */
942
//                    LVTMAOutputControlTable  (Before DEC30)
Line 746... Line 943...
746
/*                     LVTMAOutputControlTable  (Before DEC30) */
943
//                    TMDSAOutputControlTable  (Before DEC30)
Line -... Line 944...
-
 
944
/****************************************************************************/
747
/*                     TMDSAOutputControlTable  (Before DEC30) */
945
typedef struct _DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS
748
/****************************************************************************/
946
{
Line 749... Line 947...
749
typedef struct _DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS {
947
  UCHAR  ucAction;                    // Possible input:ATOM_ENABLE||ATOMDISABLE
750
	UCHAR ucAction;		/*  Possible input:ATOM_ENABLE||ATOMDISABLE */
948
                                      // When the display is LCD, in addition to above:
Line 781... Line 979...
781
#define DVO_OUTPUT_CONTROL_PARAMETERS      DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS
979
#define DVO_OUTPUT_CONTROL_PARAMETERS      DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS
782
#define DVO_OUTPUT_CONTROL_PS_ALLOCATION   DIG_TRANSMITTER_CONTROL_PS_ALLOCATION
980
#define DVO_OUTPUT_CONTROL_PS_ALLOCATION   DIG_TRANSMITTER_CONTROL_PS_ALLOCATION
783
#define DVO_OUTPUT_CONTROL_PARAMETERS_V3	 DIG_TRANSMITTER_CONTROL_PARAMETERS
981
#define DVO_OUTPUT_CONTROL_PARAMETERS_V3	 DIG_TRANSMITTER_CONTROL_PARAMETERS
Line 784... Line 982...
784
 
982
 
785
/****************************************************************************/
983
/****************************************************************************/
786
/*  Structures used by BlankCRTCTable */
984
// Structures used by BlankCRTCTable
787
/****************************************************************************/
985
/****************************************************************************/
-
 
986
typedef struct _BLANK_CRTC_PARAMETERS
788
typedef struct _BLANK_CRTC_PARAMETERS {
987
{
789
	UCHAR ucCRTC;		/*  ATOM_CRTC1 or ATOM_CRTC2 */
988
  UCHAR  ucCRTC;                    	// ATOM_CRTC1 or ATOM_CRTC2
790
	UCHAR ucBlanking;	/*  ATOM_BLANKING or ATOM_BLANKINGOFF */
989
  UCHAR  ucBlanking;                  // ATOM_BLANKING or ATOM_BLANKINGOFF
791
	USHORT usBlackColorRCr;
990
	USHORT usBlackColorRCr;
792
	USHORT usBlackColorGY;
991
	USHORT usBlackColorGY;
793
	USHORT usBlackColorBCb;
992
	USHORT usBlackColorBCb;
794
} BLANK_CRTC_PARAMETERS;
993
}BLANK_CRTC_PARAMETERS;
Line 795... Line 994...
795
#define BLANK_CRTC_PS_ALLOCATION    BLANK_CRTC_PARAMETERS
994
#define BLANK_CRTC_PS_ALLOCATION    BLANK_CRTC_PARAMETERS
796
 
995
 
797
/****************************************************************************/
996
/****************************************************************************/
798
/*  Structures used by EnableCRTCTable */
997
// Structures used by EnableCRTCTable
799
/*                     EnableCRTCMemReqTable */
998
//                    EnableCRTCMemReqTable
800
/*                     UpdateCRTC_DoubleBufferRegistersTable */
999
//                    UpdateCRTC_DoubleBufferRegistersTable
-
 
1000
/****************************************************************************/	
801
/****************************************************************************/
1001
typedef struct _ENABLE_CRTC_PARAMETERS
802
typedef struct _ENABLE_CRTC_PARAMETERS {
1002
{
803
	UCHAR ucCRTC;		/*  ATOM_CRTC1 or ATOM_CRTC2 */
1003
  UCHAR ucCRTC;                    	  // ATOM_CRTC1 or ATOM_CRTC2
804
	UCHAR ucEnable;		/*  ATOM_ENABLE or ATOM_DISABLE */
1004
  UCHAR ucEnable;                     // ATOM_ENABLE or ATOM_DISABLE 
805
	UCHAR ucPadding[2];
1005
	UCHAR ucPadding[2];
Line 806... Line 1006...
806
} ENABLE_CRTC_PARAMETERS;
1006
}ENABLE_CRTC_PARAMETERS;
807
#define ENABLE_CRTC_PS_ALLOCATION   ENABLE_CRTC_PARAMETERS
1007
#define ENABLE_CRTC_PS_ALLOCATION   ENABLE_CRTC_PARAMETERS
808
 
1008
 
809
/****************************************************************************/
1009
/****************************************************************************/
-
 
1010
// Structures used by SetCRTC_OverScanTable
810
/*  Structures used by SetCRTC_OverScanTable */
1011
/****************************************************************************/
811
/****************************************************************************/
1012
typedef struct _SET_CRTC_OVERSCAN_PARAMETERS
812
typedef struct _SET_CRTC_OVERSCAN_PARAMETERS {
1013
{
813
	USHORT usOverscanRight;	/*  right */
1014
  USHORT usOverscanRight;             // right
814
	USHORT usOverscanLeft;	/*  left */
1015
  USHORT usOverscanLeft;              // left
815
	USHORT usOverscanBottom;	/*  bottom */
1016
  USHORT usOverscanBottom;            // bottom
816
	USHORT usOverscanTop;	/*  top */
1017
  USHORT usOverscanTop;               // top
817
	UCHAR ucCRTC;		/*  ATOM_CRTC1 or ATOM_CRTC2 */
1018
  UCHAR  ucCRTC;                      // ATOM_CRTC1 or ATOM_CRTC2
Line 818... Line 1019...
818
	UCHAR ucPadding[3];
1019
	UCHAR ucPadding[3];
819
} SET_CRTC_OVERSCAN_PARAMETERS;
1020
}SET_CRTC_OVERSCAN_PARAMETERS;
820
#define SET_CRTC_OVERSCAN_PS_ALLOCATION  SET_CRTC_OVERSCAN_PARAMETERS
1021
#define SET_CRTC_OVERSCAN_PS_ALLOCATION  SET_CRTC_OVERSCAN_PARAMETERS
821
 
1022
 
-
 
1023
/****************************************************************************/
822
/****************************************************************************/
1024
// Structures used by SetCRTC_ReplicationTable
823
/*  Structures used by SetCRTC_ReplicationTable */
1025
/****************************************************************************/
824
/****************************************************************************/
1026
typedef struct _SET_CRTC_REPLICATION_PARAMETERS
825
typedef struct _SET_CRTC_REPLICATION_PARAMETERS {
1027
{
826
	UCHAR ucH_Replication;	/*  horizontal replication */
1028
  UCHAR ucH_Replication;              // horizontal replication
827
	UCHAR ucV_Replication;	/*  vertical replication */
1029
  UCHAR ucV_Replication;              // vertical replication
Line 828... Line 1030...
828
	UCHAR usCRTC;		/*  ATOM_CRTC1 or ATOM_CRTC2 */
1030
  UCHAR usCRTC;                       // ATOM_CRTC1 or ATOM_CRTC2
829
	UCHAR ucPadding;
1031
	UCHAR ucPadding;
830
} SET_CRTC_REPLICATION_PARAMETERS;
1032
}SET_CRTC_REPLICATION_PARAMETERS;
831
#define SET_CRTC_REPLICATION_PS_ALLOCATION  SET_CRTC_REPLICATION_PARAMETERS
1033
#define SET_CRTC_REPLICATION_PS_ALLOCATION  SET_CRTC_REPLICATION_PARAMETERS
-
 
1034
 
832
 
1035
/****************************************************************************/
833
/****************************************************************************/
1036
// Structures used by SelectCRTC_SourceTable
834
/*  Structures used by SelectCRTC_SourceTable */
1037
/****************************************************************************/
835
/****************************************************************************/
1038
typedef struct _SELECT_CRTC_SOURCE_PARAMETERS
836
typedef struct _SELECT_CRTC_SOURCE_PARAMETERS {
1039
{
Line 837... Line 1040...
837
	UCHAR ucCRTC;		/*  ATOM_CRTC1 or ATOM_CRTC2 */
1040
  UCHAR ucCRTC;                    	  // ATOM_CRTC1 or ATOM_CRTC2
-
 
1041
  UCHAR ucDevice;                     // ATOM_DEVICE_CRT1|ATOM_DEVICE_CRT2|....
838
	UCHAR ucDevice;		/*  ATOM_DEVICE_CRT1|ATOM_DEVICE_CRT2|.... */
1042
	UCHAR ucPadding[2];
839
	UCHAR ucPadding[2];
1043
}SELECT_CRTC_SOURCE_PARAMETERS;
840
} SELECT_CRTC_SOURCE_PARAMETERS;
1044
#define SELECT_CRTC_SOURCE_PS_ALLOCATION  SELECT_CRTC_SOURCE_PARAMETERS
841
#define SELECT_CRTC_SOURCE_PS_ALLOCATION  SELECT_CRTC_SOURCE_PARAMETERS
1045
 
842
 
1046
typedef struct _SELECT_CRTC_SOURCE_PARAMETERS_V2
Line 843... Line 1047...
843
typedef struct _SELECT_CRTC_SOURCE_PARAMETERS_V2 {
1047
{
844
	UCHAR ucCRTC;		/*  ATOM_CRTC1 or ATOM_CRTC2 */
1048
  UCHAR ucCRTC;                    	  // ATOM_CRTC1 or ATOM_CRTC2
845
	UCHAR ucEncoderID;	/*  DAC1/DAC2/TVOUT/DIG1/DIG2/DVO */
1049
  UCHAR ucEncoderID;                  // DAC1/DAC2/TVOUT/DIG1/DIG2/DVO
846
	UCHAR ucEncodeMode;	/*  Encoding mode, only valid when using DIG1/DIG2/DVO */
1050
  UCHAR ucEncodeMode;									// Encoding mode, only valid when using DIG1/DIG2/DVO
847
	UCHAR ucPadding;
1051
	UCHAR ucPadding;
848
} SELECT_CRTC_SOURCE_PARAMETERS_V2;
1052
}SELECT_CRTC_SOURCE_PARAMETERS_V2;
849
 
1053
 
850
/* ucEncoderID */
1054
//ucEncoderID
851
/* #define ASIC_INT_DAC1_ENCODER_ID                                              0x00 */
1055
//#define ASIC_INT_DAC1_ENCODER_ID    						0x00 
852
/* #define ASIC_INT_TV_ENCODER_ID                                                                        0x02 */
1056
//#define ASIC_INT_TV_ENCODER_ID									0x02
853
/* #define ASIC_INT_DIG1_ENCODER_ID                                                              0x03 */
1057
//#define ASIC_INT_DIG1_ENCODER_ID								0x03
854
/* #define ASIC_INT_DAC2_ENCODER_ID                                                              0x04 */
1058
//#define ASIC_INT_DAC2_ENCODER_ID								0x04
855
/* #define ASIC_EXT_TV_ENCODER_ID                                                                        0x06 */
1059
//#define ASIC_EXT_TV_ENCODER_ID									0x06
856
/* #define ASIC_INT_DVO_ENCODER_ID                                                                       0x07 */
1060
//#define ASIC_INT_DVO_ENCODER_ID									0x07
857
/* #define ASIC_INT_DIG2_ENCODER_ID                                                              0x09 */
1061
//#define ASIC_INT_DIG2_ENCODER_ID								0x09
858
/* #define ASIC_EXT_DIG_ENCODER_ID                                                                       0x05 */
1062
//#define ASIC_EXT_DIG_ENCODER_ID									0x05
859
 
1063
 
860
/* ucEncodeMode */
1064
//ucEncodeMode
861
/* #define ATOM_ENCODER_MODE_DP                                                                          0 */
1065
//#define ATOM_ENCODER_MODE_DP										0
862
/* #define ATOM_ENCODER_MODE_LVDS                                                                        1 */
1066
//#define ATOM_ENCODER_MODE_LVDS									1
863
/* #define ATOM_ENCODER_MODE_DVI                                                                         2 */
1067
//#define ATOM_ENCODER_MODE_DVI										2
864
/* #define ATOM_ENCODER_MODE_HDMI                                                                        3 */
1068
//#define ATOM_ENCODER_MODE_HDMI									3
865
/* #define ATOM_ENCODER_MODE_SDVO                                                                        4 */
1069
//#define ATOM_ENCODER_MODE_SDVO									4
866
/* #define ATOM_ENCODER_MODE_TV                                                                          13 */
1070
//#define ATOM_ENCODER_MODE_TV										13
867
/* #define ATOM_ENCODER_MODE_CV                                                                          14 */
1071
//#define ATOM_ENCODER_MODE_CV										14
868
/* #define ATOM_ENCODER_MODE_CRT                                                                         15 */
1072
//#define ATOM_ENCODER_MODE_CRT										15
-
 
1073
 
869
 
1074
/****************************************************************************/	
870
/****************************************************************************/
1075
// Structures used by SetPixelClockTable
871
/*  Structures used by SetPixelClockTable */
1076
//                    GetPixelClockTable 
872
/*                     GetPixelClockTable */
1077
/****************************************************************************/	
873
/****************************************************************************/
1078
//Major revision=1., Minor revision=1
874
/* Major revision=1., Minor revision=1 */
1079
typedef struct _PIXEL_CLOCK_PARAMETERS
875
typedef struct _PIXEL_CLOCK_PARAMETERS {
1080
{
876
	USHORT usPixelClock;	/*  in 10kHz unit; for bios convenient = (RefClk*FB_Div)/(Ref_Div*Post_Div) */
1081
  USHORT usPixelClock;                // in 10kHz unit; for bios convenient = (RefClk*FB_Div)/(Ref_Div*Post_Div)
877
	/*  0 means disable PPLL */
1082
                                      // 0 means disable PPLL
878
	USHORT usRefDiv;	/*  Reference divider */
1083
  USHORT usRefDiv;                    // Reference divider
879
	USHORT usFbDiv;		/*  feedback divider */
1084
  USHORT usFbDiv;                     // feedback divider
Line 880... Line 1085...
880
	UCHAR ucPostDiv;	/*  post divider */
1085
  UCHAR  ucPostDiv;                   // post divider	
881
	UCHAR ucFracFbDiv;	/*  fractional feedback divider */
1086
  UCHAR  ucFracFbDiv;                 // fractional feedback divider
882
	UCHAR ucPpll;		/*  ATOM_PPLL1 or ATOM_PPL2 */
1087
  UCHAR  ucPpll;                      // ATOM_PPLL1 or ATOM_PPL2
883
	UCHAR ucRefDivSrc;	/*  ATOM_PJITTER or ATO_NONPJITTER */
1088
  UCHAR  ucRefDivSrc;                 // ATOM_PJITTER or ATO_NONPJITTER
884
	UCHAR ucCRTC;		/*  Which CRTC uses this Ppll */
1089
  UCHAR  ucCRTC;                      // Which CRTC uses this Ppll
Line 885... Line 1090...
885
	UCHAR ucPadding;
1090
	UCHAR ucPadding;
-
 
1091
}PIXEL_CLOCK_PARAMETERS;
886
} PIXEL_CLOCK_PARAMETERS;
1092
 
887
 
1093
//Major revision=1., Minor revision=2, add ucMiscIfno
888
/* Major revision=1., Minor revision=2, add ucMiscIfno */
1094
//ucMiscInfo:
889
/* ucMiscInfo: */
1095
#define MISC_FORCE_REPROG_PIXEL_CLOCK 0x1
890
#define MISC_FORCE_REPROG_PIXEL_CLOCK 0x1
1096
#define MISC_DEVICE_INDEX_MASK        0xF0
891
#define MISC_DEVICE_INDEX_MASK        0xF0
1097
#define MISC_DEVICE_INDEX_SHIFT       4
892
#define MISC_DEVICE_INDEX_SHIFT       4
1098
 
893
 
1099
typedef struct _PIXEL_CLOCK_PARAMETERS_V2
894
typedef struct _PIXEL_CLOCK_PARAMETERS_V2 {
1100
{
895
	USHORT usPixelClock;	/*  in 10kHz unit; for bios convenient = (RefClk*FB_Div)/(Ref_Div*Post_Div) */
1101
  USHORT usPixelClock;                // in 10kHz unit; for bios convenient = (RefClk*FB_Div)/(Ref_Div*Post_Div)
896
	/*  0 means disable PPLL */
1102
                                      // 0 means disable PPLL
Line 897... Line 1103...
897
	USHORT usRefDiv;	/*  Reference divider */
1103
  USHORT usRefDiv;                    // Reference divider
898
	USHORT usFbDiv;		/*  feedback divider */
1104
  USHORT usFbDiv;                     // feedback divider
899
	UCHAR ucPostDiv;	/*  post divider */
1105
  UCHAR  ucPostDiv;                   // post divider	
900
	UCHAR ucFracFbDiv;	/*  fractional feedback divider */
1106
  UCHAR  ucFracFbDiv;                 // fractional feedback divider
901
	UCHAR ucPpll;		/*  ATOM_PPLL1 or ATOM_PPL2 */
1107
  UCHAR  ucPpll;                      // ATOM_PPLL1 or ATOM_PPL2
902
	UCHAR ucRefDivSrc;	/*  ATOM_PJITTER or ATO_NONPJITTER */
1108
  UCHAR  ucRefDivSrc;                 // ATOM_PJITTER or ATO_NONPJITTER
903
	UCHAR ucCRTC;		/*  Which CRTC uses this Ppll */
1109
  UCHAR  ucCRTC;                      // Which CRTC uses this Ppll
904
	UCHAR ucMiscInfo;	/*  Different bits for different purpose, bit [7:4] as device index, bit[0]=Force prog */
1110
  UCHAR  ucMiscInfo;                  // Different bits for different purpose, bit [7:4] as device index, bit[0]=Force prog
905
} PIXEL_CLOCK_PARAMETERS_V2;
1111
}PIXEL_CLOCK_PARAMETERS_V2;
906
 
1112
 
907
/* Major revision=1., Minor revision=3, structure/definition change */
1113
//Major revision=1., Minor revision=3, structure/definition change
908
/* ucEncoderMode: */
1114
//ucEncoderMode:
909
/* ATOM_ENCODER_MODE_DP */
1115
//ATOM_ENCODER_MODE_DP
910
/* ATOM_ENOCDER_MODE_LVDS */
1116
//ATOM_ENOCDER_MODE_LVDS
911
/* ATOM_ENOCDER_MODE_DVI */
1117
//ATOM_ENOCDER_MODE_DVI
912
/* ATOM_ENOCDER_MODE_HDMI */
1118
//ATOM_ENOCDER_MODE_HDMI
913
/* ATOM_ENOCDER_MODE_SDVO */
1119
//ATOM_ENOCDER_MODE_SDVO
914
/* ATOM_ENCODER_MODE_TV                                                                          13 */
1120
//ATOM_ENCODER_MODE_TV										13
915
/* ATOM_ENCODER_MODE_CV                                                                          14 */
1121
//ATOM_ENCODER_MODE_CV										14
Line 916... Line 1122...
916
/* ATOM_ENCODER_MODE_CRT                                                                         15 */
1122
//ATOM_ENCODER_MODE_CRT										15
917
 
1123
 
918
/* ucDVOConfig */
1124
//ucDVOConfig
919
/* #define DVO_ENCODER_CONFIG_RATE_SEL                                                   0x01 */
1125
//#define DVO_ENCODER_CONFIG_RATE_SEL							0x01
920
/* #define DVO_ENCODER_CONFIG_DDR_SPEED                                          0x00 */
1126
//#define DVO_ENCODER_CONFIG_DDR_SPEED						0x00
921
/* #define DVO_ENCODER_CONFIG_SDR_SPEED                                          0x01 */
1127
//#define DVO_ENCODER_CONFIG_SDR_SPEED						0x01
922
/* #define DVO_ENCODER_CONFIG_OUTPUT_SEL                                         0x0c */
1128
//#define DVO_ENCODER_CONFIG_OUTPUT_SEL						0x0c
-
 
1129
//#define DVO_ENCODER_CONFIG_LOW12BIT							0x00
-
 
1130
//#define DVO_ENCODER_CONFIG_UPPER12BIT						0x04
-
 
1131
//#define DVO_ENCODER_CONFIG_24BIT								0x08
-
 
1132
 
Line 923... Line 1133...
923
/* #define DVO_ENCODER_CONFIG_LOW12BIT                                                   0x00 */
1133
//ucMiscInfo: also changed, see below
-
 
1134
#define PIXEL_CLOCK_MISC_FORCE_PROG_PPLL						0x01
924
/* #define DVO_ENCODER_CONFIG_UPPER12BIT                                         0x04 */
1135
#define PIXEL_CLOCK_MISC_VGA_MODE										0x02
925
/* #define DVO_ENCODER_CONFIG_24BIT                                                              0x08 */
1136
#define PIXEL_CLOCK_MISC_CRTC_SEL_MASK							0x04
926
 
1137
#define PIXEL_CLOCK_MISC_CRTC_SEL_CRTC1							0x00
927
/* ucMiscInfo: also changed, see below */
1138
#define PIXEL_CLOCK_MISC_CRTC_SEL_CRTC2							0x04
928
#define PIXEL_CLOCK_MISC_FORCE_PROG_PPLL						0x01
1139
#define PIXEL_CLOCK_MISC_USE_ENGINE_FOR_DISPCLK			0x08
929
#define PIXEL_CLOCK_MISC_VGA_MODE										0x02
1140
#define PIXEL_CLOCK_MISC_REF_DIV_SRC                    0x10
930
#define PIXEL_CLOCK_MISC_CRTC_SEL_MASK							0x04
1141
// V1.4 for RoadRunner
931
#define PIXEL_CLOCK_MISC_CRTC_SEL_CRTC1							0x00
1142
#define PIXEL_CLOCK_V4_MISC_SS_ENABLE               0x10
932
#define PIXEL_CLOCK_MISC_CRTC_SEL_CRTC2							0x04
1143
#define PIXEL_CLOCK_V4_MISC_COHERENT_MODE           0x20
-
 
1144
 
933
#define PIXEL_CLOCK_MISC_USE_ENGINE_FOR_DISPCLK			0x08
1145
typedef struct _PIXEL_CLOCK_PARAMETERS_V3
934
 
1146
{
935
typedef struct _PIXEL_CLOCK_PARAMETERS_V3 {
1147
  USHORT usPixelClock;                // in 10kHz unit; for bios convenient = (RefClk*FB_Div)/(Ref_Div*Post_Div)
936
	USHORT usPixelClock;	/*  in 10kHz unit; for bios convenient = (RefClk*FB_Div)/(Ref_Div*Post_Div) */
1148
                                      // 0 means disable PPLL. For VGA PPLL,make sure this value is not 0.
937
	/*  0 means disable PPLL. For VGA PPLL,make sure this value is not 0. */
1149
  USHORT usRefDiv;                    // Reference divider
-
 
1150
  USHORT usFbDiv;                     // feedback divider
938
	USHORT usRefDiv;	/*  Reference divider */
1151
  UCHAR  ucPostDiv;                   // post divider	
Line 939... Line 1152...
939
	USHORT usFbDiv;		/*  feedback divider */
1152
  UCHAR  ucFracFbDiv;                 // fractional feedback divider
940
	UCHAR ucPostDiv;	/*  post divider */
1153
  UCHAR  ucPpll;                      // ATOM_PPLL1 or ATOM_PPL2
Line -... Line 1154...
-
 
1154
  UCHAR  ucTransmitterId;             // graphic encoder id defined in objectId.h
-
 
1155
	union
-
 
1156
	{
-
 
1157
  UCHAR  ucEncoderMode;               // encoder type defined as ATOM_ENCODER_MODE_DP/DVI/HDMI/
-
 
1158
	UCHAR  ucDVOConfig;									// when use DVO, need to know SDR/DDR, 12bit or 24bit
-
 
1159
	};
-
 
1160
  UCHAR  ucMiscInfo;                  // bit[0]=Force program, bit[1]= set pclk for VGA, b[2]= CRTC sel
-
 
1161
                                      // bit[3]=0:use PPLL for dispclk source, =1: use engine clock for dispclock source
-
 
1162
                                      // bit[4]=0:use XTALIN as the source of reference divider,=1 use the pre-defined clock as the source of reference divider
-
 
1163
}PIXEL_CLOCK_PARAMETERS_V3;
-
 
1164
 
-
 
1165
#define PIXEL_CLOCK_PARAMETERS_LAST			PIXEL_CLOCK_PARAMETERS_V2
-
 
1166
#define GET_PIXEL_CLOCK_PS_ALLOCATION		PIXEL_CLOCK_PARAMETERS_LAST
-
 
1167
 
-
 
1168
typedef struct _PIXEL_CLOCK_PARAMETERS_V5
-
 
1169
{
-
 
1170
  UCHAR  ucCRTC;             // ATOM_CRTC1~6, indicate the CRTC controller to 
-
 
1171
                             // drive the pixel clock. not used for DCPLL case.
-
 
1172
  union{
-
 
1173
  UCHAR  ucReserved;
-
 
1174
  UCHAR  ucFracFbDiv;        // [gphan] temporary to prevent build problem.  remove it after driver code is changed.
-
 
1175
  };
-
 
1176
  USHORT usPixelClock;       // target the pixel clock to drive the CRTC timing
-
 
1177
                             // 0 means disable PPLL/DCPLL. 
-
 
1178
  USHORT usFbDiv;            // feedback divider integer part. 
-
 
1179
  UCHAR  ucPostDiv;          // post divider. 
-
 
1180
  UCHAR  ucRefDiv;           // Reference divider
-
 
1181
  UCHAR  ucPpll;             // ATOM_PPLL1/ATOM_PPLL2/ATOM_DCPLL
-
 
1182
  UCHAR  ucTransmitterID;    // ASIC encoder id defined in objectId.h, 
-
 
1183
                             // indicate which graphic encoder will be used. 
-
 
1184
  UCHAR  ucEncoderMode;      // Encoder mode: 
-
 
1185
  UCHAR  ucMiscInfo;         // bit[0]= Force program PPLL 
-
 
1186
                             // bit[1]= when VGA timing is used. 
-
 
1187
                             // bit[3:2]= HDMI panel bit depth: =0: 24bpp =1:30bpp, =2:32bpp
-
 
1188
                             // bit[4]= RefClock source for PPLL. 
-
 
1189
                             // =0: XTLAIN( default mode )
-
 
1190
	                           // =1: other external clock source, which is pre-defined
-
 
1191
                             //     by VBIOS depend on the feature required.
-
 
1192
                             // bit[7:5]: reserved.
-
 
1193
  ULONG  ulFbDivDecFrac;     // 20 bit feedback divider decimal fraction part, range from 1~999999 ( 0.000001 to 0.999999 )
-
 
1194
 
-
 
1195
}PIXEL_CLOCK_PARAMETERS_V5;
-
 
1196
 
-
 
1197
#define PIXEL_CLOCK_V5_MISC_FORCE_PROG_PPLL					0x01
-
 
1198
#define PIXEL_CLOCK_V5_MISC_VGA_MODE								0x02
-
 
1199
#define PIXEL_CLOCK_V5_MISC_HDMI_BPP_MASK           0x0c
-
 
1200
#define PIXEL_CLOCK_V5_MISC_HDMI_24BPP              0x00
-
 
1201
#define PIXEL_CLOCK_V5_MISC_HDMI_30BPP              0x04
-
 
1202
#define PIXEL_CLOCK_V5_MISC_HDMI_32BPP              0x08
-
 
1203
#define PIXEL_CLOCK_V5_MISC_REF_DIV_SRC             0x10
-
 
1204
 
-
 
1205
typedef struct _GET_DISP_PLL_STATUS_INPUT_PARAMETERS_V2
-
 
1206
{
-
 
1207
  PIXEL_CLOCK_PARAMETERS_V3 sDispClkInput;
941
	UCHAR ucFracFbDiv;	/*  fractional feedback divider */
1208
}GET_DISP_PLL_STATUS_INPUT_PARAMETERS_V2;
942
	UCHAR ucPpll;		/*  ATOM_PPLL1 or ATOM_PPL2 */
1209
 
943
	UCHAR ucTransmitterId;	/*  graphic encoder id defined in objectId.h */
1210
typedef struct _GET_DISP_PLL_STATUS_OUTPUT_PARAMETERS_V2
944
	union {
1211
{
-
 
1212
  UCHAR  ucStatus;
945
		UCHAR ucEncoderMode;	/*  encoder type defined as ATOM_ENCODER_MODE_DP/DVI/HDMI/ */
1213
  UCHAR  ucRefDivSrc;                 // =1: reference clock source from XTALIN, =0: source from PCIE ref clock
946
		UCHAR ucDVOConfig;	/*  when use DVO, need to know SDR/DDR, 12bit or 24bit */
1214
  UCHAR  ucReserved[2];
947
	};
1215
}GET_DISP_PLL_STATUS_OUTPUT_PARAMETERS_V2;
948
	UCHAR ucMiscInfo;	/*  bit[0]=Force program, bit[1]= set pclk for VGA, b[2]= CRTC sel */
1216
 
-
 
1217
typedef struct _GET_DISP_PLL_STATUS_INPUT_PARAMETERS_V3
949
	/*  bit[3]=0:use PPLL for dispclk source, =1: use engine clock for dispclock source */
1218
{
950
} PIXEL_CLOCK_PARAMETERS_V3;
1219
  PIXEL_CLOCK_PARAMETERS_V5 sDispClkInput;
951
 
1220
}GET_DISP_PLL_STATUS_INPUT_PARAMETERS_V3;
952
#define PIXEL_CLOCK_PARAMETERS_LAST			PIXEL_CLOCK_PARAMETERS_V2
1221
 
953
#define GET_PIXEL_CLOCK_PS_ALLOCATION		PIXEL_CLOCK_PARAMETERS_LAST
1222
/****************************************************************************/
Line 954... Line 1223...
954
 
1223
// Structures used by AdjustDisplayPllTable
955
/****************************************************************************/
-
 
956
/*  Structures used by AdjustDisplayPllTable */
1224
/****************************************************************************/
Line -... Line 1225...
-
 
1225
typedef struct _ADJUST_DISPLAY_PLL_PARAMETERS
-
 
1226
{
-
 
1227
	USHORT usPixelClock;
-
 
1228
	UCHAR ucTransmitterID;
-
 
1229
	UCHAR ucEncodeMode;
-
 
1230
	union
-
 
1231
	{
-
 
1232
		UCHAR ucDVOConfig;									//if DVO, need passing link rate and output 12bitlow or 24bit
-
 
1233
		UCHAR ucConfig;											//if none DVO, not defined yet
-
 
1234
	};
-
 
1235
	UCHAR ucReserved[3];
-
 
1236
}ADJUST_DISPLAY_PLL_PARAMETERS;
-
 
1237
 
-
 
1238
#define ADJUST_DISPLAY_CONFIG_SS_ENABLE       0x10
-
 
1239
#define ADJUST_DISPLAY_PLL_PS_ALLOCATION			ADJUST_DISPLAY_PLL_PARAMETERS
-
 
1240
 
-
 
1241
typedef struct _ADJUST_DISPLAY_PLL_INPUT_PARAMETERS_V3
-
 
1242
{
-
 
1243
	USHORT usPixelClock;                    // target pixel clock
-
 
1244
	UCHAR ucTransmitterID;                  // transmitter id defined in objectid.h
-
 
1245
	UCHAR ucEncodeMode;                     // encoder mode: CRT, LVDS, DP, TMDS or HDMI
-
 
1246
  UCHAR ucDispPllConfig;                 // display pll configure parameter defined as following DISPPLL_CONFIG_XXXX
-
 
1247
	UCHAR ucReserved[3];
-
 
1248
}ADJUST_DISPLAY_PLL_INPUT_PARAMETERS_V3;
-
 
1249
 
-
 
1250
// usDispPllConfig v1.2 for RoadRunner
-
 
1251
#define DISPPLL_CONFIG_DVO_RATE_SEL                0x0001     // need only when ucTransmitterID = DVO
-
 
1252
#define DISPPLL_CONFIG_DVO_DDR_SPEED               0x0000     // need only when ucTransmitterID = DVO
-
 
1253
#define DISPPLL_CONFIG_DVO_SDR_SPEED               0x0001     // need only when ucTransmitterID = DVO
-
 
1254
#define DISPPLL_CONFIG_DVO_OUTPUT_SEL              0x000c     // need only when ucTransmitterID = DVO
-
 
1255
#define DISPPLL_CONFIG_DVO_LOW12BIT                0x0000     // need only when ucTransmitterID = DVO
-
 
1256
#define DISPPLL_CONFIG_DVO_UPPER12BIT              0x0004     // need only when ucTransmitterID = DVO
-
 
1257
#define DISPPLL_CONFIG_DVO_24BIT                   0x0008     // need only when ucTransmitterID = DVO
-
 
1258
#define DISPPLL_CONFIG_SS_ENABLE                   0x0010     // Only used when ucEncoderMode = DP or LVDS
-
 
1259
#define DISPPLL_CONFIG_COHERENT_MODE               0x0020     // Only used when ucEncoderMode = TMDS or HDMI
-
 
1260
#define DISPPLL_CONFIG_DUAL_LINK                   0x0040     // Only used when ucEncoderMode = TMDS or LVDS
-
 
1261
 
-
 
1262
 
-
 
1263
typedef struct _ADJUST_DISPLAY_PLL_OUTPUT_PARAMETERS_V3
957
/****************************************************************************/
1264
{
958
typedef struct _ADJUST_DISPLAY_PLL_PARAMETERS {
1265
  ULONG ulDispPllFreq;                 // return display PPLL freq which is used to generate the pixclock, and related idclk, symclk etc
959
	USHORT usPixelClock;
1266
  UCHAR ucRefDiv;                      // if it is none-zero, it is used to be calculated the other ppll parameter fb_divider and post_div ( if it is not given )
960
	UCHAR ucTransmitterID;
1267
  UCHAR ucPostDiv;                     // if it is none-zero, it is used to be calculated the other ppll parameter fb_divider
-
 
1268
  UCHAR ucReserved[2];  
961
	UCHAR ucEncodeMode;
1269
}ADJUST_DISPLAY_PLL_OUTPUT_PARAMETERS_V3;
962
	union {
1270
 
963
		UCHAR ucDVOConfig;	/* if DVO, need passing link rate and output 12bitlow or 24bit */
1271
typedef struct _ADJUST_DISPLAY_PLL_PS_ALLOCATION_V3
964
		UCHAR ucConfig;	/* if none DVO, not defined yet */
1272
{
965
	};
1273
  union 
Line 966... Line 1274...
966
	UCHAR ucReserved[3];
1274
  {
967
} ADJUST_DISPLAY_PLL_PARAMETERS;
1275
    ADJUST_DISPLAY_PLL_INPUT_PARAMETERS_V3  sInput;
968
 
1276
    ADJUST_DISPLAY_PLL_OUTPUT_PARAMETERS_V3 sOutput;
969
#define ADJUST_DISPLAY_CONFIG_SS_ENABLE       0x10
1277
  };
-
 
1278
} ADJUST_DISPLAY_PLL_PS_ALLOCATION_V3;
970
 
1279
 
971
#define ADJUST_DISPLAY_PLL_PS_ALLOCATION			ADJUST_DISPLAY_PLL_PARAMETERS
1280
/****************************************************************************/
972
 
1281
// Structures used by EnableYUVTable
Line 973... Line 1282...
973
/****************************************************************************/
1282
/****************************************************************************/
974
/*  Structures used by EnableYUVTable */
1283
typedef struct _ENABLE_YUV_PARAMETERS
975
/****************************************************************************/
1284
{
976
typedef struct _ENABLE_YUV_PARAMETERS {
1285
  UCHAR ucEnable;                     // ATOM_ENABLE:Enable YUV or ATOM_DISABLE:Disable YUV (RGB)
-
 
1286
  UCHAR ucCRTC;                       // Which CRTC needs this YUV or RGB format
977
	UCHAR ucEnable;		/*  ATOM_ENABLE:Enable YUV or ATOM_DISABLE:Disable YUV (RGB) */
1287
	UCHAR ucPadding[2];
978
	UCHAR ucCRTC;		/*  Which CRTC needs this YUV or RGB format */
1288
}ENABLE_YUV_PARAMETERS;
979
	UCHAR ucPadding[2];
1289
#define ENABLE_YUV_PS_ALLOCATION ENABLE_YUV_PARAMETERS
Line 980... Line 1290...
980
} ENABLE_YUV_PARAMETERS;
1290
 
981
#define ENABLE_YUV_PS_ALLOCATION ENABLE_YUV_PARAMETERS
1291
/****************************************************************************/
982
 
1292
// Structures used by GetMemoryClockTable
983
/****************************************************************************/
1293
/****************************************************************************/
984
/*  Structures used by GetMemoryClockTable */
1294
typedef struct _GET_MEMORY_CLOCK_PARAMETERS
985
/****************************************************************************/
1295
{
-
 
1296
  ULONG ulReturnMemoryClock;          // current memory speed in 10KHz unit
986
typedef struct _GET_MEMORY_CLOCK_PARAMETERS {
1297
} GET_MEMORY_CLOCK_PARAMETERS;
987
	ULONG ulReturnMemoryClock;	/*  current memory speed in 10KHz unit */
1298
#define GET_MEMORY_CLOCK_PS_ALLOCATION  GET_MEMORY_CLOCK_PARAMETERS
988
} GET_MEMORY_CLOCK_PARAMETERS;
1299
 
989
#define GET_MEMORY_CLOCK_PS_ALLOCATION  GET_MEMORY_CLOCK_PARAMETERS
1300
/****************************************************************************/
990
 
1301
// Structures used by GetEngineClockTable
991
/****************************************************************************/
1302
/****************************************************************************/
992
/*  Structures used by GetEngineClockTable */
1303
typedef struct _GET_ENGINE_CLOCK_PARAMETERS
993
/****************************************************************************/
1304
{
Line -... Line 1305...
-
 
1305
  ULONG ulReturnEngineClock;          // current engine speed in 10KHz unit
994
typedef struct _GET_ENGINE_CLOCK_PARAMETERS {
1306
} GET_ENGINE_CLOCK_PARAMETERS;
995
	ULONG ulReturnEngineClock;	/*  current engine speed in 10KHz unit */
1307
#define GET_ENGINE_CLOCK_PS_ALLOCATION  GET_ENGINE_CLOCK_PARAMETERS
996
} GET_ENGINE_CLOCK_PARAMETERS;
1308
 
997
#define GET_ENGINE_CLOCK_PS_ALLOCATION  GET_ENGINE_CLOCK_PARAMETERS
1309
/****************************************************************************/
998
 
1310
// Following Structures and constant may be obsolete
Line 999... Line 1311...
999
/****************************************************************************/
1311
/****************************************************************************/
-
 
1312
//Maxium 8 bytes,the data read in will be placed in the parameter space.
1000
/*  Following Structures and constant may be obsolete */
1313
//Read operaion successeful when the paramter space is non-zero, otherwise read operation failed
1001
/****************************************************************************/
1314
typedef struct _READ_EDID_FROM_HW_I2C_DATA_PARAMETERS
1002
/* Maxium 8 bytes,the data read in will be placed in the parameter space. */
1315
{
1003
/* Read operaion successeful when the paramter space is non-zero, otherwise read operation failed */
1316
  USHORT    usPrescale;         //Ratio between Engine clock and I2C clock
1004
typedef struct _READ_EDID_FROM_HW_I2C_DATA_PARAMETERS {
1317
  USHORT    usVRAMAddress;      //Adress in Frame Buffer where to pace raw EDID
1005
	USHORT usPrescale;	/* Ratio between Engine clock and I2C clock */
1318
  USHORT    usStatus;           //When use output: lower byte EDID checksum, high byte hardware status
1006
	USHORT usVRAMAddress;	/* Adress in Frame Buffer where to pace raw EDID */
1319
                                //WHen use input:  lower byte as 'byte to read':currently limited to 128byte or 1byte
1007
	USHORT usStatus;	/* When use output: lower byte EDID checksum, high byte hardware status */
1320
  UCHAR     ucSlaveAddr;        //Read from which slave
1008
	/* WHen use input:  lower byte as 'byte to read':currently limited to 128byte or 1byte */
1321
  UCHAR     ucLineNumber;       //Read from which HW assisted line
1009
	UCHAR ucSlaveAddr;	/* Read from which slave */
1322
}READ_EDID_FROM_HW_I2C_DATA_PARAMETERS;
1010
	UCHAR ucLineNumber;	/* Read from which HW assisted line */
1323
#define READ_EDID_FROM_HW_I2C_DATA_PS_ALLOCATION  READ_EDID_FROM_HW_I2C_DATA_PARAMETERS
1011
} READ_EDID_FROM_HW_I2C_DATA_PARAMETERS;
1324
 
1012
#define READ_EDID_FROM_HW_I2C_DATA_PS_ALLOCATION  READ_EDID_FROM_HW_I2C_DATA_PARAMETERS
1325
 
Line 1013... Line 1326...
1013
 
1326
#define  ATOM_WRITE_I2C_FORMAT_PSOFFSET_PSDATABYTE                  0
Line 1014... Line 1327...
1014
#define  ATOM_WRITE_I2C_FORMAT_PSOFFSET_PSDATABYTE                  0
1327
#define  ATOM_WRITE_I2C_FORMAT_PSOFFSET_PSTWODATABYTES              1
-
 
1328
#define  ATOM_WRITE_I2C_FORMAT_PSCOUNTER_PSOFFSET_IDDATABLOCK       2
1015
#define  ATOM_WRITE_I2C_FORMAT_PSOFFSET_PSTWODATABYTES              1
1329
#define  ATOM_WRITE_I2C_FORMAT_PSCOUNTER_IDOFFSET_PLUS_IDDATABLOCK  3
1016
#define  ATOM_WRITE_I2C_FORMAT_PSCOUNTER_PSOFFSET_IDDATABLOCK       2
1330
#define  ATOM_WRITE_I2C_FORMAT_IDCOUNTER_IDOFFSET_IDDATABLOCK       4
1017
#define  ATOM_WRITE_I2C_FORMAT_PSCOUNTER_IDOFFSET_PLUS_IDDATABLOCK  3
1331
 
1018
#define  ATOM_WRITE_I2C_FORMAT_IDCOUNTER_IDOFFSET_IDDATABLOCK       4
1332
typedef struct _WRITE_ONE_BYTE_HW_I2C_DATA_PARAMETERS
Line -... Line 1333...
-
 
1333
{
1019
 
1334
  USHORT    usPrescale;         //Ratio between Engine clock and I2C clock
1020
typedef struct _WRITE_ONE_BYTE_HW_I2C_DATA_PARAMETERS {
1335
  USHORT    usByteOffset;       //Write to which byte
Line 1021... Line 1336...
1021
	USHORT usPrescale;	/* Ratio between Engine clock and I2C clock */
1336
                                //Upper portion of usByteOffset is Format of data 
1022
	USHORT usByteOffset;	/* Write to which byte */
1337
                                //1bytePS+offsetPS
1023
	/* Upper portion of usByteOffset is Format of data */
1338
                                //2bytesPS+offsetPS
1024
	/* 1bytePS+offsetPS */
1339
                                //blockID+offsetPS
-
 
1340
                                //blockID+offsetID
1025
	/* 2bytesPS+offsetPS */
1341
                                //blockID+counterID+offsetID
1026
	/* blockID+offsetPS */
1342
  UCHAR     ucData;             //PS data1
1027
	/* blockID+offsetID */
1343
  UCHAR     ucStatus;           //Status byte 1=success, 2=failure, Also is used as PS data2
1028
	/* blockID+counterID+offsetID */
1344
  UCHAR     ucSlaveAddr;        //Write to which slave
Line 1029... Line 1345...
1029
	UCHAR ucData;		/* PS data1 */
1345
  UCHAR     ucLineNumber;       //Write from which HW assisted line
-
 
1346
}WRITE_ONE_BYTE_HW_I2C_DATA_PARAMETERS;
1030
	UCHAR ucStatus;		/* Status byte 1=success, 2=failure, Also is used as PS data2 */
1347
 
1031
	UCHAR ucSlaveAddr;	/* Write to which slave */
1348
#define WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION  WRITE_ONE_BYTE_HW_I2C_DATA_PARAMETERS
1032
	UCHAR ucLineNumber;	/* Write from which HW assisted line */
1349
 
1033
} WRITE_ONE_BYTE_HW_I2C_DATA_PARAMETERS;
1350
typedef struct _SET_UP_HW_I2C_DATA_PARAMETERS
1034
 
1351
{
Line 1035... Line 1352...
1035
#define WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION  WRITE_ONE_BYTE_HW_I2C_DATA_PARAMETERS
1352
  USHORT    usPrescale;         //Ratio between Engine clock and I2C clock
Line 1036... Line 1353...
1036
 
1353
  UCHAR     ucSlaveAddr;        //Write to which slave
1037
typedef struct _SET_UP_HW_I2C_DATA_PARAMETERS {
1354
  UCHAR     ucLineNumber;       //Write from which HW assisted line
1038
	USHORT usPrescale;	/* Ratio between Engine clock and I2C clock */
1355
}SET_UP_HW_I2C_DATA_PARAMETERS;
1039
	UCHAR ucSlaveAddr;	/* Write to which slave */
1356
 
-
 
1357
 
1040
	UCHAR ucLineNumber;	/* Write from which HW assisted line */
1358
/**************************************************************************/
1041
} SET_UP_HW_I2C_DATA_PARAMETERS;
1359
#define SPEED_FAN_CONTROL_PS_ALLOCATION   WRITE_ONE_BYTE_HW_I2C_DATA_PARAMETERS
1042
 
1360
 
1043
/**************************************************************************/
1361
/****************************************************************************/
1044
#define SPEED_FAN_CONTROL_PS_ALLOCATION   WRITE_ONE_BYTE_HW_I2C_DATA_PARAMETERS
1362
// Structures used by PowerConnectorDetectionTable
1045
 
1363
/****************************************************************************/
Line 1046... Line 1364...
1046
/****************************************************************************/
1364
typedef struct	_POWER_CONNECTOR_DETECTION_PARAMETERS
1047
/*  Structures used by PowerConnectorDetectionTable */
1365
{
-
 
1366
  UCHAR   ucPowerConnectorStatus;      //Used for return value 0: detected, 1:not detected
1048
/****************************************************************************/
1367
	UCHAR ucPwrBehaviorId;
1049
typedef struct _POWER_CONNECTOR_DETECTION_PARAMETERS {
1368
	USHORT	usPwrBudget;								 //how much power currently boot to in unit of watt
1050
	UCHAR ucPowerConnectorStatus;	/* Used for return value 0: detected, 1:not detected */
1369
}POWER_CONNECTOR_DETECTION_PARAMETERS;
1051
	UCHAR ucPwrBehaviorId;
1370
 
1052
	USHORT usPwrBudget;	/* how much power currently boot to in unit of watt */
1371
typedef struct POWER_CONNECTOR_DETECTION_PS_ALLOCATION
1053
} POWER_CONNECTOR_DETECTION_PARAMETERS;
1372
{                               
1054
 
1373
  UCHAR   ucPowerConnectorStatus;      //Used for return value 0: detected, 1:not detected
1055
typedef struct POWER_CONNECTOR_DETECTION_PS_ALLOCATION {
1374
	UCHAR ucReserved;
Line 1056... Line 1375...
1056
	UCHAR ucPowerConnectorStatus;	/* Used for return value 0: detected, 1:not detected */
1375
	USHORT	usPwrBudget;								 //how much power currently boot to in unit of watt
1057
	UCHAR ucReserved;
1376
	WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved;
-
 
1377
}POWER_CONNECTOR_DETECTION_PS_ALLOCATION;
1058
	USHORT usPwrBudget;	/* how much power currently boot to in unit of watt */
1378
 
1059
	WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved;
1379
/****************************LVDS SS Command Table Definitions**********************/
1060
} POWER_CONNECTOR_DETECTION_PS_ALLOCATION;
1380
 
1061
 
1381
/****************************************************************************/
1062
/****************************LVDS SS Command Table Definitions**********************/
1382
// Structures used by EnableSpreadSpectrumOnPPLLTable
1063
 
1383
/****************************************************************************/
1064
/****************************************************************************/
1384
typedef struct	_ENABLE_LVDS_SS_PARAMETERS
1065
/*  Structures used by EnableSpreadSpectrumOnPPLLTable */
1385
{
Line -... Line 1386...
-
 
1386
	USHORT usSpreadSpectrumPercentage;
-
 
1387
  UCHAR   ucSpreadSpectrumType;           //Bit1=0 Down Spread,=1 Center Spread. Bit1=1 Ext. =0 Int. Others:TBD
-
 
1388
  UCHAR   ucSpreadSpectrumStepSize_Delay; //bits3:2 SS_STEP_SIZE; bit 6:4 SS_DELAY
-
 
1389
  UCHAR   ucEnable;                       //ATOM_ENABLE or ATOM_DISABLE
-
 
1390
	UCHAR ucPadding[3];
-
 
1391
}ENABLE_LVDS_SS_PARAMETERS;
-
 
1392
 
-
 
1393
//ucTableFormatRevision=1,ucTableContentRevision=2
-
 
1394
typedef struct	_ENABLE_LVDS_SS_PARAMETERS_V2
-
 
1395
{
-
 
1396
	USHORT usSpreadSpectrumPercentage;
-
 
1397
  UCHAR   ucSpreadSpectrumType;           //Bit1=0 Down Spread,=1 Center Spread. Bit1=1 Ext. =0 Int. Others:TBD
-
 
1398
  UCHAR   ucSpreadSpectrumStep;           //
-
 
1399
  UCHAR   ucEnable;                       //ATOM_ENABLE or ATOM_DISABLE
-
 
1400
	UCHAR ucSpreadSpectrumDelay;
-
 
1401
	UCHAR ucSpreadSpectrumRange;
-
 
1402
	UCHAR ucPadding;
-
 
1403
}ENABLE_LVDS_SS_PARAMETERS_V2;
-
 
1404
 
-
 
1405
//This new structure is based on ENABLE_LVDS_SS_PARAMETERS but expands to SS on PPLL, so other devices can use SS.
-
 
1406
typedef struct	_ENABLE_SPREAD_SPECTRUM_ON_PPLL
-
 
1407
{
-
 
1408
	USHORT usSpreadSpectrumPercentage;
-
 
1409
  UCHAR   ucSpreadSpectrumType;           // Bit1=0 Down Spread,=1 Center Spread. Bit1=1 Ext. =0 Int. Others:TBD
1066
/****************************************************************************/
1410
  UCHAR   ucSpreadSpectrumStep;           //
Line 1067... Line 1411...
1067
typedef struct _ENABLE_LVDS_SS_PARAMETERS {
1411
  UCHAR   ucEnable;                       // ATOM_ENABLE or ATOM_DISABLE
Line 1068... Line 1412...
1068
	USHORT usSpreadSpectrumPercentage;
1412
	UCHAR ucSpreadSpectrumDelay;
-
 
1413
	UCHAR ucSpreadSpectrumRange;
1069
	UCHAR ucSpreadSpectrumType;	/* Bit1=0 Down Spread,=1 Center Spread. Bit1=1 Ext. =0 Int. Others:TBD */
1414
  UCHAR   ucPpll;												  // ATOM_PPLL1/ATOM_PPLL2
1070
	UCHAR ucSpreadSpectrumStepSize_Delay;	/* bits3:2 SS_STEP_SIZE; bit 6:4 SS_DELAY */
1415
}ENABLE_SPREAD_SPECTRUM_ON_PPLL;
1071
	UCHAR ucEnable;		/* ATOM_ENABLE or ATOM_DISABLE */
1416
 
Line 1072... Line 1417...
1072
	UCHAR ucPadding[3];
1417
typedef struct _ENABLE_SPREAD_SPECTRUM_ON_PPLL_V2
Line 1073... Line 1418...
1073
} ENABLE_LVDS_SS_PARAMETERS;
1418
{
1074
 
1419
  USHORT  usSpreadSpectrumPercentage;
1075
/* ucTableFormatRevision=1,ucTableContentRevision=2 */
1420
  UCHAR   ucSpreadSpectrumType;	        // Bit[0]: 0-Down Spread,1-Center Spread. 
1076
typedef struct _ENABLE_LVDS_SS_PARAMETERS_V2 {
1421
                                        // Bit[1]: 1-Ext. 0-Int. 
-
 
1422
                                        // Bit[3:2]: =0 P1PLL =1 P2PLL =2 DCPLL
1077
	USHORT usSpreadSpectrumPercentage;
1423
                                        // Bits[7:4] reserved
1078
	UCHAR ucSpreadSpectrumType;	/* Bit1=0 Down Spread,=1 Center Spread. Bit1=1 Ext. =0 Int. Others:TBD */
1424
  UCHAR   ucEnable;	                    // ATOM_ENABLE or ATOM_DISABLE
1079
	UCHAR ucSpreadSpectrumStep;	/*  */
1425
  USHORT  usSpreadSpectrumAmount;      	// Includes SS_AMOUNT_FBDIV[7:0] and SS_AMOUNT_NFRAC_SLIP[11:8]    
Line -... Line 1426...
-
 
1426
  USHORT  usSpreadSpectrumStep;	        // SS_STEP_SIZE_DSFRAC
1080
	UCHAR ucEnable;		/* ATOM_ENABLE or ATOM_DISABLE */
1427
}ENABLE_SPREAD_SPECTRUM_ON_PPLL_V2;
Line -... Line 1428...
-
 
1428
 
1081
	UCHAR ucSpreadSpectrumDelay;
1429
#define ATOM_PPLL_SS_TYPE_V2_DOWN_SPREAD      0x00
1082
	UCHAR ucSpreadSpectrumRange;
1430
#define ATOM_PPLL_SS_TYPE_V2_CENTRE_SPREAD    0x01
1083
	UCHAR ucPadding;
1431
#define ATOM_PPLL_SS_TYPE_V2_EXT_SPREAD       0x02
1084
} ENABLE_LVDS_SS_PARAMETERS_V2;
1432
#define ATOM_PPLL_SS_TYPE_V2_PPLL_SEL_MASK    0x0c
1085
 
1433
#define ATOM_PPLL_SS_TYPE_V2_P1PLL            0x00
1086
/* This new structure is based on ENABLE_LVDS_SS_PARAMETERS but expands to SS on PPLL, so other devices can use SS. */
1434
#define ATOM_PPLL_SS_TYPE_V2_P2PLL            0x04
-
 
1435
#define ATOM_PPLL_SS_TYPE_V2_DCPLL            0x08
1087
typedef struct _ENABLE_SPREAD_SPECTRUM_ON_PPLL {
1436
#define ATOM_PPLL_SS_AMOUNT_V2_FBDIV_MASK     0x00FF
1088
	USHORT usSpreadSpectrumPercentage;
1437
#define ATOM_PPLL_SS_AMOUNT_V2_FBDIV_SHIFT    0
1089
	UCHAR ucSpreadSpectrumType;	/*  Bit1=0 Down Spread,=1 Center Spread. Bit1=1 Ext. =0 Int. Others:TBD */
1438
#define ATOM_PPLL_SS_AMOUNT_V2_NFRAC_MASK     0x0F00
1090
	UCHAR ucSpreadSpectrumStep;	/*  */
1439
#define ATOM_PPLL_SS_AMOUNT_V2_NFRAC_SHIFT    8
1091
	UCHAR ucEnable;		/*  ATOM_ENABLE or ATOM_DISABLE */
1440
 
1092
	UCHAR ucSpreadSpectrumDelay;
1441
#define ENABLE_SPREAD_SPECTRUM_ON_PPLL_PS_ALLOCATION  ENABLE_SPREAD_SPECTRUM_ON_PPLL
1093
	UCHAR ucSpreadSpectrumRange;
1442
 
1094
	UCHAR ucPpll;		/*  ATOM_PPLL1/ATOM_PPLL2 */
1443
/**************************************************************************/
Line 1095... Line 1444...
1095
} ENABLE_SPREAD_SPECTRUM_ON_PPLL;
1444
 
Line 1096... Line 1445...
1096
 
1445
typedef struct _SET_PIXEL_CLOCK_PS_ALLOCATION
1097
#define ENABLE_SPREAD_SPECTRUM_ON_PPLL_PS_ALLOCATION  ENABLE_SPREAD_SPECTRUM_ON_PPLL
1446
{
Line 1098... Line 1447...
1098
 
1447
	PIXEL_CLOCK_PARAMETERS sPCLKInput;
1099
/**************************************************************************/
1448
  ENABLE_SPREAD_SPECTRUM_ON_PPLL sReserved;//Caller doesn't need to init this portion 
Line -... Line 1449...
-
 
1449
}SET_PIXEL_CLOCK_PS_ALLOCATION;
1100
 
1450
 
1101
typedef struct _SET_PIXEL_CLOCK_PS_ALLOCATION {
1451
#define ENABLE_VGA_RENDER_PS_ALLOCATION   SET_PIXEL_CLOCK_PS_ALLOCATION
-
 
1452
 
1102
	PIXEL_CLOCK_PARAMETERS sPCLKInput;
1453
/****************************************************************************/
1103
	ENABLE_SPREAD_SPECTRUM_ON_PPLL sReserved;	/* Caller doesn't need to init this portion */
1454
// Structures used by ###
1104
} SET_PIXEL_CLOCK_PS_ALLOCATION;
1455
/****************************************************************************/
1105
 
1456
typedef struct	_MEMORY_TRAINING_PARAMETERS
1106
#define ENABLE_VGA_RENDER_PS_ALLOCATION   SET_PIXEL_CLOCK_PS_ALLOCATION
1457
{
1107
 
1458
  ULONG ulTargetMemoryClock;          //In 10Khz unit
1108
/****************************************************************************/
1459
}MEMORY_TRAINING_PARAMETERS;
1109
/*  Structures used by ### */
1460
#define MEMORY_TRAINING_PS_ALLOCATION MEMORY_TRAINING_PARAMETERS
1110
/****************************************************************************/
1461
 
1111
typedef struct _MEMORY_TRAINING_PARAMETERS {
1462
 
1112
	ULONG ulTargetMemoryClock;	/* In 10Khz unit */
1463
/****************************LVDS and other encoder command table definitions **********************/
1113
} MEMORY_TRAINING_PARAMETERS;
1464
 
1114
#define MEMORY_TRAINING_PS_ALLOCATION MEMORY_TRAINING_PARAMETERS
1465
 
1115
 
1466
/****************************************************************************/	
1116
/****************************LVDS and other encoder command table definitions **********************/
1467
// Structures used by LVDSEncoderControlTable   (Before DCE30)
1117
 
1468
//                    LVTMAEncoderControlTable  (Before DCE30)
1118
/****************************************************************************/
1469
//                    TMDSAEncoderControlTable  (Before DCE30)
1119
/*  Structures used by LVDSEncoderControlTable   (Before DCE30) */
1470
/****************************************************************************/
1120
/*                     LVTMAEncoderControlTable  (Before DCE30) */
1471
typedef struct _LVDS_ENCODER_CONTROL_PARAMETERS
1121
/*                     TMDSAEncoderControlTable  (Before DCE30) */
1472
{
1122
/****************************************************************************/
1473
  USHORT usPixelClock;  // in 10KHz; for bios convenient
1123
typedef struct _LVDS_ENCODER_CONTROL_PARAMETERS {
1474
  UCHAR  ucMisc;        // bit0=0: Enable single link
1124
	USHORT usPixelClock;	/*  in 10KHz; for bios convenient */
1475
                        //     =1: Enable dual link
1125
	UCHAR ucMisc;		/*  bit0=0: Enable single link */
1476
                        // Bit1=0: 666RGB
1126
	/*      =1: Enable dual link */
1477
                        //     =1: 888RGB
1127
	/*  Bit1=0: 666RGB */
1478
  UCHAR  ucAction;      // 0: turn off encoder
1128
	/*      =1: 888RGB */
1479
                        // 1: setup and turn on encoder
Line 1129... Line 1480...
1129
	UCHAR ucAction;		/*  0: turn off encoder */
1480
}LVDS_ENCODER_CONTROL_PARAMETERS;
Line 1130... Line 1481...
1130
	/*  1: setup and turn on encoder */
1481
 
Line 1184... Line 1535...
1184
 
1535
 
1185
#define TMDS2_ENCODER_CONTROL_PARAMETERS_V3    LVDS_ENCODER_CONTROL_PARAMETERS_V3
1536
#define TMDS2_ENCODER_CONTROL_PARAMETERS_V3    LVDS_ENCODER_CONTROL_PARAMETERS_V3
Line 1186... Line 1537...
1186
#define TMDS2_ENCODER_CONTROL_PS_ALLOCATION_V3 TMDS2_ENCODER_CONTROL_PARAMETERS_V3
1537
#define TMDS2_ENCODER_CONTROL_PS_ALLOCATION_V3 TMDS2_ENCODER_CONTROL_PARAMETERS_V3
1187
 
1538
 
1188
/****************************************************************************/
1539
/****************************************************************************/
1189
/*  Structures used by ### */
1540
// Structures used by ###
-
 
1541
/****************************************************************************/
1190
/****************************************************************************/
1542
typedef struct _ENABLE_EXTERNAL_TMDS_ENCODER_PARAMETERS
1191
typedef struct _ENABLE_EXTERNAL_TMDS_ENCODER_PARAMETERS {
1543
{                               
1192
	UCHAR ucEnable;		/*  Enable or Disable External TMDS encoder */
1544
  UCHAR    ucEnable;            // Enable or Disable External TMDS encoder
1193
	UCHAR ucMisc;		/*  Bit0=0:Enable Single link;=1:Enable Dual link;Bit1 {=0:666RGB, =1:888RGB} */
1545
  UCHAR    ucMisc;              // Bit0=0:Enable Single link;=1:Enable Dual link;Bit1 {=0:666RGB, =1:888RGB}
Line 1194... Line 1546...
1194
	UCHAR ucPadding[2];
1546
	UCHAR ucPadding[2];
-
 
1547
}ENABLE_EXTERNAL_TMDS_ENCODER_PARAMETERS;
1195
} ENABLE_EXTERNAL_TMDS_ENCODER_PARAMETERS;
1548
 
1196
 
1549
typedef struct _ENABLE_EXTERNAL_TMDS_ENCODER_PS_ALLOCATION
1197
typedef struct _ENABLE_EXTERNAL_TMDS_ENCODER_PS_ALLOCATION {
1550
{                               
Line 1198... Line 1551...
1198
	ENABLE_EXTERNAL_TMDS_ENCODER_PARAMETERS sXTmdsEncoder;
1551
	ENABLE_EXTERNAL_TMDS_ENCODER_PARAMETERS sXTmdsEncoder;
Line 1199... Line 1552...
1199
	WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved;	/* Caller doesn't need to init this portion */
1552
  WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION   sReserved;     //Caller doesn't need to init this portion
-
 
1553
}ENABLE_EXTERNAL_TMDS_ENCODER_PS_ALLOCATION;
1200
} ENABLE_EXTERNAL_TMDS_ENCODER_PS_ALLOCATION;
1554
 
1201
 
1555
#define ENABLE_EXTERNAL_TMDS_ENCODER_PARAMETERS_V2  LVDS_ENCODER_CONTROL_PARAMETERS_V2
1202
#define ENABLE_EXTERNAL_TMDS_ENCODER_PARAMETERS_V2  LVDS_ENCODER_CONTROL_PARAMETERS_V2
1556
 
Line 1203... Line 1557...
1203
 
1557
typedef struct _ENABLE_EXTERNAL_TMDS_ENCODER_PS_ALLOCATION_V2
-
 
1558
{                               
1204
typedef struct _ENABLE_EXTERNAL_TMDS_ENCODER_PS_ALLOCATION_V2 {
1559
	ENABLE_EXTERNAL_TMDS_ENCODER_PARAMETERS_V2 sXTmdsEncoder;
1205
	ENABLE_EXTERNAL_TMDS_ENCODER_PARAMETERS_V2 sXTmdsEncoder;
1560
  WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION      sReserved;     //Caller doesn't need to init this portion
1206
	WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved;	/* Caller doesn't need to init this portion */
1561
}ENABLE_EXTERNAL_TMDS_ENCODER_PS_ALLOCATION_V2;
Line 1207... Line 1562...
1207
} ENABLE_EXTERNAL_TMDS_ENCODER_PS_ALLOCATION_V2;
1562
 
1208
 
1563
typedef struct _EXTERNAL_ENCODER_CONTROL_PS_ALLOCATION
1209
typedef struct _EXTERNAL_ENCODER_CONTROL_PS_ALLOCATION {
1564
{
1210
	DIG_ENCODER_CONTROL_PARAMETERS sDigEncoder;
1565
	DIG_ENCODER_CONTROL_PARAMETERS sDigEncoder;
Line 1211... Line 1566...
1211
	WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved;
1566
	WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved;
1212
} EXTERNAL_ENCODER_CONTROL_PS_ALLOCATION;
1567
}EXTERNAL_ENCODER_CONTROL_PS_ALLOCATION;
1213
 
1568
 
1214
/****************************************************************************/
1569
/****************************************************************************/
1215
/*  Structures used by DVOEncoderControlTable */
1570
// Structures used by DVOEncoderControlTable
1216
/****************************************************************************/
1571
/****************************************************************************/
1217
/* ucTableFormatRevision=1,ucTableContentRevision=3 */
1572
//ucTableFormatRevision=1,ucTableContentRevision=3
1218
 
1573
 
Line 1219... Line 1574...
1219
/* ucDVOConfig: */
1574
//ucDVOConfig:
-
 
1575
#define DVO_ENCODER_CONFIG_RATE_SEL							0x01
1220
#define DVO_ENCODER_CONFIG_RATE_SEL							0x01
1576
#define DVO_ENCODER_CONFIG_DDR_SPEED						0x00
1221
#define DVO_ENCODER_CONFIG_DDR_SPEED						0x00
1577
#define DVO_ENCODER_CONFIG_SDR_SPEED						0x01
1222
#define DVO_ENCODER_CONFIG_SDR_SPEED						0x01
1578
#define DVO_ENCODER_CONFIG_OUTPUT_SEL						0x0c
1223
#define DVO_ENCODER_CONFIG_OUTPUT_SEL						0x0c
1579
#define DVO_ENCODER_CONFIG_LOW12BIT							0x00
1224
#define DVO_ENCODER_CONFIG_LOW12BIT							0x00
1580
#define DVO_ENCODER_CONFIG_UPPER12BIT						0x04
1225
#define DVO_ENCODER_CONFIG_UPPER12BIT						0x04
1581
#define DVO_ENCODER_CONFIG_24BIT								0x08
Line 1226... Line 1582...
1226
#define DVO_ENCODER_CONFIG_24BIT								0x08
1582
 
1227
 
1583
typedef struct _DVO_ENCODER_CONTROL_PARAMETERS_V3
1228
typedef struct _DVO_ENCODER_CONTROL_PARAMETERS_V3 {
1584
{
1229
	USHORT usPixelClock;
1585
	USHORT usPixelClock;
Line 1230... Line 1586...
1230
	UCHAR ucDVOConfig;
1586
	UCHAR ucDVOConfig;
1231
	UCHAR ucAction;		/* ATOM_ENABLE/ATOM_DISABLE/ATOM_HPD_INIT */
1587
  UCHAR  ucAction;														//ATOM_ENABLE/ATOM_DISABLE/ATOM_HPD_INIT
1232
	UCHAR ucReseved[4];
1588
	UCHAR ucReseved[4];
1233
} DVO_ENCODER_CONTROL_PARAMETERS_V3;
1589
}DVO_ENCODER_CONTROL_PARAMETERS_V3;
Line 1234... Line 1590...
1234
#define DVO_ENCODER_CONTROL_PS_ALLOCATION_V3	DVO_ENCODER_CONTROL_PARAMETERS_V3
1590
#define DVO_ENCODER_CONTROL_PS_ALLOCATION_V3	DVO_ENCODER_CONTROL_PARAMETERS_V3
1235
 
1591
 
Line 1250... Line 1606...
1250
#define TMDS2_ENCODER_CONTROL_PS_ALLOCATION_LAST TMDS2_ENCODER_CONTROL_PARAMETERS_LAST
1606
#define TMDS2_ENCODER_CONTROL_PS_ALLOCATION_LAST TMDS2_ENCODER_CONTROL_PARAMETERS_LAST
Line 1251... Line 1607...
1251
 
1607
 
1252
#define DVO_ENCODER_CONTROL_PARAMETERS_LAST      DVO_ENCODER_CONTROL_PARAMETERS
1608
#define DVO_ENCODER_CONTROL_PARAMETERS_LAST      DVO_ENCODER_CONTROL_PARAMETERS
Line 1253... Line 1609...
1253
#define DVO_ENCODER_CONTROL_PS_ALLOCATION_LAST   DVO_ENCODER_CONTROL_PS_ALLOCATION
1609
#define DVO_ENCODER_CONTROL_PS_ALLOCATION_LAST   DVO_ENCODER_CONTROL_PS_ALLOCATION
1254
 
1610
 
1255
/* ========================================================================================== */
1611
//==========================================================================================
1256
#define PANEL_ENCODER_MISC_DUAL                0x01
1612
#define PANEL_ENCODER_MISC_DUAL                0x01
1257
#define PANEL_ENCODER_MISC_COHERENT            0x02
1613
#define PANEL_ENCODER_MISC_COHERENT            0x02
Line 1280... Line 1636...
1280
#define PANEL_ENCODER_75FRC_MASK               0x80
1636
#define PANEL_ENCODER_75FRC_MASK               0x80
1281
#define PANEL_ENCODER_75FRC_E                  0x00
1637
#define PANEL_ENCODER_75FRC_E                  0x00
1282
#define PANEL_ENCODER_75FRC_F                  0x80
1638
#define PANEL_ENCODER_75FRC_F                  0x80
Line 1283... Line 1639...
1283
 
1639
 
1284
/****************************************************************************/
1640
/****************************************************************************/
1285
/*  Structures used by SetVoltageTable */
1641
// Structures used by SetVoltageTable
1286
/****************************************************************************/
1642
/****************************************************************************/
1287
#define SET_VOLTAGE_TYPE_ASIC_VDDC             1
1643
#define SET_VOLTAGE_TYPE_ASIC_VDDC             1
1288
#define SET_VOLTAGE_TYPE_ASIC_MVDDC            2
1644
#define SET_VOLTAGE_TYPE_ASIC_MVDDC            2
1289
#define SET_VOLTAGE_TYPE_ASIC_MVDDQ            3
1645
#define SET_VOLTAGE_TYPE_ASIC_MVDDQ            3
1290
#define SET_VOLTAGE_TYPE_ASIC_VDDCI            4
1646
#define SET_VOLTAGE_TYPE_ASIC_VDDCI            4
1291
#define SET_VOLTAGE_INIT_MODE                  5
1647
#define SET_VOLTAGE_INIT_MODE                  5
Line 1292... Line 1648...
1292
#define SET_VOLTAGE_GET_MAX_VOLTAGE            6	/* Gets the Max. voltage for the soldered Asic */
1648
#define SET_VOLTAGE_GET_MAX_VOLTAGE            6					//Gets the Max. voltage for the soldered Asic
1293
 
1649
 
1294
#define SET_ASIC_VOLTAGE_MODE_ALL_SOURCE       0x1
1650
#define SET_ASIC_VOLTAGE_MODE_ALL_SOURCE       0x1
Line 1295... Line 1651...
1295
#define SET_ASIC_VOLTAGE_MODE_SOURCE_A         0x2
1651
#define SET_ASIC_VOLTAGE_MODE_SOURCE_A         0x2
1296
#define SET_ASIC_VOLTAGE_MODE_SOURCE_B         0x4
1652
#define SET_ASIC_VOLTAGE_MODE_SOURCE_B         0x4
1297
 
1653
 
Line 1298... Line 1654...
1298
#define	SET_ASIC_VOLTAGE_MODE_SET_VOLTAGE      0x0
1654
#define	SET_ASIC_VOLTAGE_MODE_SET_VOLTAGE      0x0
-
 
1655
#define	SET_ASIC_VOLTAGE_MODE_GET_GPIOVAL      0x1
1299
#define	SET_ASIC_VOLTAGE_MODE_GET_GPIOVAL      0x1
1656
#define	SET_ASIC_VOLTAGE_MODE_GET_GPIOMASK     0x2
1300
#define	SET_ASIC_VOLTAGE_MODE_GET_GPIOMASK     0x2
1657
 
1301
 
1658
typedef struct	_SET_VOLTAGE_PARAMETERS
1302
typedef struct _SET_VOLTAGE_PARAMETERS {
1659
{
1303
	UCHAR ucVoltageType;	/*  To tell which voltage to set up, VDDC/MVDDC/MVDDQ */
1660
  UCHAR    ucVoltageType;               // To tell which voltage to set up, VDDC/MVDDC/MVDDQ
Line 1304... Line 1661...
1304
	UCHAR ucVoltageMode;	/*  To set all, to set source A or source B or ... */
1661
  UCHAR    ucVoltageMode;               // To set all, to set source A or source B or ...
-
 
1662
  UCHAR    ucVoltageIndex;              // An index to tell which voltage level
1305
	UCHAR ucVoltageIndex;	/*  An index to tell which voltage level */
1663
	UCHAR ucReserved;
1306
	UCHAR ucReserved;
1664
}SET_VOLTAGE_PARAMETERS;
1307
} SET_VOLTAGE_PARAMETERS;
1665
 
1308
 
1666
typedef struct	_SET_VOLTAGE_PARAMETERS_V2
Line 1309... Line 1667...
1309
typedef struct _SET_VOLTAGE_PARAMETERS_V2 {
1667
{
-
 
1668
  UCHAR    ucVoltageType;               // To tell which voltage to set up, VDDC/MVDDC/MVDDQ
1310
	UCHAR ucVoltageType;	/*  To tell which voltage to set up, VDDC/MVDDC/MVDDQ */
1669
  UCHAR    ucVoltageMode;               // Not used, maybe use for state machine for differen power mode
1311
	UCHAR ucVoltageMode;	/*  Not used, maybe use for state machine for differen power mode */
1670
  USHORT   usVoltageLevel;              // real voltage level
1312
	USHORT usVoltageLevel;	/*  real voltage level */
1671
}SET_VOLTAGE_PARAMETERS_V2;
Line 1313... Line 1672...
1313
} SET_VOLTAGE_PARAMETERS_V2;
1672
 
1314
 
1673
typedef struct _SET_VOLTAGE_PS_ALLOCATION
1315
typedef struct _SET_VOLTAGE_PS_ALLOCATION {
1674
{
1316
	SET_VOLTAGE_PARAMETERS sASICSetVoltage;
1675
	SET_VOLTAGE_PARAMETERS sASICSetVoltage;
-
 
1676
	WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved;
1317
	WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved;
1677
}SET_VOLTAGE_PS_ALLOCATION;
1318
} SET_VOLTAGE_PS_ALLOCATION;
1678
 
1319
 
1679
/****************************************************************************/
1320
/****************************************************************************/
1680
// Structures used by TVEncoderControlTable
1321
/*  Structures used by TVEncoderControlTable */
1681
/****************************************************************************/
Line 1322... Line 1682...
1322
/****************************************************************************/
1682
typedef struct _TV_ENCODER_CONTROL_PARAMETERS
-
 
1683
{
1323
typedef struct _TV_ENCODER_CONTROL_PARAMETERS {
1684
  USHORT usPixelClock;                // in 10KHz; for bios convenient
1324
	USHORT usPixelClock;	/*  in 10KHz; for bios convenient */
1685
  UCHAR  ucTvStandard;                // See definition "ATOM_TV_NTSC ..."
1325
	UCHAR ucTvStandard;	/*  See definition "ATOM_TV_NTSC ..." */
1686
  UCHAR  ucAction;                    // 0: turn off encoder
Line 1326... Line 1687...
1326
	UCHAR ucAction;		/*  0: turn off encoder */
1687
                                      // 1: setup and turn on encoder
1327
	/*  1: setup and turn on encoder */
-
 
1328
} TV_ENCODER_CONTROL_PARAMETERS;
-
 
1329
 
-
 
1330
typedef struct _TV_ENCODER_CONTROL_PS_ALLOCATION {
-
 
1331
	TV_ENCODER_CONTROL_PARAMETERS sTVEncoder;
-
 
Line 1332... Line 1688...
1332
	WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved;	/*  Don't set this one */
1688
}TV_ENCODER_CONTROL_PARAMETERS;
1333
} TV_ENCODER_CONTROL_PS_ALLOCATION;
1689
 
1334
 
1690
typedef struct _TV_ENCODER_CONTROL_PS_ALLOCATION
1335
/* ==============================Data Table Portion==================================== */
1691
{
-
 
1692
	TV_ENCODER_CONTROL_PARAMETERS sTVEncoder;
1336
 
1693
  WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION    sReserved; // Don't set this one
1337
#ifdef	UEFI_BUILD
1694
}TV_ENCODER_CONTROL_PS_ALLOCATION;
1338
#define	UTEMP	USHORT
1695
 
1339
#define	USHORT	void*
1696
//==============================Data Table Portion====================================
1340
#endif
1697
 
1341
 
1698
/****************************************************************************/
1342
/****************************************************************************/
1699
// Structure used in Data.mtb
1343
/*  Structure used in Data.mtb */
1700
/****************************************************************************/
1344
/****************************************************************************/
1701
typedef struct _ATOM_MASTER_LIST_OF_DATA_TABLES
1345
typedef struct _ATOM_MASTER_LIST_OF_DATA_TABLES {
1702
{
1346
	USHORT UtilityPipeLine;	/*  Offest for the utility to get parser info,Don't change this position! */
1703
  USHORT        UtilityPipeLine;	        // Offest for the utility to get parser info,Don't change this position!
1347
	USHORT MultimediaCapabilityInfo;	/*  Only used by MM Lib,latest version 1.1, not configuable from Bios, need to include the table to build Bios */
1704
  USHORT        MultimediaCapabilityInfo; // Only used by MM Lib,latest version 1.1, not configuable from Bios, need to include the table to build Bios 
1348
	USHORT MultimediaConfigInfo;	/*  Only used by MM Lib,latest version 2.1, not configuable from Bios, need to include the table to build Bios */
1705
  USHORT        MultimediaConfigInfo;     // Only used by MM Lib,latest version 2.1, not configuable from Bios, need to include the table to build Bios
1349
	USHORT StandardVESA_Timing;	/*  Only used by Bios */
1706
  USHORT        StandardVESA_Timing;      // Only used by Bios
1350
	USHORT FirmwareInfo;	/*  Shared by various SW components,latest version 1.4 */
1707
  USHORT        FirmwareInfo;             // Shared by various SW components,latest version 1.4
1351
	USHORT DAC_Info;	/*  Will be obsolete from R600 */
1708
  USHORT        DAC_Info;                 // Will be obsolete from R600
1352
	USHORT LVDS_Info;	/*  Shared by various SW components,latest version 1.1 */
1709
  USHORT        LVDS_Info;                // Shared by various SW components,latest version 1.1 
1353
	USHORT TMDS_Info;	/*  Will be obsolete from R600 */
1710
  USHORT        TMDS_Info;                // Will be obsolete from R600
1354
	USHORT AnalogTV_Info;	/*  Shared by various SW components,latest version 1.1 */
1711
  USHORT        AnalogTV_Info;            // Shared by various SW components,latest version 1.1 
1355
	USHORT SupportedDevicesInfo;	/*  Will be obsolete from R600 */
1712
  USHORT        SupportedDevicesInfo;     // Will be obsolete from R600
1356
	USHORT GPIO_I2C_Info;	/*  Shared by various SW components,latest version 1.2 will be used from R600 */
1713
  USHORT        GPIO_I2C_Info;            // Shared by various SW components,latest version 1.2 will be used from R600           
1357
	USHORT VRAM_UsageByFirmware;	/*  Shared by various SW components,latest version 1.3 will be used from R600 */
1714
  USHORT        VRAM_UsageByFirmware;     // Shared by various SW components,latest version 1.3 will be used from R600
1358
	USHORT GPIO_Pin_LUT;	/*  Shared by various SW components,latest version 1.1 */
1715
  USHORT        GPIO_Pin_LUT;             // Shared by various SW components,latest version 1.1
1359
	USHORT VESA_ToInternalModeLUT;	/*  Only used by Bios */
1716
  USHORT        VESA_ToInternalModeLUT;   // Only used by Bios
1360
	USHORT ComponentVideoInfo;	/*  Shared by various SW components,latest version 2.1 will be used from R600 */
1717
  USHORT        ComponentVideoInfo;       // Shared by various SW components,latest version 2.1 will be used from R600
1361
	USHORT PowerPlayInfo;	/*  Shared by various SW components,latest version 2.1,new design from R600 */
1718
  USHORT        PowerPlayInfo;            // Shared by various SW components,latest version 2.1,new design from R600
1362
	USHORT CompassionateData;	/*  Will be obsolete from R600 */
1719
  USHORT        CompassionateData;        // Will be obsolete from R600
1363
	USHORT SaveRestoreInfo;	/*  Only used by Bios */
1720
  USHORT        SaveRestoreInfo;          // Only used by Bios
1364
	USHORT PPLL_SS_Info;	/*  Shared by various SW components,latest version 1.2, used to call SS_Info, change to new name because of int ASIC SS info */
1721
  USHORT        PPLL_SS_Info;             // Shared by various SW components,latest version 1.2, used to call SS_Info, change to new name because of int ASIC SS info
1365
	USHORT OemInfo;		/*  Defined and used by external SW, should be obsolete soon */
1722
  USHORT        OemInfo;                  // Defined and used by external SW, should be obsolete soon
1366
	USHORT XTMDS_Info;	/*  Will be obsolete from R600 */
1723
  USHORT        XTMDS_Info;               // Will be obsolete from R600
1367
	USHORT MclkSS_Info;	/*  Shared by various SW components,latest version 1.1, only enabled when ext SS chip is used */
1724
  USHORT        MclkSS_Info;              // Shared by various SW components,latest version 1.1, only enabled when ext SS chip is used
1368
	USHORT Object_Header;	/*  Shared by various SW components,latest version 1.1 */
1725
  USHORT        Object_Header;            // Shared by various SW components,latest version 1.1
1369
	USHORT IndirectIOAccess;	/*  Only used by Bios,this table position can't change at all!! */
1726
  USHORT        IndirectIOAccess;         // Only used by Bios,this table position can't change at all!!
1370
	USHORT MC_InitParameter;	/*  Only used by command table */
1727
  USHORT        MC_InitParameter;         // Only used by command table
Line 1371... Line -...
1371
	USHORT ASIC_VDDC_Info;	/*  Will be obsolete from R600 */
-
 
1372
	USHORT ASIC_InternalSS_Info;	/*  New tabel name from R600, used to be called "ASIC_MVDDC_Info" */
1728
  USHORT        ASIC_VDDC_Info;						// Will be obsolete from R600
1373
	USHORT TV_VideoMode;	/*  Only used by command table */
-
 
1374
	USHORT VRAM_Info;	/*  Only used by command table, latest version 1.3 */
1729
  USHORT        ASIC_InternalSS_Info;			// New tabel name from R600, used to be called "ASIC_MVDDC_Info"
1375
	USHORT MemoryTrainingInfo;	/*  Used for VBIOS and Diag utility for memory training purpose since R600. the new table rev start from 2.1 */
-
 
1376
	USHORT IntegratedSystemInfo;	/*  Shared by various SW components */
1730
  USHORT        TV_VideoMode;							// Only used by command table
1377
	USHORT ASIC_ProfilingInfo;	/*  New table name from R600, used to be called "ASIC_VDDCI_Info" for pre-R600 */
1731
  USHORT        VRAM_Info;								// Only used by command table, latest version 1.3
1378
	USHORT VoltageObjectInfo;	/*  Shared by various SW components, latest version 1.1 */
1732
  USHORT        MemoryTrainingInfo;				// Used for VBIOS and Diag utility for memory training purpose since R600. the new table rev start from 2.1
Line 1379... Line 1733...
1379
	USHORT PowerSourceInfo;	/*  Shared by various SW components, latest versoin 1.1 */
1733
  USHORT        IntegratedSystemInfo;			// Shared by various SW components
1380
} ATOM_MASTER_LIST_OF_DATA_TABLES;
1734
  USHORT        ASIC_ProfilingInfo;				// New table name from R600, used to be called "ASIC_VDDCI_Info" for pre-R600
1381
 
1735
  USHORT        VoltageObjectInfo;				// Shared by various SW components, latest version 1.1
1382
#ifdef	UEFI_BUILD
1736
	USHORT				PowerSourceInfo;					// Shared by various SW components, latest versoin 1.1
-
 
1737
}ATOM_MASTER_LIST_OF_DATA_TABLES;
1383
#define	USHORT	UTEMP
1738
 
1384
#endif
1739
typedef struct _ATOM_MASTER_DATA_TABLE
1385
 
1740
{ 
1386
typedef struct _ATOM_MASTER_DATA_TABLE {
1741
	ATOM_COMMON_TABLE_HEADER sHeader;
1387
	ATOM_COMMON_TABLE_HEADER sHeader;
1742
	ATOM_MASTER_LIST_OF_DATA_TABLES ListOfDataTables;
1388
	ATOM_MASTER_LIST_OF_DATA_TABLES ListOfDataTables;
1743
}ATOM_MASTER_DATA_TABLE;
1389
} ATOM_MASTER_DATA_TABLE;
1744
 
Line 1390... Line 1745...
1390
 
1745
/****************************************************************************/
1391
/****************************************************************************/
1746
// Structure used in MultimediaCapabilityInfoTable
1392
/*  Structure used in MultimediaCapabilityInfoTable */
1747
/****************************************************************************/
1393
/****************************************************************************/
1748
typedef struct _ATOM_MULTIMEDIA_CAPABILITY_INFO
-
 
1749
{
1394
typedef struct _ATOM_MULTIMEDIA_CAPABILITY_INFO {
1750
	ATOM_COMMON_TABLE_HEADER sHeader;
1395
	ATOM_COMMON_TABLE_HEADER sHeader;
1751
  ULONG                    ulSignature;      // HW info table signature string "$ATI"
1396
	ULONG ulSignature;	/*  HW info table signature string "$ATI" */
1752
  UCHAR                    ucI2C_Type;       // I2C type (normal GP_IO, ImpactTV GP_IO, Dedicated I2C pin, etc)
1397
	UCHAR ucI2C_Type;	/*  I2C type (normal GP_IO, ImpactTV GP_IO, Dedicated I2C pin, etc) */
1753
  UCHAR                    ucTV_OutInfo;     // Type of TV out supported (3:0) and video out crystal frequency (6:4) and TV data port (7)
1398
	UCHAR ucTV_OutInfo;	/*  Type of TV out supported (3:0) and video out crystal frequency (6:4) and TV data port (7) */
1754
  UCHAR                    ucVideoPortInfo;  // Provides the video port capabilities
1399
	UCHAR ucVideoPortInfo;	/*  Provides the video port capabilities */
1755
  UCHAR                    ucHostPortInfo;   // Provides host port configuration information
1400
	UCHAR ucHostPortInfo;	/*  Provides host port configuration information */
1756
}ATOM_MULTIMEDIA_CAPABILITY_INFO;
1401
} ATOM_MULTIMEDIA_CAPABILITY_INFO;
1757
 
1402
 
1758
/****************************************************************************/
1403
/****************************************************************************/
1759
// Structure used in MultimediaConfigInfoTable
1404
/*  Structure used in MultimediaConfigInfoTable */
1760
/****************************************************************************/
1405
/****************************************************************************/
1761
typedef struct _ATOM_MULTIMEDIA_CONFIG_INFO
1406
typedef struct _ATOM_MULTIMEDIA_CONFIG_INFO {
1762
{
1407
	ATOM_COMMON_TABLE_HEADER sHeader;
1763
	ATOM_COMMON_TABLE_HEADER sHeader;
1408
	ULONG ulSignature;	/*  MM info table signature sting "$MMT" */
1764
  ULONG                    ulSignature;      // MM info table signature sting "$MMT"
Line 1409... Line 1765...
1409
	UCHAR ucTunerInfo;	/*  Type of tuner installed on the adapter (4:0) and video input for tuner (7:5) */
1765
  UCHAR                    ucTunerInfo;      // Type of tuner installed on the adapter (4:0) and video input for tuner (7:5)
1410
	UCHAR ucAudioChipInfo;	/*  List the audio chip type (3:0) product type (4) and OEM revision (7:5) */
1766
  UCHAR                    ucAudioChipInfo;  // List the audio chip type (3:0) product type (4) and OEM revision (7:5)
1411
	UCHAR ucProductID;	/*  Defines as OEM ID or ATI board ID dependent on product type setting */
1767
  UCHAR                    ucProductID;      // Defines as OEM ID or ATI board ID dependent on product type setting
Line 1412... Line 1768...
1412
	UCHAR ucMiscInfo1;	/*  Tuner voltage (1:0) HW teletext support (3:2) FM audio decoder (5:4) reserved (6) audio scrambling (7) */
1768
  UCHAR                    ucMiscInfo1;      // Tuner voltage (1:0) HW teletext support (3:2) FM audio decoder (5:4) reserved (6) audio scrambling (7)
1413
	UCHAR ucMiscInfo2;	/*  I2S input config (0) I2S output config (1) I2S Audio Chip (4:2) SPDIF Output Config (5) reserved (7:6) */
1769
  UCHAR                    ucMiscInfo2;      // I2S input config (0) I2S output config (1) I2S Audio Chip (4:2) SPDIF Output Config (5) reserved (7:6)
1414
	UCHAR ucMiscInfo3;	/*  Video Decoder Type (3:0) Video In Standard/Crystal (7:4) */
1770
  UCHAR                    ucMiscInfo3;      // Video Decoder Type (3:0) Video In Standard/Crystal (7:4)
1415
	UCHAR ucMiscInfo4;	/*  Video Decoder Host Config (2:0) reserved (7:3) */
1771
  UCHAR                    ucMiscInfo4;      // Video Decoder Host Config (2:0) reserved (7:3)
1416
	UCHAR ucVideoInput0Info;	/*  Video Input 0 Type (1:0) F/B setting (2) physical connector ID (5:3) reserved (7:6) */
1772
  UCHAR                    ucVideoInput0Info;// Video Input 0 Type (1:0) F/B setting (2) physical connector ID (5:3) reserved (7:6)
1417
	UCHAR ucVideoInput1Info;	/*  Video Input 1 Type (1:0) F/B setting (2) physical connector ID (5:3) reserved (7:6) */
1773
  UCHAR                    ucVideoInput1Info;// Video Input 1 Type (1:0) F/B setting (2) physical connector ID (5:3) reserved (7:6)
1418
	UCHAR ucVideoInput2Info;	/*  Video Input 2 Type (1:0) F/B setting (2) physical connector ID (5:3) reserved (7:6) */
1774
  UCHAR                    ucVideoInput2Info;// Video Input 2 Type (1:0) F/B setting (2) physical connector ID (5:3) reserved (7:6)
1419
	UCHAR ucVideoInput3Info;	/*  Video Input 3 Type (1:0) F/B setting (2) physical connector ID (5:3) reserved (7:6) */
1775
  UCHAR                    ucVideoInput3Info;// Video Input 3 Type (1:0) F/B setting (2) physical connector ID (5:3) reserved (7:6)
1420
	UCHAR ucVideoInput4Info;	/*  Video Input 4 Type (1:0) F/B setting (2) physical connector ID (5:3) reserved (7:6) */
1776
  UCHAR                    ucVideoInput4Info;// Video Input 4 Type (1:0) F/B setting (2) physical connector ID (5:3) reserved (7:6)
1421
} ATOM_MULTIMEDIA_CONFIG_INFO;
1777
}ATOM_MULTIMEDIA_CONFIG_INFO;
1422
 
1778
 
1423
/****************************************************************************/
1779
/****************************************************************************/	
1424
/*  Structures used in FirmwareInfoTable */
1780
// Structures used in FirmwareInfoTable
1425
/****************************************************************************/
1781
/****************************************************************************/	
1426
 
1782
 
1427
/*  usBIOSCapability Definition: */
1783
// usBIOSCapability Defintion:
1428
/*  Bit 0 = 0: Bios image is not Posted, =1:Bios image is Posted; */
1784
// Bit 0 = 0: Bios image is not Posted, =1:Bios image is Posted; 
-
 
1785
// Bit 1 = 0: Dual CRTC is not supported, =1: Dual CRTC is supported; 
-
 
1786
// Bit 2 = 0: Extended Desktop is not supported, =1: Extended Desktop is supported; 
Line 1429... Line 1787...
1429
/*  Bit 1 = 0: Dual CRTC is not supported, =1: Dual CRTC is supported; */
1787
// Others: Reserved
Line 1430... Line 1788...
1430
/*  Bit 2 = 0: Extended Desktop is not supported, =1: Extended Desktop is supported; */
1788
#define ATOM_BIOS_INFO_ATOM_FIRMWARE_POSTED         0x0001
1431
/*  Others: Reserved */
1789
#define ATOM_BIOS_INFO_DUAL_CRTC_SUPPORT            0x0002
-
 
1790
#define ATOM_BIOS_INFO_EXTENDED_DESKTOP_SUPPORT     0x0004
1432
#define ATOM_BIOS_INFO_ATOM_FIRMWARE_POSTED         0x0001
1791
#define ATOM_BIOS_INFO_MEMORY_CLOCK_SS_SUPPORT      0x0008		// (valid from v1.1 ~v1.4):=1: memclk SS enable, =0 memclk SS disable. 
1433
#define ATOM_BIOS_INFO_DUAL_CRTC_SUPPORT            0x0002
1792
#define ATOM_BIOS_INFO_ENGINE_CLOCK_SS_SUPPORT      0x0010		// (valid from v1.1 ~v1.4):=1: engclk SS enable, =0 engclk SS disable. 
1434
#define ATOM_BIOS_INFO_EXTENDED_DESKTOP_SUPPORT     0x0004
1793
#define ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU         0x0020
1435
#define ATOM_BIOS_INFO_MEMORY_CLOCK_SS_SUPPORT      0x0008
1794
#define ATOM_BIOS_INFO_WMI_SUPPORT                  0x0040
1436
#define ATOM_BIOS_INFO_ENGINE_CLOCK_SS_SUPPORT      0x0010
1795
#define ATOM_BIOS_INFO_PPMODE_ASSIGNGED_BY_SYSTEM   0x0080
Line 1471... Line 1830...
1471
	USHORT HyperMemory_Size:4;
1830
	USHORT HyperMemory_Size:4;
1472
	USHORT Reserved:3;
1831
	USHORT Reserved:3;
1473
#endif
1832
#endif
1474
} ATOM_FIRMWARE_CAPABILITY;
1833
}ATOM_FIRMWARE_CAPABILITY;
Line 1475... Line 1834...
1475
 
1834
 
-
 
1835
typedef union _ATOM_FIRMWARE_CAPABILITY_ACCESS
1476
typedef union _ATOM_FIRMWARE_CAPABILITY_ACCESS {
1836
{
1477
	ATOM_FIRMWARE_CAPABILITY sbfAccess;
1837
	ATOM_FIRMWARE_CAPABILITY sbfAccess;
1478
	USHORT susAccess;
1838
	USHORT susAccess;
Line 1479... Line 1839...
1479
} ATOM_FIRMWARE_CAPABILITY_ACCESS;
1839
}ATOM_FIRMWARE_CAPABILITY_ACCESS;
Line 1480... Line 1840...
1480
 
1840
 
-
 
1841
#else
1481
#else
1842
 
1482
 
1843
typedef union _ATOM_FIRMWARE_CAPABILITY_ACCESS
Line 1483... Line 1844...
1483
typedef union _ATOM_FIRMWARE_CAPABILITY_ACCESS {
1844
{
Line 1484... Line 1845...
1484
	USHORT susAccess;
1845
	USHORT susAccess;
-
 
1846
}ATOM_FIRMWARE_CAPABILITY_ACCESS;
1485
} ATOM_FIRMWARE_CAPABILITY_ACCESS;
1847
 
1486
 
1848
#endif
1487
#endif
1849
 
1488
 
1850
typedef struct _ATOM_FIRMWARE_INFO
1489
typedef struct _ATOM_FIRMWARE_INFO {
1851
{
1490
	ATOM_COMMON_TABLE_HEADER sHeader;
1852
	ATOM_COMMON_TABLE_HEADER sHeader;
1491
	ULONG ulFirmwareRevision;
1853
	ULONG ulFirmwareRevision;
1492
	ULONG ulDefaultEngineClock;	/* In 10Khz unit */
1854
  ULONG                           ulDefaultEngineClock;       //In 10Khz unit
1493
	ULONG ulDefaultMemoryClock;	/* In 10Khz unit */
1855
  ULONG                           ulDefaultMemoryClock;       //In 10Khz unit
1494
	ULONG ulDriverTargetEngineClock;	/* In 10Khz unit */
1856
  ULONG                           ulDriverTargetEngineClock;  //In 10Khz unit
1495
	ULONG ulDriverTargetMemoryClock;	/* In 10Khz unit */
1857
  ULONG                           ulDriverTargetMemoryClock;  //In 10Khz unit
1496
	ULONG ulMaxEngineClockPLL_Output;	/* In 10Khz unit */
1858
  ULONG                           ulMaxEngineClockPLL_Output; //In 10Khz unit
1497
	ULONG ulMaxMemoryClockPLL_Output;	/* In 10Khz unit */
1859
  ULONG                           ulMaxMemoryClockPLL_Output; //In 10Khz unit
1498
	ULONG ulMaxPixelClockPLL_Output;	/* In 10Khz unit */
1860
  ULONG                           ulMaxPixelClockPLL_Output;  //In 10Khz unit
1499
	ULONG ulASICMaxEngineClock;	/* In 10Khz unit */
1861
  ULONG                           ulASICMaxEngineClock;       //In 10Khz unit
1500
	ULONG ulASICMaxMemoryClock;	/* In 10Khz unit */
1862
  ULONG                           ulASICMaxMemoryClock;       //In 10Khz unit
1501
	UCHAR ucASICMaxTemperature;
1863
	UCHAR ucASICMaxTemperature;
1502
	UCHAR ucPadding[3];	/* Don't use them */
1864
  UCHAR                           ucPadding[3];               //Don't use them
1503
	ULONG aulReservedForBIOS[3];	/* Don't use them */
1865
  ULONG                           aulReservedForBIOS[3];      //Don't use them
1504
	USHORT usMinEngineClockPLL_Input;	/* In 10Khz unit */
1866
  USHORT                          usMinEngineClockPLL_Input;  //In 10Khz unit
1505
	USHORT usMaxEngineClockPLL_Input;	/* In 10Khz unit */
1867
  USHORT                          usMaxEngineClockPLL_Input;  //In 10Khz unit
1506
	USHORT usMinEngineClockPLL_Output;	/* In 10Khz unit */
1868
  USHORT                          usMinEngineClockPLL_Output; //In 10Khz unit
1507
	USHORT usMinMemoryClockPLL_Input;	/* In 10Khz unit */
1869
  USHORT                          usMinMemoryClockPLL_Input;  //In 10Khz unit
1508
	USHORT usMaxMemoryClockPLL_Input;	/* In 10Khz unit */
1870
  USHORT                          usMaxMemoryClockPLL_Input;  //In 10Khz unit
1509
	USHORT usMinMemoryClockPLL_Output;	/* In 10Khz unit */
1871
  USHORT                          usMinMemoryClockPLL_Output; //In 10Khz unit
1510
	USHORT usMaxPixelClock;	/* In 10Khz unit, Max.  Pclk */
1872
  USHORT                          usMaxPixelClock;            //In 10Khz unit, Max.  Pclk
1511
	USHORT usMinPixelClockPLL_Input;	/* In 10Khz unit */
1873
  USHORT                          usMinPixelClockPLL_Input;   //In 10Khz unit
1512
	USHORT usMaxPixelClockPLL_Input;	/* In 10Khz unit */
1874
  USHORT                          usMaxPixelClockPLL_Input;   //In 10Khz unit
1513
	USHORT usMinPixelClockPLL_Output;	/* In 10Khz unit, the definitions above can't change!!! */
1875
  USHORT                          usMinPixelClockPLL_Output;  //In 10Khz unit, the definitions above can't change!!!
1514
	ATOM_FIRMWARE_CAPABILITY_ACCESS usFirmwareCapability;
1876
	ATOM_FIRMWARE_CAPABILITY_ACCESS usFirmwareCapability;
1515
	USHORT usReferenceClock;	/* In 10Khz unit */
1877
  USHORT                          usReferenceClock;           //In 10Khz unit	
Line 1516... Line 1878...
1516
	USHORT usPM_RTS_Location;	/* RTS PM4 starting location in ROM in 1Kb unit */
1878
  USHORT                          usPM_RTS_Location;          //RTS PM4 starting location in ROM in 1Kb unit 
-
 
1879
  UCHAR                           ucPM_RTS_StreamSize;        //RTS PM4 packets in Kb unit
1517
	UCHAR ucPM_RTS_StreamSize;	/* RTS PM4 packets in Kb unit */
1880
  UCHAR                           ucDesign_ID;                //Indicate what is the board design
1518
	UCHAR ucDesign_ID;	/* Indicate what is the board design */
1881
  UCHAR                           ucMemoryModule_ID;          //Indicate what is the board design
1519
	UCHAR ucMemoryModule_ID;	/* Indicate what is the board design */
1882
}ATOM_FIRMWARE_INFO;
1520
} ATOM_FIRMWARE_INFO;
1883
 
1521
 
1884
typedef struct _ATOM_FIRMWARE_INFO_V1_2
1522
typedef struct _ATOM_FIRMWARE_INFO_V1_2 {
1885
{
1523
	ATOM_COMMON_TABLE_HEADER sHeader;
1886
	ATOM_COMMON_TABLE_HEADER sHeader;
1524
	ULONG ulFirmwareRevision;
1887
	ULONG ulFirmwareRevision;
1525
	ULONG ulDefaultEngineClock;	/* In 10Khz unit */
1888
  ULONG                           ulDefaultEngineClock;       //In 10Khz unit
1526
	ULONG ulDefaultMemoryClock;	/* In 10Khz unit */
1889
  ULONG                           ulDefaultMemoryClock;       //In 10Khz unit
1527
	ULONG ulDriverTargetEngineClock;	/* In 10Khz unit */
1890
  ULONG                           ulDriverTargetEngineClock;  //In 10Khz unit
1528
	ULONG ulDriverTargetMemoryClock;	/* In 10Khz unit */
1891
  ULONG                           ulDriverTargetMemoryClock;  //In 10Khz unit
1529
	ULONG ulMaxEngineClockPLL_Output;	/* In 10Khz unit */
1892
  ULONG                           ulMaxEngineClockPLL_Output; //In 10Khz unit
1530
	ULONG ulMaxMemoryClockPLL_Output;	/* In 10Khz unit */
1893
  ULONG                           ulMaxMemoryClockPLL_Output; //In 10Khz unit
1531
	ULONG ulMaxPixelClockPLL_Output;	/* In 10Khz unit */
1894
  ULONG                           ulMaxPixelClockPLL_Output;  //In 10Khz unit
1532
	ULONG ulASICMaxEngineClock;	/* In 10Khz unit */
1895
  ULONG                           ulASICMaxEngineClock;       //In 10Khz unit
1533
	ULONG ulASICMaxMemoryClock;	/* In 10Khz unit */
1896
  ULONG                           ulASICMaxMemoryClock;       //In 10Khz unit
1534
	UCHAR ucASICMaxTemperature;
1897
	UCHAR ucASICMaxTemperature;
1535
	UCHAR ucMinAllowedBL_Level;
1898
	UCHAR ucMinAllowedBL_Level;
1536
	UCHAR ucPadding[2];	/* Don't use them */
1899
  UCHAR                           ucPadding[2];               //Don't use them
1537
	ULONG aulReservedForBIOS[2];	/* Don't use them */
1900
  ULONG                           aulReservedForBIOS[2];      //Don't use them
1538
	ULONG ulMinPixelClockPLL_Output;	/* In 10Khz unit */
1901
  ULONG                           ulMinPixelClockPLL_Output;  //In 10Khz unit
1539
	USHORT usMinEngineClockPLL_Input;	/* In 10Khz unit */
1902
  USHORT                          usMinEngineClockPLL_Input;  //In 10Khz unit
1540
	USHORT usMaxEngineClockPLL_Input;	/* In 10Khz unit */
1903
  USHORT                          usMaxEngineClockPLL_Input;  //In 10Khz unit
1541
	USHORT usMinEngineClockPLL_Output;	/* In 10Khz unit */
1904
  USHORT                          usMinEngineClockPLL_Output; //In 10Khz unit
1542
	USHORT usMinMemoryClockPLL_Input;	/* In 10Khz unit */
1905
  USHORT                          usMinMemoryClockPLL_Input;  //In 10Khz unit
1543
	USHORT usMaxMemoryClockPLL_Input;	/* In 10Khz unit */
1906
  USHORT                          usMaxMemoryClockPLL_Input;  //In 10Khz unit
1544
	USHORT usMinMemoryClockPLL_Output;	/* In 10Khz unit */
1907
  USHORT                          usMinMemoryClockPLL_Output; //In 10Khz unit
1545
	USHORT usMaxPixelClock;	/* In 10Khz unit, Max.  Pclk */
1908
  USHORT                          usMaxPixelClock;            //In 10Khz unit, Max.  Pclk
1546
	USHORT usMinPixelClockPLL_Input;	/* In 10Khz unit */
1909
  USHORT                          usMinPixelClockPLL_Input;   //In 10Khz unit
1547
	USHORT usMaxPixelClockPLL_Input;	/* In 10Khz unit */
1910
  USHORT                          usMaxPixelClockPLL_Input;   //In 10Khz unit
1548
	USHORT usMinPixelClockPLL_Output;	/* In 10Khz unit - lower 16bit of ulMinPixelClockPLL_Output */
1911
  USHORT                          usMinPixelClockPLL_Output;  //In 10Khz unit - lower 16bit of ulMinPixelClockPLL_Output
1549
	ATOM_FIRMWARE_CAPABILITY_ACCESS usFirmwareCapability;
1912
	ATOM_FIRMWARE_CAPABILITY_ACCESS usFirmwareCapability;
Line 1550... Line 1913...
1550
	USHORT usReferenceClock;	/* In 10Khz unit */
1913
  USHORT                          usReferenceClock;           //In 10Khz unit	
-
 
1914
  USHORT                          usPM_RTS_Location;          //RTS PM4 starting location in ROM in 1Kb unit 
1551
	USHORT usPM_RTS_Location;	/* RTS PM4 starting location in ROM in 1Kb unit */
1915
  UCHAR                           ucPM_RTS_StreamSize;        //RTS PM4 packets in Kb unit
1552
	UCHAR ucPM_RTS_StreamSize;	/* RTS PM4 packets in Kb unit */
1916
  UCHAR                           ucDesign_ID;                //Indicate what is the board design
1553
	UCHAR ucDesign_ID;	/* Indicate what is the board design */
1917
  UCHAR                           ucMemoryModule_ID;          //Indicate what is the board design
1554
	UCHAR ucMemoryModule_ID;	/* Indicate what is the board design */
1918
}ATOM_FIRMWARE_INFO_V1_2;
1555
} ATOM_FIRMWARE_INFO_V1_2;
1919
 
1556
 
1920
typedef struct _ATOM_FIRMWARE_INFO_V1_3
1557
typedef struct _ATOM_FIRMWARE_INFO_V1_3 {
1921
{
1558
	ATOM_COMMON_TABLE_HEADER sHeader;
1922
	ATOM_COMMON_TABLE_HEADER sHeader;
1559
	ULONG ulFirmwareRevision;
1923
	ULONG ulFirmwareRevision;
1560
	ULONG ulDefaultEngineClock;	/* In 10Khz unit */
1924
  ULONG                           ulDefaultEngineClock;       //In 10Khz unit
1561
	ULONG ulDefaultMemoryClock;	/* In 10Khz unit */
1925
  ULONG                           ulDefaultMemoryClock;       //In 10Khz unit
1562
	ULONG ulDriverTargetEngineClock;	/* In 10Khz unit */
1926
  ULONG                           ulDriverTargetEngineClock;  //In 10Khz unit
1563
	ULONG ulDriverTargetMemoryClock;	/* In 10Khz unit */
1927
  ULONG                           ulDriverTargetMemoryClock;  //In 10Khz unit
1564
	ULONG ulMaxEngineClockPLL_Output;	/* In 10Khz unit */
1928
  ULONG                           ulMaxEngineClockPLL_Output; //In 10Khz unit
1565
	ULONG ulMaxMemoryClockPLL_Output;	/* In 10Khz unit */
1929
  ULONG                           ulMaxMemoryClockPLL_Output; //In 10Khz unit
1566
	ULONG ulMaxPixelClockPLL_Output;	/* In 10Khz unit */
1930
  ULONG                           ulMaxPixelClockPLL_Output;  //In 10Khz unit
1567
	ULONG ulASICMaxEngineClock;	/* In 10Khz unit */
1931
  ULONG                           ulASICMaxEngineClock;       //In 10Khz unit
1568
	ULONG ulASICMaxMemoryClock;	/* In 10Khz unit */
1932
  ULONG                           ulASICMaxMemoryClock;       //In 10Khz unit
1569
	UCHAR ucASICMaxTemperature;
1933
	UCHAR ucASICMaxTemperature;
1570
	UCHAR ucMinAllowedBL_Level;
1934
	UCHAR ucMinAllowedBL_Level;
1571
	UCHAR ucPadding[2];	/* Don't use them */
1935
  UCHAR                           ucPadding[2];               //Don't use them
1572
	ULONG aulReservedForBIOS;	/* Don't use them */
1936
  ULONG                           aulReservedForBIOS;         //Don't use them
1573
	ULONG ul3DAccelerationEngineClock;	/* In 10Khz unit */
1937
  ULONG                           ul3DAccelerationEngineClock;//In 10Khz unit
1574
	ULONG ulMinPixelClockPLL_Output;	/* In 10Khz unit */
1938
  ULONG                           ulMinPixelClockPLL_Output;  //In 10Khz unit
1575
	USHORT usMinEngineClockPLL_Input;	/* In 10Khz unit */
1939
  USHORT                          usMinEngineClockPLL_Input;  //In 10Khz unit
1576
	USHORT usMaxEngineClockPLL_Input;	/* In 10Khz unit */
1940
  USHORT                          usMaxEngineClockPLL_Input;  //In 10Khz unit
1577
	USHORT usMinEngineClockPLL_Output;	/* In 10Khz unit */
1941
  USHORT                          usMinEngineClockPLL_Output; //In 10Khz unit
1578
	USHORT usMinMemoryClockPLL_Input;	/* In 10Khz unit */
1942
  USHORT                          usMinMemoryClockPLL_Input;  //In 10Khz unit
1579
	USHORT usMaxMemoryClockPLL_Input;	/* In 10Khz unit */
1943
  USHORT                          usMaxMemoryClockPLL_Input;  //In 10Khz unit
1580
	USHORT usMinMemoryClockPLL_Output;	/* In 10Khz unit */
1944
  USHORT                          usMinMemoryClockPLL_Output; //In 10Khz unit
1581
	USHORT usMaxPixelClock;	/* In 10Khz unit, Max.  Pclk */
1945
  USHORT                          usMaxPixelClock;            //In 10Khz unit, Max.  Pclk
1582
	USHORT usMinPixelClockPLL_Input;	/* In 10Khz unit */
1946
  USHORT                          usMinPixelClockPLL_Input;   //In 10Khz unit
1583
	USHORT usMaxPixelClockPLL_Input;	/* In 10Khz unit */
1947
  USHORT                          usMaxPixelClockPLL_Input;   //In 10Khz unit
1584
	USHORT usMinPixelClockPLL_Output;	/* In 10Khz unit - lower 16bit of ulMinPixelClockPLL_Output */
1948
  USHORT                          usMinPixelClockPLL_Output;  //In 10Khz unit - lower 16bit of ulMinPixelClockPLL_Output
Line 1585... Line 1949...
1585
	ATOM_FIRMWARE_CAPABILITY_ACCESS usFirmwareCapability;
1949
	ATOM_FIRMWARE_CAPABILITY_ACCESS usFirmwareCapability;
-
 
1950
  USHORT                          usReferenceClock;           //In 10Khz unit	
1586
	USHORT usReferenceClock;	/* In 10Khz unit */
1951
  USHORT                          usPM_RTS_Location;          //RTS PM4 starting location in ROM in 1Kb unit 
1587
	USHORT usPM_RTS_Location;	/* RTS PM4 starting location in ROM in 1Kb unit */
1952
  UCHAR                           ucPM_RTS_StreamSize;        //RTS PM4 packets in Kb unit
1588
	UCHAR ucPM_RTS_StreamSize;	/* RTS PM4 packets in Kb unit */
1953
  UCHAR                           ucDesign_ID;                //Indicate what is the board design
1589
	UCHAR ucDesign_ID;	/* Indicate what is the board design */
1954
  UCHAR                           ucMemoryModule_ID;          //Indicate what is the board design
1590
	UCHAR ucMemoryModule_ID;	/* Indicate what is the board design */
1955
}ATOM_FIRMWARE_INFO_V1_3;
1591
} ATOM_FIRMWARE_INFO_V1_3;
1956
 
1592
 
1957
typedef struct _ATOM_FIRMWARE_INFO_V1_4
1593
typedef struct _ATOM_FIRMWARE_INFO_V1_4 {
1958
{
1594
	ATOM_COMMON_TABLE_HEADER sHeader;
1959
	ATOM_COMMON_TABLE_HEADER sHeader;
1595
	ULONG ulFirmwareRevision;
1960
	ULONG ulFirmwareRevision;
1596
	ULONG ulDefaultEngineClock;	/* In 10Khz unit */
1961
  ULONG                           ulDefaultEngineClock;       //In 10Khz unit
1597
	ULONG ulDefaultMemoryClock;	/* In 10Khz unit */
1962
  ULONG                           ulDefaultMemoryClock;       //In 10Khz unit
1598
	ULONG ulDriverTargetEngineClock;	/* In 10Khz unit */
1963
  ULONG                           ulDriverTargetEngineClock;  //In 10Khz unit
1599
	ULONG ulDriverTargetMemoryClock;	/* In 10Khz unit */
1964
  ULONG                           ulDriverTargetMemoryClock;  //In 10Khz unit
1600
	ULONG ulMaxEngineClockPLL_Output;	/* In 10Khz unit */
1965
  ULONG                           ulMaxEngineClockPLL_Output; //In 10Khz unit
1601
	ULONG ulMaxMemoryClockPLL_Output;	/* In 10Khz unit */
1966
  ULONG                           ulMaxMemoryClockPLL_Output; //In 10Khz unit
1602
	ULONG ulMaxPixelClockPLL_Output;	/* In 10Khz unit */
1967
  ULONG                           ulMaxPixelClockPLL_Output;  //In 10Khz unit
1603
	ULONG ulASICMaxEngineClock;	/* In 10Khz unit */
1968
  ULONG                           ulASICMaxEngineClock;       //In 10Khz unit
1604
	ULONG ulASICMaxMemoryClock;	/* In 10Khz unit */
1969
  ULONG                           ulASICMaxMemoryClock;       //In 10Khz unit
1605
	UCHAR ucASICMaxTemperature;
1970
	UCHAR ucASICMaxTemperature;
1606
	UCHAR ucMinAllowedBL_Level;
1971
	UCHAR ucMinAllowedBL_Level;
1607
	USHORT usBootUpVDDCVoltage;	/* In MV unit */
1972
  USHORT                          usBootUpVDDCVoltage;        //In MV unit
1608
	USHORT usLcdMinPixelClockPLL_Output;	/*  In MHz unit */
1973
  USHORT                          usLcdMinPixelClockPLL_Output; // In MHz unit
1609
	USHORT usLcdMaxPixelClockPLL_Output;	/*  In MHz unit */
1974
  USHORT                          usLcdMaxPixelClockPLL_Output; // In MHz unit
1610
	ULONG ul3DAccelerationEngineClock;	/* In 10Khz unit */
1975
  ULONG                           ul3DAccelerationEngineClock;//In 10Khz unit
1611
	ULONG ulMinPixelClockPLL_Output;	/* In 10Khz unit */
1976
  ULONG                           ulMinPixelClockPLL_Output;  //In 10Khz unit
1612
	USHORT usMinEngineClockPLL_Input;	/* In 10Khz unit */
1977
  USHORT                          usMinEngineClockPLL_Input;  //In 10Khz unit
1613
	USHORT usMaxEngineClockPLL_Input;	/* In 10Khz unit */
1978
  USHORT                          usMaxEngineClockPLL_Input;  //In 10Khz unit
1614
	USHORT usMinEngineClockPLL_Output;	/* In 10Khz unit */
1979
  USHORT                          usMinEngineClockPLL_Output; //In 10Khz unit
1615
	USHORT usMinMemoryClockPLL_Input;	/* In 10Khz unit */
1980
  USHORT                          usMinMemoryClockPLL_Input;  //In 10Khz unit
1616
	USHORT usMaxMemoryClockPLL_Input;	/* In 10Khz unit */
1981
  USHORT                          usMaxMemoryClockPLL_Input;  //In 10Khz unit
1617
	USHORT usMinMemoryClockPLL_Output;	/* In 10Khz unit */
1982
  USHORT                          usMinMemoryClockPLL_Output; //In 10Khz unit
1618
	USHORT usMaxPixelClock;	/* In 10Khz unit, Max.  Pclk */
1983
  USHORT                          usMaxPixelClock;            //In 10Khz unit, Max.  Pclk
1619
	USHORT usMinPixelClockPLL_Input;	/* In 10Khz unit */
1984
  USHORT                          usMinPixelClockPLL_Input;   //In 10Khz unit
1620
	USHORT usMaxPixelClockPLL_Input;	/* In 10Khz unit */
1985
  USHORT                          usMaxPixelClockPLL_Input;   //In 10Khz unit
Line -... Line 1986...
-
 
1986
  USHORT                          usMinPixelClockPLL_Output;  //In 10Khz unit - lower 16bit of ulMinPixelClockPLL_Output
-
 
1987
  ATOM_FIRMWARE_CAPABILITY_ACCESS usFirmwareCapability;
-
 
1988
  USHORT                          usReferenceClock;           //In 10Khz unit	
-
 
1989
  USHORT                          usPM_RTS_Location;          //RTS PM4 starting location in ROM in 1Kb unit 
-
 
1990
  UCHAR                           ucPM_RTS_StreamSize;        //RTS PM4 packets in Kb unit
-
 
1991
  UCHAR                           ucDesign_ID;                //Indicate what is the board design
-
 
1992
  UCHAR                           ucMemoryModule_ID;          //Indicate what is the board design
-
 
1993
}ATOM_FIRMWARE_INFO_V1_4;
-
 
1994
 
-
 
1995
//the structure below to be used from Cypress
-
 
1996
typedef struct _ATOM_FIRMWARE_INFO_V2_1
-
 
1997
{
-
 
1998
  ATOM_COMMON_TABLE_HEADER        sHeader; 
-
 
1999
  ULONG                           ulFirmwareRevision;
-
 
2000
  ULONG                           ulDefaultEngineClock;       //In 10Khz unit
-
 
2001
  ULONG                           ulDefaultMemoryClock;       //In 10Khz unit
-
 
2002
  ULONG                           ulReserved1;
-
 
2003
  ULONG                           ulReserved2;
-
 
2004
  ULONG                           ulMaxEngineClockPLL_Output; //In 10Khz unit
-
 
2005
  ULONG                           ulMaxMemoryClockPLL_Output; //In 10Khz unit
-
 
2006
  ULONG                           ulMaxPixelClockPLL_Output;  //In 10Khz unit
-
 
2007
  ULONG                           ulBinaryAlteredInfo;        //Was ulASICMaxEngineClock
-
 
2008
  ULONG                           ulDefaultDispEngineClkFreq; //In 10Khz unit
-
 
2009
  UCHAR                           ucReserved1;                //Was ucASICMaxTemperature;
-
 
2010
  UCHAR                           ucMinAllowedBL_Level;
-
 
2011
  USHORT                          usBootUpVDDCVoltage;        //In MV unit
-
 
2012
  USHORT                          usLcdMinPixelClockPLL_Output; // In MHz unit
-
 
2013
  USHORT                          usLcdMaxPixelClockPLL_Output; // In MHz unit
-
 
2014
  ULONG                           ulReserved4;                //Was ulAsicMaximumVoltage
-
 
2015
  ULONG                           ulMinPixelClockPLL_Output;  //In 10Khz unit
-
 
2016
  USHORT                          usMinEngineClockPLL_Input;  //In 10Khz unit
-
 
2017
  USHORT                          usMaxEngineClockPLL_Input;  //In 10Khz unit
-
 
2018
  USHORT                          usMinEngineClockPLL_Output; //In 10Khz unit
-
 
2019
  USHORT                          usMinMemoryClockPLL_Input;  //In 10Khz unit
-
 
2020
  USHORT                          usMaxMemoryClockPLL_Input;  //In 10Khz unit
-
 
2021
  USHORT                          usMinMemoryClockPLL_Output; //In 10Khz unit
-
 
2022
  USHORT                          usMaxPixelClock;            //In 10Khz unit, Max.  Pclk
-
 
2023
  USHORT                          usMinPixelClockPLL_Input;   //In 10Khz unit
-
 
2024
  USHORT                          usMaxPixelClockPLL_Input;   //In 10Khz unit
-
 
2025
  USHORT                          usMinPixelClockPLL_Output;  //In 10Khz unit - lower 16bit of ulMinPixelClockPLL_Output
1621
	USHORT usMinPixelClockPLL_Output;	/* In 10Khz unit - lower 16bit of ulMinPixelClockPLL_Output */
2026
	ATOM_FIRMWARE_CAPABILITY_ACCESS usFirmwareCapability;
Line 1622... Line 2027...
1622
	ATOM_FIRMWARE_CAPABILITY_ACCESS usFirmwareCapability;
2027
  USHORT                          usCoreReferenceClock;       //In 10Khz unit	
1623
	USHORT usReferenceClock;	/* In 10Khz unit */
2028
  USHORT                          usMemoryReferenceClock;     //In 10Khz unit	
1624
	USHORT usPM_RTS_Location;	/* RTS PM4 starting location in ROM in 1Kb unit */
2029
  USHORT                          usUniphyDPModeExtClkFreq;   //In 10Khz unit, if it is 0, In DP Mode Uniphy Input clock from internal PPLL, otherwise Input clock from external Spread clock
1625
	UCHAR ucPM_RTS_StreamSize;	/* RTS PM4 packets in Kb unit */
2030
  UCHAR                           ucMemoryModule_ID;          //Indicate what is the board design
1626
	UCHAR ucDesign_ID;	/* Indicate what is the board design */
2031
  UCHAR                           ucReserved4[3];
1627
	UCHAR ucMemoryModule_ID;	/* Indicate what is the board design */
2032
}ATOM_FIRMWARE_INFO_V2_1;
1628
} ATOM_FIRMWARE_INFO_V1_4;
2033
 
Line 1629... Line 2034...
1629
 
2034
 
-
 
2035
#define ATOM_FIRMWARE_INFO_LAST  ATOM_FIRMWARE_INFO_V2_1
1630
#define ATOM_FIRMWARE_INFO_LAST  ATOM_FIRMWARE_INFO_V1_4
2036
 
1631
 
2037
/****************************************************************************/
1632
/****************************************************************************/
2038
// Structures used in IntegratedSystemInfoTable
1633
/*  Structures used in IntegratedSystemInfoTable */
2039
/****************************************************************************/
1634
/****************************************************************************/
2040
#define IGP_CAP_FLAG_DYNAMIC_CLOCK_EN      0x2
1635
#define IGP_CAP_FLAG_DYNAMIC_CLOCK_EN      0x2
2041
#define IGP_CAP_FLAG_AC_CARD               0x4
1636
#define IGP_CAP_FLAG_AC_CARD               0x4
2042
#define IGP_CAP_FLAG_SDVO_CARD             0x8
1637
#define IGP_CAP_FLAG_SDVO_CARD             0x8
2043
#define IGP_CAP_FLAG_POSTDIV_BY_2_MODE     0x10
1638
#define IGP_CAP_FLAG_POSTDIV_BY_2_MODE     0x10
2044
 
1639
 
2045
typedef struct _ATOM_INTEGRATED_SYSTEM_INFO
1640
typedef struct _ATOM_INTEGRATED_SYSTEM_INFO {
2046
{
Line 1641... Line 2047...
1641
	ATOM_COMMON_TABLE_HEADER sHeader;
2047
	ATOM_COMMON_TABLE_HEADER sHeader;
1642
	ULONG ulBootUpEngineClock;	/* in 10kHz unit */
2048
  ULONG	                          ulBootUpEngineClock;		    //in 10kHz unit
1643
	ULONG ulBootUpMemoryClock;	/* in 10kHz unit */
2049
  ULONG	                          ulBootUpMemoryClock;		    //in 10kHz unit
1644
	ULONG ulMaxSystemMemoryClock;	/* in 10kHz unit */
2050
  ULONG	                          ulMaxSystemMemoryClock;	    //in 10kHz unit
1645
	ULONG ulMinSystemMemoryClock;	/* in 10kHz unit */
2051
  ULONG	                          ulMinSystemMemoryClock;	    //in 10kHz unit
1646
	UCHAR ucNumberOfCyclesInPeriodHi;
2052
	UCHAR ucNumberOfCyclesInPeriodHi;
1647
	UCHAR ucLCDTimingSel;	/* =0:not valid.!=0 sel this timing descriptor from LCD EDID. */
2053
  UCHAR                           ucLCDTimingSel;             //=0:not valid.!=0 sel this timing descriptor from LCD EDID.
1648
	USHORT usReserved1;
2054
	USHORT usReserved1;
1649
	USHORT usInterNBVoltageLow;	/* An intermidiate PMW value to set the voltage */
2055
  USHORT                          usInterNBVoltageLow;        //An intermidiate PMW value to set the voltage 
1650
	USHORT usInterNBVoltageHigh;	/* Another intermidiate PMW value to set the voltage */
2056
  USHORT                          usInterNBVoltageHigh;       //Another intermidiate PMW value to set the voltage 
1651
	ULONG ulReserved[2];
2057
	ULONG ulReserved[2];
1652
 
2058
 
1653
	USHORT usFSBClock;	/* In MHz unit */
2059
  USHORT	                        usFSBClock;			            //In MHz unit
1654
	USHORT usCapabilityFlag;	/* Bit0=1 indicates the fake HDMI support,Bit1=0/1 for Dynamic clocking dis/enable */
2060
  USHORT                          usCapabilityFlag;		        //Bit0=1 indicates the fake HDMI support,Bit1=0/1 for Dynamic clocking dis/enable
1655
	/* Bit[3:2]== 0:No PCIE card, 1:AC card, 2:SDVO card */
2061
																                              //Bit[3:2]== 0:No PCIE card, 1:AC card, 2:SDVO card
1656
	/* Bit[4]==1: P/2 mode, ==0: P/1 mode */
2062
                                                              //Bit[4]==1: P/2 mode, ==0: P/1 mode
1657
	USHORT usPCIENBCfgReg7;	/* bit[7:0]=MUX_Sel, bit[9:8]=MUX_SEL_LEVEL2, bit[10]=Lane_Reversal */
2063
  USHORT	                        usPCIENBCfgReg7;				    //bit[7:0]=MUX_Sel, bit[9:8]=MUX_SEL_LEVEL2, bit[10]=Lane_Reversal
Line 1658... Line 2064...
1658
	USHORT usK8MemoryClock;	/* in MHz unit */
2064
  USHORT	                        usK8MemoryClock;            //in MHz unit
Line 1691... Line 2097...
1691
ucNumberOfCyclesInPeriodHi: Indicate how many cycles when PWM duty is 100%. high 8 bits of the value.If the PWM has an inverter,set bit [7]==1,otherwise set it 0
2097
ucNumberOfCyclesInPeriodHi: Indicate how many cycles when PWM duty is 100%. high 8 bits of the value.If the PWM has an inverter,set bit [7]==1,otherwise set it 0
Line 1692... Line 2098...
1692
 
2098
 
1693
ucMaxNBVoltageHigh:     Voltage regulator dependent PWM value. High 8 bits of  the value for the max voltage.Set this one to 0xFF if VC without PWM. Set this to 0x0 if no VC at all.
2099
ucMaxNBVoltageHigh:     Voltage regulator dependent PWM value. High 8 bits of  the value for the max voltage.Set this one to 0xFF if VC without PWM. Set this to 0x0 if no VC at all.
Line -... Line 2100...
-
 
2100
ucMinNBVoltageHigh:     Voltage regulator dependent PWM value. High 8 bits of the value for the min voltage.Set this one to 0x00 if VC without PWM or no VC at all.
1694
ucMinNBVoltageHigh:     Voltage regulator dependent PWM value. High 8 bits of the value for the min voltage.Set this one to 0x00 if VC without PWM or no VC at all.
2101
 
1695
 
2102
 
1696
usInterNBVoltageLow:    Voltage regulator dependent PWM value. The value makes the the voltage >=Min NB voltage but <=InterNBVoltageHigh. Set this to 0x0000 if VC without PWM or no VC at all.
2103
usInterNBVoltageLow:    Voltage regulator dependent PWM value. The value makes the the voltage >=Min NB voltage but <=InterNBVoltageHigh. Set this to 0x0000 if VC without PWM or no VC at all.
Line -... Line 2104...
-
 
2104
usInterNBVoltageHigh:   Voltage regulator dependent PWM value. The value makes the the voltage >=InterNBVoltageLow but <=Max NB voltage.Set this to 0x0000 if VC without PWM or no VC at all.
1697
usInterNBVoltageHigh:   Voltage regulator dependent PWM value. The value makes the the voltage >=InterNBVoltageLow but <=Max NB voltage.Set this to 0x0000 if VC without PWM or no VC at all.
2105
*/
1698
*/
2106
 
1699
 
2107
 
1700
/*
2108
/*
Line 1701... Line 2109...
1701
The following IGP table is introduced from RS780, which is supposed to be put by SBIOS in FB before IGP VBIOS starts VPOST;
2109
The following IGP table is introduced from RS780, which is supposed to be put by SBIOS in FB before IGP VBIOS starts VPOST;
1702
Then VBIOS will copy the whole structure to its image so all GPU SW components can access this data structure to get whatever they need.
2110
Then VBIOS will copy the whole structure to its image so all GPU SW components can access this data structure to get whatever they need.
Line -... Line 2111...
-
 
2111
The enough reservation should allow us to never change table revisions. Whenever needed, a GPU SW component can use reserved portion for new data entries.
1703
The enough reservation should allow us to never change table revisions. Whenever needed, a GPU SW component can use reserved portion for new data entries.
2112
 
-
 
2113
SW components can access the IGP system infor structure in the same way as before
1704
 
2114
*/
1705
SW components can access the IGP system infor structure in the same way as before
2115
 
1706
*/
2116
 
1707
 
2117
typedef struct _ATOM_INTEGRATED_SYSTEM_INFO_V2
1708
typedef struct _ATOM_INTEGRATED_SYSTEM_INFO_V2 {
2118
{
1709
	ATOM_COMMON_TABLE_HEADER sHeader;
2119
	ATOM_COMMON_TABLE_HEADER sHeader;
1710
	ULONG ulBootUpEngineClock;	/* in 10kHz unit */
2120
  ULONG	                     ulBootUpEngineClock;       //in 10kHz unit
1711
	ULONG ulReserved1[2];	/* must be 0x0 for the reserved */
2121
  ULONG			     ulReserved1[2];            //must be 0x0 for the reserved
1712
	ULONG ulBootUpUMAClock;	/* in 10kHz unit */
2122
  ULONG	                     ulBootUpUMAClock;          //in 10kHz unit
1713
	ULONG ulBootUpSidePortClock;	/* in 10kHz unit */
2123
  ULONG	                     ulBootUpSidePortClock;     //in 10kHz unit
1714
	ULONG ulMinSidePortClock;	/* in 10kHz unit */
2124
  ULONG	                     ulMinSidePortClock;        //in 10kHz unit
1715
	ULONG ulReserved2[6];	/* must be 0x0 for the reserved */
2125
  ULONG			     ulReserved2[6];            //must be 0x0 for the reserved
1716
	ULONG ulSystemConfig;	/* see explanation below */
2126
  ULONG                      ulSystemConfig;            //see explanation below
1717
	ULONG ulBootUpReqDisplayVector;
2127
	ULONG ulBootUpReqDisplayVector;
1718
	ULONG ulOtherDisplayMisc;
2128
	ULONG ulOtherDisplayMisc;
1719
	ULONG ulDDISlot1Config;
2129
	ULONG ulDDISlot1Config;
1720
	ULONG ulDDISlot2Config;
2130
	ULONG ulDDISlot2Config;
1721
	UCHAR ucMemoryType;	/* [3:0]=1:DDR1;=2:DDR2;=3:DDR3.[7:4] is reserved */
2131
  UCHAR                      ucMemoryType;              //[3:0]=1:DDR1;=2:DDR2;=3:DDR3.[7:4] is reserved
1722
	UCHAR ucUMAChannelNumber;
2132
	UCHAR ucUMAChannelNumber;
1723
	UCHAR ucDockingPinBit;
2133
	UCHAR ucDockingPinBit;
1724
	UCHAR ucDockingPinPolarity;
2134
	UCHAR ucDockingPinPolarity;
1725
	ULONG ulDockingPinCFGInfo;
2135
	ULONG ulDockingPinCFGInfo;
1726
	ULONG ulCPUCapInfo;
2136
	ULONG ulCPUCapInfo;
1727
	USHORT usNumberOfCyclesInPeriod;
2137
	USHORT usNumberOfCyclesInPeriod;
1728
	USHORT usMaxNBVoltage;
2138
	USHORT usMaxNBVoltage;
1729
	USHORT usMinNBVoltage;
2139
	USHORT usMinNBVoltage;
1730
	USHORT usBootUpNBVoltage;
2140
	USHORT usBootUpNBVoltage;
1731
	ULONG ulHTLinkFreq;	/* in 10Khz */
2141
  ULONG                      ulHTLinkFreq;              //in 10Khz
1732
	USHORT usMinHTLinkWidth;
2142
	USHORT usMinHTLinkWidth;
1733
	USHORT usMaxHTLinkWidth;
2143
	USHORT usMaxHTLinkWidth;
1734
	USHORT usUMASyncStartDelay;
2144
	USHORT usUMASyncStartDelay;
1735
	USHORT usUMADataReturnTime;
2145
	USHORT usUMADataReturnTime;
1736
	USHORT usLinkStatusZeroTime;
2146
	USHORT usLinkStatusZeroTime;
1737
	USHORT usReserved;
2147
  USHORT                     usDACEfuse;				//for storing badgap value (for RS880 only)
1738
	ULONG ulHighVoltageHTLinkFreq;	/*  in 10Khz */
2148
  ULONG                      ulHighVoltageHTLinkFreq;     // in 10Khz
-
 
2149
  ULONG                      ulLowVoltageHTLinkFreq;      // in 10Khz
-
 
2150
	USHORT usMaxUpStreamHTLinkWidth;
1739
	ULONG ulLowVoltageHTLinkFreq;	/*  in 10Khz */
2151
	USHORT usMaxDownStreamHTLinkWidth;
1740
	USHORT usMaxUpStreamHTLinkWidth;
2152
	USHORT usMinUpStreamHTLinkWidth;
Line 1741... Line 2153...
1741
	USHORT usMaxDownStreamHTLinkWidth;
2153
	USHORT usMinDownStreamHTLinkWidth;
1742
	USHORT usMinUpStreamHTLinkWidth;
2154
  USHORT                     usFirmwareVersion;         //0 means FW is not supported. Otherwise it's the FW version loaded by SBIOS and driver should enable FW.
1743
	USHORT usMinDownStreamHTLinkWidth;
2155
  USHORT                     usFullT0Time;             // Input to calculate minimum HT link change time required by NB P-State. Unit is 0.01us.
Line 1762... Line 2174...
1762
      =0: CDLW is disabled. If CLMC is enabled case, Min HT width will be set equal to Max HT width. If CLMC disabled case, Max HT width will be applied.
2174
      =0: CDLW is disabled. If CLMC is enabled case, Min HT width will be set equal to Max HT width. If CLMC disabled case, Max HT width will be applied.
1763
Bit[6]=1: High Voltage requested for all power states. In this case, voltage will be forced at 1.1v and powerplay table voltage drop/throttling request will be ignored.
2175
Bit[6]=1: High Voltage requested for all power states. In this case, voltage will be forced at 1.1v and powerplay table voltage drop/throttling request will be ignored.
1764
      =0: Voltage settings is determined by powerplay table.
2176
      =0: Voltage settings is determined by powerplay table.
1765
Bit[7]=1: Enable CLMC as hybrid Mode. CDLD and CILR will be disabled in this case and we're using legacy C1E. This is workaround for CPU(Griffin) performance issue.
2177
Bit[7]=1: Enable CLMC as hybrid Mode. CDLD and CILR will be disabled in this case and we're using legacy C1E. This is workaround for CPU(Griffin) performance issue.
1766
      =0: Enable CLMC as regular mode, CDLD and CILR will be enabled.
2178
      =0: Enable CLMC as regular mode, CDLD and CILR will be enabled.
-
 
2179
Bit[8]=1: CDLF is supported and enabled on current system.
-
 
2180
      =0: CDLF is not supported or enabled on current system.
-
 
2181
Bit[9]=1: DLL Shut Down feature is enabled on current system.
-
 
2182
      =0: DLL Shut Down feature is not enabled or supported on current system.
Line 1767... Line 2183...
1767
 
2183
 
Line 1768... Line 2184...
1768
ulBootUpReqDisplayVector: This dword is a bit vector indicates what display devices are requested during boot-up. Refer to ATOM_DEVICE_xxx_SUPPORT for the bit vector definitions.
2184
ulBootUpReqDisplayVector: This dword is a bit vector indicates what display devices are requested during boot-up. Refer to ATOM_DEVICE_xxx_SUPPORT for the bit vector definitions.
1769
 
2185
 
Line 1770... Line 2186...
1770
ulOtherDisplayMisc: [15:8]- Bootup LCD Expansion selection; 0-center, 1-full panel size expansion;
2186
ulOtherDisplayMisc: [15:8]- Bootup LCD Expansion selection; 0-center, 1-full panel size expansion;
1771
			              [7:0] - BootupTV standard selection; This is a bit vector to indicate what TV standards are supported by the system. Refer to ucTVSuppportedStd definition;
2187
			              [7:0] - BootupTV standard selection; This is a bit vector to indicate what TV standards are supported by the system. Refer to ucTVSupportedStd definition;
1772
 
2188
 
-
 
2189
ulDDISlot1Config: Describes the PCIE lane configuration on this DDI PCIE slot (ADD2 card) or connector (Mobile design).
-
 
2190
      [3:0]  - Bit vector to indicate PCIE lane config of the DDI slot/connector on chassis (bit 0=1 lane 3:0; bit 1=1 lane 7:4; bit 2=1 lane 11:8; bit 3=1 lane 15:12)
-
 
2191
			[7:4]  - Bit vector to indicate PCIE lane config of the same DDI slot/connector on docking station (bit 4=1 lane 3:0; bit 5=1 lane 7:4; bit 6=1 lane 11:8; bit 7=1 lane 15:12)
-
 
2192
      When a DDI connector is not "paired" (meaming two connections mutualexclusive on chassis or docking, only one of them can be connected at one time.
1773
ulDDISlot1Config: Describes the PCIE lane configuration on this DDI PCIE slot (ADD2 card) or connector (Mobile design).
2193
      in both chassis and docking, SBIOS has to duplicate the same PCIE lane info from chassis to docking or vice versa. For example:
1774
      [3:0]  - Bit vector to indicate PCIE lane config of the DDI slot/connector on chassis (bit 0=1 lane 3:0; bit 1=1 lane 7:4; bit 2=1 lane 11:8; bit 3=1 lane 15:12)
2194
      one DDI connector is only populated in docking with PCIE lane 8-11, but there is no paired connection on chassis, SBIOS has to copy bit 6 to bit 2.
1775
			[7:4]  - Bit vector to indicate PCIE lane config of the same DDI slot/connector on docking station (bit 0=1 lane 3:0; bit 1=1 lane 7:4; bit 2=1 lane 11:8; bit 3=1 lane 15:12)
2195
 
1776
			[15:8] - Lane configuration attribute;
2196
			[15:8] - Lane configuration attribute;
1777
      [23:16]- Connector type, possible value:
2197
      [23:16]- Connector type, possible value:
1778
               CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_D
2198
               CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_D
-
 
2199
               CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D
1779
               CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D
2200
               CONNECTOR_OBJECT_ID_HDMI_TYPE_A
Line 1780... Line 2201...
1780
               CONNECTOR_OBJECT_ID_HDMI_TYPE_A
2201
               CONNECTOR_OBJECT_ID_DISPLAYPORT
1781
               CONNECTOR_OBJECT_ID_DISPLAYPORT
2202
               CONNECTOR_OBJECT_ID_eDP
1782
			[31:24]- Reserved
2203
			[31:24]- Reserved
Line 1792... Line 2213...
1792
ucDockingPinPolarity:Polarity of the pin when docked;
2213
ucDockingPinPolarity:Polarity of the pin when docked;
Line 1793... Line 2214...
1793
 
2214
 
Line 1794... Line 2215...
1794
ulCPUCapInfo:        [7:0]=1:Griffin;[7:0]=2:Greyhound;[7:0]=3:K8, other bits reserved for now and must be 0x0
2215
ulCPUCapInfo:        [7:0]=1:Griffin;[7:0]=2:Greyhound;[7:0]=3:K8, other bits reserved for now and must be 0x0
-
 
2216
 
1795
 
2217
usNumberOfCyclesInPeriod:Indicate how many cycles when PWM duty is 100%.
1796
usNumberOfCyclesInPeriod:Indicate how many cycles when PWM duty is 100%.
2218
 
1797
usMaxNBVoltage:Max. voltage control value in either PWM or GPIO mode.
2219
usMaxNBVoltage:Max. voltage control value in either PWM or GPIO mode.
1798
usMinNBVoltage:Min. voltage control value in either PWM or GPIO mode.
2220
usMinNBVoltage:Min. voltage control value in either PWM or GPIO mode.
1799
                    GPIO mode: both usMaxNBVoltage & usMinNBVoltage have a valid value ulSystemConfig.SYSTEM_CONFIG_USE_PWM_ON_VOLTAGE=0
2221
                    GPIO mode: both usMaxNBVoltage & usMinNBVoltage have a valid value ulSystemConfig.SYSTEM_CONFIG_USE_PWM_ON_VOLTAGE=0
-
 
2222
                    PWM mode: both usMaxNBVoltage & usMinNBVoltage have a valid value ulSystemConfig.SYSTEM_CONFIG_USE_PWM_ON_VOLTAGE=1
1800
                    PWM mode: both usMaxNBVoltage & usMinNBVoltage have a valid value ulSystemConfig.SYSTEM_CONFIG_USE_PWM_ON_VOLTAGE=1
2223
                    GPU SW don't control mode: usMaxNBVoltage & usMinNBVoltage=0 and no care about ulSystemConfig.SYSTEM_CONFIG_USE_PWM_ON_VOLTAGE
Line 1801... Line 2224...
1801
                    GPU SW don't control mode: usMaxNBVoltage & usMinNBVoltage=0 and no care about ulSystemConfig.SYSTEM_CONFIG_USE_PWM_ON_VOLTAGE
2224
 
1802
usBootUpNBVoltage:Boot-up voltage regulator dependent PWM value.
2225
usBootUpNBVoltage:Boot-up voltage regulator dependent PWM value.
1803
 
2226
 
Line 1825... Line 2248...
1825
usMaxDownStreamHTLinkWidth:  same as above.
2248
usMaxDownStreamHTLinkWidth:  same as above.
1826
usMinUpStreamHTLinkWidth:    Asymmetric link width support in the future, to replace usMinHTLinkWidth. Not used for now.
2249
usMinUpStreamHTLinkWidth:    Asymmetric link width support in the future, to replace usMinHTLinkWidth. Not used for now.
1827
usMinDownStreamHTLinkWidth:  same as above.
2250
usMinDownStreamHTLinkWidth:  same as above.
1828
*/
2251
*/
Line -... Line 2252...
-
 
2252
 
1829
 
2253
 
1830
#define SYSTEM_CONFIG_POWEREXPRESS_ENABLE                 0x00000001
2254
#define SYSTEM_CONFIG_POWEREXPRESS_ENABLE                 0x00000001
1831
#define SYSTEM_CONFIG_RUN_AT_OVERDRIVE_ENGINE             0x00000002
2255
#define SYSTEM_CONFIG_RUN_AT_OVERDRIVE_ENGINE             0x00000002
1832
#define SYSTEM_CONFIG_USE_PWM_ON_VOLTAGE                  0x00000004
2256
#define SYSTEM_CONFIG_USE_PWM_ON_VOLTAGE                  0x00000004
1833
#define SYSTEM_CONFIG_PERFORMANCE_POWERSTATE_ONLY         0x00000008
2257
#define SYSTEM_CONFIG_PERFORMANCE_POWERSTATE_ONLY         0x00000008
1834
#define SYSTEM_CONFIG_CLMC_ENABLED                        0x00000010
2258
#define SYSTEM_CONFIG_CLMC_ENABLED                        0x00000010
1835
#define SYSTEM_CONFIG_CDLW_ENABLED                        0x00000020
2259
#define SYSTEM_CONFIG_CDLW_ENABLED                        0x00000020
1836
#define SYSTEM_CONFIG_HIGH_VOLTAGE_REQUESTED              0x00000040
2260
#define SYSTEM_CONFIG_HIGH_VOLTAGE_REQUESTED              0x00000040
-
 
2261
#define SYSTEM_CONFIG_CLMC_HYBRID_MODE_ENABLED            0x00000080
-
 
2262
#define SYSTEM_CONFIG_CDLF_ENABLED                        0x00000100
Line 1837... Line 2263...
1837
#define SYSTEM_CONFIG_CLMC_HYBRID_MODE_ENABLED            0x00000080
2263
#define SYSTEM_CONFIG_DLL_SHUTDOWN_ENABLED                0x00000200
Line 1838... Line 2264...
1838
 
2264
 
1839
#define IGP_DDI_SLOT_LANE_CONFIG_MASK                     0x000000FF
2265
#define IGP_DDI_SLOT_LANE_CONFIG_MASK                     0x000000FF
Line 1849... Line 2275...
1849
#define IGP_DDI_SLOT_CONFIG_REVERSED                      0x00000100
2275
#define IGP_DDI_SLOT_CONFIG_REVERSED                      0x00000100
1850
#define b1IGP_DDI_SLOT_CONFIG_REVERSED                    0x01
2276
#define b1IGP_DDI_SLOT_CONFIG_REVERSED                    0x01
Line 1851... Line 2277...
1851
 
2277
 
Line -... Line 2278...
-
 
2278
#define IGP_DDI_SLOT_CONNECTOR_TYPE_MASK                  0x00FF0000
-
 
2279
 
-
 
2280
// IntegratedSystemInfoTable new Rev is V5 after V2, because of the real rev of V2 is v1.4. This rev is used for RR
-
 
2281
typedef struct _ATOM_INTEGRATED_SYSTEM_INFO_V5
-
 
2282
{
-
 
2283
  ATOM_COMMON_TABLE_HEADER   sHeader;
-
 
2284
  ULONG	                     ulBootUpEngineClock;       //in 10kHz unit
-
 
2285
  ULONG                      ulDentistVCOFreq;          //Dentist VCO clock in 10kHz unit, the source of GPU SCLK, LCLK, UCLK and VCLK. 
-
 
2286
  ULONG                      ulLClockFreq;              //GPU Lclk freq in 10kHz unit, have relationship with NCLK in NorthBridge
-
 
2287
  ULONG	                     ulBootUpUMAClock;          //in 10kHz unit
-
 
2288
  ULONG                      ulReserved1[8];            //must be 0x0 for the reserved
-
 
2289
  ULONG                      ulBootUpReqDisplayVector;
-
 
2290
  ULONG                      ulOtherDisplayMisc;
-
 
2291
  ULONG                      ulReserved2[4];            //must be 0x0 for the reserved
-
 
2292
  ULONG                      ulSystemConfig;            //TBD
-
 
2293
  ULONG                      ulCPUCapInfo;              //TBD
-
 
2294
  USHORT                     usMaxNBVoltage;            //high NB voltage, calculated using current VDDNB (D24F2xDC) and VDDNB offset fuse;
-
 
2295
  USHORT                     usMinNBVoltage;            //low NB voltage, calculated using current VDDNB (D24F2xDC) and VDDNB offset fuse;
-
 
2296
  USHORT                     usBootUpNBVoltage;         //boot up NB voltage
-
 
2297
  UCHAR                      ucHtcTmpLmt;               //bit [22:16] of D24F3x64 Hardware Thermal Control (HTC) Register, may not be needed, TBD
-
 
2298
  UCHAR                      ucTjOffset;                //bit [28:22] of D24F3xE4 Thermtrip Status Register,may not be needed, TBD
-
 
2299
  ULONG                      ulReserved3[4];            //must be 0x0 for the reserved
-
 
2300
  ULONG                      ulDDISlot1Config;          //see above ulDDISlot1Config definition
-
 
2301
  ULONG                      ulDDISlot2Config;
-
 
2302
  ULONG                      ulDDISlot3Config;
-
 
2303
  ULONG                      ulDDISlot4Config;
-
 
2304
  ULONG                      ulReserved4[4];            //must be 0x0 for the reserved
-
 
2305
  UCHAR                      ucMemoryType;              //[3:0]=1:DDR1;=2:DDR2;=3:DDR3.[7:4] is reserved
-
 
2306
  UCHAR                      ucUMAChannelNumber;
-
 
2307
  USHORT                     usReserved;
-
 
2308
  ULONG                      ulReserved5[4];            //must be 0x0 for the reserved
-
 
2309
  ULONG                      ulCSR_M3_ARB_CNTL_DEFAULT[10];//arrays with values for CSR M3 arbiter for default
-
 
2310
  ULONG                      ulCSR_M3_ARB_CNTL_UVD[10]; //arrays with values for CSR M3 arbiter for UVD playback
-
 
2311
  ULONG                      ulCSR_M3_ARB_CNTL_FS3D[10];//arrays with values for CSR M3 arbiter for Full Screen 3D applications
-
 
2312
  ULONG                      ulReserved6[61];           //must be 0x0
1852
#define IGP_DDI_SLOT_CONNECTOR_TYPE_MASK                  0x00FF0000
2313
}ATOM_INTEGRATED_SYSTEM_INFO_V5;   
1853
 
2314
 
1854
#define ATOM_CRT_INT_ENCODER1_INDEX                       0x00000000
2315
#define ATOM_CRT_INT_ENCODER1_INDEX                       0x00000000
1855
#define ATOM_LCD_INT_ENCODER1_INDEX                       0x00000001
2316
#define ATOM_LCD_INT_ENCODER1_INDEX                       0x00000001
1856
#define ATOM_TV_INT_ENCODER1_INDEX                        0x00000002
2317
#define ATOM_TV_INT_ENCODER1_INDEX                        0x00000002
Line 1864... Line 2325...
1864
#define ATOM_CRT_EXT_ENCODER1_INDEX                       0x0000000A
2325
#define ATOM_CRT_EXT_ENCODER1_INDEX                       0x0000000A
1865
#define ATOM_CV_EXT_ENCODER1_INDEX                        0x0000000B
2326
#define ATOM_CV_EXT_ENCODER1_INDEX                        0x0000000B
1866
#define ATOM_DFP_INT_ENCODER3_INDEX                       0x0000000C
2327
#define ATOM_DFP_INT_ENCODER3_INDEX                       0x0000000C
1867
#define ATOM_DFP_INT_ENCODER4_INDEX                       0x0000000D
2328
#define ATOM_DFP_INT_ENCODER4_INDEX                       0x0000000D
Line 1868... Line 2329...
1868
 
2329
 
1869
/*  define ASIC internal encoder id ( bit vector ) */
2330
// define ASIC internal encoder id ( bit vector ), used for CRTC_SourceSelTable
1870
#define ASIC_INT_DAC1_ENCODER_ID											0x00
2331
#define ASIC_INT_DAC1_ENCODER_ID											0x00
1871
#define ASIC_INT_TV_ENCODER_ID														0x02
2332
#define ASIC_INT_TV_ENCODER_ID														0x02
1872
#define ASIC_INT_DIG1_ENCODER_ID													0x03
2333
#define ASIC_INT_DIG1_ENCODER_ID													0x03
1873
#define ASIC_INT_DAC2_ENCODER_ID													0x04
2334
#define ASIC_INT_DAC2_ENCODER_ID													0x04
1874
#define ASIC_EXT_TV_ENCODER_ID														0x06
2335
#define ASIC_EXT_TV_ENCODER_ID														0x06
1875
#define ASIC_INT_DVO_ENCODER_ID														0x07
2336
#define ASIC_INT_DVO_ENCODER_ID														0x07
1876
#define ASIC_INT_DIG2_ENCODER_ID													0x09
2337
#define ASIC_INT_DIG2_ENCODER_ID													0x09
-
 
2338
#define ASIC_EXT_DIG_ENCODER_ID														0x05
-
 
2339
#define ASIC_EXT_DIG2_ENCODER_ID													0x08
-
 
2340
#define ASIC_INT_DIG3_ENCODER_ID													0x0a
-
 
2341
#define ASIC_INT_DIG4_ENCODER_ID													0x0b
-
 
2342
#define ASIC_INT_DIG5_ENCODER_ID													0x0c
Line 1877... Line 2343...
1877
#define ASIC_EXT_DIG_ENCODER_ID														0x05
2343
#define ASIC_INT_DIG6_ENCODER_ID													0x0d
1878
 
2344
 
1879
/* define Encoder attribute */
2345
//define Encoder attribute
-
 
2346
#define ATOM_ANALOG_ENCODER																0
-
 
2347
#define ATOM_DIGITAL_ENCODER															1
-
 
2348
#define ATOM_DP_ENCODER															      2		
-
 
2349
 
-
 
2350
#define ATOM_ENCODER_ENUM_MASK                            0x70
-
 
2351
#define ATOM_ENCODER_ENUM_ID1                             0x00
-
 
2352
#define ATOM_ENCODER_ENUM_ID2                             0x10
-
 
2353
#define ATOM_ENCODER_ENUM_ID3                             0x20
-
 
2354
#define ATOM_ENCODER_ENUM_ID4                             0x30
Line 1880... Line 2355...
1880
#define ATOM_ANALOG_ENCODER																0
2355
#define ATOM_ENCODER_ENUM_ID5                             0x40 
1881
#define ATOM_DIGITAL_ENCODER															1
2356
#define ATOM_ENCODER_ENUM_ID6                             0x50
1882
 
2357
 
1883
#define ATOM_DEVICE_CRT1_INDEX                            0x00000000
2358
#define ATOM_DEVICE_CRT1_INDEX                            0x00000000
1884
#define ATOM_DEVICE_LCD1_INDEX                            0x00000001
2359
#define ATOM_DEVICE_LCD1_INDEX                            0x00000001
1885
#define ATOM_DEVICE_TV1_INDEX                             0x00000002
2360
#define ATOM_DEVICE_TV1_INDEX                             0x00000002
1886
#define ATOM_DEVICE_DFP1_INDEX                            0x00000003
2361
#define ATOM_DEVICE_DFP1_INDEX                            0x00000003
1887
#define ATOM_DEVICE_CRT2_INDEX                            0x00000004
2362
#define ATOM_DEVICE_CRT2_INDEX                            0x00000004
1888
#define ATOM_DEVICE_LCD2_INDEX                            0x00000005
2363
#define ATOM_DEVICE_LCD2_INDEX                            0x00000005
1889
#define ATOM_DEVICE_TV2_INDEX                             0x00000006
2364
#define ATOM_DEVICE_DFP6_INDEX                            0x00000006
1890
#define ATOM_DEVICE_DFP2_INDEX                            0x00000007
2365
#define ATOM_DEVICE_DFP2_INDEX                            0x00000007
1891
#define ATOM_DEVICE_CV_INDEX                              0x00000008
2366
#define ATOM_DEVICE_CV_INDEX                              0x00000008
-
 
2367
#define ATOM_DEVICE_DFP3_INDEX														0x00000009
1892
#define ATOM_DEVICE_DFP3_INDEX														0x00000009
2368
#define ATOM_DEVICE_DFP4_INDEX														0x0000000A
1893
#define ATOM_DEVICE_DFP4_INDEX														0x0000000A
2369
#define ATOM_DEVICE_DFP5_INDEX														0x0000000B
1894
#define ATOM_DEVICE_DFP5_INDEX														0x0000000B
2370
 
1895
#define ATOM_DEVICE_RESERVEDC_INDEX                       0x0000000C
2371
#define ATOM_DEVICE_RESERVEDC_INDEX                       0x0000000C
1896
#define ATOM_DEVICE_RESERVEDD_INDEX                       0x0000000D
2372
#define ATOM_DEVICE_RESERVEDD_INDEX                       0x0000000D
Line 1906... Line 2382...
1906
#define ATOM_DEVICE_LCD1_SUPPORT                          (0x1L << ATOM_DEVICE_LCD1_INDEX)
2382
#define ATOM_DEVICE_LCD1_SUPPORT                          (0x1L << ATOM_DEVICE_LCD1_INDEX )
1907
#define ATOM_DEVICE_TV1_SUPPORT                           (0x1L << ATOM_DEVICE_TV1_INDEX)
2383
#define ATOM_DEVICE_TV1_SUPPORT                           (0x1L << ATOM_DEVICE_TV1_INDEX  )
1908
#define ATOM_DEVICE_DFP1_SUPPORT                          (0x1L << ATOM_DEVICE_DFP1_INDEX)
2384
#define ATOM_DEVICE_DFP1_SUPPORT                          (0x1L << ATOM_DEVICE_DFP1_INDEX )
1909
#define ATOM_DEVICE_CRT2_SUPPORT                          (0x1L << ATOM_DEVICE_CRT2_INDEX)
2385
#define ATOM_DEVICE_CRT2_SUPPORT                          (0x1L << ATOM_DEVICE_CRT2_INDEX )
1910
#define ATOM_DEVICE_LCD2_SUPPORT                          (0x1L << ATOM_DEVICE_LCD2_INDEX)
2386
#define ATOM_DEVICE_LCD2_SUPPORT                          (0x1L << ATOM_DEVICE_LCD2_INDEX )
1911
#define ATOM_DEVICE_TV2_SUPPORT                           (0x1L << ATOM_DEVICE_TV2_INDEX)
2387
#define ATOM_DEVICE_DFP6_SUPPORT                          (0x1L << ATOM_DEVICE_DFP6_INDEX )
1912
#define ATOM_DEVICE_DFP2_SUPPORT                          (0x1L << ATOM_DEVICE_DFP2_INDEX)
2388
#define ATOM_DEVICE_DFP2_SUPPORT                          (0x1L << ATOM_DEVICE_DFP2_INDEX )
1913
#define ATOM_DEVICE_CV_SUPPORT                            (0x1L << ATOM_DEVICE_CV_INDEX)
2389
#define ATOM_DEVICE_CV_SUPPORT                            (0x1L << ATOM_DEVICE_CV_INDEX   )
1914
#define ATOM_DEVICE_DFP3_SUPPORT													(0x1L << ATOM_DEVICE_DFP3_INDEX)
2390
#define ATOM_DEVICE_DFP3_SUPPORT                          (0x1L << ATOM_DEVICE_DFP3_INDEX )
1915
#define ATOM_DEVICE_DFP4_SUPPORT													(0x1L << ATOM_DEVICE_DFP4_INDEX )
2391
#define ATOM_DEVICE_DFP4_SUPPORT													(0x1L << ATOM_DEVICE_DFP4_INDEX )
1916
#define ATOM_DEVICE_DFP5_SUPPORT													(0x1L << ATOM_DEVICE_DFP5_INDEX)
2392
#define ATOM_DEVICE_DFP5_SUPPORT                          (0x1L << ATOM_DEVICE_DFP5_INDEX )
Line 1917... Line -...
1917
 
-
 
1918
#define ATOM_DEVICE_CRT_SUPPORT \
2393
 
1919
	(ATOM_DEVICE_CRT1_SUPPORT | ATOM_DEVICE_CRT2_SUPPORT)
-
 
1920
#define ATOM_DEVICE_DFP_SUPPORT \
2394
#define ATOM_DEVICE_CRT_SUPPORT                           (ATOM_DEVICE_CRT1_SUPPORT | ATOM_DEVICE_CRT2_SUPPORT)
1921
	(ATOM_DEVICE_DFP1_SUPPORT | ATOM_DEVICE_DFP2_SUPPORT | \
-
 
1922
	 ATOM_DEVICE_DFP3_SUPPORT | ATOM_DEVICE_DFP4_SUPPORT | \
-
 
1923
	 ATOM_DEVICE_DFP5_SUPPORT)
-
 
1924
#define ATOM_DEVICE_TV_SUPPORT \
2395
#define ATOM_DEVICE_DFP_SUPPORT                           (ATOM_DEVICE_DFP1_SUPPORT | ATOM_DEVICE_DFP2_SUPPORT |  ATOM_DEVICE_DFP3_SUPPORT | ATOM_DEVICE_DFP4_SUPPORT | ATOM_DEVICE_DFP5_SUPPORT | ATOM_DEVICE_DFP6_SUPPORT)
1925
	(ATOM_DEVICE_TV1_SUPPORT  | ATOM_DEVICE_TV2_SUPPORT)
-
 
1926
#define ATOM_DEVICE_LCD_SUPPORT \
2396
#define ATOM_DEVICE_TV_SUPPORT                            (ATOM_DEVICE_TV1_SUPPORT)
Line 1927... Line 2397...
1927
	(ATOM_DEVICE_LCD1_SUPPORT | ATOM_DEVICE_LCD2_SUPPORT)
2397
#define ATOM_DEVICE_LCD_SUPPORT                           (ATOM_DEVICE_LCD1_SUPPORT | ATOM_DEVICE_LCD2_SUPPORT)
1928
 
2398
 
1929
#define ATOM_DEVICE_CONNECTOR_TYPE_MASK                   0x000000F0
2399
#define ATOM_DEVICE_CONNECTOR_TYPE_MASK                   0x000000F0
1930
#define ATOM_DEVICE_CONNECTOR_TYPE_SHIFT                  0x00000004
2400
#define ATOM_DEVICE_CONNECTOR_TYPE_SHIFT                  0x00000004
Line 1940... Line 2410...
1940
#define ATOM_DEVICE_CONNECTOR_HDMI_TYPE_A                 0x0000000A
2410
#define ATOM_DEVICE_CONNECTOR_HDMI_TYPE_A                 0x0000000A
1941
#define ATOM_DEVICE_CONNECTOR_HDMI_TYPE_B                 0x0000000B
2411
#define ATOM_DEVICE_CONNECTOR_HDMI_TYPE_B                 0x0000000B
1942
#define ATOM_DEVICE_CONNECTOR_CASE_1                      0x0000000E
2412
#define ATOM_DEVICE_CONNECTOR_CASE_1                      0x0000000E
1943
#define ATOM_DEVICE_CONNECTOR_DISPLAYPORT                 0x0000000F
2413
#define ATOM_DEVICE_CONNECTOR_DISPLAYPORT                 0x0000000F
Line -... Line 2414...
-
 
2414
 
1944
 
2415
 
1945
#define ATOM_DEVICE_DAC_INFO_MASK                         0x0000000F
2416
#define ATOM_DEVICE_DAC_INFO_MASK                         0x0000000F
1946
#define ATOM_DEVICE_DAC_INFO_SHIFT                        0x00000000
2417
#define ATOM_DEVICE_DAC_INFO_SHIFT                        0x00000000
1947
#define ATOM_DEVICE_DAC_INFO_NODAC                        0x00000000
2418
#define ATOM_DEVICE_DAC_INFO_NODAC                        0x00000000
1948
#define ATOM_DEVICE_DAC_INFO_DACA                         0x00000001
2419
#define ATOM_DEVICE_DAC_INFO_DACA                         0x00000001
Line 1956... Line 2427...
1956
 
2427
 
1957
#define ATOM_DEVICE_I2C_ID_MASK                           0x00000070
2428
#define ATOM_DEVICE_I2C_ID_MASK                           0x00000070
1958
#define ATOM_DEVICE_I2C_ID_SHIFT                          0x00000004
2429
#define ATOM_DEVICE_I2C_ID_SHIFT                          0x00000004
1959
#define ATOM_DEVICE_I2C_ID_IS_FOR_NON_MM_USE              0x00000001
2430
#define ATOM_DEVICE_I2C_ID_IS_FOR_NON_MM_USE              0x00000001
1960
#define ATOM_DEVICE_I2C_ID_IS_FOR_MM_USE                  0x00000002
2431
#define ATOM_DEVICE_I2C_ID_IS_FOR_MM_USE                  0x00000002
1961
#define ATOM_DEVICE_I2C_ID_IS_FOR_SDVO_USE                0x00000003	/* For IGP RS600 */
2432
#define ATOM_DEVICE_I2C_ID_IS_FOR_SDVO_USE                0x00000003    //For IGP RS600
Line 1962... Line 2433...
1962
#define ATOM_DEVICE_I2C_ID_IS_FOR_DAC_SCL                 0x00000004	/* For IGP RS690 */
2433
#define ATOM_DEVICE_I2C_ID_IS_FOR_DAC_SCL                 0x00000004    //For IGP RS690
1963
 
2434
 
1964
#define ATOM_DEVICE_I2C_HARDWARE_CAP_MASK                 0x00000080
2435
#define ATOM_DEVICE_I2C_HARDWARE_CAP_MASK                 0x00000080
1965
#define ATOM_DEVICE_I2C_HARDWARE_CAP_SHIFT                0x00000007
2436
#define ATOM_DEVICE_I2C_HARDWARE_CAP_SHIFT                0x00000007
Line 1966... Line 2437...
1966
#define	ATOM_DEVICE_USES_SOFTWARE_ASSISTED_I2C            0x00000000
2437
#define	ATOM_DEVICE_USES_SOFTWARE_ASSISTED_I2C            0x00000000
1967
#define	ATOM_DEVICE_USES_HARDWARE_ASSISTED_I2C            0x00000001
2438
#define	ATOM_DEVICE_USES_HARDWARE_ASSISTED_I2C            0x00000001
1968
 
2439
 
1969
/*   usDeviceSupport: */
2440
//  usDeviceSupport:
1970
/*   Bits0       = 0 - no CRT1 support= 1- CRT1 is supported */
2441
//  Bits0	= 0 - no CRT1 support= 1- CRT1 is supported
1971
/*   Bit 1       = 0 - no LCD1 support= 1- LCD1 is supported */
2442
//  Bit 1	= 0 - no LCD1 support= 1- LCD1 is supported
1972
/*   Bit 2       = 0 - no TV1  support= 1- TV1  is supported */
2443
//  Bit 2	= 0 - no TV1  support= 1- TV1  is supported
1973
/*   Bit 3       = 0 - no DFP1 support= 1- DFP1 is supported */
2444
//  Bit 3	= 0 - no DFP1 support= 1- DFP1 is supported
1974
/*   Bit 4       = 0 - no CRT2 support= 1- CRT2 is supported */
2445
//  Bit 4	= 0 - no CRT2 support= 1- CRT2 is supported
1975
/*   Bit 5       = 0 - no LCD2 support= 1- LCD2 is supported */
2446
//  Bit 5	= 0 - no LCD2 support= 1- LCD2 is supported
1976
/*   Bit 6       = 0 - no TV2  support= 1- TV2  is supported */
2447
//  Bit 6	= 0 - no DFP6 support= 1- DFP6 is supported
1977
/*   Bit 7       = 0 - no DFP2 support= 1- DFP2 is supported */
2448
//  Bit 7	= 0 - no DFP2 support= 1- DFP2 is supported
1978
/*   Bit 8       = 0 - no CV   support= 1- CV   is supported */
2449
//  Bit 8	= 0 - no CV   support= 1- CV   is supported
1979
/*   Bit 9       = 0 - no DFP3 support= 1- DFP3 is supported */
2450
//  Bit 9	= 0 - no DFP3 support= 1- DFP3 is supported
1980
/*   Byte1 (Supported Device Info) */
2451
//  Bit 10      = 0 - no DFP4 support= 1- DFP4 is supported
1981
/*   Bit 0       = = 0 - no CV support= 1- CV is supported */
2452
//  Bit 11      = 0 - no DFP5 support= 1- DFP5 is supported
-
 
2453
//   
-
 
2454
//  
-
 
2455
 
1982
/*  */
2456
/****************************************************************************/
1983
/*  */
2457
/* Structure used in MclkSS_InfoTable                                       */
1984
 
2458
/****************************************************************************/
1985
/*               ucI2C_ConfigID */
2459
//		ucI2C_ConfigID
1986
/*     [7:0] - I2C LINE Associate ID */
2460
//    [7:0] - I2C LINE Associate ID
1987
/*           = 0   - no I2C */
2461
//          = 0   - no I2C
1988
/*     [7]               -       HW_Cap        = 1,  [6:0]=HW assisted I2C ID(HW line selection) */
2462
//    [7]		-	HW_Cap        =	1,  [6:0]=HW assisted I2C ID(HW line selection)
1989
/*                           =   0,  [6:0]=SW assisted I2C ID */
2463
//                          =	0,  [6:0]=SW assisted I2C ID
1990
/*     [6-4]     - HW_ENGINE_ID  =       1,  HW engine for NON multimedia use */
2464
//    [6-4]	- HW_ENGINE_ID  =	1,  HW engine for NON multimedia use
Line 1991... Line 2465...
1991
/*                           =   2,      HW engine for Multimedia use */
2465
//                          =	2,	HW engine for Multimedia use
-
 
2466
//                          =	3-7	Reserved for future I2C engines
1992
/*                           =   3-7     Reserved for future I2C engines */
2467
//		[3-0] - I2C_LINE_MUX  = A Mux number when it's HW assisted I2C or GPIO ID when it's SW I2C
1993
/*               [3-0] - I2C_LINE_MUX  = A Mux number when it's HW assisted I2C or GPIO ID when it's SW I2C */
2468
 
1994
 
2469
typedef struct _ATOM_I2C_ID_CONFIG
1995
typedef struct _ATOM_I2C_ID_CONFIG {
2470
{
1996
#if ATOM_BIG_ENDIAN
2471
#if ATOM_BIG_ENDIAN
Line 2002... Line 2477...
2002
	UCHAR bfHW_EngineID:3;
2477
	UCHAR bfHW_EngineID:3;
2003
	UCHAR bfHW_Capable:1;
2478
	UCHAR bfHW_Capable:1;
2004
#endif
2479
#endif
2005
} ATOM_I2C_ID_CONFIG;
2480
}ATOM_I2C_ID_CONFIG;
Line 2006... Line 2481...
2006
 
2481
 
-
 
2482
typedef union _ATOM_I2C_ID_CONFIG_ACCESS
2007
typedef union _ATOM_I2C_ID_CONFIG_ACCESS {
2483
{
2008
	ATOM_I2C_ID_CONFIG sbfAccess;
2484
	ATOM_I2C_ID_CONFIG sbfAccess;
2009
	UCHAR ucAccess;
2485
	UCHAR ucAccess;
Line -... Line 2486...
-
 
2486
}ATOM_I2C_ID_CONFIG_ACCESS;
2010
} ATOM_I2C_ID_CONFIG_ACCESS;
2487
   
2011
 
2488
 
2012
/****************************************************************************/
2489
/****************************************************************************/
2013
/*  Structure used in GPIO_I2C_InfoTable */
2490
// Structure used in GPIO_I2C_InfoTable
-
 
2491
/****************************************************************************/
2014
/****************************************************************************/
2492
typedef struct _ATOM_GPIO_I2C_ASSIGMENT
2015
typedef struct _ATOM_GPIO_I2C_ASSIGMENT {
2493
{
2016
	USHORT usClkMaskRegisterIndex;
2494
	USHORT usClkMaskRegisterIndex;
2017
	USHORT usClkEnRegisterIndex;
2495
	USHORT usClkEnRegisterIndex;
2018
	USHORT usClkY_RegisterIndex;
2496
	USHORT usClkY_RegisterIndex;
Line 2032... Line 2510...
2032
	UCHAR ucDataA_Shift;
2510
	UCHAR ucDataA_Shift;
2033
	UCHAR ucReserved1;
2511
	UCHAR ucReserved1;
2034
	UCHAR ucReserved2;
2512
	UCHAR ucReserved2;
2035
} ATOM_GPIO_I2C_ASSIGMENT;
2513
}ATOM_GPIO_I2C_ASSIGMENT;
Line 2036... Line 2514...
2036
 
2514
 
-
 
2515
typedef struct _ATOM_GPIO_I2C_INFO
2037
typedef struct _ATOM_GPIO_I2C_INFO {
2516
{ 
2038
	ATOM_COMMON_TABLE_HEADER sHeader;
2517
	ATOM_COMMON_TABLE_HEADER sHeader;
2039
	ATOM_GPIO_I2C_ASSIGMENT asGPIO_Info[ATOM_MAX_SUPPORTED_DEVICE];
2518
	ATOM_GPIO_I2C_ASSIGMENT asGPIO_Info[ATOM_MAX_SUPPORTED_DEVICE];
Line 2040... Line 2519...
2040
} ATOM_GPIO_I2C_INFO;
2519
}ATOM_GPIO_I2C_INFO;
2041
 
2520
 
2042
/****************************************************************************/
2521
/****************************************************************************/
Line 2043... Line 2522...
2043
/*  Common Structure used in other structures */
2522
// Common Structure used in other structures
Line 2044... Line 2523...
2044
/****************************************************************************/
2523
/****************************************************************************/
2045
 
2524
 
-
 
2525
#ifndef _H2INC
2046
#ifndef _H2INC
2526
 
2047
 
2527
//Please don't add or expand this bitfield structure below, this one will retire soon.!
2048
/* Please don't add or expand this bitfield structure below, this one will retire soon.! */
2528
typedef struct _ATOM_MODE_MISC_INFO
2049
typedef struct _ATOM_MODE_MISC_INFO {
2529
{ 
2050
#if ATOM_BIG_ENDIAN
2530
#if ATOM_BIG_ENDIAN
2051
	USHORT Reserved:6;
2531
	USHORT Reserved:6;
2052
	USHORT RGB888:1;
2532
	USHORT RGB888:1;
2053
	USHORT DoubleClock:1;
2533
	USHORT DoubleClock:1;
2054
	USHORT Interlace:1;
2534
	USHORT Interlace:1;
2055
	USHORT CompositeSync:1;
2535
	USHORT CompositeSync:1;
2056
	USHORT V_ReplicationBy2:1;
2536
	USHORT V_ReplicationBy2:1;
2057
	USHORT H_ReplicationBy2:1;
2537
	USHORT H_ReplicationBy2:1;
2058
	USHORT VerticalCutOff:1;
2538
	USHORT VerticalCutOff:1;
2059
	USHORT VSyncPolarity:1;	/* 0=Active High, 1=Active Low */
2539
  USHORT VSyncPolarity:1;      //0=Active High, 1=Active Low
2060
	USHORT HSyncPolarity:1;	/* 0=Active High, 1=Active Low */
2540
  USHORT HSyncPolarity:1;      //0=Active High, 1=Active Low
2061
	USHORT HorizontalCutOff:1;
2541
	USHORT HorizontalCutOff:1;
2062
#else
2542
#else
2063
	USHORT HorizontalCutOff:1;
2543
	USHORT HorizontalCutOff:1;
2064
	USHORT HSyncPolarity:1;	/* 0=Active High, 1=Active Low */
2544
  USHORT HSyncPolarity:1;      //0=Active High, 1=Active Low
2065
	USHORT VSyncPolarity:1;	/* 0=Active High, 1=Active Low */
2545
  USHORT VSyncPolarity:1;      //0=Active High, 1=Active Low
2066
	USHORT VerticalCutOff:1;
2546
	USHORT VerticalCutOff:1;
Line 2072... Line 2552...
2072
	USHORT RGB888:1;
2552
	USHORT RGB888:1;
2073
	USHORT Reserved:6;
2553
	USHORT Reserved:6;
2074
#endif
2554
#endif
2075
} ATOM_MODE_MISC_INFO;
2555
}ATOM_MODE_MISC_INFO;
Line 2076... Line 2556...
2076
 
2556
 
-
 
2557
typedef union _ATOM_MODE_MISC_INFO_ACCESS
2077
typedef union _ATOM_MODE_MISC_INFO_ACCESS {
2558
{ 
2078
	ATOM_MODE_MISC_INFO sbfAccess;
2559
	ATOM_MODE_MISC_INFO sbfAccess;
2079
	USHORT usAccess;
2560
	USHORT usAccess;
Line 2080... Line 2561...
2080
} ATOM_MODE_MISC_INFO_ACCESS;
2561
}ATOM_MODE_MISC_INFO_ACCESS;
Line 2081... Line 2562...
2081
 
2562
 
-
 
2563
#else
2082
#else
2564
 
2083
 
2565
typedef union _ATOM_MODE_MISC_INFO_ACCESS
Line 2084... Line 2566...
2084
typedef union _ATOM_MODE_MISC_INFO_ACCESS {
2566
{ 
Line 2085... Line 2567...
2085
	USHORT usAccess;
2567
	USHORT usAccess;
2086
} ATOM_MODE_MISC_INFO_ACCESS;
2568
}ATOM_MODE_MISC_INFO_ACCESS;
2087
 
2569
 
2088
#endif
2570
#endif
2089
 
2571
 
2090
/*  usModeMiscInfo- */
2572
// usModeMiscInfo-
2091
#define ATOM_H_CUTOFF           0x01
2573
#define ATOM_H_CUTOFF           0x01
2092
#define ATOM_HSYNC_POLARITY     0x02	/* 0=Active High, 1=Active Low */
2574
#define ATOM_HSYNC_POLARITY     0x02             //0=Active High, 1=Active Low
2093
#define ATOM_VSYNC_POLARITY     0x04	/* 0=Active High, 1=Active Low */
2575
#define ATOM_VSYNC_POLARITY     0x04             //0=Active High, 1=Active Low
2094
#define ATOM_V_CUTOFF           0x08
2576
#define ATOM_V_CUTOFF           0x08
2095
#define ATOM_H_REPLICATIONBY2   0x10
2577
#define ATOM_H_REPLICATIONBY2   0x10
Line 2096... Line 2578...
2096
#define ATOM_V_REPLICATIONBY2   0x20
2578
#define ATOM_V_REPLICATIONBY2   0x20
2097
#define ATOM_COMPOSITESYNC      0x40
2579
#define ATOM_COMPOSITESYNC      0x40
2098
#define ATOM_INTERLACE          0x80
2580
#define ATOM_INTERLACE          0x80
2099
#define ATOM_DOUBLE_CLOCK_MODE  0x100
2581
#define ATOM_DOUBLE_CLOCK_MODE  0x100
2100
#define ATOM_RGB888_MODE        0x200
2582
#define ATOM_RGB888_MODE        0x200
2101
 
2583
 
2102
/* usRefreshRate- */
2584
//usRefreshRate-
2103
#define ATOM_REFRESH_43         43
2585
#define ATOM_REFRESH_43         43
2104
#define ATOM_REFRESH_47         47
2586
#define ATOM_REFRESH_47         47
2105
#define ATOM_REFRESH_56         56
2587
#define ATOM_REFRESH_56         56
Line 2106... Line 2588...
2106
#define ATOM_REFRESH_60         60
2588
#define ATOM_REFRESH_60         60
2107
#define ATOM_REFRESH_65         65
2589
#define ATOM_REFRESH_65         65
2108
#define ATOM_REFRESH_70         70
2590
#define ATOM_REFRESH_70         70
2109
#define ATOM_REFRESH_72         72
2591
#define ATOM_REFRESH_72         72
2110
#define ATOM_REFRESH_75         75
2592
#define ATOM_REFRESH_75         75
2111
#define ATOM_REFRESH_85         85
2593
#define ATOM_REFRESH_85         85
2112
 
2594
 
2113
/*  ATOM_MODE_TIMING data are exactly the same as VESA timing data. */
2595
// ATOM_MODE_TIMING data are exactly the same as VESA timing data.
2114
/*  Translation from EDID to ATOM_MODE_TIMING, use the following formula. */
2596
// Translation from EDID to ATOM_MODE_TIMING, use the following formula.
2115
/*  */
2597
//
Line 2116... Line 2598...
2116
/*       VESA_HTOTAL                     =       VESA_ACTIVE + 2* VESA_BORDER + VESA_BLANK */
2598
//	VESA_HTOTAL			=	VESA_ACTIVE + 2* VESA_BORDER + VESA_BLANK
2117
/*                                               =       EDID_HA + EDID_HBL */
2599
//						=	EDID_HA + EDID_HBL
2118
/*       VESA_HDISP                      =       VESA_ACTIVE     =       EDID_HA */
2600
//	VESA_HDISP			=	VESA_ACTIVE	=	EDID_HA
2119
/*       VESA_HSYNC_START        =       VESA_ACTIVE + VESA_BORDER + VESA_FRONT_PORCH */
2601
//	VESA_HSYNC_START	=	VESA_ACTIVE + VESA_BORDER + VESA_FRONT_PORCH
-
 
2602
//						=	EDID_HA + EDID_HSO
2120
/*                                               =       EDID_HA + EDID_HSO */
2603
//	VESA_HSYNC_WIDTH	=	VESA_HSYNC_TIME	=	EDID_HSPW
2121
/*       VESA_HSYNC_WIDTH        =       VESA_HSYNC_TIME =       EDID_HSPW */
2604
//	VESA_BORDER			=	EDID_BORDER
2122
/*       VESA_BORDER                     =       EDID_BORDER */
2605
 
2123
 
2606
/****************************************************************************/
2124
/****************************************************************************/
2607
// Structure used in SetCRTC_UsingDTDTimingTable
2125
/*  Structure used in SetCRTC_UsingDTDTimingTable */
2608
/****************************************************************************/
2126
/****************************************************************************/
2609
typedef struct _SET_CRTC_USING_DTD_TIMING_PARAMETERS
2127
typedef struct _SET_CRTC_USING_DTD_TIMING_PARAMETERS {
2610
{
2128
	USHORT usH_Size;
2611
	USHORT usH_Size;
2129
	USHORT usH_Blanking_Time;
2612
	USHORT usH_Blanking_Time;
2130
	USHORT usV_Size;
2613
	USHORT usV_Size;
2131
	USHORT usV_Blanking_Time;
2614
	USHORT usV_Blanking_Time;
2132
	USHORT usH_SyncOffset;
2615
	USHORT usH_SyncOffset;
2133
	USHORT usH_SyncWidth;
2616
	USHORT usH_SyncWidth;
Line 2134... Line 2617...
2134
	USHORT usV_SyncOffset;
2617
	USHORT usV_SyncOffset;
2135
	USHORT usV_SyncWidth;
2618
	USHORT usV_SyncWidth;
2136
	ATOM_MODE_MISC_INFO_ACCESS susModeMiscInfo;
2619
	ATOM_MODE_MISC_INFO_ACCESS susModeMiscInfo;
2137
	UCHAR ucH_Border;	/*  From DFP EDID */
2620
  UCHAR   ucH_Border;         // From DFP EDID
-
 
2621
	UCHAR ucV_Border;
2138
	UCHAR ucV_Border;
2622
  UCHAR   ucCRTC;             // ATOM_CRTC1 or ATOM_CRTC2  
2139
	UCHAR ucCRTC;		/*  ATOM_CRTC1 or ATOM_CRTC2 */
2623
	UCHAR ucPadding[3];
2140
	UCHAR ucPadding[3];
2624
}SET_CRTC_USING_DTD_TIMING_PARAMETERS;
2141
} SET_CRTC_USING_DTD_TIMING_PARAMETERS;
2625
 
2142
 
2626
/****************************************************************************/
2143
/****************************************************************************/
2627
// Structure used in SetCRTC_TimingTable
2144
/*  Structure used in SetCRTC_TimingTable */
2628
/****************************************************************************/
2145
/****************************************************************************/
2629
typedef struct _SET_CRTC_TIMING_PARAMETERS
2146
typedef struct _SET_CRTC_TIMING_PARAMETERS {
2630
{
2147
	USHORT usH_Total;	/*  horizontal total */
2631
  USHORT                      usH_Total;        // horizontal total
2148
	USHORT usH_Disp;	/*  horizontal display */
2632
  USHORT                      usH_Disp;         // horizontal display
2149
	USHORT usH_SyncStart;	/*  horozontal Sync start */
2633
  USHORT                      usH_SyncStart;    // horozontal Sync start
2150
	USHORT usH_SyncWidth;	/*  horizontal Sync width */
2634
  USHORT                      usH_SyncWidth;    // horizontal Sync width
2151
	USHORT usV_Total;	/*  vertical total */
2635
  USHORT                      usV_Total;        // vertical total
2152
	USHORT usV_Disp;	/*  vertical display */
2636
  USHORT                      usV_Disp;         // vertical display
2153
	USHORT usV_SyncStart;	/*  vertical Sync start */
2637
  USHORT                      usV_SyncStart;    // vertical Sync start
2154
	USHORT usV_SyncWidth;	/*  vertical Sync width */
2638
  USHORT                      usV_SyncWidth;    // vertical Sync width
Line 2155... Line 2639...
2155
	ATOM_MODE_MISC_INFO_ACCESS susModeMiscInfo;
2639
	ATOM_MODE_MISC_INFO_ACCESS susModeMiscInfo;
2156
	UCHAR ucCRTC;		/*  ATOM_CRTC1 or ATOM_CRTC2 */
2640
  UCHAR                       ucCRTC;           // ATOM_CRTC1 or ATOM_CRTC2
2157
	UCHAR ucOverscanRight;	/*  right */
2641
  UCHAR                       ucOverscanRight;  // right
2158
	UCHAR ucOverscanLeft;	/*  left */
2642
  UCHAR                       ucOverscanLeft;   // left
2159
	UCHAR ucOverscanBottom;	/*  bottom */
2643
  UCHAR                       ucOverscanBottom; // bottom
2160
	UCHAR ucOverscanTop;	/*  top */
2644
  UCHAR                       ucOverscanTop;    // top
-
 
2645
	UCHAR ucReserved;
2161
	UCHAR ucReserved;
2646
}SET_CRTC_TIMING_PARAMETERS;
2162
} SET_CRTC_TIMING_PARAMETERS;
2647
#define SET_CRTC_TIMING_PARAMETERS_PS_ALLOCATION SET_CRTC_TIMING_PARAMETERS
2163
#define SET_CRTC_TIMING_PARAMETERS_PS_ALLOCATION SET_CRTC_TIMING_PARAMETERS
2648
 
2164
 
2649
/****************************************************************************/
2165
/****************************************************************************/
2650
// Structure used in StandardVESA_TimingTable
2166
/*  Structure used in StandardVESA_TimingTable */
2651
//                   AnalogTV_InfoTable 
2167
/*                    AnalogTV_InfoTable */
2652
//                   ComponentVideoInfoTable
2168
/*                    ComponentVideoInfoTable */
2653
/****************************************************************************/
2169
/****************************************************************************/
2654
typedef struct _ATOM_MODE_TIMING
2170
typedef struct _ATOM_MODE_TIMING {
2655
{
2171
	USHORT usCRTC_H_Total;
2656
	USHORT usCRTC_H_Total;
2172
	USHORT usCRTC_H_Disp;
2657
	USHORT usCRTC_H_Disp;
2173
	USHORT usCRTC_H_SyncStart;
2658
	USHORT usCRTC_H_SyncStart;
2174
	USHORT usCRTC_H_SyncWidth;
2659
	USHORT usCRTC_H_SyncWidth;
2175
	USHORT usCRTC_V_Total;
2660
	USHORT usCRTC_V_Total;
2176
	USHORT usCRTC_V_Disp;
2661
	USHORT usCRTC_V_Disp;
2177
	USHORT usCRTC_V_SyncStart;
2662
	USHORT usCRTC_V_SyncStart;
2178
	USHORT usCRTC_V_SyncWidth;
2663
	USHORT usCRTC_V_SyncWidth;
Line 2179... Line 2664...
2179
	USHORT usPixelClock;	/* in 10Khz unit */
2664
  USHORT  usPixelClock;					                 //in 10Khz unit
-
 
2665
	ATOM_MODE_MISC_INFO_ACCESS susModeMiscInfo;
2180
	ATOM_MODE_MISC_INFO_ACCESS susModeMiscInfo;
2666
	USHORT usCRTC_OverscanRight;
2181
	USHORT usCRTC_OverscanRight;
2667
	USHORT usCRTC_OverscanLeft;
2182
	USHORT usCRTC_OverscanLeft;
2668
	USHORT usCRTC_OverscanBottom;
2183
	USHORT usCRTC_OverscanBottom;
2669
	USHORT usCRTC_OverscanTop;
2184
	USHORT usCRTC_OverscanTop;
2670
	USHORT usReserve;
Line 2205... Line 2691...
2205
	UCHAR ucInternalModeNumber;
2691
	UCHAR ucInternalModeNumber;
2206
	UCHAR ucRefreshRate;
2692
	UCHAR ucRefreshRate;
2207
} ATOM_DTD_FORMAT;
2693
}ATOM_DTD_FORMAT;
Line 2208... Line 2694...
2208
 
2694
 
2209
/****************************************************************************/
2695
/****************************************************************************/
2210
/*  Structure used in LVDS_InfoTable */
2696
// Structure used in LVDS_InfoTable 
2211
/*   * Need a document to describe this table */
2697
//  * Need a document to describe this table
2212
/****************************************************************************/
2698
/****************************************************************************/
2213
#define SUPPORTED_LCD_REFRESHRATE_30Hz          0x0004
2699
#define SUPPORTED_LCD_REFRESHRATE_30Hz          0x0004
2214
#define SUPPORTED_LCD_REFRESHRATE_40Hz          0x0008
2700
#define SUPPORTED_LCD_REFRESHRATE_40Hz          0x0008
2215
#define SUPPORTED_LCD_REFRESHRATE_50Hz          0x0010
2701
#define SUPPORTED_LCD_REFRESHRATE_50Hz          0x0010
Line 2216... Line -...
2216
#define SUPPORTED_LCD_REFRESHRATE_60Hz          0x0020
-
 
2217
 
-
 
2218
/* Once DAL sees this CAP is set, it will read EDID from LCD on its own instead of using sLCDTiming in ATOM_LVDS_INFO_V12. */
-
 
2219
/* Other entries in ATOM_LVDS_INFO_V12 are still valid/useful to DAL */
-
 
2220
#define	LCDPANEL_CAP_READ_EDID									0x1
2702
#define SUPPORTED_LCD_REFRESHRATE_60Hz          0x0020
2221
 
2703
 
2222
/* ucTableFormatRevision=1 */
2704
//ucTableFormatRevision=1
-
 
2705
//ucTableContentRevision=1
2223
/* ucTableContentRevision=1 */
2706
typedef struct _ATOM_LVDS_INFO
2224
typedef struct _ATOM_LVDS_INFO {
2707
{
2225
	ATOM_COMMON_TABLE_HEADER sHeader;
2708
	ATOM_COMMON_TABLE_HEADER sHeader;
2226
	ATOM_DTD_FORMAT sLCDTiming;
2709
	ATOM_DTD_FORMAT sLCDTiming;
2227
	USHORT usModePatchTableOffset;
2710
	USHORT usModePatchTableOffset;
2228
	USHORT usSupportedRefreshRate;	/* Refer to panel info table in ATOMBIOS extension Spec. */
2711
  USHORT              usSupportedRefreshRate;     //Refer to panel info table in ATOMBIOS extension Spec.
2229
	USHORT usOffDelayInMs;
2712
	USHORT usOffDelayInMs;
2230
	UCHAR ucPowerSequenceDigOntoDEin10Ms;
2713
	UCHAR ucPowerSequenceDigOntoDEin10Ms;
2231
	UCHAR ucPowerSequenceDEtoBLOnin10Ms;
2714
	UCHAR ucPowerSequenceDEtoBLOnin10Ms;
2232
	UCHAR ucLVDS_Misc;	/*  Bit0:{=0:single, =1:dual},Bit1 {=0:666RGB, =1:888RGB},Bit2:3:{Grey level} */
2715
  UCHAR               ucLVDS_Misc;               // Bit0:{=0:single, =1:dual},Bit1 {=0:666RGB, =1:888RGB},Bit2:3:{Grey level}
2233
	/*  Bit4:{=0:LDI format for RGB888, =1 FPDI format for RGB888} */
2716
                                                 // Bit4:{=0:LDI format for RGB888, =1 FPDI format for RGB888}
2234
	/*  Bit5:{=0:Spatial Dithering disabled;1 Spatial Dithering enabled} */
2717
                                                 // Bit5:{=0:Spatial Dithering disabled;1 Spatial Dithering enabled}
2235
	/*  Bit6:{=0:Temporal Dithering disabled;1 Temporal Dithering enabled} */
2718
                                                 // Bit6:{=0:Temporal Dithering disabled;1 Temporal Dithering enabled}
2236
	UCHAR ucPanelDefaultRefreshRate;
2719
	UCHAR ucPanelDefaultRefreshRate;
2237
	UCHAR ucPanelIdentification;
2720
	UCHAR ucPanelIdentification;
Line 2238... Line 2721...
2238
	UCHAR ucSS_Id;
2721
	UCHAR ucSS_Id;
2239
} ATOM_LVDS_INFO;
2722
}ATOM_LVDS_INFO;
2240
 
2723
 
-
 
2724
//ucTableFormatRevision=1
2241
/* ucTableFormatRevision=1 */
2725
//ucTableContentRevision=2
2242
/* ucTableContentRevision=2 */
2726
typedef struct _ATOM_LVDS_INFO_V12
2243
typedef struct _ATOM_LVDS_INFO_V12 {
2727
{
2244
	ATOM_COMMON_TABLE_HEADER sHeader;
2728
	ATOM_COMMON_TABLE_HEADER sHeader;
2245
	ATOM_DTD_FORMAT sLCDTiming;
2729
	ATOM_DTD_FORMAT sLCDTiming;
2246
	USHORT usExtInfoTableOffset;
2730
	USHORT usExtInfoTableOffset;
2247
	USHORT usSupportedRefreshRate;	/* Refer to panel info table in ATOMBIOS extension Spec. */
2731
  USHORT              usSupportedRefreshRate;     //Refer to panel info table in ATOMBIOS extension Spec.
2248
	USHORT usOffDelayInMs;
2732
	USHORT usOffDelayInMs;
2249
	UCHAR ucPowerSequenceDigOntoDEin10Ms;
2733
	UCHAR ucPowerSequenceDigOntoDEin10Ms;
2250
	UCHAR ucPowerSequenceDEtoBLOnin10Ms;
2734
	UCHAR ucPowerSequenceDEtoBLOnin10Ms;
2251
	UCHAR ucLVDS_Misc;	/*  Bit0:{=0:single, =1:dual},Bit1 {=0:666RGB, =1:888RGB},Bit2:3:{Grey level} */
2735
  UCHAR               ucLVDS_Misc;               // Bit0:{=0:single, =1:dual},Bit1 {=0:666RGB, =1:888RGB},Bit2:3:{Grey level}
2252
	/*  Bit4:{=0:LDI format for RGB888, =1 FPDI format for RGB888} */
2736
                                                 // Bit4:{=0:LDI format for RGB888, =1 FPDI format for RGB888}
2253
	/*  Bit5:{=0:Spatial Dithering disabled;1 Spatial Dithering enabled} */
2737
                                                 // Bit5:{=0:Spatial Dithering disabled;1 Spatial Dithering enabled}
2254
	/*  Bit6:{=0:Temporal Dithering disabled;1 Temporal Dithering enabled} */
2738
                                                 // Bit6:{=0:Temporal Dithering disabled;1 Temporal Dithering enabled}
2255
	UCHAR ucPanelDefaultRefreshRate;
2739
	UCHAR ucPanelDefaultRefreshRate;
2256
	UCHAR ucPanelIdentification;
2740
	UCHAR ucPanelIdentification;
2257
	UCHAR ucSS_Id;
2741
	UCHAR ucSS_Id;
2258
	USHORT usLCDVenderID;
2742
	USHORT usLCDVenderID;
2259
	USHORT usLCDProductID;
2743
	USHORT usLCDProductID;
2260
	UCHAR ucLCDPanel_SpecialHandlingCap;
2744
	UCHAR ucLCDPanel_SpecialHandlingCap;
Line -... Line 2745...
-
 
2745
	UCHAR								ucPanelInfoSize;					//  start from ATOM_DTD_FORMAT to end of panel info, include ExtInfoTable
-
 
2746
	UCHAR ucReserved[2];
-
 
2747
}ATOM_LVDS_INFO_V12;
-
 
2748
 
-
 
2749
//Definitions for ucLCDPanel_SpecialHandlingCap:
-
 
2750
 
-
 
2751
//Once DAL sees this CAP is set, it will read EDID from LCD on its own instead of using sLCDTiming in ATOM_LVDS_INFO_V12. 
-
 
2752
//Other entries in ATOM_LVDS_INFO_V12 are still valid/useful to DAL 
-
 
2753
#define	LCDPANEL_CAP_READ_EDID                  0x1
-
 
2754
 
-
 
2755
//If a design supports DRR (dynamic refresh rate) on internal panels (LVDS or EDP), this cap is set in ucLCDPanel_SpecialHandlingCap together
-
 
2756
//with multiple supported refresh rates@usSupportedRefreshRate. This cap should not be set when only slow refresh rate is supported (static
-
 
2757
//refresh rate switch by SW. This is only valid from ATOM_LVDS_INFO_V12
-
 
2758
#define	LCDPANEL_CAP_DRR_SUPPORTED              0x2
-
 
2759
 
-
 
2760
//Use this cap bit for a quick reference whether an embadded panel (LCD1 ) is LVDS or eDP.
-
 
2761
#define	LCDPANEL_CAP_eDP                        0x4
-
 
2762
 
-
 
2763
 
-
 
2764
//Color Bit Depth definition in EDID V1.4 @BYTE 14h
-
 
2765
//Bit 6  5  4
-
 
2766
                              //      0  0  0  -  Color bit depth is undefined
-
 
2767
                              //      0  0  1  -  6 Bits per Primary Color
-
 
2768
                              //      0  1  0  -  8 Bits per Primary Color
-
 
2769
                              //      0  1  1  - 10 Bits per Primary Color
-
 
2770
                              //      1  0  0  - 12 Bits per Primary Color
-
 
2771
                              //      1  0  1  - 14 Bits per Primary Color
-
 
2772
                              //      1  1  0  - 16 Bits per Primary Color
-
 
2773
                              //      1  1  1  - Reserved
-
 
2774
 
-
 
2775
#define PANEL_COLOR_BIT_DEPTH_MASK    0x70
-
 
2776
 
-
 
2777
// Bit7:{=0:Random Dithering disabled;1 Random Dithering enabled}   
2261
	UCHAR ucPanelInfoSize;	/*   start from ATOM_DTD_FORMAT to end of panel info, include ExtInfoTable */
2778
#define PANEL_RANDOM_DITHER   0x80
Line 2262... Line 2779...
2262
	UCHAR ucReserved[2];
2779
#define PANEL_RANDOM_DITHER_MASK   0x80
-
 
2780
 
2263
} ATOM_LVDS_INFO_V12;
2781
 
2264
 
2782
#define ATOM_LVDS_INFO_LAST  ATOM_LVDS_INFO_V12
2265
#define ATOM_LVDS_INFO_LAST  ATOM_LVDS_INFO_V12
2783
 
2266
 
2784
typedef struct  _ATOM_PATCH_RECORD_MODE
Line 2267... Line 2785...
2267
typedef struct _ATOM_PATCH_RECORD_MODE {
2785
{
-
 
2786
	UCHAR ucRecordType;
2268
	UCHAR ucRecordType;
2787
	USHORT usHDisp;
2269
	USHORT usHDisp;
2788
	USHORT usVDisp;
2270
	USHORT usVDisp;
2789
}ATOM_PATCH_RECORD_MODE;
Line 2271... Line 2790...
2271
} ATOM_PATCH_RECORD_MODE;
2790
 
-
 
2791
typedef struct  _ATOM_LCD_RTS_RECORD
2272
 
2792
{
-
 
2793
	UCHAR ucRecordType;
2273
typedef struct _ATOM_LCD_RTS_RECORD {
2794
	UCHAR ucRTSValue;
2274
	UCHAR ucRecordType;
2795
}ATOM_LCD_RTS_RECORD;
2275
	UCHAR ucRTSValue;
2796
 
Line 2276... Line 2797...
2276
} ATOM_LCD_RTS_RECORD;
2797
//!! If the record below exits, it shoud always be the first record for easy use in command table!!! 
2277
 
2798
// The record below is only used when LVDS_Info is present. From ATOM_LVDS_INFO_V12, use ucLCDPanel_SpecialHandlingCap instead.
2278
/* !! If the record below exits, it shoud always be the first record for easy use in command table!!! */
2799
typedef struct  _ATOM_LCD_MODE_CONTROL_CAP
Line 2279... Line 2800...
2279
typedef struct _ATOM_LCD_MODE_CONTROL_CAP {
2800
{
-
 
2801
	UCHAR ucRecordType;
2280
	UCHAR ucRecordType;
2802
	USHORT usLCDCap;
2281
	USHORT usLCDCap;
2803
}ATOM_LCD_MODE_CONTROL_CAP;
2282
} ATOM_LCD_MODE_CONTROL_CAP;
2804
 
2283
 
2805
#define LCD_MODE_CAP_BL_OFF                   1
Line 2284... Line 2806...
2284
#define LCD_MODE_CAP_BL_OFF                   1
2806
#define LCD_MODE_CAP_CRTC_OFF                 2
-
 
2807
#define LCD_MODE_CAP_PANEL_OFF                4
2285
#define LCD_MODE_CAP_CRTC_OFF                 2
2808
 
2286
#define LCD_MODE_CAP_PANEL_OFF                4
2809
typedef struct _ATOM_FAKE_EDID_PATCH_RECORD
2287
 
2810
{
2288
typedef struct _ATOM_FAKE_EDID_PATCH_RECORD {
2811
	UCHAR ucRecordType;
Line 2304... Line 2827...
2304
#define LCD_PANEL_RESOLUTION_RECORD_TYPE      5
2827
#define LCD_PANEL_RESOLUTION_RECORD_TYPE      5
2305
#define ATOM_RECORD_END_TYPE                  0xFF
2828
#define ATOM_RECORD_END_TYPE                  0xFF
Line 2306... Line 2829...
2306
 
2829
 
Line 2307... Line 2830...
2307
/****************************Spread Spectrum Info Table Definitions **********************/
2830
/****************************Spread Spectrum Info Table Definitions **********************/
2308
 
2831
 
2309
/* ucTableFormatRevision=1 */
2832
//ucTableFormatRevision=1
-
 
2833
//ucTableContentRevision=2
2310
/* ucTableContentRevision=2 */
2834
typedef struct _ATOM_SPREAD_SPECTRUM_ASSIGNMENT
2311
typedef struct _ATOM_SPREAD_SPECTRUM_ASSIGNMENT {
2835
{
2312
	USHORT usSpreadSpectrumPercentage;
2836
	USHORT usSpreadSpectrumPercentage;
2313
	UCHAR ucSpreadSpectrumType;	/* Bit1=0 Down Spread,=1 Center Spread. Bit1=1 Ext. =0 Int. Others:TBD */
2837
  UCHAR               ucSpreadSpectrumType;	    //Bit1=0 Down Spread,=1 Center Spread. Bit1=1 Ext. =0 Int. Bit2=1: PCIE REFCLK SS =0 iternal PPLL SS  Others:TBD
2314
	UCHAR ucSS_Step;
2838
	UCHAR ucSS_Step;
2315
	UCHAR ucSS_Delay;
2839
	UCHAR ucSS_Delay;
2316
	UCHAR ucSS_Id;
2840
	UCHAR ucSS_Id;
2317
	UCHAR ucRecommendedRef_Div;
2841
	UCHAR ucRecommendedRef_Div;
Line 2318... Line 2842...
2318
	UCHAR ucSS_Range;	/* it was reserved for V11 */
2842
  UCHAR               ucSS_Range;               //it was reserved for V11
-
 
2843
}ATOM_SPREAD_SPECTRUM_ASSIGNMENT;
2319
} ATOM_SPREAD_SPECTRUM_ASSIGNMENT;
2844
 
2320
 
2845
#define ATOM_MAX_SS_ENTRY                      16
-
 
2846
#define ATOM_DP_SS_ID1												 0x0f1			// SS ID for internal DP stream at 2.7Ghz. if ATOM_DP_SS_ID2 does not exist in SS_InfoTable, it is used for internal DP stream at 1.62Ghz as well. 
-
 
2847
#define ATOM_DP_SS_ID2												 0x0f2			// SS ID for internal DP stream at 1.62Ghz, if it exists in SS_InfoTable. 
Line 2321... Line 2848...
2321
#define ATOM_MAX_SS_ENTRY                      16
2848
#define ATOM_LVLINK_2700MHz_SS_ID              0x0f3      // SS ID for LV link translator chip at 2.7Ghz
2322
#define ATOM_DP_SS_ID1												 0x0f1	/*  SS modulation freq=30k */
2849
#define ATOM_LVLINK_1620MHz_SS_ID              0x0f4      // SS ID for LV link translator chip at 1.62Ghz
2323
#define ATOM_DP_SS_ID2												 0x0f2	/*  SS modulation freq=33k */
2850
 
2324
 
2851
 
Line 2330... Line 2857...
2330
#define ATOM_EXTERNAL_SS_MASK                  0x00000002
2857
#define ATOM_EXTERNAL_SS_MASK                  0x00000002
2331
#define EXEC_SS_STEP_SIZE_SHIFT                2
2858
#define EXEC_SS_STEP_SIZE_SHIFT                2
2332
#define EXEC_SS_DELAY_SHIFT                    4
2859
#define EXEC_SS_DELAY_SHIFT                    4
2333
#define ACTIVEDATA_TO_BLON_DELAY_SHIFT         4
2860
#define ACTIVEDATA_TO_BLON_DELAY_SHIFT         4
Line 2334... Line 2861...
2334
 
2861
 
-
 
2862
typedef struct _ATOM_SPREAD_SPECTRUM_INFO
2335
typedef struct _ATOM_SPREAD_SPECTRUM_INFO {
2863
{ 
2336
	ATOM_COMMON_TABLE_HEADER sHeader;
2864
	ATOM_COMMON_TABLE_HEADER sHeader;
2337
	ATOM_SPREAD_SPECTRUM_ASSIGNMENT asSS_Info[ATOM_MAX_SS_ENTRY];
2865
	ATOM_SPREAD_SPECTRUM_ASSIGNMENT asSS_Info[ATOM_MAX_SS_ENTRY];
Line 2338... Line 2866...
2338
} ATOM_SPREAD_SPECTRUM_INFO;
2866
}ATOM_SPREAD_SPECTRUM_INFO;
2339
 
2867
 
2340
/****************************************************************************/
2868
/****************************************************************************/
2341
/*  Structure used in AnalogTV_InfoTable (Top level) */
2869
// Structure used in AnalogTV_InfoTable (Top level)
Line 2342... Line 2870...
2342
/****************************************************************************/
2870
/****************************************************************************/
2343
/* ucTVBootUpDefaultStd definiton: */
2871
//ucTVBootUpDefaultStd definiton:
2344
 
2872
 
2345
/* ATOM_TV_NTSC                1 */
2873
//ATOM_TV_NTSC                1
2346
/* ATOM_TV_NTSCJ               2 */
2874
//ATOM_TV_NTSCJ               2
2347
/* ATOM_TV_PAL                 3 */
2875
//ATOM_TV_PAL                 3
2348
/* ATOM_TV_PALM                4 */
2876
//ATOM_TV_PALM                4
2349
/* ATOM_TV_PALCN               5 */
2877
//ATOM_TV_PALCN               5
Line 2350... Line 2878...
2350
/* ATOM_TV_PALN                6 */
2878
//ATOM_TV_PALN                6
2351
/* ATOM_TV_PAL60               7 */
2879
//ATOM_TV_PAL60               7
2352
/* ATOM_TV_SECAM               8 */
2880
//ATOM_TV_SECAM               8
Line 2353... Line 2881...
2353
 
2881
 
2354
/* ucTVSuppportedStd definition: */
2882
//ucTVSupportedStd definition:
Line 2362... Line 2890...
2362
#define PAL60_SUPPORT         0x40
2890
#define PAL60_SUPPORT         0x40
2363
#define SECAM_SUPPORT         0x80
2891
#define SECAM_SUPPORT         0x80
Line 2364... Line 2892...
2364
 
2892
 
Line 2365... Line 2893...
2365
#define MAX_SUPPORTED_TV_TIMING    2
2893
#define MAX_SUPPORTED_TV_TIMING    2
-
 
2894
 
2366
 
2895
typedef struct _ATOM_ANALOG_TV_INFO
2367
typedef struct _ATOM_ANALOG_TV_INFO {
2896
{
2368
	ATOM_COMMON_TABLE_HEADER sHeader;
2897
	ATOM_COMMON_TABLE_HEADER sHeader;
2369
	UCHAR ucTV_SupportedStandard;
2898
	UCHAR ucTV_SupportedStandard;
2370
	UCHAR ucTV_BootUpDefaultStandard;
2899
	UCHAR ucTV_BootUpDefaultStandard;
Line 2374... Line 2903...
2374
	ATOM_MODE_TIMING aModeTimings[MAX_SUPPORTED_TV_TIMING];
2903
	ATOM_MODE_TIMING aModeTimings[MAX_SUPPORTED_TV_TIMING];
2375
} ATOM_ANALOG_TV_INFO;
2904
}ATOM_ANALOG_TV_INFO;
Line 2376... Line 2905...
2376
 
2905
 
Line 2377... Line 2906...
2377
#define MAX_SUPPORTED_TV_TIMING_V1_2    3
2906
#define MAX_SUPPORTED_TV_TIMING_V1_2    3
-
 
2907
 
2378
 
2908
typedef struct _ATOM_ANALOG_TV_INFO_V1_2
2379
typedef struct _ATOM_ANALOG_TV_INFO_V1_2 {
2909
{
2380
	ATOM_COMMON_TABLE_HEADER sHeader;
2910
	ATOM_COMMON_TABLE_HEADER sHeader;
2381
	UCHAR                    ucTV_SupportedStandard;
2911
	UCHAR                    ucTV_SupportedStandard;
2382
	UCHAR                    ucTV_BootUpDefaultStandard;
2912
	UCHAR                    ucTV_BootUpDefaultStandard;
2383
	UCHAR                    ucExt_TV_ASIC_ID;
2913
	UCHAR                    ucExt_TV_ASIC_ID;
2384
	UCHAR                    ucExt_TV_ASIC_SlaveAddr;
2914
	UCHAR                    ucExt_TV_ASIC_SlaveAddr;
Line -... Line 2915...
-
 
2915
	ATOM_DTD_FORMAT          aModeTimings[MAX_SUPPORTED_TV_TIMING];
-
 
2916
}ATOM_ANALOG_TV_INFO_V1_2;
-
 
2917
 
-
 
2918
typedef struct _ATOM_DPCD_INFO
-
 
2919
{
-
 
2920
  UCHAR   ucRevisionNumber;        //10h : Revision 1.0; 11h : Revision 1.1   
-
 
2921
  UCHAR   ucMaxLinkRate;           //06h : 1.62Gbps per lane; 0Ah = 2.7Gbps per lane
-
 
2922
  UCHAR   ucMaxLane;               //Bits 4:0 = MAX_LANE_COUNT (1/2/4). Bit 7 = ENHANCED_FRAME_CAP 
-
 
2923
  UCHAR   ucMaxDownSpread;         //Bit0 = 0: No Down spread; Bit0 = 1: 0.5% (Subject to change according to DP spec)
-
 
2924
}ATOM_DPCD_INFO;
2385
	ATOM_DTD_FORMAT          aModeTimings[MAX_SUPPORTED_TV_TIMING];
2925
 
2386
} ATOM_ANALOG_TV_INFO_V1_2;
2926
#define ATOM_DPCD_MAX_LANE_MASK    0x1F
Line 2387... Line 2927...
2387
 
2927
 
2388
/**************************************************************************/
2928
/**************************************************************************/
2389
/*  VRAM usage and their definitions */
2929
// VRAM usage and their defintions
2390
 
2930
 
2391
/*  One chunk of VRAM used by Bios are for HWICON surfaces,EDID data. */
2931
// One chunk of VRAM used by Bios are for HWICON surfaces,EDID data.
Line 2392... Line 2932...
2392
/*  Current Mode timing and Dail Timing and/or STD timing data EACH device. They can be broken down as below. */
2932
// Current Mode timing and Dail Timing and/or STD timing data EACH device. They can be broken down as below.
2393
/*  All the addresses below are the offsets from the frame buffer start.They all MUST be Dword aligned! */
2933
// All the addresses below are the offsets from the frame buffer start.They all MUST be Dword aligned!
2394
/*  To driver: The physical address of this memory portion=mmFB_START(4K aligned)+ATOMBIOS_VRAM_USAGE_START_ADDR+ATOM_x_ADDR */
2934
// To driver: The physical address of this memory portion=mmFB_START(4K aligned)+ATOMBIOS_VRAM_USAGE_START_ADDR+ATOM_x_ADDR
Line 2395... Line 2935...
2395
/*  To Bios:  ATOMBIOS_VRAM_USAGE_START_ADDR+ATOM_x_ADDR->MM_INDEX */
2935
// To Bios:  ATOMBIOS_VRAM_USAGE_START_ADDR+ATOM_x_ADDR->MM_INDEX 
2396
 
2936
 
2397
#ifndef VESA_MEMORY_IN_64K_BLOCK
2937
#ifndef VESA_MEMORY_IN_64K_BLOCK
2398
#define VESA_MEMORY_IN_64K_BLOCK        0x100	/* 256*64K=16Mb (Max. VESA memory is 16Mb!) */
2938
#define VESA_MEMORY_IN_64K_BLOCK        0x100       //256*64K=16Mb (Max. VESA memory is 16Mb!)
2399
#endif
2939
#endif
2400
 
2940
 
2401
#define ATOM_EDID_RAW_DATASIZE          256	/* In Bytes */
2941
#define ATOM_EDID_RAW_DATASIZE          256         //In Bytes
2402
#define ATOM_HWICON_SURFACE_SIZE        4096	/* In Bytes */
2942
#define ATOM_HWICON_SURFACE_SIZE        4096        //In Bytes
2403
#define ATOM_HWICON_INFOTABLE_SIZE      32
2943
#define ATOM_HWICON_INFOTABLE_SIZE      32
Line 2404... Line 2944...
2404
#define MAX_DTD_MODE_IN_VRAM            6
2944
#define MAX_DTD_MODE_IN_VRAM            6
Line 2431... Line 2971...
2431
 
2971
 
2432
#define ATOM_LCD2_EDID_ADDR             (ATOM_CRT2_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE)
2972
#define ATOM_LCD2_EDID_ADDR             (ATOM_CRT2_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE)
2433
#define ATOM_LCD2_DTD_MODE_TBL_ADDR     (ATOM_LCD2_EDID_ADDR + ATOM_EDID_RAW_DATASIZE)
2973
#define ATOM_LCD2_DTD_MODE_TBL_ADDR     (ATOM_LCD2_EDID_ADDR + ATOM_EDID_RAW_DATASIZE)
Line 2434... Line 2974...
2434
#define ATOM_LCD2_STD_MODE_TBL_ADDR	(ATOM_LCD2_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE)
2974
#define ATOM_LCD2_STD_MODE_TBL_ADDR	(ATOM_LCD2_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE)
2435
 
2975
 
2436
#define ATOM_TV2_EDID_ADDR              (ATOM_LCD2_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE)
2976
#define ATOM_DFP6_EDID_ADDR             (ATOM_LCD2_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE)
Line 2437... Line 2977...
2437
#define ATOM_TV2_DTD_MODE_TBL_ADDR      (ATOM_TV2_EDID_ADDR + ATOM_EDID_RAW_DATASIZE)
2977
#define ATOM_DFP6_DTD_MODE_TBL_ADDR     (ATOM_DFP6_EDID_ADDR + ATOM_EDID_RAW_DATASIZE)
2438
#define ATOM_TV2_STD_MODE_TBL_ADDR	  (ATOM_TV2_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE)
2978
#define ATOM_DFP6_STD_MODE_TBL_ADDR     (ATOM_DFP6_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE)
2439
 
2979
 
Line 2440... Line 2980...
2440
#define ATOM_DFP2_EDID_ADDR             (ATOM_TV2_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE)
2980
#define ATOM_DFP2_EDID_ADDR             (ATOM_DFP6_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE)
2441
#define ATOM_DFP2_DTD_MODE_TBL_ADDR     (ATOM_DFP2_EDID_ADDR + ATOM_EDID_RAW_DATASIZE)
2981
#define ATOM_DFP2_DTD_MODE_TBL_ADDR     (ATOM_DFP2_EDID_ADDR + ATOM_EDID_RAW_DATASIZE)
Line 2458... Line 2998...
2458
#define ATOM_DFP5_STD_MODE_TBL_ADDR     (ATOM_DFP5_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE)
2998
#define ATOM_DFP5_STD_MODE_TBL_ADDR     (ATOM_DFP5_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE)
Line 2459... Line 2999...
2459
 
2999
 
Line 2460... Line 3000...
2460
#define ATOM_DP_TRAINING_TBL_ADDR	(ATOM_DFP5_STD_MODE_TBL_ADDR+ATOM_STD_MODE_SUPPORT_TBL_SIZE)
3000
#define ATOM_DP_TRAINING_TBL_ADDR	(ATOM_DFP5_STD_MODE_TBL_ADDR+ATOM_STD_MODE_SUPPORT_TBL_SIZE)
2461
 
3001
 
Line 2462... Line 3002...
2462
#define ATOM_STACK_STORAGE_START        (ATOM_DP_TRAINING_TBL_ADDR + 256)
3002
#define ATOM_STACK_STORAGE_START        (ATOM_DP_TRAINING_TBL_ADDR+256)       
2463
#define ATOM_STACK_STORAGE_END          (ATOM_STACK_STORAGE_START + 512)
3003
#define ATOM_STACK_STORAGE_END          ATOM_STACK_STORAGE_START+512        
Line 2464... Line 3004...
2464
 
3004
 
2465
/* The size below is in Kb! */
3005
//The size below is in Kb!
2466
#define ATOM_VRAM_RESERVE_SIZE         ((((ATOM_STACK_STORAGE_END - ATOM_HWICON1_SURFACE_ADDR)>>10)+4)&0xFFFC)
3006
#define ATOM_VRAM_RESERVE_SIZE         ((((ATOM_STACK_STORAGE_END - ATOM_HWICON1_SURFACE_ADDR)>>10)+4)&0xFFFC)
2467
 
3007
 
Line 2468... Line 3008...
2468
#define	ATOM_VRAM_OPERATION_FLAGS_MASK         0xC0000000L
3008
#define	ATOM_VRAM_OPERATION_FLAGS_MASK         0xC0000000L
2469
#define ATOM_VRAM_OPERATION_FLAGS_SHIFT        30
3009
#define ATOM_VRAM_OPERATION_FLAGS_SHIFT        30
2470
#define	ATOM_VRAM_BLOCK_NEEDS_NO_RESERVATION   0x1
3010
#define	ATOM_VRAM_BLOCK_NEEDS_NO_RESERVATION   0x1
2471
#define	ATOM_VRAM_BLOCK_NEEDS_RESERVATION      0x0
3011
#define	ATOM_VRAM_BLOCK_NEEDS_RESERVATION      0x0
2472
 
3012
 
2473
/***********************************************************************************/
3013
/***********************************************************************************/
2474
/*  Structure used in VRAM_UsageByFirmwareTable */
3014
// Structure used in VRAM_UsageByFirmwareTable
2475
/*  Note1: This table is filled by SetBiosReservationStartInFB in CoreCommSubs.asm */
3015
// Note1: This table is filled by SetBiosReservationStartInFB in CoreCommSubs.asm
2476
/*         at running time. */
3016
//        at running time.   
-
 
3017
// note2: From RV770, the memory is more than 32bit addressable, so we will change 
-
 
3018
//        ucTableFormatRevision=1,ucTableContentRevision=4, the strcuture remains 
-
 
3019
//        exactly same as 1.1 and 1.2 (1.3 is never in use), but ulStartAddrUsedByFirmware 
-
 
3020
//        (in offset to start of memory address) is KB aligned instead of byte aligend.
-
 
3021
/***********************************************************************************/
-
 
3022
// Note3:
-
 
3023
/* If we change usReserved to "usFBUsedbyDrvInKB", then to VBIOS this usFBUsedbyDrvInKB is a predefined, unchanged constant across VGA or non VGA adapter,
-
 
3024
for CAIL, The size of FB access area is known, only thing missing is the Offset of FB Access area, so we can  have:
-
 
3025
 
-
 
3026
If (ulStartAddrUsedByFirmware!=0)
-
 
3027
FBAccessAreaOffset= ulStartAddrUsedByFirmware - usFBUsedbyDrvInKB;
-
 
3028
Reserved area has been claimed by VBIOS including this FB access area; CAIL doesn't need to reserve any extra area for this purpose
-
 
3029
else	//Non VGA case
-
 
3030
 if (FB_Size<=2Gb)
-
 
3031
    FBAccessAreaOffset= FB_Size - usFBUsedbyDrvInKB;
2477
/*  note2: From RV770, the memory is more than 32bit addressable, so we will change */
3032
 else
Line 2478... Line 3033...
2478
/*         ucTableFormatRevision=1,ucTableContentRevision=4, the strcuture remains */
3033
	  FBAccessAreaOffset= Aper_Size - usFBUsedbyDrvInKB
-
 
3034
 
2479
/*         exactly same as 1.1 and 1.2 (1.3 is never in use), but ulStartAddrUsedByFirmware */
3035
CAIL needs to claim an reserved area defined by FBAccessAreaOffset and usFBUsedbyDrvInKB in non VGA case.*/
2480
/*         (in offset to start of memory address) is KB aligned instead of byte aligend. */
3036
 
2481
/***********************************************************************************/
3037
#define ATOM_MAX_FIRMWARE_VRAM_USAGE_INFO			1
2482
#define ATOM_MAX_FIRMWARE_VRAM_USAGE_INFO			1
3038
 
Line 2483... Line 3039...
2483
 
3039
typedef struct _ATOM_FIRMWARE_VRAM_RESERVE_INFO
-
 
3040
{
2484
typedef struct _ATOM_FIRMWARE_VRAM_RESERVE_INFO {
3041
	ULONG ulStartAddrUsedByFirmware;
2485
	ULONG ulStartAddrUsedByFirmware;
-
 
2486
	USHORT usFirmwareUseInKb;
3042
	USHORT usFirmwareUseInKb;
2487
	USHORT usReserved;
3043
	USHORT usReserved;
Line -... Line 3044...
-
 
3044
}ATOM_FIRMWARE_VRAM_RESERVE_INFO;
-
 
3045
 
-
 
3046
typedef struct _ATOM_VRAM_USAGE_BY_FIRMWARE
-
 
3047
{
-
 
3048
  ATOM_COMMON_TABLE_HEADER sHeader;  
-
 
3049
  ATOM_FIRMWARE_VRAM_RESERVE_INFO	asFirmwareVramReserveInfo[ATOM_MAX_FIRMWARE_VRAM_USAGE_INFO];
-
 
3050
}ATOM_VRAM_USAGE_BY_FIRMWARE;
-
 
3051
 
-
 
3052
// change verion to 1.5, when allow driver to allocate the vram area for command table access. 
-
 
3053
typedef struct _ATOM_FIRMWARE_VRAM_RESERVE_INFO_V1_5
-
 
3054
{
-
 
3055
  ULONG   ulStartAddrUsedByFirmware;
-
 
3056
  USHORT  usFirmwareUseInKb;
-
 
3057
  USHORT  usFBUsedByDrvInKb;
2488
} ATOM_FIRMWARE_VRAM_RESERVE_INFO;
3058
}ATOM_FIRMWARE_VRAM_RESERVE_INFO_V1_5;
2489
 
3059
 
2490
typedef struct _ATOM_VRAM_USAGE_BY_FIRMWARE {
3060
typedef struct _ATOM_VRAM_USAGE_BY_FIRMWARE_V1_5
2491
	ATOM_COMMON_TABLE_HEADER sHeader;
3061
{
-
 
3062
	ATOM_COMMON_TABLE_HEADER sHeader;
2492
	ATOM_FIRMWARE_VRAM_RESERVE_INFO
3063
  ATOM_FIRMWARE_VRAM_RESERVE_INFO_V1_5	asFirmwareVramReserveInfo[ATOM_MAX_FIRMWARE_VRAM_USAGE_INFO];
2493
	    asFirmwareVramReserveInfo[ATOM_MAX_FIRMWARE_VRAM_USAGE_INFO];
3064
}ATOM_VRAM_USAGE_BY_FIRMWARE_V1_5;
2494
} ATOM_VRAM_USAGE_BY_FIRMWARE;
3065
 
2495
 
3066
/****************************************************************************/
Line 2496... Line 3067...
2496
/****************************************************************************/
3067
// Structure used in GPIO_Pin_LUTTable
-
 
3068
/****************************************************************************/
2497
/*  Structure used in GPIO_Pin_LUTTable */
3069
typedef struct _ATOM_GPIO_PIN_ASSIGNMENT
2498
/****************************************************************************/
3070
{
2499
typedef struct _ATOM_GPIO_PIN_ASSIGNMENT {
3071
	USHORT usGpioPin_AIndex;
Line 2500... Line 3072...
2500
	USHORT usGpioPin_AIndex;
3072
	UCHAR ucGpioPinBitShift;
2501
	UCHAR ucGpioPinBitShift;
3073
	UCHAR ucGPIO_ID;
2502
	UCHAR ucGPIO_ID;
3074
}ATOM_GPIO_PIN_ASSIGNMENT;
2503
} ATOM_GPIO_PIN_ASSIGNMENT;
3075
 
Line 2504... Line 3076...
2504
 
3076
typedef struct _ATOM_GPIO_PIN_LUT
Line 2505... Line 3077...
2505
typedef struct _ATOM_GPIO_PIN_LUT {
3077
{
2506
	ATOM_COMMON_TABLE_HEADER sHeader;
3078
	ATOM_COMMON_TABLE_HEADER sHeader;
2507
	ATOM_GPIO_PIN_ASSIGNMENT asGPIO_Pin[1];
3079
	ATOM_GPIO_PIN_ASSIGNMENT asGPIO_Pin[1];
2508
} ATOM_GPIO_PIN_LUT;
3080
}ATOM_GPIO_PIN_LUT;
Line 2509... Line 3081...
2509
 
3081
 
-
 
3082
/****************************************************************************/
2510
/****************************************************************************/
3083
// Structure used in ComponentVideoInfoTable	
2511
/*  Structure used in ComponentVideoInfoTable */
3084
/****************************************************************************/
2512
/****************************************************************************/
3085
#define GPIO_PIN_ACTIVE_HIGH          0x1
2513
#define GPIO_PIN_ACTIVE_HIGH          0x1
3086
 
Line 2514... Line 3087...
2514
 
3087
#define MAX_SUPPORTED_CV_STANDARDS    5
2515
#define MAX_SUPPORTED_CV_STANDARDS    5
3088
 
Line 2516... Line 3089...
2516
 
3089
// definitions for ATOM_D_INFO.ucSettings
2517
/*  definitions for ATOM_D_INFO.ucSettings */
3090
#define ATOM_GPIO_SETTINGS_BITSHIFT_MASK  0x1F    // [4:0]
2518
#define ATOM_GPIO_SETTINGS_BITSHIFT_MASK  0x1F	/*  [4:0] */
3091
#define ATOM_GPIO_SETTINGS_RESERVED_MASK  0x60    // [6:5] = must be zeroed out
2519
#define ATOM_GPIO_SETTINGS_RESERVED_MASK  0x60	/*  [6:5] = must be zeroed out */
3092
#define ATOM_GPIO_SETTINGS_ACTIVE_MASK    0x80    // [7]
2520
#define ATOM_GPIO_SETTINGS_ACTIVE_MASK    0x80	/*  [7] */
3093
 
2521
 
3094
typedef struct _ATOM_GPIO_INFO
2522
typedef struct _ATOM_GPIO_INFO {
3095
{
2523
	USHORT usAOffset;
3096
	USHORT usAOffset;
2524
	UCHAR ucSettings;
3097
	UCHAR ucSettings;
Line 2525... Line 3098...
2525
	UCHAR ucReserved;
3098
	UCHAR ucReserved;
2526
} ATOM_GPIO_INFO;
3099
}ATOM_GPIO_INFO;
2527
 
3100
 
2528
/*  definitions for ATOM_COMPONENT_VIDEO_INFO.ucMiscInfo (bit vector) */
3101
// definitions for ATOM_COMPONENT_VIDEO_INFO.ucMiscInfo (bit vector)
Line 2529... Line 3102...
2529
#define ATOM_CV_RESTRICT_FORMAT_SELECTION           0x2
3102
#define ATOM_CV_RESTRICT_FORMAT_SELECTION           0x2
2530
 
3103
 
2531
/*  definitions for ATOM_COMPONENT_VIDEO_INFO.uc480i/uc480p/uc720p/uc1080i */
3104
// definitions for ATOM_COMPONENT_VIDEO_INFO.uc480i/uc480p/uc720p/uc1080i
2532
#define ATOM_GPIO_DEFAULT_MODE_EN                   0x80	/* [7]; */
3105
#define ATOM_GPIO_DEFAULT_MODE_EN                   0x80 //[7];
Line 2533... Line 3106...
2533
#define ATOM_GPIO_SETTING_PERMODE_MASK              0x7F	/* [6:0] */
3106
#define ATOM_GPIO_SETTING_PERMODE_MASK              0x7F //[6:0]
Line 2534... Line 3107...
2534
 
3107
 
Line 2535... Line 3108...
2535
/*  definitions for ATOM_COMPONENT_VIDEO_INFO.ucLetterBoxMode */
3108
// definitions for ATOM_COMPONENT_VIDEO_INFO.ucLetterBoxMode
2536
/* Line 3 out put 5V. */
3109
//Line 3 out put 5V.
2537
#define ATOM_CV_LINE3_ASPECTRATIO_16_9_GPIO_A       0x01	/* represent gpio 3 state for 16:9 */
3110
#define ATOM_CV_LINE3_ASPECTRATIO_16_9_GPIO_A       0x01     //represent gpio 3 state for 16:9
Line -... Line 3111...
-
 
3111
#define ATOM_CV_LINE3_ASPECTRATIO_16_9_GPIO_B       0x02     //represent gpio 4 state for 16:9
2538
#define ATOM_CV_LINE3_ASPECTRATIO_16_9_GPIO_B       0x02	/* represent gpio 4 state for 16:9 */
3112
#define ATOM_CV_LINE3_ASPECTRATIO_16_9_GPIO_SHIFT   0x0
-
 
3113
 
2539
#define ATOM_CV_LINE3_ASPECTRATIO_16_9_GPIO_SHIFT   0x0
3114
//Line 3 out put 2.2V              
2540
 
3115
#define ATOM_CV_LINE3_ASPECTRATIO_4_3_LETBOX_GPIO_A 0x04     //represent gpio 3 state for 4:3 Letter box
2541
/* Line 3 out put 2.2V */
3116
#define ATOM_CV_LINE3_ASPECTRATIO_4_3_LETBOX_GPIO_B 0x08     //represent gpio 4 state for 4:3 Letter box
2542
#define ATOM_CV_LINE3_ASPECTRATIO_4_3_LETBOX_GPIO_A 0x04	/* represent gpio 3 state for 4:3 Letter box */
3117
#define ATOM_CV_LINE3_ASPECTRATIO_4_3_LETBOX_GPIO_SHIFT 0x2
2543
#define ATOM_CV_LINE3_ASPECTRATIO_4_3_LETBOX_GPIO_B 0x08	/* represent gpio 4 state for 4:3 Letter box */
3118
 
2544
#define ATOM_CV_LINE3_ASPECTRATIO_4_3_LETBOX_GPIO_SHIFT 0x2
3119
//Line 3 out put 0V
2545
 
3120
#define ATOM_CV_LINE3_ASPECTRATIO_4_3_GPIO_A        0x10     //represent gpio 3 state for 4:3
2546
/* Line 3 out put 0V */
3121
#define ATOM_CV_LINE3_ASPECTRATIO_4_3_GPIO_B        0x20     //represent gpio 4 state for 4:3
2547
#define ATOM_CV_LINE3_ASPECTRATIO_4_3_GPIO_A        0x10	/* represent gpio 3 state for 4:3 */
3122
#define ATOM_CV_LINE3_ASPECTRATIO_4_3_GPIO_SHIFT    0x4
2548
#define ATOM_CV_LINE3_ASPECTRATIO_4_3_GPIO_B        0x20	/* represent gpio 4 state for 4:3 */
3123
 
2549
#define ATOM_CV_LINE3_ASPECTRATIO_4_3_GPIO_SHIFT    0x4
3124
#define ATOM_CV_LINE3_ASPECTRATIO_MASK              0x3F     // bit [5:0]
2550
 
3125
 
2551
#define ATOM_CV_LINE3_ASPECTRATIO_MASK              0x3F	/*  bit [5:0] */
3126
#define ATOM_CV_LINE3_ASPECTRATIO_EXIST             0x80     //bit 7
2552
 
3127
 
2553
#define ATOM_CV_LINE3_ASPECTRATIO_EXIST             0x80	/* bit 7 */
3128
//GPIO bit index in gpio setting per mode value, also represend the block no. in gpio blocks.
2554
 
3129
#define ATOM_GPIO_INDEX_LINE3_ASPECRATIO_GPIO_A   3   //bit 3 in uc480i/uc480p/uc720p/uc1080i, which represend the default gpio bit setting for the mode.
2555
/* GPIO bit index in gpio setting per mode value, also represend the block no. in gpio blocks. */
3130
#define ATOM_GPIO_INDEX_LINE3_ASPECRATIO_GPIO_B   4   //bit 4 in uc480i/uc480p/uc720p/uc1080i, which represend the default gpio bit setting for the mode.
2556
#define ATOM_GPIO_INDEX_LINE3_ASPECRATIO_GPIO_A   3	/* bit 3 in uc480i/uc480p/uc720p/uc1080i, which represend the default gpio bit setting for the mode. */
3131
 
2557
#define ATOM_GPIO_INDEX_LINE3_ASPECRATIO_GPIO_B   4	/* bit 4 in uc480i/uc480p/uc720p/uc1080i, which represend the default gpio bit setting for the mode. */
3132
 
Line 2558... Line 3133...
2558
 
3133
typedef struct _ATOM_COMPONENT_VIDEO_INFO
2559
typedef struct _ATOM_COMPONENT_VIDEO_INFO {
3134
{
2560
	ATOM_COMMON_TABLE_HEADER sHeader;
3135
	ATOM_COMMON_TABLE_HEADER sHeader;
-
 
3136
	USHORT usMask_PinRegisterIndex;
2561
	USHORT usMask_PinRegisterIndex;
3137
	USHORT usEN_PinRegisterIndex;
2562
	USHORT usEN_PinRegisterIndex;
3138
	USHORT usY_PinRegisterIndex;
2563
	USHORT usY_PinRegisterIndex;
3139
	USHORT usA_PinRegisterIndex;
2564
	USHORT usA_PinRegisterIndex;
3140
	UCHAR ucBitShift;
2565
	UCHAR ucBitShift;
3141
  UCHAR              ucPinActiveState;  //ucPinActiveState: Bit0=1 active high, =0 active low
2566
	UCHAR ucPinActiveState;	/* ucPinActiveState: Bit0=1 active high, =0 active low */
3142
  ATOM_DTD_FORMAT    sReserved;         // must be zeroed out
2567
	ATOM_DTD_FORMAT sReserved;	/*  must be zeroed out */
3143
	UCHAR ucMiscInfo;
2568
	UCHAR ucMiscInfo;
3144
	UCHAR uc480i;
2569
	UCHAR uc480i;
3145
	UCHAR uc480p;
2570
	UCHAR uc480p;
3146
	UCHAR uc720p;
2571
	UCHAR uc720p;
3147
	UCHAR uc1080i;
2572
	UCHAR uc1080i;
3148
	UCHAR ucLetterBoxMode;
Line 2573... Line 3149...
2573
	UCHAR ucLetterBoxMode;
3149
	UCHAR ucReserved[3];
Line 2574... Line 3150...
2574
	UCHAR ucReserved[3];
3150
  UCHAR              ucNumOfWbGpioBlocks; //For Component video D-Connector support. If zere, NTSC type connector
2575
	UCHAR ucNumOfWbGpioBlocks;	/* For Component video D-Connector support. If zere, NTSC type connector */
3151
	ATOM_GPIO_INFO aWbGpioStateBlock[MAX_SUPPORTED_CV_STANDARDS];
2576
	ATOM_GPIO_INFO aWbGpioStateBlock[MAX_SUPPORTED_CV_STANDARDS];
3152
	ATOM_DTD_FORMAT aModeTimings[MAX_SUPPORTED_CV_STANDARDS];
2577
	ATOM_DTD_FORMAT aModeTimings[MAX_SUPPORTED_CV_STANDARDS];
3153
}ATOM_COMPONENT_VIDEO_INFO;
-
 
3154
 
2578
} ATOM_COMPONENT_VIDEO_INFO;
3155
//ucTableFormatRevision=2
2579
 
3156
//ucTableContentRevision=1
2580
/* ucTableFormatRevision=2 */
3157
typedef struct _ATOM_COMPONENT_VIDEO_INFO_V21
2581
/* ucTableContentRevision=1 */
3158
{
2582
typedef struct _ATOM_COMPONENT_VIDEO_INFO_V21 {
3159
	ATOM_COMMON_TABLE_HEADER sHeader;
2583
	ATOM_COMMON_TABLE_HEADER sHeader;
3160
	UCHAR ucMiscInfo;
2584
	UCHAR ucMiscInfo;
3161
	UCHAR uc480i;
2585
	UCHAR uc480i;
3162
	UCHAR uc480p;
Line -... Line 3163...
-
 
3163
	UCHAR uc720p;
-
 
3164
	UCHAR uc1080i;
-
 
3165
	UCHAR ucReserved;
-
 
3166
	UCHAR ucLetterBoxMode;
-
 
3167
  UCHAR              ucNumOfWbGpioBlocks; //For Component video D-Connector support. If zere, NTSC type connector
-
 
3168
	ATOM_GPIO_INFO aWbGpioStateBlock[MAX_SUPPORTED_CV_STANDARDS];
-
 
3169
	ATOM_DTD_FORMAT aModeTimings[MAX_SUPPORTED_CV_STANDARDS];
-
 
3170
}ATOM_COMPONENT_VIDEO_INFO_V21;
-
 
3171
 
-
 
3172
#define ATOM_COMPONENT_VIDEO_INFO_LAST  ATOM_COMPONENT_VIDEO_INFO_V21
-
 
3173
 
-
 
3174
/****************************************************************************/
2586
	UCHAR uc480p;
3175
// Structure used in object_InfoTable
-
 
3176
/****************************************************************************/
2587
	UCHAR uc720p;
3177
typedef struct _ATOM_OBJECT_HEADER
2588
	UCHAR uc1080i;
3178
{ 
2589
	UCHAR ucReserved;
3179
	ATOM_COMMON_TABLE_HEADER sHeader;
2590
	UCHAR ucLetterBoxMode;
3180
	USHORT usDeviceSupport;
2591
	UCHAR ucNumOfWbGpioBlocks;	/* For Component video D-Connector support. If zere, NTSC type connector */
3181
	USHORT usConnectorObjectTableOffset;
2592
	ATOM_GPIO_INFO aWbGpioStateBlock[MAX_SUPPORTED_CV_STANDARDS];
3182
	USHORT usRouterObjectTableOffset;
Line 2593... Line 3183...
2593
	ATOM_DTD_FORMAT aModeTimings[MAX_SUPPORTED_CV_STANDARDS];
3183
	USHORT usEncoderObjectTableOffset;
-
 
3184
  USHORT                    usProtectionObjectTableOffset; //only available when Protection block is independent.
2594
} ATOM_COMPONENT_VIDEO_INFO_V21;
3185
	USHORT usDisplayPathTableOffset;
2595
 
3186
}ATOM_OBJECT_HEADER;
2596
#define ATOM_COMPONENT_VIDEO_INFO_LAST  ATOM_COMPONENT_VIDEO_INFO_V21
3187
 
2597
 
3188
typedef struct _ATOM_OBJECT_HEADER_V3
2598
/****************************************************************************/
3189
{ 
Line -... Line 3190...
-
 
3190
  ATOM_COMMON_TABLE_HEADER	sHeader;
2599
/*  Structure used in object_InfoTable */
3191
  USHORT                    usDeviceSupport;
2600
/****************************************************************************/
3192
  USHORT                    usConnectorObjectTableOffset;
2601
typedef struct _ATOM_OBJECT_HEADER {
3193
  USHORT                    usRouterObjectTableOffset;
2602
	ATOM_COMMON_TABLE_HEADER sHeader;
3194
  USHORT                    usEncoderObjectTableOffset;
2603
	USHORT usDeviceSupport;
3195
  USHORT                    usProtectionObjectTableOffset; //only available when Protection block is independent.
2604
	USHORT usConnectorObjectTableOffset;
3196
  USHORT                    usDisplayPathTableOffset;
2605
	USHORT usRouterObjectTableOffset;
3197
  USHORT                    usMiscObjectTableOffset;
Line 2606... Line 3198...
2606
	USHORT usEncoderObjectTableOffset;
3198
}ATOM_OBJECT_HEADER_V3;
2607
	USHORT usProtectionObjectTableOffset;	/* only available when Protection block is independent. */
3199
 
2608
	USHORT usDisplayPathTableOffset;
3200
typedef struct  _ATOM_DISPLAY_OBJECT_PATH
2609
} ATOM_OBJECT_HEADER;
3201
{
2610
 
3202
  USHORT    usDeviceTag;                                   //supported device 
2611
typedef struct _ATOM_DISPLAY_OBJECT_PATH {
3203
  USHORT    usSize;                                        //the size of ATOM_DISPLAY_OBJECT_PATH
Line 2612... Line 3204...
2612
	USHORT usDeviceTag;	/* supported device */
3204
  USHORT    usConnObjectId;                                //Connector Object ID 
2613
	USHORT usSize;		/* the size of ATOM_DISPLAY_OBJECT_PATH */
3205
  USHORT    usGPUObjectId;                                 //GPU ID 
2614
	USHORT usConnObjectId;	/* Connector Object ID */
3206
  USHORT    usGraphicObjIds[1];                             //1st Encoder Obj source from GPU to last Graphic Obj destinate to connector.
2615
	USHORT usGPUObjectId;	/* GPU ID */
3207
}ATOM_DISPLAY_OBJECT_PATH;
2616
	USHORT usGraphicObjIds[1];	/* 1st Encoder Obj source from GPU to last Graphic Obj destinate to connector. */
3208
 
2617
} ATOM_DISPLAY_OBJECT_PATH;
3209
typedef struct _ATOM_DISPLAY_OBJECT_PATH_TABLE
2618
 
3210
{
Line -... Line 3211...
-
 
3211
	UCHAR ucNumOfDispPath;
-
 
3212
	UCHAR ucVersion;
-
 
3213
	UCHAR ucPadding[2];
-
 
3214
	ATOM_DISPLAY_OBJECT_PATH asDispPath[1];
-
 
3215
}ATOM_DISPLAY_OBJECT_PATH_TABLE;
-
 
3216
 
-
 
3217
 
-
 
3218
typedef struct _ATOM_OBJECT                                //each object has this structure    
-
 
3219
{
-
 
3220
	USHORT usObjectID;
-
 
3221
	USHORT usSrcDstTableOffset;
-
 
3222
  USHORT              usRecordOffset;                     //this pointing to a bunch of records defined below
-
 
3223
	USHORT usReserved;
-
 
3224
}ATOM_OBJECT;
-
 
3225
 
-
 
3226
typedef struct _ATOM_OBJECT_TABLE                         //Above 4 object table offset pointing to a bunch of objects all have this structure     
-
 
3227
{
-
 
3228
	UCHAR ucNumberOfObjects;
-
 
3229
	UCHAR ucPadding[3];
-
 
3230
	ATOM_OBJECT asObjects[1];
-
 
3231
}ATOM_OBJECT_TABLE;
-
 
3232
 
-
 
3233
typedef struct _ATOM_SRC_DST_TABLE_FOR_ONE_OBJECT         //usSrcDstTableOffset pointing to this structure
-
 
3234
{
-
 
3235
	UCHAR ucNumberOfSrc;
-
 
3236
	USHORT usSrcObjectID[1];
-
 
3237
	UCHAR ucNumberOfDst;
-
 
3238
	USHORT usDstObjectID[1];
-
 
3239
}ATOM_SRC_DST_TABLE_FOR_ONE_OBJECT;
-
 
3240
 
-
 
3241
 
-
 
3242
//Two definitions below are for OPM on MXM module designs
-
 
3243
 
-
 
3244
#define EXT_HPDPIN_LUTINDEX_0                   0
-
 
3245
#define EXT_HPDPIN_LUTINDEX_1                   1
-
 
3246
#define EXT_HPDPIN_LUTINDEX_2                   2
-
 
3247
#define EXT_HPDPIN_LUTINDEX_3                   3
-
 
3248
#define EXT_HPDPIN_LUTINDEX_4                   4
-
 
3249
#define EXT_HPDPIN_LUTINDEX_5                   5
-
 
3250
#define EXT_HPDPIN_LUTINDEX_6                   6
-
 
3251
#define EXT_HPDPIN_LUTINDEX_7                   7
-
 
3252
#define MAX_NUMBER_OF_EXT_HPDPIN_LUT_ENTRIES   (EXT_HPDPIN_LUTINDEX_7+1)
-
 
3253
 
-
 
3254
#define EXT_AUXDDC_LUTINDEX_0                   0
-
 
3255
#define EXT_AUXDDC_LUTINDEX_1                   1
-
 
3256
#define EXT_AUXDDC_LUTINDEX_2                   2
2619
typedef struct _ATOM_DISPLAY_OBJECT_PATH_TABLE {
3257
#define EXT_AUXDDC_LUTINDEX_3                   3
2620
	UCHAR ucNumOfDispPath;
3258
#define EXT_AUXDDC_LUTINDEX_4                   4
-
 
3259
#define EXT_AUXDDC_LUTINDEX_5                   5
2621
	UCHAR ucVersion;
3260
#define EXT_AUXDDC_LUTINDEX_6                   6
2622
	UCHAR ucPadding[2];
3261
#define EXT_AUXDDC_LUTINDEX_7                   7
2623
	ATOM_DISPLAY_OBJECT_PATH asDispPath[1];
3262
#define MAX_NUMBER_OF_EXT_AUXDDC_LUT_ENTRIES   (EXT_AUXDDC_LUTINDEX_7+1)
Line -... Line 3263...
-
 
3263
 
2624
} ATOM_DISPLAY_OBJECT_PATH_TABLE;
3264
typedef struct _EXT_DISPLAY_PATH
2625
 
3265
{
2626
typedef struct _ATOM_OBJECT	/* each object has this structure */
3266
  USHORT  usDeviceTag;                    //A bit vector to show what devices are supported 
2627
{
3267
  USHORT  usDeviceACPIEnum;               //16bit device ACPI id. 
2628
	USHORT usObjectID;
3268
  USHORT  usDeviceConnector;              //A physical connector for displays to plug in, using object connector definitions
2629
	USHORT usSrcDstTableOffset;
3269
  UCHAR   ucExtAUXDDCLutIndex;            //An index into external AUX/DDC channel LUT
2630
	USHORT usRecordOffset;	/* this pointing to a bunch of records defined below */
3270
  UCHAR   ucExtHPDPINLutIndex;            //An index into external HPD pin LUT
2631
	USHORT usReserved;
3271
  USHORT  usExtEncoderObjId;              //external encoder object id
2632
} ATOM_OBJECT;
3272
  USHORT  usReserved[3]; 
2633
 
3273
}EXT_DISPLAY_PATH;
2634
typedef struct _ATOM_OBJECT_TABLE	/* Above 4 object table offset pointing to a bunch of objects all have this structure */
3274
   
2635
{
3275
#define NUMBER_OF_UCHAR_FOR_GUID          16
2636
	UCHAR ucNumberOfObjects;
3276
#define MAX_NUMBER_OF_EXT_DISPLAY_PATH    7
2637
	UCHAR ucPadding[3];
3277
 
2638
	ATOM_OBJECT asObjects[1];
3278
typedef  struct _ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO
-
 
3279
{
-
 
3280
  ATOM_COMMON_TABLE_HEADER sHeader;
-
 
3281
  UCHAR                    ucGuid [NUMBER_OF_UCHAR_FOR_GUID];     // a GUID is a 16 byte long string
-
 
3282
  EXT_DISPLAY_PATH         sPath[MAX_NUMBER_OF_EXT_DISPLAY_PATH]; // total of fixed 7 entries.
-
 
3283
  UCHAR                    ucChecksum;                            // a  simple Checksum of the sum of whole structure equal to 0x0. 
Line 2639... Line 3284...
2639
} ATOM_OBJECT_TABLE;
3284
  UCHAR                    Reserved [7];                          // for potential expansion
2640
 
3285
}ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO;
Line 2641... Line 3286...
2641
typedef struct _ATOM_SRC_DST_TABLE_FOR_ONE_OBJECT	/* usSrcDstTableOffset pointing to this structure */
3286
 
-
 
3287
//Related definitions, all records are differnt but they have a commond header
2642
{
3288
typedef struct _ATOM_COMMON_RECORD_HEADER
2643
	UCHAR ucNumberOfSrc;
3289
{
2644
	USHORT usSrcObjectID[1];
3290
  UCHAR               ucRecordType;                      //An emun to indicate the record type
2645
	UCHAR ucNumberOfDst;
3291
  UCHAR               ucRecordSize;                      //The size of the whole record in byte
Line 2646... Line 3292...
2646
	USHORT usDstObjectID[1];
3292
}ATOM_COMMON_RECORD_HEADER;
-
 
3293
 
2647
} ATOM_SRC_DST_TABLE_FOR_ONE_OBJECT;
3294
 
2648
 
3295
#define ATOM_I2C_RECORD_TYPE                           1
2649
/* Related definitions, all records are differnt but they have a commond header */
3296
#define ATOM_HPD_INT_RECORD_TYPE                       2
2650
typedef struct _ATOM_COMMON_RECORD_HEADER {
3297
#define ATOM_OUTPUT_PROTECTION_RECORD_TYPE             3
Line -... Line 3298...
-
 
3298
#define ATOM_CONNECTOR_DEVICE_TAG_RECORD_TYPE          4
2651
	UCHAR ucRecordType;	/* An emun to indicate the record type */
3299
#define	ATOM_CONNECTOR_DVI_EXT_INPUT_RECORD_TYPE	     5 //Obsolete, switch to use GPIO_CNTL_RECORD_TYPE
-
 
3300
#define ATOM_ENCODER_FPGA_CONTROL_RECORD_TYPE          6 //Obsolete, switch to use GPIO_CNTL_RECORD_TYPE
2652
	UCHAR ucRecordSize;	/* The size of the whole record in byte */
3301
#define ATOM_CONNECTOR_CVTV_SHARE_DIN_RECORD_TYPE      7
2653
} ATOM_COMMON_RECORD_HEADER;
3302
#define ATOM_JTAG_RECORD_TYPE                          8 //Obsolete, switch to use GPIO_CNTL_RECORD_TYPE
2654
 
3303
#define ATOM_OBJECT_GPIO_CNTL_RECORD_TYPE              9
2655
#define ATOM_I2C_RECORD_TYPE                           1
3304
#define ATOM_ENCODER_DVO_CF_RECORD_TYPE               10
Line 2656... Line 3305...
2656
#define ATOM_HPD_INT_RECORD_TYPE                       2
3305
#define ATOM_CONNECTOR_CF_RECORD_TYPE                 11
-
 
3306
#define	ATOM_CONNECTOR_HARDCODE_DTD_RECORD_TYPE	      12
2657
#define ATOM_OUTPUT_PROTECTION_RECORD_TYPE             3
3307
#define ATOM_CONNECTOR_PCIE_SUBCONNECTOR_RECORD_TYPE  13
2658
#define ATOM_CONNECTOR_DEVICE_TAG_RECORD_TYPE          4
3308
#define ATOM_ROUTER_DDC_PATH_SELECT_RECORD_TYPE				14
2659
#define	ATOM_CONNECTOR_DVI_EXT_INPUT_RECORD_TYPE	     5	/* Obsolete, switch to use GPIO_CNTL_RECORD_TYPE */
3309
#define ATOM_ROUTER_DATA_CLOCK_PATH_SELECT_RECORD_TYPE					15
2660
#define ATOM_ENCODER_FPGA_CONTROL_RECORD_TYPE          6	/* Obsolete, switch to use GPIO_CNTL_RECORD_TYPE */
3310
#define ATOM_CONNECTOR_HPDPIN_LUT_RECORD_TYPE          16 //This is for the case when connectors are not known to object table
Line 2661... Line 3311...
2661
#define ATOM_CONNECTOR_CVTV_SHARE_DIN_RECORD_TYPE      7
3311
#define ATOM_CONNECTOR_AUXDDC_LUT_RECORD_TYPE          17 //This is for the case when connectors are not known to object table
-
 
3312
#define ATOM_OBJECT_LINK_RECORD_TYPE                   18 //Once this record is present under one object, it indicats the oobject is linked to another obj described by the record
2662
#define ATOM_JTAG_RECORD_TYPE                          8	/* Obsolete, switch to use GPIO_CNTL_RECORD_TYPE */
3313
#define ATOM_CONNECTOR_REMOTE_CAP_RECORD_TYPE          19
2663
#define ATOM_OBJECT_GPIO_CNTL_RECORD_TYPE              9
3314
 
2664
#define ATOM_ENCODER_DVO_CF_RECORD_TYPE               10
3315
 
2665
#define ATOM_CONNECTOR_CF_RECORD_TYPE                 11
3316
//Must be updated when new record type is added,equal to that record definition!
2666
#define	ATOM_CONNECTOR_HARDCODE_DTD_RECORD_TYPE	      12
3317
#define ATOM_MAX_OBJECT_RECORD_NUMBER             ATOM_CONNECTOR_REMOTE_CAP_RECORD_TYPE
Line -... Line 3318...
-
 
3318
 
2667
#define ATOM_CONNECTOR_PCIE_SUBCONNECTOR_RECORD_TYPE  13
3319
typedef struct  _ATOM_I2C_RECORD
-
 
3320
{
2668
#define ATOM_ROUTER_DDC_PATH_SELECT_RECORD_TYPE				14
3321
	ATOM_COMMON_RECORD_HEADER sheader;
2669
#define ATOM_ROUTER_DATA_CLOCK_PATH_SELECT_RECORD_TYPE					15
3322
	ATOM_I2C_ID_CONFIG sucI2cId;
2670
 
3323
  UCHAR                       ucI2CAddr;              //The slave address, it's 0 when the record is attached to connector for DDC
2671
/* Must be updated when new record type is added,equal to that record definition! */
3324
}ATOM_I2C_RECORD;
2672
#define ATOM_MAX_OBJECT_RECORD_NUMBER             ATOM_CONNECTOR_CF_RECORD_TYPE
3325
 
2673
 
3326
typedef struct  _ATOM_HPD_INT_RECORD
Line 2674... Line 3327...
2674
typedef struct _ATOM_I2C_RECORD {
3327
{
-
 
3328
	ATOM_COMMON_RECORD_HEADER sheader;
2675
	ATOM_COMMON_RECORD_HEADER sheader;
3329
  UCHAR                       ucHPDIntGPIOID;         //Corresponding block in GPIO_PIN_INFO table gives the pin info           
2676
	ATOM_I2C_ID_CONFIG sucI2cId;
3330
	UCHAR ucPlugged_PinState;
2677
	UCHAR ucI2CAddr;	/* The slave address, it's 0 when the record is attached to connector for DDC */
3331
}ATOM_HPD_INT_RECORD;
2678
} ATOM_I2C_RECORD;
3332
 
2679
 
3333
 
2680
typedef struct _ATOM_HPD_INT_RECORD {
3334
typedef struct  _ATOM_OUTPUT_PROTECTION_RECORD 
2681
	ATOM_COMMON_RECORD_HEADER sheader;
3335
{
2682
	UCHAR ucHPDIntGPIOID;	/* Corresponding block in GPIO_PIN_INFO table gives the pin info */
3336
	ATOM_COMMON_RECORD_HEADER sheader;
2683
	UCHAR ucPlugged_PinState;
3337
	UCHAR ucProtectionFlag;
2684
} ATOM_HPD_INT_RECORD;
3338
	UCHAR ucReserved;
Line 2685... Line 3339...
2685
 
3339
}ATOM_OUTPUT_PROTECTION_RECORD;
-
 
3340
 
2686
typedef struct _ATOM_OUTPUT_PROTECTION_RECORD {
3341
typedef struct  _ATOM_CONNECTOR_DEVICE_TAG
2687
	ATOM_COMMON_RECORD_HEADER sheader;
3342
{
2688
	UCHAR ucProtectionFlag;
3343
  ULONG                       ulACPIDeviceEnum;       //Reserved for now
2689
	UCHAR ucReserved;
3344
  USHORT                      usDeviceID;             //This Id is same as "ATOM_DEVICE_XXX_SUPPORT"
Line 2690... Line 3345...
2690
} ATOM_OUTPUT_PROTECTION_RECORD;
3345
	USHORT usPadding;
-
 
3346
}ATOM_CONNECTOR_DEVICE_TAG;
2691
 
3347
 
2692
typedef struct _ATOM_CONNECTOR_DEVICE_TAG {
3348
typedef struct  _ATOM_CONNECTOR_DEVICE_TAG_RECORD
2693
	ULONG ulACPIDeviceEnum;	/* Reserved for now */
3349
{
2694
	USHORT usDeviceID;	/* This Id is same as "ATOM_DEVICE_XXX_SUPPORT" */
3350
	ATOM_COMMON_RECORD_HEADER sheader;
2695
	USHORT usPadding;
3351
	UCHAR ucNumberOfDevice;
2696
} ATOM_CONNECTOR_DEVICE_TAG;
3352
	UCHAR ucReserved;
2697
 
3353
  ATOM_CONNECTOR_DEVICE_TAG   asDeviceTag[1];         //This Id is same as "ATOM_DEVICE_XXX_SUPPORT", 1 is only for allocation
2698
typedef struct _ATOM_CONNECTOR_DEVICE_TAG_RECORD {
3354
}ATOM_CONNECTOR_DEVICE_TAG_RECORD;
2699
	ATOM_COMMON_RECORD_HEADER sheader;
3355
 
2700
	UCHAR ucNumberOfDevice;
3356
 
2701
	UCHAR ucReserved;
3357
typedef struct  _ATOM_CONNECTOR_DVI_EXT_INPUT_RECORD
Line -... Line 3358...
-
 
3358
{
2702
	ATOM_CONNECTOR_DEVICE_TAG asDeviceTag[1];	/* This Id is same as "ATOM_DEVICE_XXX_SUPPORT", 1 is only for allocation */
3359
	ATOM_COMMON_RECORD_HEADER sheader;
2703
} ATOM_CONNECTOR_DEVICE_TAG_RECORD;
3360
	UCHAR ucConfigGPIOID;
-
 
3361
  UCHAR						            ucConfigGPIOState;	    //Set to 1 when it's active high to enable external flow in
2704
 
3362
	UCHAR ucFlowinGPIPID;
2705
typedef struct _ATOM_CONNECTOR_DVI_EXT_INPUT_RECORD {
3363
	UCHAR ucExtInGPIPID;
2706
	ATOM_COMMON_RECORD_HEADER sheader;
3364
}ATOM_CONNECTOR_DVI_EXT_INPUT_RECORD;
Line 2707... Line 3365...
2707
	UCHAR ucConfigGPIOID;
3365
 
-
 
3366
typedef struct  _ATOM_ENCODER_FPGA_CONTROL_RECORD
2708
	UCHAR ucConfigGPIOState;	/* Set to 1 when it's active high to enable external flow in */
3367
{
2709
	UCHAR ucFlowinGPIPID;
3368
	ATOM_COMMON_RECORD_HEADER sheader;
2710
	UCHAR ucExtInGPIPID;
3369
	UCHAR ucCTL1GPIO_ID;
2711
} ATOM_CONNECTOR_DVI_EXT_INPUT_RECORD;
3370
  UCHAR                       ucCTL1GPIOState;        //Set to 1 when it's active high
2712
 
3371
	UCHAR ucCTL2GPIO_ID;
Line 2713... Line 3372...
2713
typedef struct _ATOM_ENCODER_FPGA_CONTROL_RECORD {
3372
  UCHAR                       ucCTL2GPIOState;        //Set to 1 when it's active high
2714
	ATOM_COMMON_RECORD_HEADER sheader;
3373
	UCHAR ucCTL3GPIO_ID;
2715
	UCHAR ucCTL1GPIO_ID;
3374
  UCHAR                       ucCTL3GPIOState;        //Set to 1 when it's active high
2716
	UCHAR ucCTL1GPIOState;	/* Set to 1 when it's active high */
3375
	UCHAR ucCTLFPGA_IN_ID;
Line 2717... Line 3376...
2717
	UCHAR ucCTL2GPIO_ID;
3376
	UCHAR ucPadding[3];
2718
	UCHAR ucCTL2GPIOState;	/* Set to 1 when it's active high */
3377
}ATOM_ENCODER_FPGA_CONTROL_RECORD;
2719
	UCHAR ucCTL3GPIO_ID;
3378
 
2720
	UCHAR ucCTL3GPIOState;	/* Set to 1 when it's active high */
3379
typedef struct  _ATOM_CONNECTOR_CVTV_SHARE_DIN_RECORD
2721
	UCHAR ucCTLFPGA_IN_ID;
3380
{
Line -... Line 3381...
-
 
3381
	ATOM_COMMON_RECORD_HEADER sheader;
-
 
3382
  UCHAR                       ucGPIOID;               //Corresponding block in GPIO_PIN_INFO table gives the pin info 
-
 
3383
  UCHAR                       ucTVActiveState;        //Indicating when the pin==0 or 1 when TV is connected
-
 
3384
}ATOM_CONNECTOR_CVTV_SHARE_DIN_RECORD;
-
 
3385
 
-
 
3386
typedef struct  _ATOM_JTAG_RECORD
-
 
3387
{
-
 
3388
	ATOM_COMMON_RECORD_HEADER sheader;
-
 
3389
	UCHAR ucTMSGPIO_ID;
-
 
3390
  UCHAR                       ucTMSGPIOState;         //Set to 1 when it's active high
2722
	UCHAR ucPadding[3];
3391
	UCHAR ucTCKGPIO_ID;
-
 
3392
  UCHAR                       ucTCKGPIOState;         //Set to 1 when it's active high
2723
} ATOM_ENCODER_FPGA_CONTROL_RECORD;
3393
	UCHAR ucTDOGPIO_ID;
2724
 
3394
  UCHAR                       ucTDOGPIOState;         //Set to 1 when it's active high
2725
typedef struct _ATOM_CONNECTOR_CVTV_SHARE_DIN_RECORD {
3395
	UCHAR ucTDIGPIO_ID;
2726
	ATOM_COMMON_RECORD_HEADER sheader;
3396
  UCHAR                       ucTDIGPIOState;         //Set to 1 when it's active high
Line 2727... Line 3397...
2727
	UCHAR ucGPIOID;		/* Corresponding block in GPIO_PIN_INFO table gives the pin info */
3397
	UCHAR ucPadding[2];
2728
	UCHAR ucTVActiveState;	/* Indicating when the pin==0 or 1 when TV is connected */
3398
}ATOM_JTAG_RECORD;
2729
} ATOM_CONNECTOR_CVTV_SHARE_DIN_RECORD;
3399
 
Line 2730... Line 3400...
2730
 
3400
 
-
 
3401
//The following generic object gpio pin control record type will replace JTAG_RECORD/FPGA_CONTROL_RECORD/DVI_EXT_INPUT_RECORD above gradually
2731
typedef struct _ATOM_JTAG_RECORD {
3402
typedef struct _ATOM_GPIO_PIN_CONTROL_PAIR
2732
	ATOM_COMMON_RECORD_HEADER sheader;
3403
{
2733
	UCHAR ucTMSGPIO_ID;
3404
  UCHAR                       ucGPIOID;               // GPIO_ID, find the corresponding ID in GPIO_LUT table
2734
	UCHAR ucTMSGPIOState;	/* Set to 1 when it's active high */
3405
  UCHAR                       ucGPIO_PinState;        // Pin state showing how to set-up the pin
2735
	UCHAR ucTCKGPIO_ID;
3406
}ATOM_GPIO_PIN_CONTROL_PAIR;
2736
	UCHAR ucTCKGPIOState;	/* Set to 1 when it's active high */
3407
 
2737
	UCHAR ucTDOGPIO_ID;
3408
typedef struct  _ATOM_OBJECT_GPIO_CNTL_RECORD
Line 2738... Line 3409...
2738
	UCHAR ucTDOGPIOState;	/* Set to 1 when it's active high */
3409
{
-
 
3410
	ATOM_COMMON_RECORD_HEADER sheader;
2739
	UCHAR ucTDIGPIO_ID;
3411
  UCHAR                       ucFlags;                // Future expnadibility
2740
	UCHAR ucTDIGPIOState;	/* Set to 1 when it's active high */
3412
  UCHAR                       ucNumberOfPins;         // Number of GPIO pins used to control the object
2741
	UCHAR ucPadding[2];
3413
  ATOM_GPIO_PIN_CONTROL_PAIR  asGpio[1];              // the real gpio pin pair determined by number of pins ucNumberOfPins
Line 2742... Line 3414...
2742
} ATOM_JTAG_RECORD;
3414
}ATOM_OBJECT_GPIO_CNTL_RECORD;
-
 
3415
 
2743
 
3416
//Definitions for GPIO pin state 
2744
/* The following generic object gpio pin control record type will replace JTAG_RECORD/FPGA_CONTROL_RECORD/DVI_EXT_INPUT_RECORD above gradually */
3417
#define GPIO_PIN_TYPE_INPUT             0x00
2745
typedef struct _ATOM_GPIO_PIN_CONTROL_PAIR {
3418
#define GPIO_PIN_TYPE_OUTPUT            0x10
2746
	UCHAR ucGPIOID;		/*  GPIO_ID, find the corresponding ID in GPIO_LUT table */
3419
#define GPIO_PIN_TYPE_HW_CONTROL        0x20
Line -... Line 3420...
-
 
3420
 
2747
	UCHAR ucGPIO_PinState;	/*  Pin state showing how to set-up the pin */
3421
//For GPIO_PIN_TYPE_OUTPUT the following is defined 
-
 
3422
#define GPIO_PIN_OUTPUT_STATE_MASK      0x01
2748
} ATOM_GPIO_PIN_CONTROL_PAIR;
3423
#define GPIO_PIN_OUTPUT_STATE_SHIFT     0
2749
 
3424
#define GPIO_PIN_STATE_ACTIVE_LOW       0x0
2750
typedef struct _ATOM_OBJECT_GPIO_CNTL_RECORD {
3425
#define GPIO_PIN_STATE_ACTIVE_HIGH      0x1
2751
	ATOM_COMMON_RECORD_HEADER sheader;
3426
 
2752
	UCHAR ucFlags;		/*  Future expnadibility */
3427
// Indexes to GPIO array in GLSync record 
Line 2753... Line 3428...
2753
	UCHAR ucNumberOfPins;	/*  Number of GPIO pins used to control the object */
3428
#define ATOM_GPIO_INDEX_GLSYNC_REFCLK    0
-
 
3429
#define ATOM_GPIO_INDEX_GLSYNC_HSYNC     1
2754
	ATOM_GPIO_PIN_CONTROL_PAIR asGpio[1];	/*  the real gpio pin pair determined by number of pins ucNumberOfPins */
3430
#define ATOM_GPIO_INDEX_GLSYNC_VSYNC     2
2755
} ATOM_OBJECT_GPIO_CNTL_RECORD;
3431
#define ATOM_GPIO_INDEX_GLSYNC_SWAP_REQ  3
2756
 
3432
#define ATOM_GPIO_INDEX_GLSYNC_SWAP_GNT  4
2757
/* Definitions for GPIO pin state */
3433
#define ATOM_GPIO_INDEX_GLSYNC_INTERRUPT 5
2758
#define GPIO_PIN_TYPE_INPUT             0x00
3434
#define ATOM_GPIO_INDEX_GLSYNC_V_RESET   6
Line 2759... Line 3435...
2759
#define GPIO_PIN_TYPE_OUTPUT            0x10
3435
#define ATOM_GPIO_INDEX_GLSYNC_MAX       7
2760
#define GPIO_PIN_TYPE_HW_CONTROL        0x20
3436
 
2761
 
3437
typedef struct  _ATOM_ENCODER_DVO_CF_RECORD
Line -... Line 3438...
-
 
3438
{
-
 
3439
	ATOM_COMMON_RECORD_HEADER sheader;
-
 
3440
  ULONG                       ulStrengthControl;      // DVOA strength control for CF
-
 
3441
	UCHAR ucPadding[2];
-
 
3442
}ATOM_ENCODER_DVO_CF_RECORD;
-
 
3443
 
-
 
3444
// value for ATOM_CONNECTOR_CF_RECORD.ucConnectedDvoBundle
-
 
3445
#define ATOM_CONNECTOR_CF_RECORD_CONNECTED_UPPER12BITBUNDLEA   1
-
 
3446
#define ATOM_CONNECTOR_CF_RECORD_CONNECTED_LOWER12BITBUNDLEB   2
-
 
3447
 
-
 
3448
typedef struct  _ATOM_CONNECTOR_CF_RECORD
-
 
3449
{
-
 
3450
	ATOM_COMMON_RECORD_HEADER sheader;
-
 
3451
	USHORT usMaxPixClk;
-
 
3452
	UCHAR ucFlowCntlGpioId;
-
 
3453
	UCHAR ucSwapCntlGpioId;
-
 
3454
	UCHAR ucConnectedDvoBundle;
-
 
3455
	UCHAR ucPadding;
-
 
3456
}ATOM_CONNECTOR_CF_RECORD;
-
 
3457
 
-
 
3458
typedef struct  _ATOM_CONNECTOR_HARDCODE_DTD_RECORD
-
 
3459
{
-
 
3460
	ATOM_COMMON_RECORD_HEADER sheader;
-
 
3461
	ATOM_DTD_FORMAT asTiming;
2762
/* For GPIO_PIN_TYPE_OUTPUT the following is defined */
3462
}ATOM_CONNECTOR_HARDCODE_DTD_RECORD;
2763
#define GPIO_PIN_OUTPUT_STATE_MASK      0x01
3463
 
2764
#define GPIO_PIN_OUTPUT_STATE_SHIFT     0
3464
typedef struct _ATOM_CONNECTOR_PCIE_SUBCONNECTOR_RECORD
2765
#define GPIO_PIN_STATE_ACTIVE_LOW       0x0
3465
{
-
 
3466
  ATOM_COMMON_RECORD_HEADER   sheader;                //ATOM_CONNECTOR_PCIE_SUBCONNECTOR_RECORD_TYPE
2766
#define GPIO_PIN_STATE_ACTIVE_HIGH      0x1
3467
  UCHAR                       ucSubConnectorType;     //CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_D|X_ID_DUAL_LINK_DVI_D|HDMI_TYPE_A
2767
 
3468
	UCHAR ucReserved;
2768
typedef struct _ATOM_ENCODER_DVO_CF_RECORD {
3469
}ATOM_CONNECTOR_PCIE_SUBCONNECTOR_RECORD;
2769
	ATOM_COMMON_RECORD_HEADER sheader;
3470
 
2770
	ULONG ulStrengthControl;	/*  DVOA strength control for CF */
3471
 
2771
	UCHAR ucPadding[2];
3472
typedef struct _ATOM_ROUTER_DDC_PATH_SELECT_RECORD
2772
} ATOM_ENCODER_DVO_CF_RECORD;
3473
{
2773
 
3474
	ATOM_COMMON_RECORD_HEADER sheader;
2774
/*  value for ATOM_CONNECTOR_CF_RECORD.ucConnectedDvoBundle */
3475
	UCHAR												ucMuxType;							//decide the number of ucMuxState, =0, no pin state, =1: single state with complement, >1: multiple state
2775
#define ATOM_CONNECTOR_CF_RECORD_CONNECTED_UPPER12BITBUNDLEA   1
3476
	UCHAR ucMuxControlPin;
Line 2776... Line 3477...
2776
#define ATOM_CONNECTOR_CF_RECORD_CONNECTED_LOWER12BITBUNDLEB   2
3477
	UCHAR												ucMuxState[2];					//for alligment purpose
-
 
3478
}ATOM_ROUTER_DDC_PATH_SELECT_RECORD;
2777
 
3479
 
2778
typedef struct _ATOM_CONNECTOR_CF_RECORD {
3480
typedef struct _ATOM_ROUTER_DATA_CLOCK_PATH_SELECT_RECORD
2779
	ATOM_COMMON_RECORD_HEADER sheader;
3481
{
2780
	USHORT usMaxPixClk;
3482
	ATOM_COMMON_RECORD_HEADER sheader;
Line -... Line 3483...
-
 
3483
	UCHAR ucMuxType;
2781
	UCHAR ucFlowCntlGpioId;
3484
	UCHAR ucMuxControlPin;
-
 
3485
	UCHAR												ucMuxState[2];					//for alligment purpose
2782
	UCHAR ucSwapCntlGpioId;
3486
}ATOM_ROUTER_DATA_CLOCK_PATH_SELECT_RECORD;
2783
	UCHAR ucConnectedDvoBundle;
3487
 
2784
	UCHAR ucPadding;
3488
// define ucMuxType
2785
} ATOM_CONNECTOR_CF_RECORD;
3489
#define ATOM_ROUTER_MUX_PIN_STATE_MASK								0x0f
2786
 
3490
#define ATOM_ROUTER_MUX_PIN_SINGLE_STATE_COMPLEMENT		0x01
2787
typedef struct _ATOM_CONNECTOR_HARDCODE_DTD_RECORD {
3491
 
2788
	ATOM_COMMON_RECORD_HEADER sheader;
3492
typedef struct _ATOM_CONNECTOR_HPDPIN_LUT_RECORD     //record for ATOM_CONNECTOR_HPDPIN_LUT_RECORD_TYPE
2789
	ATOM_DTD_FORMAT asTiming;
3493
{
Line -... Line 3494...
-
 
3494
  ATOM_COMMON_RECORD_HEADER   sheader;
-
 
3495
  UCHAR                       ucHPDPINMap[MAX_NUMBER_OF_EXT_HPDPIN_LUT_ENTRIES];  //An fixed size array which maps external pins to internal GPIO_PIN_INFO table 
-
 
3496
}ATOM_CONNECTOR_HPDPIN_LUT_RECORD;
-
 
3497
 
-
 
3498
typedef struct _ATOM_CONNECTOR_AUXDDC_LUT_RECORD  //record for ATOM_CONNECTOR_AUXDDC_LUT_RECORD_TYPE
-
 
3499
{
-
 
3500
  ATOM_COMMON_RECORD_HEADER   sheader;
-
 
3501
  ATOM_I2C_ID_CONFIG          ucAUXDDCMap[MAX_NUMBER_OF_EXT_AUXDDC_LUT_ENTRIES];  //An fixed size array which maps external pins to internal DDC ID
-
 
3502
}ATOM_CONNECTOR_AUXDDC_LUT_RECORD;
-
 
3503
 
-
 
3504
typedef struct _ATOM_OBJECT_LINK_RECORD
-
 
3505
{
-
 
3506
  ATOM_COMMON_RECORD_HEADER   sheader;
2790
} ATOM_CONNECTOR_HARDCODE_DTD_RECORD;
3507
  USHORT                      usObjectID;         //could be connector, encorder or other object in object.h
-
 
3508
}ATOM_OBJECT_LINK_RECORD;
2791
 
3509
 
2792
typedef struct _ATOM_CONNECTOR_PCIE_SUBCONNECTOR_RECORD {
3510
typedef struct _ATOM_CONNECTOR_REMOTE_CAP_RECORD
2793
	ATOM_COMMON_RECORD_HEADER sheader;	/* ATOM_CONNECTOR_PCIE_SUBCONNECTOR_RECORD_TYPE */
3511
{
2794
	UCHAR ucSubConnectorType;	/* CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_D|X_ID_DUAL_LINK_DVI_D|HDMI_TYPE_A */
3512
  ATOM_COMMON_RECORD_HEADER   sheader;
2795
	UCHAR ucReserved;
3513
  USHORT                      usReserved;
2796
} ATOM_CONNECTOR_PCIE_SUBCONNECTOR_RECORD;
3514
}ATOM_CONNECTOR_REMOTE_CAP_RECORD;
2797
 
3515
 
2798
typedef struct _ATOM_ROUTER_DDC_PATH_SELECT_RECORD {
3516
/****************************************************************************/
Line 2799... Line 3517...
2799
	ATOM_COMMON_RECORD_HEADER sheader;
3517
// ASIC voltage data table
2800
	UCHAR ucMuxType;	/* decide the number of ucMuxState, =0, no pin state, =1: single state with complement, >1: multiple state */
3518
/****************************************************************************/
2801
	UCHAR ucMuxControlPin;
3519
typedef struct  _ATOM_VOLTAGE_INFO_HEADER
2802
	UCHAR ucMuxState[2];	/* for alligment purpose */
3520
{
2803
} ATOM_ROUTER_DDC_PATH_SELECT_RECORD;
3521
   USHORT   usVDDCBaseLevel;                //In number of 50mv unit
2804
 
3522
   USHORT   usReserved;                     //For possible extension table offset
2805
typedef struct _ATOM_ROUTER_DATA_CLOCK_PATH_SELECT_RECORD {
3523
	UCHAR ucNumOfVoltageEntries;
2806
	ATOM_COMMON_RECORD_HEADER sheader;
3524
	UCHAR ucBytesPerVoltageEntry;
Line 2807... Line 3525...
2807
	UCHAR ucMuxType;
3525
   UCHAR    ucVoltageStep;                  //Indicating in how many mv increament is one step, 0.5mv unit
-
 
3526
	UCHAR ucDefaultVoltageEntry;
2808
	UCHAR ucMuxControlPin;
3527
	UCHAR ucVoltageControlI2cLine;
2809
	UCHAR ucMuxState[2];	/* for alligment purpose */
3528
	UCHAR ucVoltageControlAddress;
2810
} ATOM_ROUTER_DATA_CLOCK_PATH_SELECT_RECORD;
3529
	UCHAR ucVoltageControlOffset;
2811
 
3530
}ATOM_VOLTAGE_INFO_HEADER;
2812
/*  define ucMuxType */
3531
 
Line -... Line 3532...
-
 
3532
typedef struct  _ATOM_VOLTAGE_INFO
-
 
3533
{
-
 
3534
	ATOM_COMMON_TABLE_HEADER sHeader;
-
 
3535
	ATOM_VOLTAGE_INFO_HEADER viHeader;
-
 
3536
   UCHAR    ucVoltageEntries[64];            //64 is for allocation, the actual number of entry is present at ucNumOfVoltageEntries*ucBytesPerVoltageEntry
-
 
3537
}ATOM_VOLTAGE_INFO;
-
 
3538
 
-
 
3539
 
2813
#define ATOM_ROUTER_MUX_PIN_STATE_MASK								0x0f
3540
typedef struct  _ATOM_VOLTAGE_FORMULA
-
 
3541
{
2814
#define ATOM_ROUTER_MUX_PIN_SINGLE_STATE_COMPLEMENT		0x01
3542
   USHORT   usVoltageBaseLevel;             // In number of 1mv unit
2815
 
3543
   USHORT   usVoltageStep;                  // Indicating in how many mv increament is one step, 1mv unit
2816
/****************************************************************************/
3544
	 UCHAR		ucNumOfVoltageEntries;					// Number of Voltage Entry, which indicate max Voltage
Line -... Line 3545...
-
 
3545
	 UCHAR		ucFlag;													// bit0=0 :step is 1mv =1 0.5mv
-
 
3546
	 UCHAR		ucBaseVID;											// if there is no lookup table, VID= BaseVID + ( Vol - BaseLevle ) /VoltageStep
-
 
3547
	UCHAR ucReserved;
-
 
3548
	 UCHAR		ucVIDAdjustEntries[32];					// 32 is for allocation, the actual number of entry is present at ucNumOfVoltageEntries
-
 
3549
}ATOM_VOLTAGE_FORMULA;
-
 
3550
 
2817
/*  ASIC voltage data table */
3551
typedef struct  _VOLTAGE_LUT_ENTRY
-
 
3552
{
2818
/****************************************************************************/
3553
	 USHORT		usVoltageCode;									// The Voltage ID, either GPIO or I2C code
2819
typedef struct _ATOM_VOLTAGE_INFO_HEADER {
3554
	 USHORT		usVoltageValue;									// The corresponding Voltage Value, in mV
2820
	USHORT usVDDCBaseLevel;	/* In number of 50mv unit */
3555
}VOLTAGE_LUT_ENTRY;
2821
	USHORT usReserved;	/* For possible extension table offset */
3556
 
Line 2822... Line 3557...
2822
	UCHAR ucNumOfVoltageEntries;
3557
typedef struct  _ATOM_VOLTAGE_FORMULA_V2
-
 
3558
{
2823
	UCHAR ucBytesPerVoltageEntry;
3559
	 UCHAR		ucNumOfVoltageEntries;					// Number of Voltage Entry, which indicate max Voltage
2824
	UCHAR ucVoltageStep;	/* Indicating in how many mv increament is one step, 0.5mv unit */
3560
	 UCHAR		ucReserved[3];
2825
	UCHAR ucDefaultVoltageEntry;
3561
	 VOLTAGE_LUT_ENTRY asVIDAdjustEntries[32];// 32 is for allocation, the actual number of entries is in ucNumOfVoltageEntries
2826
	UCHAR ucVoltageControlI2cLine;
3562
}ATOM_VOLTAGE_FORMULA_V2;
2827
	UCHAR ucVoltageControlAddress;
3563
 
2828
	UCHAR ucVoltageControlOffset;
3564
typedef struct _ATOM_VOLTAGE_CONTROL
2829
} ATOM_VOLTAGE_INFO_HEADER;
3565
{
Line 2830... Line 3566...
2830
 
3566
	UCHAR		 ucVoltageControlId;							//Indicate it is controlled by I2C or GPIO or HW state machine		
2831
typedef struct _ATOM_VOLTAGE_INFO {
3567
	UCHAR ucVoltageControlI2cLine;
2832
	ATOM_COMMON_TABLE_HEADER sHeader;
3568
	UCHAR ucVoltageControlAddress;
2833
	ATOM_VOLTAGE_INFO_HEADER viHeader;
3569
	UCHAR ucVoltageControlOffset;
Line 2834... Line 3570...
2834
	UCHAR ucVoltageEntries[64];	/* 64 is for allocation, the actual number of entry is present at ucNumOfVoltageEntries*ucBytesPerVoltageEntry */
3570
  USHORT   usGpioPin_AIndex;								//GPIO_PAD register index
-
 
3571
  UCHAR    ucGpioPinBitShift[9];						//at most 8 pin support 255 VIDs, termintate with 0xff
2835
} ATOM_VOLTAGE_INFO;
3572
	UCHAR ucReserved;
2836
 
3573
}ATOM_VOLTAGE_CONTROL;
2837
typedef struct _ATOM_VOLTAGE_FORMULA {
3574
 
Line 2838... Line 3575...
2838
	USHORT usVoltageBaseLevel;	/*  In number of 1mv unit */
3575
// Define ucVoltageControlId
-
 
3576
#define	VOLTAGE_CONTROLLED_BY_HW							0x00
2839
	USHORT usVoltageStep;	/*  Indicating in how many mv increament is one step, 1mv unit */
3577
#define	VOLTAGE_CONTROLLED_BY_I2C_MASK				0x7F
2840
	UCHAR ucNumOfVoltageEntries;	/*  Number of Voltage Entry, which indicate max Voltage */
3578
#define	VOLTAGE_CONTROLLED_BY_GPIO						0x80
2841
	UCHAR ucFlag;		/*  bit0=0 :step is 1mv =1 0.5mv */
3579
#define	VOLTAGE_CONTROL_ID_LM64								0x01									//I2C control, used for R5xx Core Voltage
2842
	UCHAR ucBaseVID;	/*  if there is no lookup table, VID= BaseVID + ( Vol - BaseLevle ) /VoltageStep */
3580
#define	VOLTAGE_CONTROL_ID_DAC								0x02									//I2C control, used for R5xx/R6xx MVDDC,MVDDQ or VDDCI
2843
	UCHAR ucReserved;
3581
#define	VOLTAGE_CONTROL_ID_VT116xM						0x03									//I2C control, used for R6xx Core Voltage
2844
	UCHAR ucVIDAdjustEntries[32];	/*  32 is for allocation, the actual number of entry is present at ucNumOfVoltageEntries */
3582
#define VOLTAGE_CONTROL_ID_DS4402							0x04
2845
} ATOM_VOLTAGE_FORMULA;
3583
 
2846
 
3584
typedef struct  _ATOM_VOLTAGE_OBJECT
2847
typedef struct _ATOM_VOLTAGE_CONTROL {
3585
{
2848
	UCHAR ucVoltageControlId;	/* Indicate it is controlled by I2C or GPIO or HW state machine */
3586
 	 UCHAR		ucVoltageType;									//Indicate Voltage Source: VDDC, MVDDC, MVDDQ or MVDDCI	 
Line 2849... Line 3587...
2849
	UCHAR ucVoltageControlI2cLine;
3587
	 UCHAR		ucSize;													//Size of Object	
-
 
3588
	 ATOM_VOLTAGE_CONTROL			asControl;			//describ how to control 	 
2850
	UCHAR ucVoltageControlAddress;
3589
 	 ATOM_VOLTAGE_FORMULA			asFormula;			//Indicate How to convert real Voltage to VID 
2851
	UCHAR ucVoltageControlOffset;
3590
}ATOM_VOLTAGE_OBJECT;
2852
	USHORT usGpioPin_AIndex;	/* GPIO_PAD register index */
3591
 
2853
	UCHAR ucGpioPinBitShift[9];	/* at most 8 pin support 255 VIDs, termintate with 0xff */
3592
typedef struct  _ATOM_VOLTAGE_OBJECT_V2
Line -... Line 3593...
-
 
3593
{
2854
	UCHAR ucReserved;
3594
 	 UCHAR		ucVoltageType;									//Indicate Voltage Source: VDDC, MVDDC, MVDDQ or MVDDCI	 
2855
} ATOM_VOLTAGE_CONTROL;
3595
	 UCHAR		ucSize;													//Size of Object	
2856
 
3596
	 ATOM_VOLTAGE_CONTROL			asControl;			//describ how to control 	 
2857
/*  Define ucVoltageControlId */
3597
 	 ATOM_VOLTAGE_FORMULA_V2	asFormula;			//Indicate How to convert real Voltage to VID 
2858
#define	VOLTAGE_CONTROLLED_BY_HW							0x00
3598
}ATOM_VOLTAGE_OBJECT_V2;
2859
#define	VOLTAGE_CONTROLLED_BY_I2C_MASK				0x7F
3599
 
Line 2860... Line 3600...
2860
#define	VOLTAGE_CONTROLLED_BY_GPIO						0x80
3600
typedef struct  _ATOM_VOLTAGE_OBJECT_INFO
2861
#define	VOLTAGE_CONTROL_ID_LM64								0x01	/* I2C control, used for R5xx Core Voltage */
3601
{
2862
#define	VOLTAGE_CONTROL_ID_DAC								0x02	/* I2C control, used for R5xx/R6xx MVDDC,MVDDQ or VDDCI */
3602
   ATOM_COMMON_TABLE_HEADER	sHeader; 
2863
#define	VOLTAGE_CONTROL_ID_VT116xM						0x03	/* I2C control, used for R6xx Core Voltage */
3603
	 ATOM_VOLTAGE_OBJECT			asVoltageObj[3];	//Info for Voltage control	  	 
Line -... Line 3604...
-
 
3604
}ATOM_VOLTAGE_OBJECT_INFO;
-
 
3605
 
-
 
3606
typedef struct  _ATOM_VOLTAGE_OBJECT_INFO_V2
-
 
3607
{
-
 
3608
	ATOM_COMMON_TABLE_HEADER sHeader;
-
 
3609
	 ATOM_VOLTAGE_OBJECT_V2			asVoltageObj[3];	//Info for Voltage control	  	 
-
 
3610
}ATOM_VOLTAGE_OBJECT_INFO_V2;
-
 
3611
 
-
 
3612
typedef struct  _ATOM_LEAKID_VOLTAGE
-
 
3613
{
-
 
3614
	UCHAR ucLeakageId;
-
 
3615
	UCHAR ucReserved;
-
 
3616
	USHORT usVoltage;
-
 
3617
}ATOM_LEAKID_VOLTAGE;
-
 
3618
 
-
 
3619
typedef struct  _ATOM_ASIC_PROFILE_VOLTAGE
-
 
3620
{
-
 
3621
	UCHAR ucProfileId;
-
 
3622
	UCHAR ucReserved;
-
 
3623
	USHORT usSize;
-
 
3624
	USHORT usEfuseSpareStartAddr;
-
 
3625
	USHORT	usFuseIndex[8];												//from LSB to MSB, Max 8bit,end of 0xffff if less than 8 efuse id, 
-
 
3626
	ATOM_LEAKID_VOLTAGE					asLeakVol[2];			//Leakid and relatd voltage
-
 
3627
}ATOM_ASIC_PROFILE_VOLTAGE;
-
 
3628
 
-
 
3629
//ucProfileId
-
 
3630
#define	ATOM_ASIC_PROFILE_ID_EFUSE_VOLTAGE			1
-
 
3631
#define	ATOM_ASIC_PROFILE_ID_EFUSE_PERFORMANCE_VOLTAGE			1
-
 
3632
#define	ATOM_ASIC_PROFILE_ID_EFUSE_THERMAL_VOLTAGE					2
-
 
3633
 
-
 
3634
typedef struct  _ATOM_ASIC_PROFILING_INFO
-
 
3635
{
-
 
3636
	ATOM_COMMON_TABLE_HEADER asHeader;
-
 
3637
	ATOM_ASIC_PROFILE_VOLTAGE asVoltage;
-
 
3638
}ATOM_ASIC_PROFILING_INFO;
-
 
3639
 
-
 
3640
typedef struct _ATOM_POWER_SOURCE_OBJECT
-
 
3641
{
-
 
3642
	UCHAR	ucPwrSrcId;													// Power source
-
 
3643
	UCHAR	ucPwrSensorType;										// GPIO, I2C or none
-
 
3644
	UCHAR	ucPwrSensId;											  // if GPIO detect, it is GPIO id,  if I2C detect, it is I2C id
-
 
3645
	UCHAR	ucPwrSensSlaveAddr;									// Slave address if I2C detect
-
 
3646
	UCHAR ucPwrSensRegIndex;									// I2C register Index if I2C detect
-
 
3647
	UCHAR ucPwrSensRegBitMask;								// detect which bit is used if I2C detect
-
 
3648
	UCHAR	ucPwrSensActiveState;								// high active or low active
-
 
3649
	UCHAR	ucReserve[3];												// reserve		
-
 
3650
	USHORT usSensPwr;													// in unit of watt
-
 
3651
}ATOM_POWER_SOURCE_OBJECT;
-
 
3652
 
-
 
3653
typedef struct _ATOM_POWER_SOURCE_INFO
-
 
3654
{
-
 
3655
	ATOM_COMMON_TABLE_HEADER asHeader;
-
 
3656
	UCHAR asPwrbehave[16];
-
 
3657
	ATOM_POWER_SOURCE_OBJECT asPwrObj[1];
-
 
3658
}ATOM_POWER_SOURCE_INFO;
-
 
3659
 
-
 
3660
 
-
 
3661
//Define ucPwrSrcId
-
 
3662
#define POWERSOURCE_PCIE_ID1						0x00
-
 
3663
#define POWERSOURCE_6PIN_CONNECTOR_ID1	0x01
-
 
3664
#define POWERSOURCE_8PIN_CONNECTOR_ID1	0x02
-
 
3665
#define POWERSOURCE_6PIN_CONNECTOR_ID2	0x04
2864
#define VOLTAGE_CONTROL_ID_DS4402							0x04
3666
#define POWERSOURCE_8PIN_CONNECTOR_ID2	0x08
2865
 
3667
 
2866
typedef struct _ATOM_VOLTAGE_OBJECT {
3668
//define ucPwrSensorId
2867
	UCHAR ucVoltageType;	/* Indicate Voltage Source: VDDC, MVDDC, MVDDQ or MVDDCI */
3669
#define POWER_SENSOR_ALWAYS							0x00
2868
	UCHAR ucSize;		/* Size of Object */
3670
#define POWER_SENSOR_GPIO								0x01
2869
	ATOM_VOLTAGE_CONTROL asControl;	/* describ how to control */
3671
#define POWER_SENSOR_I2C								0x02
Line 2870... Line 3672...
2870
	ATOM_VOLTAGE_FORMULA asFormula;	/* Indicate How to convert real Voltage to VID */
3672
 
2871
} ATOM_VOLTAGE_OBJECT;
3673
typedef struct _ATOM_INTEGRATED_SYSTEM_INFO_V6
-
 
3674
{
2872
 
3675
  ATOM_COMMON_TABLE_HEADER   sHeader;
2873
typedef struct _ATOM_VOLTAGE_OBJECT_INFO {
3676
  ULONG  ulBootUpEngineClock;
2874
	ATOM_COMMON_TABLE_HEADER sHeader;
3677
  ULONG  ulDentistVCOFreq;          
Line -... Line 3678...
-
 
3678
  ULONG  ulBootUpUMAClock;          
2875
	ATOM_VOLTAGE_OBJECT asVoltageObj[3];	/* Info for Voltage control */
3679
  ULONG  ulReserved1[8];            
2876
} ATOM_VOLTAGE_OBJECT_INFO;
3680
  ULONG  ulBootUpReqDisplayVector;
-
 
3681
  ULONG  ulOtherDisplayMisc;
2877
 
3682
  ULONG  ulGPUCapInfo;
2878
typedef struct _ATOM_LEAKID_VOLTAGE {
3683
  ULONG  ulReserved2[3];            
2879
	UCHAR ucLeakageId;
3684
  ULONG  ulSystemConfig;            
2880
	UCHAR ucReserved;
3685
  ULONG  ulCPUCapInfo;              
2881
	USHORT usVoltage;
3686
  USHORT usMaxNBVoltage;  
2882
} ATOM_LEAKID_VOLTAGE;
3687
  USHORT usMinNBVoltage;  
Line 2883... Line 3688...
2883
 
3688
  USHORT usBootUpNBVoltage;         
2884
typedef struct _ATOM_ASIC_PROFILE_VOLTAGE {
3689
  USHORT usExtDispConnInfoOffset;  
-
 
3690
  UCHAR  ucHtcTmpLmt;   
2885
	UCHAR ucProfileId;
3691
  UCHAR  ucTjOffset;    
2886
	UCHAR ucReserved;
3692
  UCHAR  ucMemoryType;  
2887
	USHORT usSize;
3693
  UCHAR  ucUMAChannelNumber;
Line 2888... Line 3694...
2888
	USHORT usEfuseSpareStartAddr;
3694
  ULONG  ulCSR_M3_ARB_CNTL_DEFAULT[10];  
2889
	USHORT usFuseIndex[8];	/* from LSB to MSB, Max 8bit,end of 0xffff if less than 8 efuse id, */
3695
  ULONG  ulCSR_M3_ARB_CNTL_UVD[10]; 
Line 2890... Line 3696...
2890
	ATOM_LEAKID_VOLTAGE asLeakVol[2];	/* Leakid and relatd voltage */
3696
  ULONG  ulCSR_M3_ARB_CNTL_FS3D[10];
2891
} ATOM_ASIC_PROFILE_VOLTAGE;
3697
  ULONG  ulReserved3[42]; 
Line 2892... Line 3698...
2892
 
3698
  ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO sExtDispConnInfo;   
-
 
3699
}ATOM_INTEGRATED_SYSTEM_INFO_V6;   
2893
/* ucProfileId */
3700
 
2894
#define	ATOM_ASIC_PROFILE_ID_EFUSE_VOLTAGE			1
3701
/**********************************************************************************************************************
2895
#define	ATOM_ASIC_PROFILE_ID_EFUSE_PERFORMANCE_VOLTAGE			1
3702
// ATOM_INTEGRATED_SYSTEM_INFO_V6 Description
2896
#define	ATOM_ASIC_PROFILE_ID_EFUSE_THERMAL_VOLTAGE					2
3703
//ulBootUpEngineClock:              VBIOS bootup Engine clock frequency, in 10kHz unit. 
2897
 
3704
//ulDentistVCOFreq:                 Dentist VCO clock in 10kHz unit. 
2898
typedef struct _ATOM_ASIC_PROFILING_INFO {
3705
//ulBootUpUMAClock:                 System memory boot up clock frequency in 10Khz unit. 
2899
	ATOM_COMMON_TABLE_HEADER asHeader;
3706
//ulReserved1[8]                    Reserved by now, must be 0x0. 
Line -... Line 3707...
-
 
3707
//ulBootUpReqDisplayVector	        VBIOS boot up display IDs
2900
	ATOM_ASIC_PROFILE_VOLTAGE asVoltage;
3708
//                                  ATOM_DEVICE_CRT1_SUPPORT                  0x0001
2901
} ATOM_ASIC_PROFILING_INFO;
3709
//                                  ATOM_DEVICE_CRT2_SUPPORT                  0x0010
2902
 
3710
//                                  ATOM_DEVICE_DFP1_SUPPORT                  0x0008 
2903
typedef struct _ATOM_POWER_SOURCE_OBJECT {
3711
//                                  ATOM_DEVICE_DFP6_SUPPORT                  0x0040 
-
 
3712
//                                  ATOM_DEVICE_DFP2_SUPPORT                  0x0080       
-
 
3713
//                                  ATOM_DEVICE_DFP3_SUPPORT                  0x0200       
-
 
3714
//                                  ATOM_DEVICE_DFP4_SUPPORT                  0x0400        
-
 
3715
//                                  ATOM_DEVICE_DFP5_SUPPORT                  0x0800
-
 
3716
//                                  ATOM_DEVICE_LCD1_SUPPORT                  0x0002
-
 
3717
//ulOtherDisplayMisc      	        Other display related flags, not defined yet. 
-
 
3718
//ulGPUCapInfo                      TBD
-
 
3719
//ulReserved2[3]                    must be 0x0 for the reserved.
-
 
3720
//ulSystemConfig                    TBD
-
 
3721
//ulCPUCapInfo                      TBD
-
 
3722
//usMaxNBVoltage                    High NB voltage in unit of mv, calculated using current VDDNB (D24F2xDC) and VDDNB offset fuse. 
-
 
3723
//usMinNBVoltage                    Low NB voltage in unit of mv, calculated using current VDDNB (D24F2xDC) and VDDNB offset fuse.
-
 
3724
//usBootUpNBVoltage                 Boot up NB voltage in unit of mv.
-
 
3725
//ucHtcTmpLmt                       Bit [22:16] of D24F3x64 Thermal Control (HTC) Register.
-
 
3726
//ucTjOffset                        Bit [28:22] of D24F3xE4 Thermtrip Status Register,may not be needed.
-
 
3727
//ucMemoryType                      [3:0]=1:DDR1;=2:DDR2;=3:DDR3.[7:4] is reserved.
-
 
3728
//ucUMAChannelNumber      	        System memory channel numbers. 
-
 
3729
//usExtDispConnectionInfoOffset     ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO offset relative to beginning of this table. 
-
 
3730
//ulCSR_M3_ARB_CNTL_DEFAULT[10]     Arrays with values for CSR M3 arbiter for default
-
 
3731
//ulCSR_M3_ARB_CNTL_UVD[10]         Arrays with values for CSR M3 arbiter for UVD playback.
-
 
3732
//ulCSR_M3_ARB_CNTL_FS3D[10]        Arrays with values for CSR M3 arbiter for Full Screen 3D applications.
-
 
3733
**********************************************************************************************************************/
-
 
3734
 
-
 
3735
/**************************************************************************/
Line 2904... Line 3736...
2904
	UCHAR ucPwrSrcId;	/*  Power source */
3736
// This portion is only used when ext thermal chip or engine/memory clock SS chip is populated on a design
-
 
3737
//Memory SS Info Table
2905
	UCHAR ucPwrSensorType;	/*  GPIO, I2C or none */
3738
//Define Memory Clock SS chip ID
2906
	UCHAR ucPwrSensId;	/*  if GPIO detect, it is GPIO id,  if I2C detect, it is I2C id */
3739
#define ICS91719  1
2907
	UCHAR ucPwrSensSlaveAddr;	/*  Slave address if I2C detect */
3740
#define ICS91720  2
Line -... Line 3741...
-
 
3741
 
-
 
3742
//Define one structure to inform SW a "block of data" writing to external SS chip via I2C protocol
-
 
3743
typedef struct _ATOM_I2C_DATA_RECORD
-
 
3744
{
-
 
3745
  UCHAR         ucNunberOfBytes;                                              //Indicates how many bytes SW needs to write to the external ASIC for one block, besides to "Start" and "Stop"
-
 
3746
  UCHAR         ucI2CData[1];                                                 //I2C data in bytes, should be less than 16 bytes usually
-
 
3747
}ATOM_I2C_DATA_RECORD;
-
 
3748
 
-
 
3749
 
-
 
3750
//Define one structure to inform SW how many blocks of data writing to external SS chip via I2C protocol, in addition to other information
-
 
3751
typedef struct _ATOM_I2C_DEVICE_SETUP_INFO
-
 
3752
{
-
 
3753
  ATOM_I2C_ID_CONFIG_ACCESS       sucI2cId;               //I2C line and HW/SW assisted cap.
-
 
3754
  UCHAR		                        ucSSChipID;             //SS chip being used
-
 
3755
  UCHAR		                        ucSSChipSlaveAddr;      //Slave Address to set up this SS chip
-
 
3756
  UCHAR                           ucNumOfI2CDataRecords;  //number of data block
-
 
3757
	ATOM_I2C_DATA_RECORD asI2CData[1];
-
 
3758
}ATOM_I2C_DEVICE_SETUP_INFO;
-
 
3759
 
-
 
3760
//==========================================================================================
-
 
3761
typedef struct  _ATOM_ASIC_MVDD_INFO
-
 
3762
{
-
 
3763
	ATOM_COMMON_TABLE_HEADER sHeader;
-
 
3764
	ATOM_I2C_DEVICE_SETUP_INFO asI2CSetup[1];
2908
	UCHAR ucPwrSensRegIndex;	/*  I2C register Index if I2C detect */
3765
}ATOM_ASIC_MVDD_INFO;
2909
	UCHAR ucPwrSensRegBitMask;	/*  detect which bit is used if I2C detect */
3766
 
2910
	UCHAR ucPwrSensActiveState;	/*  high active or low active */
3767
//==========================================================================================
2911
	UCHAR ucReserve[3];	/*  reserve */
3768
#define ATOM_MCLK_SS_INFO         ATOM_ASIC_MVDD_INFO
2912
	USHORT usSensPwr;	/*  in unit of watt */
3769
 
2913
} ATOM_POWER_SOURCE_OBJECT;
3770
//==========================================================================================
Line 2993... Line 3850...
2993
#define ATOM_ACC_CHANGE_INFO_DEF      6
3850
#define ATOM_ACC_CHANGE_INFO_DEF      6
2994
#define ATOM_DOS_MODE_INFO_DEF        7
3851
#define ATOM_DOS_MODE_INFO_DEF        7
2995
#define ATOM_I2C_CHANNEL_STATUS_DEF   8
3852
#define ATOM_I2C_CHANNEL_STATUS_DEF   8
2996
#define ATOM_I2C_CHANNEL_STATUS1_DEF  9
3853
#define ATOM_I2C_CHANNEL_STATUS1_DEF  9
Line -... Line 3854...
-
 
3854
 
2997
 
3855
 
2998
/*  BIOS_0_SCRATCH Definition */
3856
// BIOS_0_SCRATCH Definition 
2999
#define ATOM_S0_CRT1_MONO               0x00000001L
3857
#define ATOM_S0_CRT1_MONO               0x00000001L
3000
#define ATOM_S0_CRT1_COLOR              0x00000002L
3858
#define ATOM_S0_CRT1_COLOR              0x00000002L
Line 3001... Line 3859...
3001
#define ATOM_S0_CRT1_MASK               (ATOM_S0_CRT1_MONO+ATOM_S0_CRT1_COLOR)
3859
#define ATOM_S0_CRT1_MASK               (ATOM_S0_CRT1_MONO+ATOM_S0_CRT1_COLOR)
Line 3006... Line 3864...
3006
 
3864
 
3007
#define ATOM_S0_CV_A                    0x00000010L
3865
#define ATOM_S0_CV_A                    0x00000010L
3008
#define ATOM_S0_CV_DIN_A                0x00000020L
3866
#define ATOM_S0_CV_DIN_A                0x00000020L
Line -... Line 3867...
-
 
3867
#define ATOM_S0_CV_MASK_A               (ATOM_S0_CV_A+ATOM_S0_CV_DIN_A)
3009
#define ATOM_S0_CV_MASK_A               (ATOM_S0_CV_A+ATOM_S0_CV_DIN_A)
3868
 
3010
 
3869
 
3011
#define ATOM_S0_CRT2_MONO               0x00000100L
3870
#define ATOM_S0_CRT2_MONO               0x00000100L
Line 3012... Line 3871...
3012
#define ATOM_S0_CRT2_COLOR              0x00000200L
3871
#define ATOM_S0_CRT2_COLOR              0x00000200L
Line 3023... Line 3882...
3023
 
3882
 
3024
#define ATOM_S0_DFP1                    0x00010000L
3883
#define ATOM_S0_DFP1                    0x00010000L
3025
#define ATOM_S0_DFP2                    0x00020000L
3884
#define ATOM_S0_DFP2                    0x00020000L
3026
#define ATOM_S0_LCD1                    0x00040000L
3885
#define ATOM_S0_LCD1                    0x00040000L
3027
#define ATOM_S0_LCD2                    0x00080000L
3886
#define ATOM_S0_LCD2                    0x00080000L
3028
#define ATOM_S0_TV2                     0x00100000L
3887
#define ATOM_S0_DFP6                    0x00100000L
3029
#define ATOM_S0_DFP3			0x00200000L
3888
#define ATOM_S0_DFP3			0x00200000L
3030
#define ATOM_S0_DFP4			0x00400000L
3889
#define ATOM_S0_DFP4			0x00400000L
Line 3031... Line -...
3031
#define ATOM_S0_DFP5			0x00800000L
-
 
3032
 
3890
#define ATOM_S0_DFP5			0x00800000L
Line 3033... Line 3891...
3033
#define ATOM_S0_DFP_MASK \
3891
 
3034
	(ATOM_S0_DFP1 | ATOM_S0_DFP2 | ATOM_S0_DFP3 | ATOM_S0_DFP4 | ATOM_S0_DFP5)
3892
#define ATOM_S0_DFP_MASK                ATOM_S0_DFP1 | ATOM_S0_DFP2 | ATOM_S0_DFP3 | ATOM_S0_DFP4 | ATOM_S0_DFP5 | ATOM_S0_DFP6
Line 3035... Line 3893...
3035
 
3893
 
3036
#define ATOM_S0_FAD_REGISTER_BUG        0x02000000L	/*  If set, indicates we are running a PCIE asic with */
3894
#define ATOM_S0_FAD_REGISTER_BUG        0x02000000L // If set, indicates we are running a PCIE asic with 
Line 3037... Line 3895...
3037
						    /*  the FAD/HDP reg access bug.  Bit is read by DAL */
3895
                                                    // the FAD/HDP reg access bug.  Bit is read by DAL, this is obsolete from RV5xx
Line 3044... Line 3902...
3044
 
3902
 
3045
#define ATOM_S0_SYSTEM_POWER_STATE_VALUE_AC     1
3903
#define ATOM_S0_SYSTEM_POWER_STATE_VALUE_AC     1
3046
#define ATOM_S0_SYSTEM_POWER_STATE_VALUE_DC     2
3904
#define ATOM_S0_SYSTEM_POWER_STATE_VALUE_DC     2
Line 3047... Line 3905...
3047
#define ATOM_S0_SYSTEM_POWER_STATE_VALUE_LITEAC 3
3905
#define ATOM_S0_SYSTEM_POWER_STATE_VALUE_LITEAC 3
3048
 
3906
 
3049
/* Byte aligned definition for BIOS usage */
3907
//Byte aligned defintion for BIOS usage
3050
#define ATOM_S0_CRT1_MONOb0             0x01
3908
#define ATOM_S0_CRT1_MONOb0             0x01
Line 3051... Line 3909...
3051
#define ATOM_S0_CRT1_COLORb0            0x02
3909
#define ATOM_S0_CRT1_COLORb0            0x02
Line 3074... Line 3932...
3074
 
3932
 
3075
#define ATOM_S0_DFP1b2                  0x01
3933
#define ATOM_S0_DFP1b2                  0x01
3076
#define ATOM_S0_DFP2b2                  0x02
3934
#define ATOM_S0_DFP2b2                  0x02
3077
#define ATOM_S0_LCD1b2                  0x04
3935
#define ATOM_S0_LCD1b2                  0x04
3078
#define ATOM_S0_LCD2b2                  0x08
3936
#define ATOM_S0_LCD2b2                  0x08
3079
#define ATOM_S0_TV2b2                   0x10
3937
#define ATOM_S0_DFP6b2                  0x10
-
 
3938
#define ATOM_S0_DFP3b2									0x20
-
 
3939
#define ATOM_S0_DFP4b2                  0x40
-
 
3940
#define ATOM_S0_DFP5b2                  0x80
Line 3080... Line 3941...
3080
#define ATOM_S0_DFP3b2									0x20
3941
 
3081
 
3942
 
Line 3082... Line 3943...
3082
#define ATOM_S0_THERMAL_STATE_MASKb3    0x1C
3943
#define ATOM_S0_THERMAL_STATE_MASKb3    0x1C
3083
#define ATOM_S0_THERMAL_STATE_SHIFTb3   2
3944
#define ATOM_S0_THERMAL_STATE_SHIFTb3   2
Line 3084... Line 3945...
3084
 
3945
 
3085
#define ATOM_S0_SYSTEM_POWER_STATE_MASKb3 0xE0
3946
#define ATOM_S0_SYSTEM_POWER_STATE_MASKb3 0xE0
3086
#define ATOM_S0_LCD1_SHIFT              18
3947
#define ATOM_S0_LCD1_SHIFT              18
Line 3087... Line 3948...
3087
 
3948
 
3088
/*  BIOS_1_SCRATCH Definition */
3949
// BIOS_1_SCRATCH Definition
3089
#define ATOM_S1_ROM_LOCATION_MASK       0x0000FFFFL
3950
#define ATOM_S1_ROM_LOCATION_MASK       0x0000FFFFL
3090
#define ATOM_S1_PCI_BUS_DEV_MASK        0xFFFF0000L
3951
#define ATOM_S1_PCI_BUS_DEV_MASK        0xFFFF0000L
Line 3091... Line -...
3091
 
-
 
3092
/*       BIOS_2_SCRATCH Definition */
-
 
3093
#define ATOM_S2_TV1_STANDARD_MASK       0x0000000FL
-
 
3094
#define ATOM_S2_CURRENT_BL_LEVEL_MASK   0x0000FF00L
-
 
3095
#define ATOM_S2_CURRENT_BL_LEVEL_SHIFT  8
-
 
3096
 
-
 
3097
#define ATOM_S2_CRT1_DPMS_STATE         0x00010000L
-
 
3098
#define ATOM_S2_LCD1_DPMS_STATE	        0x00020000L
-
 
3099
#define ATOM_S2_TV1_DPMS_STATE          0x00040000L
-
 
3100
#define ATOM_S2_DFP1_DPMS_STATE         0x00080000L
-
 
3101
#define ATOM_S2_CRT2_DPMS_STATE         0x00100000L
-
 
3102
#define ATOM_S2_LCD2_DPMS_STATE         0x00200000L
-
 
3103
#define ATOM_S2_TV2_DPMS_STATE          0x00400000L
-
 
3104
#define ATOM_S2_DFP2_DPMS_STATE         0x00800000L
-
 
3105
#define ATOM_S2_CV_DPMS_STATE           0x01000000L
-
 
3106
#define ATOM_S2_DFP3_DPMS_STATE					0x02000000L
-
 
3107
#define ATOM_S2_DFP4_DPMS_STATE					0x04000000L
-
 
3108
#define ATOM_S2_DFP5_DPMS_STATE					0x08000000L
-
 
3109
 
-
 
3110
#define ATOM_S2_DFP_DPM_STATE \
-
 
3111
	(ATOM_S2_DFP1_DPMS_STATE | ATOM_S2_DFP2_DPMS_STATE | \
-
 
3112
	 ATOM_S2_DFP3_DPMS_STATE | ATOM_S2_DFP4_DPMS_STATE | \
-
 
3113
	 ATOM_S2_DFP5_DPMS_STATE)
-
 
3114
 
-
 
3115
#define ATOM_S2_DEVICE_DPMS_STATE \
3952
 
3116
	(ATOM_S2_CRT1_DPMS_STATE + ATOM_S2_LCD1_DPMS_STATE + \
3953
//	BIOS_2_SCRATCH Definition
3117
	 ATOM_S2_TV1_DPMS_STATE + ATOM_S2_DFP_DPMS_STATE + \
3954
#define ATOM_S2_TV1_STANDARD_MASK       0x0000000FL
Line -... Line 3955...
-
 
3955
#define ATOM_S2_CURRENT_BL_LEVEL_MASK   0x0000FF00L
3118
	 ATOM_S2_CRT2_DPMS_STATE + ATOM_S2_LCD2_DPMS_STATE + \
3956
#define ATOM_S2_CURRENT_BL_LEVEL_SHIFT  8
Line 3119... Line 3957...
3119
	 ATOM_S2_TV2_DPMS_STATE + ATOM_S2_CV_DPMS_STATE)
3957
 
3120
 
3958
#define ATOM_S2_FORCEDLOWPWRMODE_STATE_MASK       0x0C000000L
3121
#define ATOM_S2_FORCEDLOWPWRMODE_STATE_MASK       0x0C000000L
3959
#define ATOM_S2_FORCEDLOWPWRMODE_STATE_MASK_SHIFT 26
3122
#define ATOM_S2_FORCEDLOWPWRMODE_STATE_MASK_SHIFT 26
3960
#define ATOM_S2_FORCEDLOWPWRMODE_STATE_CHANGE     0x10000000L
3123
#define ATOM_S2_FORCEDLOWPWRMODE_STATE_CHANGE     0x10000000L
3961
 
3124
 
3962
#define ATOM_S2_DEVICE_DPMS_STATE       0x00010000L
Line -... Line 3963...
-
 
3963
#define ATOM_S2_VRI_BRIGHT_ENABLE       0x20000000L
3125
#define ATOM_S2_VRI_BRIGHT_ENABLE       0x20000000L
3964
 
3126
 
3965
#define ATOM_S2_DISPLAY_ROTATION_0_DEGREE     0x0
3127
#define ATOM_S2_DISPLAY_ROTATION_0_DEGREE     0x0
3966
#define ATOM_S2_DISPLAY_ROTATION_90_DEGREE    0x1
3128
#define ATOM_S2_DISPLAY_ROTATION_90_DEGREE    0x1
3967
#define ATOM_S2_DISPLAY_ROTATION_180_DEGREE   0x2
3129
#define ATOM_S2_DISPLAY_ROTATION_180_DEGREE   0x2
-
 
3130
#define ATOM_S2_DISPLAY_ROTATION_270_DEGREE   0x3
-
 
3131
#define ATOM_S2_DISPLAY_ROTATION_DEGREE_SHIFT 30
-
 
3132
#define ATOM_S2_DISPLAY_ROTATION_ANGLE_MASK   0xC0000000L
-
 
3133
 
-
 
3134
/* Byte aligned definition for BIOS usage */
-
 
3135
#define ATOM_S2_TV1_STANDARD_MASKb0     0x0F
-
 
3136
#define ATOM_S2_CURRENT_BL_LEVEL_MASKb1 0xFF
-
 
3137
#define ATOM_S2_CRT1_DPMS_STATEb2       0x01
-
 
3138
#define ATOM_S2_LCD1_DPMS_STATEb2       0x02
-
 
3139
#define ATOM_S2_TV1_DPMS_STATEb2        0x04
-
 
Line 3140... Line 3968...
3140
#define ATOM_S2_DFP1_DPMS_STATEb2       0x08
3968
#define ATOM_S2_DISPLAY_ROTATION_270_DEGREE   0x3
3141
#define ATOM_S2_CRT2_DPMS_STATEb2       0x10
3969
#define ATOM_S2_DISPLAY_ROTATION_DEGREE_SHIFT 30
3142
#define ATOM_S2_LCD2_DPMS_STATEb2       0x20
3970
#define ATOM_S2_DISPLAY_ROTATION_ANGLE_MASK   0xC0000000L
3143
#define ATOM_S2_TV2_DPMS_STATEb2        0x40
3971
 
3144
#define ATOM_S2_DFP2_DPMS_STATEb2       0x80
3972
 
Line -... Line 3973...
-
 
3973
//Byte aligned defintion for BIOS usage
3145
#define ATOM_S2_CV_DPMS_STATEb3         0x01
3974
#define ATOM_S2_TV1_STANDARD_MASKb0     0x0F
3146
#define ATOM_S2_DFP3_DPMS_STATEb3				0x02
3975
#define ATOM_S2_CURRENT_BL_LEVEL_MASKb1 0xFF
3147
#define ATOM_S2_DFP4_DPMS_STATEb3				0x04
3976
#define ATOM_S2_DEVICE_DPMS_STATEb2     0x01
3148
#define ATOM_S2_DFP5_DPMS_STATEb3				0x08
3977
 
3149
 
3978
#define ATOM_S2_DEVICE_DPMS_MASKw1      0x3FF
3150
#define ATOM_S2_DEVICE_DPMS_MASKw1      0x3FF
3979
#define ATOM_S2_FORCEDLOWPWRMODE_STATE_MASKb3     0x0C
3151
#define ATOM_S2_FORCEDLOWPWRMODE_STATE_MASKb3     0x0C
3980
#define ATOM_S2_FORCEDLOWPWRMODE_STATE_CHANGEb3   0x10
3152
#define ATOM_S2_FORCEDLOWPWRMODE_STATE_CHANGEb3   0x10
3981
#define ATOM_S2_VRI_BRIGHT_ENABLEb3     0x20
3153
#define ATOM_S2_VRI_BRIGHT_ENABLEb3     0x20
3982
#define ATOM_S2_ROTATION_STATE_MASKb3   0xC0
3154
#define ATOM_S2_ROTATION_STATE_MASKb3   0xC0
3983
 
3155
 
3984
 
3156
/*  BIOS_3_SCRATCH Definition */
3985
// BIOS_3_SCRATCH Definition
3157
#define ATOM_S3_CRT1_ACTIVE             0x00000001L
3986
#define ATOM_S3_CRT1_ACTIVE             0x00000001L
Line 3158... Line 3987...
3158
#define ATOM_S3_LCD1_ACTIVE             0x00000002L
3987
#define ATOM_S3_LCD1_ACTIVE             0x00000002L
Line 3159... Line 3988...
3159
#define ATOM_S3_TV1_ACTIVE              0x00000004L
3988
#define ATOM_S3_TV1_ACTIVE              0x00000004L
3160
#define ATOM_S3_DFP1_ACTIVE             0x00000008L
3989
#define ATOM_S3_DFP1_ACTIVE             0x00000008L
Line 3161... Line 3990...
3161
#define ATOM_S3_CRT2_ACTIVE             0x00000010L
3990
#define ATOM_S3_CRT2_ACTIVE             0x00000010L
3162
#define ATOM_S3_LCD2_ACTIVE             0x00000020L
3991
#define ATOM_S3_LCD2_ACTIVE             0x00000020L
3163
#define ATOM_S3_TV2_ACTIVE              0x00000040L
3992
#define ATOM_S3_DFP6_ACTIVE             0x00000040L
3164
#define ATOM_S3_DFP2_ACTIVE             0x00000080L
3993
#define ATOM_S3_DFP2_ACTIVE             0x00000080L
3165
#define ATOM_S3_CV_ACTIVE               0x00000100L
3994
#define ATOM_S3_CV_ACTIVE               0x00000100L
3166
#define ATOM_S3_DFP3_ACTIVE							0x00000200L
3995
#define ATOM_S3_DFP3_ACTIVE							0x00000200L
3167
#define ATOM_S3_DFP4_ACTIVE							0x00000400L
3996
#define ATOM_S3_DFP4_ACTIVE							0x00000400L
3168
#define ATOM_S3_DFP5_ACTIVE							0x00000800L
3997
#define ATOM_S3_DFP5_ACTIVE							0x00000800L
3169
 
3998
 
3170
#define ATOM_S3_DEVICE_ACTIVE_MASK      0x000003FFL
3999
#define ATOM_S3_DEVICE_ACTIVE_MASK      0x00000FFFL
3171
 
4000
 
3172
#define ATOM_S3_LCD_FULLEXPANSION_ACTIVE         0x00001000L
4001
#define ATOM_S3_LCD_FULLEXPANSION_ACTIVE         0x00001000L
Line 3173... Line 4002...
3173
#define ATOM_S3_LCD_EXPANSION_ASPEC_RATIO_ACTIVE 0x00002000L
4002
#define ATOM_S3_LCD_EXPANSION_ASPEC_RATIO_ACTIVE 0x00002000L
3174
 
4003
 
-
 
4004
#define ATOM_S3_CRT1_CRTC_ACTIVE        0x00010000L
3175
#define ATOM_S3_CRT1_CRTC_ACTIVE        0x00010000L
4005
#define ATOM_S3_LCD1_CRTC_ACTIVE        0x00020000L
3176
#define ATOM_S3_LCD1_CRTC_ACTIVE        0x00020000L
4006
#define ATOM_S3_TV1_CRTC_ACTIVE         0x00040000L
Line 3177... Line 4007...
3177
#define ATOM_S3_TV1_CRTC_ACTIVE         0x00040000L
4007
#define ATOM_S3_DFP1_CRTC_ACTIVE        0x00080000L
3178
#define ATOM_S3_DFP1_CRTC_ACTIVE        0x00080000L
4008
#define ATOM_S3_CRT2_CRTC_ACTIVE        0x00100000L
3179
#define ATOM_S3_CRT2_CRTC_ACTIVE        0x00100000L
4009
#define ATOM_S3_LCD2_CRTC_ACTIVE        0x00200000L
3180
#define ATOM_S3_LCD2_CRTC_ACTIVE        0x00200000L
4010
#define ATOM_S3_DFP6_CRTC_ACTIVE        0x00400000L
3181
#define ATOM_S3_TV2_CRTC_ACTIVE         0x00400000L
4011
#define ATOM_S3_DFP2_CRTC_ACTIVE        0x00800000L
3182
#define ATOM_S3_DFP2_CRTC_ACTIVE        0x00800000L
4012
#define ATOM_S3_CV_CRTC_ACTIVE          0x01000000L
3183
#define ATOM_S3_CV_CRTC_ACTIVE          0x01000000L
4013
#define ATOM_S3_DFP3_CRTC_ACTIVE				0x02000000L
3184
#define ATOM_S3_DFP3_CRTC_ACTIVE				0x02000000L
4014
#define ATOM_S3_DFP4_CRTC_ACTIVE				0x04000000L
3185
#define ATOM_S3_DFP4_CRTC_ACTIVE				0x04000000L
4015
#define ATOM_S3_DFP5_CRTC_ACTIVE				0x08000000L
3186
#define ATOM_S3_DFP5_CRTC_ACTIVE				0x08000000L
4016
 
3187
 
4017
#define ATOM_S3_DEVICE_CRTC_ACTIVE_MASK 0x0FFF0000L
3188
#define ATOM_S3_DEVICE_CRTC_ACTIVE_MASK 0x0FFF0000L
4018
#define ATOM_S3_ASIC_GUI_ENGINE_HUNG    0x20000000L
3189
#define ATOM_S3_ASIC_GUI_ENGINE_HUNG    0x20000000L
4019
//Below two definitions are not supported in pplib, but in the old powerplay in DAL
Line 3210... Line 4040...
3210
#define ATOM_S3_LCD1_CRTC_ACTIVEb2      0x02
4040
#define ATOM_S3_LCD1_CRTC_ACTIVEb2      0x02
3211
#define ATOM_S3_TV1_CRTC_ACTIVEb2       0x04
4041
#define ATOM_S3_TV1_CRTC_ACTIVEb2       0x04
3212
#define ATOM_S3_DFP1_CRTC_ACTIVEb2      0x08
4042
#define ATOM_S3_DFP1_CRTC_ACTIVEb2      0x08
3213
#define ATOM_S3_CRT2_CRTC_ACTIVEb2      0x10
4043
#define ATOM_S3_CRT2_CRTC_ACTIVEb2      0x10
3214
#define ATOM_S3_LCD2_CRTC_ACTIVEb2      0x20
4044
#define ATOM_S3_LCD2_CRTC_ACTIVEb2      0x20
3215
#define ATOM_S3_TV2_CRTC_ACTIVEb2       0x40
4045
#define ATOM_S3_DFP6_CRTC_ACTIVEb2      0x40
3216
#define ATOM_S3_DFP2_CRTC_ACTIVEb2      0x80
4046
#define ATOM_S3_DFP2_CRTC_ACTIVEb2      0x80
3217
#define ATOM_S3_CV_CRTC_ACTIVEb3        0x01
4047
#define ATOM_S3_CV_CRTC_ACTIVEb3        0x01
3218
#define ATOM_S3_DFP3_CRTC_ACTIVEb3			0x02
4048
#define ATOM_S3_DFP3_CRTC_ACTIVEb3			0x02
3219
#define ATOM_S3_DFP4_CRTC_ACTIVEb3			0x04
4049
#define ATOM_S3_DFP4_CRTC_ACTIVEb3			0x04
3220
#define ATOM_S3_DFP5_CRTC_ACTIVEb3			0x08
4050
#define ATOM_S3_DFP5_CRTC_ACTIVEb3			0x08
Line 3221... Line 4051...
3221
 
4051
 
Line 3222... Line -...
3222
#define ATOM_S3_ACTIVE_CRTC2w1          0xFFF
-
 
3223
 
-
 
3224
#define ATOM_S3_ASIC_GUI_ENGINE_HUNGb3	0x20
-
 
3225
#define ATOM_S3_ALLOW_FAST_PWR_SWITCHb3 0x40
-
 
3226
#define ATOM_S3_RQST_GPU_USE_MIN_PWRb3  0x80
4052
#define ATOM_S3_ACTIVE_CRTC2w1          0xFFF
3227
 
4053
 
3228
/*  BIOS_4_SCRATCH Definition */
4054
// BIOS_4_SCRATCH Definition
3229
#define ATOM_S4_LCD1_PANEL_ID_MASK      0x000000FFL
4055
#define ATOM_S4_LCD1_PANEL_ID_MASK      0x000000FFL
Line 3230... Line 4056...
3230
#define ATOM_S4_LCD1_REFRESH_MASK       0x0000FF00L
4056
#define ATOM_S4_LCD1_REFRESH_MASK       0x0000FF00L
3231
#define ATOM_S4_LCD1_REFRESH_SHIFT      8
4057
#define ATOM_S4_LCD1_REFRESH_SHIFT      8
3232
 
4058
 
3233
/* Byte aligned definition for BIOS usage */
4059
//Byte aligned defintion for BIOS usage
Line 3234... Line 4060...
3234
#define ATOM_S4_LCD1_PANEL_ID_MASKb0	  0x0FF
4060
#define ATOM_S4_LCD1_PANEL_ID_MASKb0	  0x0FF
3235
#define ATOM_S4_LCD1_REFRESH_MASKb1		  ATOM_S4_LCD1_PANEL_ID_MASKb0
4061
#define ATOM_S4_LCD1_REFRESH_MASKb1		  ATOM_S4_LCD1_PANEL_ID_MASKb0
3236
#define ATOM_S4_VRAM_INFO_MASKb2        ATOM_S4_LCD1_PANEL_ID_MASKb0
4062
#define ATOM_S4_VRAM_INFO_MASKb2        ATOM_S4_LCD1_PANEL_ID_MASKb0
3237
 
4063
 
3238
/*  BIOS_5_SCRATCH Definition, BIOS_5_SCRATCH is used by Firmware only !!!! */
4064
// BIOS_5_SCRATCH Definition, BIOS_5_SCRATCH is used by Firmware only !!!!
3239
#define ATOM_S5_DOS_REQ_CRT1b0          0x01
4065
#define ATOM_S5_DOS_REQ_CRT1b0          0x01
3240
#define ATOM_S5_DOS_REQ_LCD1b0          0x02
4066
#define ATOM_S5_DOS_REQ_LCD1b0          0x02
3241
#define ATOM_S5_DOS_REQ_TV1b0           0x04
4067
#define ATOM_S5_DOS_REQ_TV1b0           0x04
3242
#define ATOM_S5_DOS_REQ_DFP1b0          0x08
4068
#define ATOM_S5_DOS_REQ_DFP1b0          0x08
3243
#define ATOM_S5_DOS_REQ_CRT2b0          0x10
4069
#define ATOM_S5_DOS_REQ_CRT2b0          0x10
3244
#define ATOM_S5_DOS_REQ_LCD2b0          0x20
4070
#define ATOM_S5_DOS_REQ_LCD2b0          0x20
3245
#define ATOM_S5_DOS_REQ_TV2b0           0x40
4071
#define ATOM_S5_DOS_REQ_DFP6b0          0x40
3246
#define ATOM_S5_DOS_REQ_DFP2b0          0x80
4072
#define ATOM_S5_DOS_REQ_DFP2b0          0x80
Line 3247... Line 4073...
3247
#define ATOM_S5_DOS_REQ_CVb1            0x01
4073
#define ATOM_S5_DOS_REQ_CVb1            0x01
Line 3248... Line 4074...
3248
#define ATOM_S5_DOS_REQ_DFP3b1					0x02
4074
#define ATOM_S5_DOS_REQ_DFP3b1					0x02
3249
#define ATOM_S5_DOS_REQ_DFP4b1					0x04
4075
#define ATOM_S5_DOS_REQ_DFP4b1					0x04
3250
#define ATOM_S5_DOS_REQ_DFP5b1					0x08
4076
#define ATOM_S5_DOS_REQ_DFP5b1					0x08
3251
 
4077
 
3252
#define ATOM_S5_DOS_REQ_DEVICEw0        0x03FF
4078
#define ATOM_S5_DOS_REQ_DEVICEw0        0x0FFF
3253
 
4079
 
3254
#define ATOM_S5_DOS_REQ_CRT1            0x0001
4080
#define ATOM_S5_DOS_REQ_CRT1            0x0001
3255
#define ATOM_S5_DOS_REQ_LCD1            0x0002
4081
#define ATOM_S5_DOS_REQ_LCD1            0x0002
3256
#define ATOM_S5_DOS_REQ_TV1             0x0004
4082
#define ATOM_S5_DOS_REQ_TV1             0x0004
3257
#define ATOM_S5_DOS_REQ_DFP1            0x0008
4083
#define ATOM_S5_DOS_REQ_DFP1            0x0008
3258
#define ATOM_S5_DOS_REQ_CRT2            0x0010
4084
#define ATOM_S5_DOS_REQ_CRT2            0x0010
3259
#define ATOM_S5_DOS_REQ_LCD2            0x0020
4085
#define ATOM_S5_DOS_REQ_LCD2            0x0020
Line 3260... Line 4086...
3260
#define ATOM_S5_DOS_REQ_TV2             0x0040
4086
#define ATOM_S5_DOS_REQ_DFP6            0x0040
3261
#define ATOM_S5_DOS_REQ_DFP2            0x0080
4087
#define ATOM_S5_DOS_REQ_DFP2            0x0080
3262
#define ATOM_S5_DOS_REQ_CV              0x0100
4088
#define ATOM_S5_DOS_REQ_CV              0x0100
3263
#define ATOM_S5_DOS_REQ_DFP3						0x0200
4089
#define ATOM_S5_DOS_REQ_DFP3						0x0200
3264
#define ATOM_S5_DOS_REQ_DFP4						0x0400
-
 
3265
#define ATOM_S5_DOS_REQ_DFP5						0x0800
4090
#define ATOM_S5_DOS_REQ_DFP4						0x0400
3266
 
4091
#define ATOM_S5_DOS_REQ_DFP5						0x0800
Line 3267... Line 4092...
3267
#define ATOM_S5_DOS_FORCE_CRT1b2        ATOM_S5_DOS_REQ_CRT1b0
4092
 
3268
#define ATOM_S5_DOS_FORCE_TV1b2         ATOM_S5_DOS_REQ_TV1b0
4093
#define ATOM_S5_DOS_FORCE_CRT1b2        ATOM_S5_DOS_REQ_CRT1b0
3269
#define ATOM_S5_DOS_FORCE_CRT2b2        ATOM_S5_DOS_REQ_CRT2b0
4094
#define ATOM_S5_DOS_FORCE_TV1b2         ATOM_S5_DOS_REQ_TV1b0
3270
#define ATOM_S5_DOS_FORCE_CVb3          ATOM_S5_DOS_REQ_CVb1
4095
#define ATOM_S5_DOS_FORCE_CRT2b2        ATOM_S5_DOS_REQ_CRT2b0
3271
#define ATOM_S5_DOS_FORCE_DEVICEw1 \
4096
#define ATOM_S5_DOS_FORCE_CVb3          ATOM_S5_DOS_REQ_CVb1
3272
	(ATOM_S5_DOS_FORCE_CRT1b2 + ATOM_S5_DOS_FORCE_TV1b2 + \
4097
#define ATOM_S5_DOS_FORCE_DEVICEw1      (ATOM_S5_DOS_FORCE_CRT1b2+ATOM_S5_DOS_FORCE_TV1b2+ATOM_S5_DOS_FORCE_CRT2b2+\
Line 3283... Line 4108...
3283
#define ATOM_S6_DOCK_STATE              0x00000080L
4108
#define ATOM_S6_DOCK_STATE              0x00000080L
3284
#define ATOM_S6_CRITICAL_STATE          0x00000100L
4109
#define ATOM_S6_CRITICAL_STATE          0x00000100L
3285
#define ATOM_S6_HW_I2C_BUSY_STATE       0x00000200L
4110
#define ATOM_S6_HW_I2C_BUSY_STATE       0x00000200L
3286
#define ATOM_S6_THERMAL_STATE_CHANGE    0x00000400L
4111
#define ATOM_S6_THERMAL_STATE_CHANGE    0x00000400L
3287
#define ATOM_S6_INTERRUPT_SET_BY_BIOS   0x00000800L
4112
#define ATOM_S6_INTERRUPT_SET_BY_BIOS   0x00000800L
3288
#define ATOM_S6_REQ_LCD_EXPANSION_FULL         0x00001000L	/* Normal expansion Request bit for LCD */
4113
#define ATOM_S6_REQ_LCD_EXPANSION_FULL         0x00001000L //Normal expansion Request bit for LCD
3289
#define ATOM_S6_REQ_LCD_EXPANSION_ASPEC_RATIO  0x00002000L	/* Aspect ratio expansion Request bit for LCD */
4114
#define ATOM_S6_REQ_LCD_EXPANSION_ASPEC_RATIO  0x00002000L //Aspect ratio expansion Request bit for LCD
Line 3290... Line 4115...
3290
 
4115
 
3291
#define ATOM_S6_DISPLAY_STATE_CHANGE    0x00004000L	/* This bit is recycled when ATOM_BIOS_INFO_BIOS_SCRATCH6_SCL2_REDEFINE is set,previously it's SCL2_H_expansion */
4116
#define ATOM_S6_DISPLAY_STATE_CHANGE    0x00004000L        //This bit is recycled when ATOM_BIOS_INFO_BIOS_SCRATCH6_SCL2_REDEFINE is set,previously it's SCL2_H_expansion
Line 3292... Line 4117...
3292
#define ATOM_S6_I2C_STATE_CHANGE        0x00008000L	/* This bit is recycled,when ATOM_BIOS_INFO_BIOS_SCRATCH6_SCL2_REDEFINE is set,previously it's SCL2_V_expansion */
4117
#define ATOM_S6_I2C_STATE_CHANGE        0x00008000L        //This bit is recycled,when ATOM_BIOS_INFO_BIOS_SCRATCH6_SCL2_REDEFINE is set,previously it's SCL2_V_expansion
3293
 
4118
 
3294
#define ATOM_S6_ACC_REQ_CRT1            0x00010000L
4119
#define ATOM_S6_ACC_REQ_CRT1            0x00010000L
3295
#define ATOM_S6_ACC_REQ_LCD1            0x00020000L
4120
#define ATOM_S6_ACC_REQ_LCD1            0x00020000L
3296
#define ATOM_S6_ACC_REQ_TV1             0x00040000L
4121
#define ATOM_S6_ACC_REQ_TV1             0x00040000L
3297
#define ATOM_S6_ACC_REQ_DFP1            0x00080000L
4122
#define ATOM_S6_ACC_REQ_DFP1            0x00080000L
3298
#define ATOM_S6_ACC_REQ_CRT2            0x00100000L
4123
#define ATOM_S6_ACC_REQ_CRT2            0x00100000L
3299
#define ATOM_S6_ACC_REQ_LCD2            0x00200000L
4124
#define ATOM_S6_ACC_REQ_LCD2            0x00200000L
3300
#define ATOM_S6_ACC_REQ_TV2             0x00400000L
4125
#define ATOM_S6_ACC_REQ_DFP6            0x00400000L
3301
#define ATOM_S6_ACC_REQ_DFP2            0x00800000L
4126
#define ATOM_S6_ACC_REQ_DFP2            0x00800000L
3302
#define ATOM_S6_ACC_REQ_CV              0x01000000L
4127
#define ATOM_S6_ACC_REQ_CV              0x01000000L
3303
#define ATOM_S6_ACC_REQ_DFP3						0x02000000L
4128
#define ATOM_S6_ACC_REQ_DFP3						0x02000000L
Line 3308... Line 4133...
3308
#define ATOM_S6_SYSTEM_POWER_MODE_CHANGE    0x10000000L
4133
#define ATOM_S6_SYSTEM_POWER_MODE_CHANGE    0x10000000L
3309
#define ATOM_S6_ACC_BLOCK_DISPLAY_SWITCH    0x20000000L
4134
#define ATOM_S6_ACC_BLOCK_DISPLAY_SWITCH    0x20000000L
3310
#define ATOM_S6_VRI_BRIGHTNESS_CHANGE       0x40000000L
4135
#define ATOM_S6_VRI_BRIGHTNESS_CHANGE       0x40000000L
3311
#define ATOM_S6_CONFIG_DISPLAY_CHANGE_MASK  0x80000000L
4136
#define ATOM_S6_CONFIG_DISPLAY_CHANGE_MASK  0x80000000L
Line 3312... Line 4137...
3312
 
4137
 
3313
/* Byte aligned definition for BIOS usage */
4138
//Byte aligned defintion for BIOS usage
3314
#define ATOM_S6_DEVICE_CHANGEb0         0x01
4139
#define ATOM_S6_DEVICE_CHANGEb0         0x01
3315
#define ATOM_S6_SCALER_CHANGEb0         0x02
4140
#define ATOM_S6_SCALER_CHANGEb0         0x02
3316
#define ATOM_S6_LID_CHANGEb0            0x04
4141
#define ATOM_S6_LID_CHANGEb0            0x04
3317
#define ATOM_S6_DOCKING_CHANGEb0        0x08
4142
#define ATOM_S6_DOCKING_CHANGEb0        0x08
Line 3330... Line 4155...
3330
#define ATOM_S6_ACC_REQ_LCD1b2          0x02
4155
#define ATOM_S6_ACC_REQ_LCD1b2          0x02
3331
#define ATOM_S6_ACC_REQ_TV1b2           0x04
4156
#define ATOM_S6_ACC_REQ_TV1b2           0x04
3332
#define ATOM_S6_ACC_REQ_DFP1b2          0x08
4157
#define ATOM_S6_ACC_REQ_DFP1b2          0x08
3333
#define ATOM_S6_ACC_REQ_CRT2b2          0x10
4158
#define ATOM_S6_ACC_REQ_CRT2b2          0x10
3334
#define ATOM_S6_ACC_REQ_LCD2b2          0x20
4159
#define ATOM_S6_ACC_REQ_LCD2b2          0x20
3335
#define ATOM_S6_ACC_REQ_TV2b2           0x40
4160
#define ATOM_S6_ACC_REQ_DFP6b2          0x40
3336
#define ATOM_S6_ACC_REQ_DFP2b2          0x80
4161
#define ATOM_S6_ACC_REQ_DFP2b2          0x80
3337
#define ATOM_S6_ACC_REQ_CVb3            0x01
4162
#define ATOM_S6_ACC_REQ_CVb3            0x01
3338
#define ATOM_S6_ACC_REQ_DFP3b3					0x02
4163
#define ATOM_S6_ACC_REQ_DFP3b3					0x02
3339
#define ATOM_S6_ACC_REQ_DFP4b3					0x04
4164
#define ATOM_S6_ACC_REQ_DFP4b3					0x04
3340
#define ATOM_S6_ACC_REQ_DFP5b3					0x08
4165
#define ATOM_S6_ACC_REQ_DFP5b3					0x08
Line 3364... Line 4189...
3364
#define ATOM_S6_SYSTEM_POWER_MODE_CHANGE_SHIFT  28
4189
#define ATOM_S6_SYSTEM_POWER_MODE_CHANGE_SHIFT  28
3365
#define ATOM_S6_ACC_BLOCK_DISPLAY_SWITCH_SHIFT  29
4190
#define ATOM_S6_ACC_BLOCK_DISPLAY_SWITCH_SHIFT  29
3366
#define ATOM_S6_VRI_BRIGHTNESS_CHANGE_SHIFT     30
4191
#define ATOM_S6_VRI_BRIGHTNESS_CHANGE_SHIFT     30
3367
#define ATOM_S6_CONFIG_DISPLAY_CHANGE_SHIFT     31
4192
#define ATOM_S6_CONFIG_DISPLAY_CHANGE_SHIFT     31
Line 3368... Line 4193...
3368
 
4193
 
3369
/*  BIOS_7_SCRATCH Definition, BIOS_7_SCRATCH is used by Firmware only !!!! */
4194
// BIOS_7_SCRATCH Definition, BIOS_7_SCRATCH is used by Firmware only !!!!
3370
#define ATOM_S7_DOS_MODE_TYPEb0             0x03
4195
#define ATOM_S7_DOS_MODE_TYPEb0             0x03
3371
#define ATOM_S7_DOS_MODE_VGAb0              0x00
4196
#define ATOM_S7_DOS_MODE_VGAb0              0x00
3372
#define ATOM_S7_DOS_MODE_VESAb0             0x01
4197
#define ATOM_S7_DOS_MODE_VESAb0             0x01
3373
#define ATOM_S7_DOS_MODE_EXTb0              0x02
4198
#define ATOM_S7_DOS_MODE_EXTb0              0x02
Line 3376... Line 4201...
3376
#define ATOM_S7_DOS_8BIT_DAC_ENb1           0x01
4201
#define ATOM_S7_DOS_8BIT_DAC_ENb1           0x01
3377
#define ATOM_S7_DOS_MODE_NUMBERw1           0x0FFFF
4202
#define ATOM_S7_DOS_MODE_NUMBERw1           0x0FFFF
Line 3378... Line 4203...
3378
 
4203
 
Line 3379... Line 4204...
3379
#define ATOM_S7_DOS_8BIT_DAC_EN_SHIFT       8
4204
#define ATOM_S7_DOS_8BIT_DAC_EN_SHIFT       8
3380
 
4205
 
3381
/*  BIOS_8_SCRATCH Definition */
4206
// BIOS_8_SCRATCH Definition
Line 3382... Line 4207...
3382
#define ATOM_S8_I2C_CHANNEL_BUSY_MASK       0x00000FFFF
4207
#define ATOM_S8_I2C_CHANNEL_BUSY_MASK       0x00000FFFF
3383
#define ATOM_S8_I2C_HW_ENGINE_BUSY_MASK     0x0FFFF0000
4208
#define ATOM_S8_I2C_HW_ENGINE_BUSY_MASK     0x0FFFF0000
Line 3384... Line 4209...
3384
 
4209
 
3385
#define ATOM_S8_I2C_CHANNEL_BUSY_SHIFT      0
4210
#define ATOM_S8_I2C_CHANNEL_BUSY_SHIFT      0
3386
#define ATOM_S8_I2C_ENGINE_BUSY_SHIFT       16
4211
#define ATOM_S8_I2C_ENGINE_BUSY_SHIFT       16
3387
 
4212
 
3388
/*  BIOS_9_SCRATCH Definition */
4213
// BIOS_9_SCRATCH Definition
3389
#ifndef ATOM_S9_I2C_CHANNEL_COMPLETED_MASK
4214
#ifndef ATOM_S9_I2C_CHANNEL_COMPLETED_MASK
Line 3397... Line 4222...
3397
#endif
4222
#endif
3398
#ifndef ATOM_S9_I2C_CHANNEL_ABORTED_SHIFT
4223
#ifndef ATOM_S9_I2C_CHANNEL_ABORTED_SHIFT
3399
#define ATOM_S9_I2C_CHANNEL_ABORTED_SHIFT   16
4224
#define ATOM_S9_I2C_CHANNEL_ABORTED_SHIFT   16
3400
#endif
4225
#endif
Line -... Line 4226...
-
 
4226
 
3401
 
4227
 
3402
#define ATOM_FLAG_SET                         0x20
4228
#define ATOM_FLAG_SET                         0x20
3403
#define ATOM_FLAG_CLEAR                       0
-
 
3404
#define CLEAR_ATOM_S6_ACC_MODE \
-
 
3405
	((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
4229
#define ATOM_FLAG_CLEAR                       0
3406
	 ATOM_S6_ACC_MODE_SHIFT | ATOM_FLAG_CLEAR)
-
 
3407
#define SET_ATOM_S6_DEVICE_CHANGE \
-
 
3408
	((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
4230
#define CLEAR_ATOM_S6_ACC_MODE                ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_ACC_MODE_SHIFT | ATOM_FLAG_CLEAR)
3409
	 ATOM_S6_DEVICE_CHANGE_SHIFT | ATOM_FLAG_SET)
-
 
3410
#define SET_ATOM_S6_VRI_BRIGHTNESS_CHANGE \
-
 
3411
	((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
4231
#define SET_ATOM_S6_DEVICE_CHANGE             ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_DEVICE_CHANGE_SHIFT | ATOM_FLAG_SET)
3412
	 ATOM_S6_VRI_BRIGHTNESS_CHANGE_SHIFT | ATOM_FLAG_SET)
-
 
3413
#define SET_ATOM_S6_SCALER_CHANGE \
-
 
3414
	((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
4232
#define SET_ATOM_S6_VRI_BRIGHTNESS_CHANGE     ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_VRI_BRIGHTNESS_CHANGE_SHIFT | ATOM_FLAG_SET)
3415
	 ATOM_S6_SCALER_CHANGE_SHIFT | ATOM_FLAG_SET)
-
 
3416
#define SET_ATOM_S6_LID_CHANGE \
-
 
3417
	((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
4233
#define SET_ATOM_S6_SCALER_CHANGE             ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_SCALER_CHANGE_SHIFT | ATOM_FLAG_SET)
3418
	 ATOM_S6_LID_CHANGE_SHIFT | ATOM_FLAG_SET)
4234
#define SET_ATOM_S6_LID_CHANGE                ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_LID_CHANGE_SHIFT | ATOM_FLAG_SET)
3419
 
-
 
3420
#define SET_ATOM_S6_LID_STATE \
-
 
3421
	((ATOM_ACC_CHANGE_INFO_DEF << 8) |\
4235
 
3422
	 ATOM_S6_LID_STATE_SHIFT | ATOM_FLAG_SET)
-
 
3423
#define CLEAR_ATOM_S6_LID_STATE \
-
 
3424
	((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
4236
#define SET_ATOM_S6_LID_STATE                 ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_LID_STATE_SHIFT | ATOM_FLAG_SET)
3425
	 ATOM_S6_LID_STATE_SHIFT | ATOM_FLAG_CLEAR)
4237
#define CLEAR_ATOM_S6_LID_STATE               ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_LID_STATE_SHIFT | ATOM_FLAG_CLEAR)
3426
 
-
 
3427
#define SET_ATOM_S6_DOCK_CHANGE \
-
 
3428
	((ATOM_ACC_CHANGE_INFO_DEF << 8)| \
4238
 
3429
	 ATOM_S6_DOCKING_CHANGE_SHIFT | ATOM_FLAG_SET)
-
 
3430
#define SET_ATOM_S6_DOCK_STATE \
-
 
3431
	((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
4239
#define SET_ATOM_S6_DOCK_CHANGE			          ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_DOCKING_CHANGE_SHIFT | ATOM_FLAG_SET)
3432
	 ATOM_S6_DOCK_STATE_SHIFT | ATOM_FLAG_SET)
-
 
3433
#define CLEAR_ATOM_S6_DOCK_STATE \
-
 
3434
	((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
4240
#define SET_ATOM_S6_DOCK_STATE                ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_DOCK_STATE_SHIFT | ATOM_FLAG_SET)
3435
	 ATOM_S6_DOCK_STATE_SHIFT | ATOM_FLAG_CLEAR)
4241
#define CLEAR_ATOM_S6_DOCK_STATE              ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_DOCK_STATE_SHIFT | ATOM_FLAG_CLEAR)
3436
 
-
 
3437
#define SET_ATOM_S6_THERMAL_STATE_CHANGE \
-
 
3438
	((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
4242
 
3439
	 ATOM_S6_THERMAL_STATE_CHANGE_SHIFT | ATOM_FLAG_SET)
-
 
3440
#define SET_ATOM_S6_SYSTEM_POWER_MODE_CHANGE \
-
 
3441
	((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
4243
#define SET_ATOM_S6_THERMAL_STATE_CHANGE      ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_THERMAL_STATE_CHANGE_SHIFT | ATOM_FLAG_SET)
3442
	 ATOM_S6_SYSTEM_POWER_MODE_CHANGE_SHIFT | ATOM_FLAG_SET)
-
 
3443
#define SET_ATOM_S6_INTERRUPT_SET_BY_BIOS \
-
 
3444
	((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
4244
#define SET_ATOM_S6_SYSTEM_POWER_MODE_CHANGE  ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_SYSTEM_POWER_MODE_CHANGE_SHIFT | ATOM_FLAG_SET)
3445
	 ATOM_S6_INTERRUPT_SET_BY_BIOS_SHIFT | ATOM_FLAG_SET)
4245
#define SET_ATOM_S6_INTERRUPT_SET_BY_BIOS     ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_INTERRUPT_SET_BY_BIOS_SHIFT | ATOM_FLAG_SET)
3446
 
-
 
3447
#define SET_ATOM_S6_CRITICAL_STATE \
-
 
3448
	((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
4246
 
3449
	 ATOM_S6_CRITICAL_STATE_SHIFT | ATOM_FLAG_SET)
-
 
3450
#define CLEAR_ATOM_S6_CRITICAL_STATE \
-
 
3451
	((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
4247
#define SET_ATOM_S6_CRITICAL_STATE            ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_CRITICAL_STATE_SHIFT | ATOM_FLAG_SET)
3452
	 ATOM_S6_CRITICAL_STATE_SHIFT | ATOM_FLAG_CLEAR)
4248
#define CLEAR_ATOM_S6_CRITICAL_STATE          ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_CRITICAL_STATE_SHIFT | ATOM_FLAG_CLEAR)
3453
 
-
 
3454
#define SET_ATOM_S6_REQ_SCALER \
-
 
3455
	((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
4249
 
3456
	 ATOM_S6_REQ_SCALER_SHIFT | ATOM_FLAG_SET)
-
 
3457
#define CLEAR_ATOM_S6_REQ_SCALER \
-
 
3458
	((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
4250
#define SET_ATOM_S6_REQ_SCALER                ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_REQ_SCALER_SHIFT | ATOM_FLAG_SET)  
3459
	 ATOM_S6_REQ_SCALER_SHIFT | ATOM_FLAG_CLEAR )
4251
#define CLEAR_ATOM_S6_REQ_SCALER              ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_REQ_SCALER_SHIFT | ATOM_FLAG_CLEAR )
3460
 
-
 
3461
#define SET_ATOM_S6_REQ_SCALER_ARATIO \
-
 
3462
	((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
4252
 
3463
	 ATOM_S6_REQ_SCALER_ARATIO_SHIFT | ATOM_FLAG_SET )
-
 
3464
#define CLEAR_ATOM_S6_REQ_SCALER_ARATIO \
-
 
3465
	((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
4253
#define SET_ATOM_S6_REQ_SCALER_ARATIO         ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_REQ_SCALER_ARATIO_SHIFT | ATOM_FLAG_SET )
3466
	 ATOM_S6_REQ_SCALER_ARATIO_SHIFT | ATOM_FLAG_CLEAR )
4254
#define CLEAR_ATOM_S6_REQ_SCALER_ARATIO       ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_REQ_SCALER_ARATIO_SHIFT | ATOM_FLAG_CLEAR )
3467
 
-
 
3468
#define SET_ATOM_S6_I2C_STATE_CHANGE \
-
 
3469
	((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
4255
 
3470
	 ATOM_S6_I2C_STATE_CHANGE_SHIFT | ATOM_FLAG_SET )
4256
#define SET_ATOM_S6_I2C_STATE_CHANGE          ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_I2C_STATE_CHANGE_SHIFT | ATOM_FLAG_SET )
3471
 
-
 
3472
#define SET_ATOM_S6_DISPLAY_STATE_CHANGE \
-
 
3473
	((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
4257
 
3474
	 ATOM_S6_DISPLAY_STATE_CHANGE_SHIFT | ATOM_FLAG_SET )
4258
#define SET_ATOM_S6_DISPLAY_STATE_CHANGE      ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_DISPLAY_STATE_CHANGE_SHIFT | ATOM_FLAG_SET )
3475
 
-
 
3476
#define SET_ATOM_S6_DEVICE_RECONFIG \
-
 
3477
	((ATOM_ACC_CHANGE_INFO_DEF << 8) | \
4259
 
3478
	 ATOM_S6_CONFIG_DISPLAY_CHANGE_SHIFT | ATOM_FLAG_SET)
-
 
3479
#define CLEAR_ATOM_S0_LCD1 \
4260
#define SET_ATOM_S6_DEVICE_RECONFIG           ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_CONFIG_DISPLAY_CHANGE_SHIFT | ATOM_FLAG_SET)
3480
	((ATOM_DEVICE_CONNECT_INFO_DEF << 8 ) | \
-
 
3481
	 ATOM_S0_LCD1_SHIFT | ATOM_FLAG_CLEAR )
-
 
3482
#define SET_ATOM_S7_DOS_8BIT_DAC_EN \
-
 
3483
	((ATOM_DOS_MODE_INFO_DEF << 8) | \
4261
#define CLEAR_ATOM_S0_LCD1                    ((ATOM_DEVICE_CONNECT_INFO_DEF << 8 )|  ATOM_S0_LCD1_SHIFT | ATOM_FLAG_CLEAR )
3484
	 ATOM_S7_DOS_8BIT_DAC_EN_SHIFT | ATOM_FLAG_SET )
-
 
3485
#define CLEAR_ATOM_S7_DOS_8BIT_DAC_EN \
-
 
3486
	((ATOM_DOS_MODE_INFO_DEF << 8) | \
4262
#define SET_ATOM_S7_DOS_8BIT_DAC_EN           ((ATOM_DOS_MODE_INFO_DEF << 8 )|ATOM_S7_DOS_8BIT_DAC_EN_SHIFT | ATOM_FLAG_SET )
Line 3487... Line 4263...
3487
	 ATOM_S7_DOS_8BIT_DAC_EN_SHIFT | ATOM_FLAG_CLEAR )
4263
#define CLEAR_ATOM_S7_DOS_8BIT_DAC_EN         ((ATOM_DOS_MODE_INFO_DEF << 8 )|ATOM_S7_DOS_8BIT_DAC_EN_SHIFT | ATOM_FLAG_CLEAR )
3488
 
4264
 
3489
/****************************************************************************/
4265
/****************************************************************************/
Line 3490... Line 4266...
3490
/* Portion II: Definitinos only used in Driver */
4266
//Portion II: Definitinos only used in Driver
-
 
4267
/****************************************************************************/
-
 
4268
 
Line -... Line 4269...
-
 
4269
// Macros used by driver
-
 
4270
#ifdef __cplusplus
-
 
4271
#define GetIndexIntoMasterTable(MasterOrData, FieldName) ((reinterpret_cast(&(static_cast(0))->FieldName)-static_cast(0))/sizeof(USHORT))
3491
/****************************************************************************/
4272
 
Line 3492... Line 4273...
3492
 
4273
#define GET_COMMAND_TABLE_COMMANDSET_REVISION(TABLE_HEADER_OFFSET) (((static_cast(TABLE_HEADER_OFFSET))->ucTableFormatRevision )&0x3F)
3493
/*  Macros used by driver */
4274
#define GET_COMMAND_TABLE_PARAMETER_REVISION(TABLE_HEADER_OFFSET)  (((static_cast(TABLE_HEADER_OFFSET))->ucTableContentRevision)&0x3F)
-
 
4275
#else // not __cplusplus
Line 3494... Line 4276...
3494
 
4276
#define	GetIndexIntoMasterTable(MasterOrData, FieldName) (((char*)(&((ATOM_MASTER_LIST_OF_##MasterOrData##_TABLES*)0)->FieldName)-(char*)0)/sizeof(USHORT))
3495
#define	GetIndexIntoMasterTable(MasterOrData, FieldName) (((char *)(&((ATOM_MASTER_LIST_OF_##MasterOrData##_TABLES *)0)->FieldName)-(char *)0)/sizeof(USHORT))
4277
 
Line 3496... Line 4278...
3496
 
4278
#define GET_COMMAND_TABLE_COMMANDSET_REVISION(TABLE_HEADER_OFFSET) ((((ATOM_COMMON_TABLE_HEADER*)TABLE_HEADER_OFFSET)->ucTableFormatRevision)&0x3F)
3497
#define GET_COMMAND_TABLE_COMMANDSET_REVISION(TABLE_HEADER_OFFSET) ((((ATOM_COMMON_TABLE_HEADER*)TABLE_HEADER_OFFSET)->ucTableFormatRevision)&0x3F)
4279
#define GET_COMMAND_TABLE_PARAMETER_REVISION(TABLE_HEADER_OFFSET)  ((((ATOM_COMMON_TABLE_HEADER*)TABLE_HEADER_OFFSET)->ucTableContentRevision)&0x3F)
3498
#define GET_COMMAND_TABLE_PARAMETER_REVISION(TABLE_HEADER_OFFSET)  ((((ATOM_COMMON_TABLE_HEADER*)TABLE_HEADER_OFFSET)->ucTableContentRevision)&0x3F)
4280
#endif // __cplusplus
3499
 
4281
 
3500
#define GET_DATA_TABLE_MAJOR_REVISION GET_COMMAND_TABLE_COMMANDSET_REVISION
4282
#define GET_DATA_TABLE_MAJOR_REVISION GET_COMMAND_TABLE_COMMANDSET_REVISION
3501
#define GET_DATA_TABLE_MINOR_REVISION GET_COMMAND_TABLE_PARAMETER_REVISION
4283
#define GET_DATA_TABLE_MINOR_REVISION GET_COMMAND_TABLE_PARAMETER_REVISION
Line 3502... Line -...
3502
 
-
 
3503
/****************************************************************************/
4284
 
3504
/* Portion III: Definitinos only used in VBIOS */
-
 
3505
/****************************************************************************/
4285
/****************************************************************************/
3506
#define ATOM_DAC_SRC					0x80
-
 
3507
#define ATOM_SRC_DAC1					0
4286
//Portion III: Definitinos only used in VBIOS
3508
#define ATOM_SRC_DAC2					0x80
4287
/****************************************************************************/
3509
 
4288
#define ATOM_DAC_SRC					0x80
3510
#ifdef	UEFI_BUILD
4289
#define ATOM_SRC_DAC1					0
3511
#define	USHORT	UTEMP
4290
#define ATOM_SRC_DAC2					0x80
3512
#endif
4291
 
Line 3513... Line 4292...
3513
 
4292
typedef struct _MEMORY_PLLINIT_PARAMETERS
Line -... Line 4293...
-
 
4293
{
3514
typedef struct _MEMORY_PLLINIT_PARAMETERS {
4294
  ULONG ulTargetMemoryClock; //In 10Khz unit
3515
	ULONG ulTargetMemoryClock;	/* In 10Khz unit */
4295
  UCHAR   ucAction;					 //not define yet
Line 3516... Line 4296...
3516
	UCHAR ucAction;		/* not define yet */
4296
  UCHAR   ucFbDiv_Hi;				 //Fbdiv Hi byte
-
 
4297
  UCHAR   ucFbDiv;					 //FB value
3517
	UCHAR ucFbDiv_Hi;	/* Fbdiv Hi byte */
4298
  UCHAR   ucPostDiv;				 //Post div
3518
	UCHAR ucFbDiv;		/* FB value */
4299
}MEMORY_PLLINIT_PARAMETERS;
3519
	UCHAR ucPostDiv;	/* Post div */
4300
 
3520
} MEMORY_PLLINIT_PARAMETERS;
4301
#define MEMORY_PLLINIT_PS_ALLOCATION  MEMORY_PLLINIT_PARAMETERS
3521
 
4302
 
Line 3522... Line 4303...
3522
#define MEMORY_PLLINIT_PS_ALLOCATION  MEMORY_PLLINIT_PARAMETERS
4303
 
-
 
4304
#define	GPIO_PIN_WRITE													0x01
3523
 
4305
#define	GPIO_PIN_READ														0x00
3524
#define	GPIO_PIN_WRITE													0x01
4306
 
3525
#define	GPIO_PIN_READ														0x00
4307
typedef struct  _GPIO_PIN_CONTROL_PARAMETERS
3526
 
4308
{
3527
typedef struct _GPIO_PIN_CONTROL_PARAMETERS {
4309
  UCHAR ucGPIO_ID;           //return value, read from GPIO pins
3528
	UCHAR ucGPIO_ID;	/* return value, read from GPIO pins */
4310
  UCHAR ucGPIOBitShift;	     //define which bit in uGPIOBitVal need to be update 
Line 3529... Line 4311...
3529
	UCHAR ucGPIOBitShift;	/* define which bit in uGPIOBitVal need to be update */
4311
	UCHAR ucGPIOBitVal;		     //Set/Reset corresponding bit defined in ucGPIOBitMask
3530
	UCHAR ucGPIOBitVal;	/* Set/Reset corresponding bit defined in ucGPIOBitMask */
4312
  UCHAR ucAction;				     //=GPIO_PIN_WRITE: Read; =GPIO_PIN_READ: Write
3531
	UCHAR ucAction;		/* =GPIO_PIN_WRITE: Read; =GPIO_PIN_READ: Write */
4313
}GPIO_PIN_CONTROL_PARAMETERS;
3532
} GPIO_PIN_CONTROL_PARAMETERS;
4314
 
3533
 
4315
typedef struct _ENABLE_SCALER_PARAMETERS
Line 3534... Line 4316...
3534
typedef struct _ENABLE_SCALER_PARAMETERS {
4316
{
-
 
4317
  UCHAR ucScaler;            // ATOM_SCALER1, ATOM_SCALER2
3535
	UCHAR ucScaler;		/*  ATOM_SCALER1, ATOM_SCALER2 */
4318
  UCHAR ucEnable;            // ATOM_SCALER_DISABLE or ATOM_SCALER_CENTER or ATOM_SCALER_EXPANSION
3536
	UCHAR ucEnable;		/*  ATOM_SCALER_DISABLE or ATOM_SCALER_CENTER or ATOM_SCALER_EXPANSION */
4319
  UCHAR ucTVStandard;        // 
3537
	UCHAR ucTVStandard;	/*  */
4320
	UCHAR ucPadding[1];
3538
	UCHAR ucPadding[1];
4321
}ENABLE_SCALER_PARAMETERS; 
3539
} ENABLE_SCALER_PARAMETERS;
4322
#define ENABLE_SCALER_PS_ALLOCATION ENABLE_SCALER_PARAMETERS
3540
#define ENABLE_SCALER_PS_ALLOCATION ENABLE_SCALER_PARAMETERS
4323
 
Line 3541... Line 4324...
3541
 
4324
//ucEnable:
-
 
4325
#define SCALER_BYPASS_AUTO_CENTER_NO_REPLICATION    0
3542
/* ucEnable: */
4326
#define SCALER_BYPASS_AUTO_CENTER_AUTO_REPLICATION  1
3543
#define SCALER_BYPASS_AUTO_CENTER_NO_REPLICATION    0
4327
#define SCALER_ENABLE_2TAP_ALPHA_MODE               2
3544
#define SCALER_BYPASS_AUTO_CENTER_AUTO_REPLICATION  1
4328
#define SCALER_ENABLE_MULTITAP_MODE                 3
Line 3545... Line 4329...
3545
#define SCALER_ENABLE_2TAP_ALPHA_MODE               2
4329
 
-
 
4330
typedef struct _ENABLE_HARDWARE_ICON_CURSOR_PARAMETERS
3546
#define SCALER_ENABLE_MULTITAP_MODE                 3
4331
{
3547
 
4332
  ULONG  usHWIconHorzVertPosn;        // Hardware Icon Vertical position
3548
typedef struct _ENABLE_HARDWARE_ICON_CURSOR_PARAMETERS {
4333
  UCHAR  ucHWIconVertOffset;          // Hardware Icon Vertical offset
3549
	ULONG usHWIconHorzVertPosn;	/*  Hardware Icon Vertical position */
4334
  UCHAR  ucHWIconHorzOffset;          // Hardware Icon Horizontal offset
3550
	UCHAR ucHWIconVertOffset;	/*  Hardware Icon Vertical offset */
4335
  UCHAR  ucSelection;                 // ATOM_CURSOR1 or ATOM_ICON1 or ATOM_CURSOR2 or ATOM_ICON2
Line 3551... Line 4336...
3551
	UCHAR ucHWIconHorzOffset;	/*  Hardware Icon Horizontal offset */
4336
  UCHAR  ucEnable;                    // ATOM_ENABLE or ATOM_DISABLE
-
 
4337
}ENABLE_HARDWARE_ICON_CURSOR_PARAMETERS;
3552
	UCHAR ucSelection;	/*  ATOM_CURSOR1 or ATOM_ICON1 or ATOM_CURSOR2 or ATOM_ICON2 */
4338
 
3553
	UCHAR ucEnable;		/*  ATOM_ENABLE or ATOM_DISABLE */
4339
typedef struct _ENABLE_HARDWARE_ICON_CURSOR_PS_ALLOCATION
3554
} ENABLE_HARDWARE_ICON_CURSOR_PARAMETERS;
4340
{
3555
 
4341
	ENABLE_HARDWARE_ICON_CURSOR_PARAMETERS sEnableIcon;
3556
typedef struct _ENABLE_HARDWARE_ICON_CURSOR_PS_ALLOCATION {
4342
	ENABLE_CRTC_PARAMETERS sReserved;
3557
	ENABLE_HARDWARE_ICON_CURSOR_PARAMETERS sEnableIcon;
4343
}ENABLE_HARDWARE_ICON_CURSOR_PS_ALLOCATION;
Line -... Line 4344...
-
 
4344
 
-
 
4345
typedef struct _ENABLE_GRAPH_SURFACE_PARAMETERS
-
 
4346
{
-
 
4347
  USHORT usHight;                     // Image Hight
-
 
4348
  USHORT usWidth;                     // Image Width
-
 
4349
  UCHAR  ucSurface;                   // Surface 1 or 2	
-
 
4350
	UCHAR ucPadding[3];
-
 
4351
}ENABLE_GRAPH_SURFACE_PARAMETERS;
-
 
4352
 
3558
	ENABLE_CRTC_PARAMETERS sReserved;
4353
typedef struct _ENABLE_GRAPH_SURFACE_PARAMETERS_V1_2
-
 
4354
{
3559
} ENABLE_HARDWARE_ICON_CURSOR_PS_ALLOCATION;
4355
  USHORT usHight;                     // Image Hight
3560
 
4356
  USHORT usWidth;                     // Image Width
3561
typedef struct _ENABLE_GRAPH_SURFACE_PARAMETERS {
4357
  UCHAR  ucSurface;                   // Surface 1 or 2
Line 3562... Line 4358...
3562
	USHORT usHight;		/*  Image Hight */
4358
  UCHAR  ucEnable;                    // ATOM_ENABLE or ATOM_DISABLE
-
 
4359
	UCHAR ucPadding[2];
3563
	USHORT usWidth;		/*  Image Width */
4360
}ENABLE_GRAPH_SURFACE_PARAMETERS_V1_2;
3564
	UCHAR ucSurface;	/*  Surface 1 or 2 */
4361
 
3565
	UCHAR ucPadding[3];
4362
typedef struct _ENABLE_GRAPH_SURFACE_PARAMETERS_V1_3
3566
} ENABLE_GRAPH_SURFACE_PARAMETERS;
4363
{
Line 3567... Line 4364...
3567
 
4364
  USHORT usHight;                     // Image Hight
-
 
4365
  USHORT usWidth;                     // Image Width
3568
typedef struct _ENABLE_GRAPH_SURFACE_PARAMETERS_V1_2 {
4366
  UCHAR  ucSurface;                   // Surface 1 or 2
3569
	USHORT usHight;		/*  Image Hight */
4367
  UCHAR  ucEnable;                    // ATOM_ENABLE or ATOM_DISABLE
3570
	USHORT usWidth;		/*  Image Width */
4368
  USHORT usDeviceId;                  // Active Device Id for this surface. If no device, set to 0. 
Line 3571... Line 4369...
3571
	UCHAR ucSurface;	/*  Surface 1 or 2 */
4369
}ENABLE_GRAPH_SURFACE_PARAMETERS_V1_3;
-
 
4370
 
3572
	UCHAR ucEnable;		/*  ATOM_ENABLE or ATOM_DISABLE */
4371
typedef struct _ENABLE_GRAPH_SURFACE_PS_ALLOCATION
3573
	UCHAR ucPadding[2];
4372
{
3574
} ENABLE_GRAPH_SURFACE_PARAMETERS_V1_2;
4373
	ENABLE_GRAPH_SURFACE_PARAMETERS sSetSurface;
Line 3575... Line 4374...
3575
 
4374
  ENABLE_YUV_PS_ALLOCATION        sReserved; // Don't set this one
Line 3613... Line 4412...
3613
#define INDIRECT_IO_PCIEP_READ     INDIRECT_IO_PCIEP | INDIRECT_READ
4412
#define INDIRECT_IO_PCIEP_READ     INDIRECT_IO_PCIEP | INDIRECT_READ
3614
#define INDIRECT_IO_PCIEP_WRITE    INDIRECT_IO_PCIEP | INDIRECT_WRITE
4413
#define INDIRECT_IO_PCIEP_WRITE    INDIRECT_IO_PCIEP | INDIRECT_WRITE
3615
#define INDIRECT_IO_NBMISC_READ    INDIRECT_IO_NBMISC | INDIRECT_READ
4414
#define INDIRECT_IO_NBMISC_READ    INDIRECT_IO_NBMISC | INDIRECT_READ
3616
#define INDIRECT_IO_NBMISC_WRITE   INDIRECT_IO_NBMISC | INDIRECT_WRITE
4415
#define INDIRECT_IO_NBMISC_WRITE   INDIRECT_IO_NBMISC | INDIRECT_WRITE
Line 3617... Line 4416...
3617
 
4416
 
-
 
4417
typedef struct _ATOM_OEM_INFO
3618
typedef struct _ATOM_OEM_INFO {
4418
{ 
3619
	ATOM_COMMON_TABLE_HEADER sHeader;
4419
	ATOM_COMMON_TABLE_HEADER sHeader;
3620
	ATOM_I2C_ID_CONFIG_ACCESS sucI2cId;
4420
	ATOM_I2C_ID_CONFIG_ACCESS sucI2cId;
Line 3621... Line 4421...
3621
} ATOM_OEM_INFO;
4421
}ATOM_OEM_INFO;
-
 
4422
 
3622
 
4423
typedef struct _ATOM_TV_MODE
3623
typedef struct _ATOM_TV_MODE {
4424
{
3624
	UCHAR ucVMode_Num;	/* Video mode number */
4425
   UCHAR	ucVMode_Num;			  //Video mode number
Line 3625... Line 4426...
3625
	UCHAR ucTV_Mode_Num;	/* Internal TV mode number */
4426
   UCHAR	ucTV_Mode_Num;			//Internal TV mode number
-
 
4427
}ATOM_TV_MODE;
3626
} ATOM_TV_MODE;
4428
 
3627
 
4429
typedef struct _ATOM_BIOS_INT_TVSTD_MODE
3628
typedef struct _ATOM_BIOS_INT_TVSTD_MODE {
4430
{
3629
	ATOM_COMMON_TABLE_HEADER sHeader;
4431
  ATOM_COMMON_TABLE_HEADER sHeader;  
3630
	USHORT usTV_Mode_LUT_Offset;	/*  Pointer to standard to internal number conversion table */
4432
   USHORT	usTV_Mode_LUT_Offset;	// Pointer to standard to internal number conversion table
3631
	USHORT usTV_FIFO_Offset;	/*  Pointer to FIFO entry table */
4433
   USHORT	usTV_FIFO_Offset;		  // Pointer to FIFO entry table
3632
	USHORT usNTSC_Tbl_Offset;	/*  Pointer to SDTV_Mode_NTSC table */
4434
   USHORT	usNTSC_Tbl_Offset;		// Pointer to SDTV_Mode_NTSC table
Line -... Line 4435...
-
 
4435
   USHORT	usPAL_Tbl_Offset;		  // Pointer to SDTV_Mode_PAL table 
3633
	USHORT usPAL_Tbl_Offset;	/*  Pointer to SDTV_Mode_PAL table */
4436
   USHORT	usCV_Tbl_Offset;		  // Pointer to SDTV_Mode_PAL table 
-
 
4437
}ATOM_BIOS_INT_TVSTD_MODE;
3634
	USHORT usCV_Tbl_Offset;	/*  Pointer to SDTV_Mode_PAL table */
4438
 
3635
} ATOM_BIOS_INT_TVSTD_MODE;
4439
 
3636
 
4440
typedef struct _ATOM_TV_MODE_SCALER_PTR
3637
typedef struct _ATOM_TV_MODE_SCALER_PTR {
4441
{
Line 3638... Line 4442...
3638
	USHORT ucFilter0_Offset;	/* Pointer to filter format 0 coefficients */
4442
   USHORT	ucFilter0_Offset;		//Pointer to filter format 0 coefficients
-
 
4443
   USHORT	usFilter1_Offset;		//Pointer to filter format 0 coefficients
3639
	USHORT usFilter1_Offset;	/* Pointer to filter format 0 coefficients */
4444
	UCHAR ucTV_Mode_Num;
3640
	UCHAR ucTV_Mode_Num;
4445
}ATOM_TV_MODE_SCALER_PTR;
3641
} ATOM_TV_MODE_SCALER_PTR;
4446
 
Line -... Line 4447...
-
 
4447
typedef struct _ATOM_STANDARD_VESA_TIMING
3642
 
4448
{
-
 
4449
	ATOM_COMMON_TABLE_HEADER sHeader;
3643
typedef struct _ATOM_STANDARD_VESA_TIMING {
4450
  ATOM_DTD_FORMAT 				 aModeTimings[16];      // 16 is not the real array number, just for initial allocation
3644
	ATOM_COMMON_TABLE_HEADER sHeader;
4451
}ATOM_STANDARD_VESA_TIMING;
3645
	ATOM_DTD_FORMAT aModeTimings[16];	/*  16 is not the real array number, just for initial allocation */
4452
 
3646
} ATOM_STANDARD_VESA_TIMING;
4453
 
3647
 
4454
typedef struct _ATOM_STD_FORMAT
Line 3648... Line 4455...
3648
typedef struct _ATOM_STD_FORMAT {
4455
{ 
-
 
4456
	USHORT usSTD_HDisp;
3649
	USHORT usSTD_HDisp;
4457
	USHORT usSTD_VDisp;
3650
	USHORT usSTD_VDisp;
4458
	USHORT usSTD_RefreshRate;
3651
	USHORT usSTD_RefreshRate;
4459
	USHORT usReserved;
Line 3652... Line 4460...
3652
	USHORT usReserved;
4460
}ATOM_STD_FORMAT;
-
 
4461
 
3653
} ATOM_STD_FORMAT;
4462
typedef struct _ATOM_VESA_TO_EXTENDED_MODE
3654
 
4463
{
3655
typedef struct _ATOM_VESA_TO_EXTENDED_MODE {
4464
	USHORT usVESA_ModeNumber;
Line 3656... Line 4465...
3656
	USHORT usVESA_ModeNumber;
4465
	USHORT usExtendedModeNumber;
Line 3669... Line 4478...
3669
	UCHAR ucAdjMCId;
4478
	UCHAR ucAdjMCId;
3670
	UCHAR ucDynClkId;
4479
	UCHAR ucDynClkId;
3671
	ULONG ulDllResetClkRange;
4480
	ULONG ulDllResetClkRange;
3672
} ATOM_MEMORY_VENDOR_BLOCK;
4481
}ATOM_MEMORY_VENDOR_BLOCK;
Line -... Line 4482...
-
 
4482
 
3673
 
4483
 
3674
typedef struct _ATOM_MEMORY_SETTING_ID_CONFIG {
4484
typedef struct _ATOM_MEMORY_SETTING_ID_CONFIG{
3675
#if ATOM_BIG_ENDIAN
4485
#if ATOM_BIG_ENDIAN
3676
	ULONG ucMemBlkId:8;
4486
	ULONG ucMemBlkId:8;
3677
	ULONG ulMemClockRange:24;
4487
	ULONG ulMemClockRange:24;
3678
#else
4488
#else
3679
	ULONG ulMemClockRange:24;
4489
	ULONG ulMemClockRange:24;
3680
	ULONG ucMemBlkId:8;
4490
	ULONG ucMemBlkId:8;
3681
#endif
4491
#endif
Line 3682... Line 4492...
3682
} ATOM_MEMORY_SETTING_ID_CONFIG;
4492
}ATOM_MEMORY_SETTING_ID_CONFIG;
-
 
4493
 
3683
 
4494
typedef union _ATOM_MEMORY_SETTING_ID_CONFIG_ACCESS
3684
typedef union _ATOM_MEMORY_SETTING_ID_CONFIG_ACCESS {
4495
{
3685
	ATOM_MEMORY_SETTING_ID_CONFIG slAccess;
4496
	ATOM_MEMORY_SETTING_ID_CONFIG slAccess;
Line -... Line 4497...
-
 
4497
	ULONG ulAccess;
3686
	ULONG ulAccess;
4498
}ATOM_MEMORY_SETTING_ID_CONFIG_ACCESS;
3687
} ATOM_MEMORY_SETTING_ID_CONFIG_ACCESS;
4499
 
3688
 
4500
 
3689
typedef struct _ATOM_MEMORY_SETTING_DATA_BLOCK {
4501
typedef struct _ATOM_MEMORY_SETTING_DATA_BLOCK{
Line -... Line 4502...
-
 
4502
	ATOM_MEMORY_SETTING_ID_CONFIG_ACCESS ulMemoryID;
3690
	ATOM_MEMORY_SETTING_ID_CONFIG_ACCESS ulMemoryID;
4503
	ULONG aulMemData[1];
3691
	ULONG aulMemData[1];
4504
}ATOM_MEMORY_SETTING_DATA_BLOCK;
3692
} ATOM_MEMORY_SETTING_DATA_BLOCK;
4505
 
3693
 
4506
 
Line -... Line 4507...
-
 
4507
typedef struct _ATOM_INIT_REG_INDEX_FORMAT{
3694
typedef struct _ATOM_INIT_REG_INDEX_FORMAT {
4508
	 USHORT											usRegIndex;                                     // MC register index
3695
	USHORT usRegIndex;	/*  MC register index */
4509
	 UCHAR											ucPreRegDataLength;                             // offset in ATOM_INIT_REG_DATA_BLOCK.saRegDataBuf
3696
	UCHAR ucPreRegDataLength;	/*  offset in ATOM_INIT_REG_DATA_BLOCK.saRegDataBuf */
4510
}ATOM_INIT_REG_INDEX_FORMAT;
3697
} ATOM_INIT_REG_INDEX_FORMAT;
4511
 
3698
 
4512
 
3699
typedef struct _ATOM_INIT_REG_BLOCK {
4513
typedef struct _ATOM_INIT_REG_BLOCK{
Line 3700... Line 4514...
3700
	USHORT usRegIndexTblSize;	/* size of asRegIndexBuf */
4514
	USHORT													usRegIndexTblSize;													//size of asRegIndexBuf
Line 3714... Line 4528...
3714
 
4528
 
3715
#define INDEX_ACCESS_RANGE_BEGIN	    (VALUE_DWORD + 1)
4529
#define INDEX_ACCESS_RANGE_BEGIN	    (VALUE_DWORD + 1)
3716
#define INDEX_ACCESS_RANGE_END		    (INDEX_ACCESS_RANGE_BEGIN + 1)
4530
#define INDEX_ACCESS_RANGE_END		    (INDEX_ACCESS_RANGE_BEGIN + 1)
Line -... Line 4531...
-
 
4531
#define VALUE_INDEX_ACCESS_SINGLE	    (INDEX_ACCESS_RANGE_END + 1)
3717
#define VALUE_INDEX_ACCESS_SINGLE	    (INDEX_ACCESS_RANGE_END + 1)
4532
 
-
 
4533
 
3718
 
4534
typedef struct _ATOM_MC_INIT_PARAM_TABLE
3719
typedef struct _ATOM_MC_INIT_PARAM_TABLE {
4535
{ 
3720
	ATOM_COMMON_TABLE_HEADER sHeader;
4536
	ATOM_COMMON_TABLE_HEADER sHeader;
3721
	USHORT usAdjustARB_SEQDataOffset;
4537
	USHORT usAdjustARB_SEQDataOffset;
3722
	USHORT usMCInitMemTypeTblOffset;
4538
	USHORT usMCInitMemTypeTblOffset;
3723
	USHORT usMCInitCommonTblOffset;
4539
	USHORT usMCInitCommonTblOffset;
3724
	USHORT usMCInitPowerDownTblOffset;
4540
	USHORT usMCInitPowerDownTblOffset;
3725
	ULONG ulARB_SEQDataBuf[32];
4541
	ULONG ulARB_SEQDataBuf[32];
3726
	ATOM_INIT_REG_BLOCK asMCInitMemType;
4542
	ATOM_INIT_REG_BLOCK asMCInitMemType;
Line -... Line 4543...
-
 
4543
	ATOM_INIT_REG_BLOCK asMCInitCommon;
3727
	ATOM_INIT_REG_BLOCK asMCInitCommon;
4544
}ATOM_MC_INIT_PARAM_TABLE;
3728
} ATOM_MC_INIT_PARAM_TABLE;
4545
 
3729
 
4546
 
3730
#define _4Mx16              0x2
4547
#define _4Mx16              0x2
3731
#define _4Mx32              0x3
4548
#define _4Mx32              0x3
Line 3749... Line 4566...
3749
#define ESMT                0x9
4566
#define ESMT                0x9
3750
#define MICRON              0xF
4567
#define MICRON              0xF
Line 3751... Line 4568...
3751
 
4568
 
3752
#define QIMONDA             INFINEON
4569
#define QIMONDA             INFINEON
-
 
4570
#define PROMOS              MOSEL
Line 3753... Line 4571...
3753
#define PROMOS              MOSEL
4571
#define KRETON              INFINEON
Line 3754... Line 4572...
3754
 
4572
 
3755
/* ///////////Support for GDDR5 MC uCode to reside in upper 64K of ROM///////////// */
4573
/////////////Support for GDDR5 MC uCode to reside in upper 64K of ROM/////////////
Line 3756... Line 4574...
3756
 
4574
 
Line 3757... Line 4575...
3757
#define UCODE_ROM_START_ADDRESS		0x1c000
4575
#define UCODE_ROM_START_ADDRESS		0x1c000
-
 
4576
#define	UCODE_SIGNATURE			0x4375434d // 'MCuC' - MC uCode
3758
#define	UCODE_SIGNATURE			0x4375434d	/*  'MCuC' - MC uCode */
4577
 
3759
 
4578
//uCode block header for reference
3760
/* uCode block header for reference */
4579
 
3761
 
4580
typedef struct _MCuCodeHeader
3762
typedef struct _MCuCodeHeader {
4581
{
Line 3769... Line 4588...
3769
	USHORT usUCodeLength;
4588
	USHORT usUCodeLength;
3770
	USHORT usReserved1;
4589
	USHORT usReserved1;
3771
	USHORT usReserved2;
4590
	USHORT usReserved2;
3772
} MCuCodeHeader;
4591
} MCuCodeHeader;
Line 3773... Line 4592...
3773
 
4592
 
Line 3774... Line 4593...
3774
/* //////////////////////////////////////////////////////////////////////////////// */
4593
//////////////////////////////////////////////////////////////////////////////////
Line 3775... Line 4594...
3775
 
4594
 
3776
#define ATOM_MAX_NUMBER_OF_VRAM_MODULE	16
4595
#define ATOM_MAX_NUMBER_OF_VRAM_MODULE	16
-
 
4596
 
3777
 
4597
#define ATOM_VRAM_MODULE_MEMORY_VENDOR_ID_MASK	0xF
3778
#define ATOM_VRAM_MODULE_MEMORY_VENDOR_ID_MASK	0xF
4598
typedef struct _ATOM_VRAM_MODULE_V1
3779
typedef struct _ATOM_VRAM_MODULE_V1 {
4599
{
3780
	ULONG ulReserved;
4600
	ULONG ulReserved;
3781
	USHORT usEMRSValue;
4601
	USHORT usEMRSValue;
3782
	USHORT usMRSValue;
4602
	USHORT usMRSValue;
3783
	USHORT usReserved;
4603
	USHORT usReserved;
3784
	UCHAR ucExtMemoryID;	/*  An external indicator (by hardcode, callback or pin) to tell what is the current memory module */
4604
  UCHAR                      ucExtMemoryID;     // An external indicator (by hardcode, callback or pin) to tell what is the current memory module
3785
	UCHAR ucMemoryType;	/*  [7:4]=0x1:DDR1;=0x2:DDR2;=0x3:DDR3;=0x4:DDR4;[3:0] reserved; */
4605
  UCHAR                      ucMemoryType;      // [7:4]=0x1:DDR1;=0x2:DDR2;=0x3:DDR3;=0x4:DDR4;[3:0] reserved;
3786
	UCHAR ucMemoryVenderID;	/*  Predefined,never change across designs or memory type/vender */
4606
  UCHAR                      ucMemoryVenderID;  // Predefined,never change across designs or memory type/vender 
3787
	UCHAR ucMemoryDeviceCfg;	/*  [7:4]=0x0:4M;=0x1:8M;=0x2:16M;0x3:32M....[3:0]=0x0:x4;=0x1:x8;=0x2:x16;=0x3:x32... */
4607
  UCHAR                      ucMemoryDeviceCfg; // [7:4]=0x0:4M;=0x1:8M;=0x2:16M;0x3:32M....[3:0]=0x0:x4;=0x1:x8;=0x2:x16;=0x3:x32...
3788
	UCHAR ucRow;		/*  Number of Row,in power of 2; */
4608
  UCHAR                      ucRow;             // Number of Row,in power of 2;
3789
	UCHAR ucColumn;		/*  Number of Column,in power of 2; */
4609
  UCHAR                      ucColumn;          // Number of Column,in power of 2;
3790
	UCHAR ucBank;		/*  Nunber of Bank; */
4610
  UCHAR                      ucBank;            // Nunber of Bank;
3791
	UCHAR ucRank;		/*  Number of Rank, in power of 2 */
4611
  UCHAR                      ucRank;            // Number of Rank, in power of 2
3792
	UCHAR ucChannelNum;	/*  Number of channel; */
4612
  UCHAR                      ucChannelNum;      // Number of channel;
3793
	UCHAR ucChannelConfig;	/*  [3:0]=Indication of what channel combination;[4:7]=Channel bit width, in number of 2 */
4613
  UCHAR                      ucChannelConfig;   // [3:0]=Indication of what channel combination;[4:7]=Channel bit width, in number of 2
3794
	UCHAR ucDefaultMVDDQ_ID;	/*  Default MVDDQ setting for this memory block, ID linking to MVDDQ info table to find real set-up data; */
4614
  UCHAR                      ucDefaultMVDDQ_ID; // Default MVDDQ setting for this memory block, ID linking to MVDDQ info table to find real set-up data;
Line -... Line 4615...
-
 
4615
  UCHAR                      ucDefaultMVDDC_ID; // Default MVDDC setting for this memory block, ID linking to MVDDC info table to find real set-up data;
3795
	UCHAR ucDefaultMVDDC_ID;	/*  Default MVDDC setting for this memory block, ID linking to MVDDC info table to find real set-up data; */
4616
	UCHAR ucReserved[2];
-
 
4617
}ATOM_VRAM_MODULE_V1;
3796
	UCHAR ucReserved[2];
4618
 
3797
} ATOM_VRAM_MODULE_V1;
4619
 
3798
 
4620
typedef struct _ATOM_VRAM_MODULE_V2
3799
typedef struct _ATOM_VRAM_MODULE_V2 {
4621
{
3800
	ULONG ulReserved;
4622
	ULONG ulReserved;
3801
	ULONG ulFlags;		/*  To enable/disable functionalities based on memory type */
4623
  ULONG                      ulFlags;     			// To enable/disable functionalities based on memory type
3802
	ULONG ulEngineClock;	/*  Override of default engine clock for particular memory type */
4624
  ULONG                      ulEngineClock;     // Override of default engine clock for particular memory type
3803
	ULONG ulMemoryClock;	/*  Override of default memory clock for particular memory type */
4625
  ULONG                      ulMemoryClock;     // Override of default memory clock for particular memory type
3804
	USHORT usEMRS2Value;	/*  EMRS2 Value is used for GDDR2 and GDDR4 memory type */
4626
  USHORT                     usEMRS2Value;      // EMRS2 Value is used for GDDR2 and GDDR4 memory type
3805
	USHORT usEMRS3Value;	/*  EMRS3 Value is used for GDDR2 and GDDR4 memory type */
4627
  USHORT                     usEMRS3Value;      // EMRS3 Value is used for GDDR2 and GDDR4 memory type
3806
	USHORT usEMRSValue;
4628
	USHORT usEMRSValue;
3807
	USHORT usMRSValue;
4629
	USHORT usMRSValue;
3808
	USHORT usReserved;
4630
	USHORT usReserved;
3809
	UCHAR ucExtMemoryID;	/*  An external indicator (by hardcode, callback or pin) to tell what is the current memory module */
4631
  UCHAR                      ucExtMemoryID;     // An external indicator (by hardcode, callback or pin) to tell what is the current memory module
3810
	UCHAR ucMemoryType;	/*  [7:4]=0x1:DDR1;=0x2:DDR2;=0x3:DDR3;=0x4:DDR4;[3:0] - must not be used for now; */
4632
  UCHAR                      ucMemoryType;      // [7:4]=0x1:DDR1;=0x2:DDR2;=0x3:DDR3;=0x4:DDR4;[3:0] - must not be used for now;
3811
	UCHAR ucMemoryVenderID;	/*  Predefined,never change across designs or memory type/vender. If not predefined, vendor detection table gets executed */
4633
  UCHAR                      ucMemoryVenderID;  // Predefined,never change across designs or memory type/vender. If not predefined, vendor detection table gets executed
3812
	UCHAR ucMemoryDeviceCfg;	/*  [7:4]=0x0:4M;=0x1:8M;=0x2:16M;0x3:32M....[3:0]=0x0:x4;=0x1:x8;=0x2:x16;=0x3:x32... */
4634
  UCHAR                      ucMemoryDeviceCfg; // [7:4]=0x0:4M;=0x1:8M;=0x2:16M;0x3:32M....[3:0]=0x0:x4;=0x1:x8;=0x2:x16;=0x3:x32...
3813
	UCHAR ucRow;		/*  Number of Row,in power of 2; */
4635
  UCHAR                      ucRow;             // Number of Row,in power of 2;
3814
	UCHAR ucColumn;		/*  Number of Column,in power of 2; */
4636
  UCHAR                      ucColumn;          // Number of Column,in power of 2;
3815
	UCHAR ucBank;		/*  Nunber of Bank; */
4637
  UCHAR                      ucBank;            // Nunber of Bank;
3816
	UCHAR ucRank;		/*  Number of Rank, in power of 2 */
4638
  UCHAR                      ucRank;            // Number of Rank, in power of 2
3817
	UCHAR ucChannelNum;	/*  Number of channel; */
4639
  UCHAR                      ucChannelNum;      // Number of channel;
3818
	UCHAR ucChannelConfig;	/*  [3:0]=Indication of what channel combination;[4:7]=Channel bit width, in number of 2 */
4640
  UCHAR                      ucChannelConfig;   // [3:0]=Indication of what channel combination;[4:7]=Channel bit width, in number of 2
3819
	UCHAR ucDefaultMVDDQ_ID;	/*  Default MVDDQ setting for this memory block, ID linking to MVDDQ info table to find real set-up data; */
4641
  UCHAR                      ucDefaultMVDDQ_ID; // Default MVDDQ setting for this memory block, ID linking to MVDDQ info table to find real set-up data;
Line -... Line 4642...
-
 
4642
  UCHAR                      ucDefaultMVDDC_ID; // Default MVDDC setting for this memory block, ID linking to MVDDC info table to find real set-up data;
3820
	UCHAR ucDefaultMVDDC_ID;	/*  Default MVDDC setting for this memory block, ID linking to MVDDC info table to find real set-up data; */
4643
	UCHAR ucRefreshRateFactor;
-
 
4644
	UCHAR ucReserved[3];
3821
	UCHAR ucRefreshRateFactor;
4645
}ATOM_VRAM_MODULE_V2;
3822
	UCHAR ucReserved[3];
4646
 
3823
} ATOM_VRAM_MODULE_V2;
4647
 
3824
 
4648
typedef	struct _ATOM_MEMORY_TIMING_FORMAT
3825
typedef struct _ATOM_MEMORY_TIMING_FORMAT {
4649
{
3826
	ULONG ulClkRange;	/*  memory clock in 10kHz unit, when target memory clock is below this clock, use this memory timing */
4650
	ULONG											 ulClkRange;				// memory clock in 10kHz unit, when target memory clock is below this clock, use this memory timing 	
3827
	union {
4651
  union{
3828
		USHORT usMRS;	/*  mode register */
4652
	  USHORT										 usMRS;							// mode register						
3829
		USHORT usDDR3_MR0;
4653
		USHORT usDDR3_MR0;
3830
	};
4654
	};
3831
	union {
4655
  union{
3832
		USHORT usEMRS;	/*  extended mode register */
4656
	  USHORT										 usEMRS;						// extended mode register
3833
		USHORT usDDR3_MR1;
4657
		USHORT usDDR3_MR1;
3834
	};
4658
	};
3835
	UCHAR ucCL;		/*  CAS latency */
4659
	UCHAR											 ucCL;							// CAS latency
3836
	UCHAR ucWL;		/*  WRITE Latency */
4660
	UCHAR											 ucWL;							// WRITE Latency				
3837
	UCHAR uctRAS;		/*  tRAS */
4661
	UCHAR											 uctRAS;						// tRAS
3838
	UCHAR uctRC;		/*  tRC */
4662
	UCHAR											 uctRC;							// tRC	
3839
	UCHAR uctRFC;		/*  tRFC */
4663
	UCHAR											 uctRFC;						// tRFC
3840
	UCHAR uctRCDR;		/*  tRCDR */
4664
	UCHAR											 uctRCDR;						// tRCDR	
3841
	UCHAR uctRCDW;		/*  tRCDW */
4665
	UCHAR											 uctRCDW;						// tRCDW
3842
	UCHAR uctRP;		/*  tRP */
4666
	UCHAR											 uctRP;							// tRP
3843
	UCHAR uctRRD;		/*  tRRD */
4667
	UCHAR											 uctRRD;						// tRRD	
3844
	UCHAR uctWR;		/*  tWR */
4668
	UCHAR											 uctWR;							// tWR
-
 
4669
	UCHAR											 uctWTR;						// tWTR
3845
	UCHAR uctWTR;		/*  tWTR */
4670
	UCHAR											 uctPDIX;						// tPDIX
3846
	UCHAR uctPDIX;		/*  tPDIX */
4671
	UCHAR											 uctFAW;						// tFAW
3847
	UCHAR uctFAW;		/*  tFAW */
4672
	UCHAR											 uctAOND;						// tAOND
3848
	UCHAR uctAOND;		/*  tAOND */
4673
  union 
3849
	union {
4674
  {
3850
		struct {
4675
		struct {
3851
			UCHAR ucflag;	/*  flag to control memory timing calculation. bit0= control EMRS2 Infineon */
4676
	    UCHAR											 ucflag;						// flag to control memory timing calculation. bit0= control EMRS2 Infineon 
Line -... Line 4677...
-
 
4677
			UCHAR ucReserved;
3852
			UCHAR ucReserved;
4678
		};
-
 
4679
		USHORT usDDR3_MR2;
3853
		};
4680
	};
3854
		USHORT usDDR3_MR2;
4681
}ATOM_MEMORY_TIMING_FORMAT;
3855
	};
4682
 
3856
} ATOM_MEMORY_TIMING_FORMAT;
4683
 
3857
 
4684
typedef	struct _ATOM_MEMORY_TIMING_FORMAT_V1
3858
typedef struct _ATOM_MEMORY_TIMING_FORMAT_V1 {
4685
{
3859
	ULONG ulClkRange;	/*  memory clock in 10kHz unit, when target memory clock is below this clock, use this memory timing */
4686
	ULONG											 ulClkRange;				// memory clock in 10kHz unit, when target memory clock is below this clock, use this memory timing 	
3860
	USHORT usMRS;		/*  mode register */
4687
	USHORT										 usMRS;							// mode register						
3861
	USHORT usEMRS;		/*  extended mode register */
4688
	USHORT										 usEMRS;						// extended mode register
3862
	UCHAR ucCL;		/*  CAS latency */
4689
	UCHAR											 ucCL;							// CAS latency
3863
	UCHAR ucWL;		/*  WRITE Latency */
4690
	UCHAR											 ucWL;							// WRITE Latency				
3864
	UCHAR uctRAS;		/*  tRAS */
4691
	UCHAR											 uctRAS;						// tRAS
3865
	UCHAR uctRC;		/*  tRC */
4692
	UCHAR											 uctRC;							// tRC	
3866
	UCHAR uctRFC;		/*  tRFC */
4693
	UCHAR											 uctRFC;						// tRFC
3867
	UCHAR uctRCDR;		/*  tRCDR */
4694
	UCHAR											 uctRCDR;						// tRCDR	
3868
	UCHAR uctRCDW;		/*  tRCDW */
4695
	UCHAR											 uctRCDW;						// tRCDW
3869
	UCHAR uctRP;		/*  tRP */
4696
	UCHAR											 uctRP;							// tRP
3870
	UCHAR uctRRD;		/*  tRRD */
4697
	UCHAR											 uctRRD;						// tRRD	
3871
	UCHAR uctWR;		/*  tWR */
4698
	UCHAR											 uctWR;							// tWR
3872
	UCHAR uctWTR;		/*  tWTR */
4699
	UCHAR											 uctWTR;						// tWTR
3873
	UCHAR uctPDIX;		/*  tPDIX */
4700
	UCHAR											 uctPDIX;						// tPDIX
3874
	UCHAR uctFAW;		/*  tFAW */
4701
	UCHAR											 uctFAW;						// tFAW
3875
	UCHAR uctAOND;		/*  tAOND */
4702
	UCHAR											 uctAOND;						// tAOND
3876
	UCHAR ucflag;		/*  flag to control memory timing calculation. bit0= control EMRS2 Infineon */
4703
	UCHAR											 ucflag;						// flag to control memory timing calculation. bit0= control EMRS2 Infineon 
3877
/* ///////////////////////GDDR parameters/////////////////////////////////// */
4704
////////////////////////////////////GDDR parameters///////////////////////////////////
3878
	UCHAR uctCCDL;		/*  */
4705
	UCHAR											 uctCCDL;						// 
3879
	UCHAR uctCRCRL;		/*  */
4706
	UCHAR											 uctCRCRL;						// 
3880
	UCHAR uctCRCWL;		/*  */
4707
	UCHAR											 uctCRCWL;						// 
3881
	UCHAR uctCKE;		/*  */
4708
	UCHAR											 uctCKE;						// 
3882
	UCHAR uctCKRSE;		/*  */
4709
	UCHAR											 uctCKRSE;						// 
Line -... Line 4710...
-
 
4710
	UCHAR											 uctCKRSX;						// 
-
 
4711
	UCHAR											 uctFAW32;						// 
-
 
4712
	UCHAR											 ucMR5lo;					// 
-
 
4713
	UCHAR											 ucMR5hi;					// 
-
 
4714
	UCHAR											 ucTerminator;
-
 
4715
}ATOM_MEMORY_TIMING_FORMAT_V1;
-
 
4716
 
-
 
4717
typedef	struct _ATOM_MEMORY_TIMING_FORMAT_V2
-
 
4718
{
-
 
4719
	ULONG											 ulClkRange;				// memory clock in 10kHz unit, when target memory clock is below this clock, use this memory timing 	
-
 
4720
	USHORT										 usMRS;							// mode register						
-
 
4721
	USHORT										 usEMRS;						// extended mode register
-
 
4722
	UCHAR											 ucCL;							// CAS latency
-
 
4723
	UCHAR											 ucWL;							// WRITE Latency				
-
 
4724
	UCHAR											 uctRAS;						// tRAS
-
 
4725
	UCHAR											 uctRC;							// tRC	
-
 
4726
	UCHAR											 uctRFC;						// tRFC
-
 
4727
	UCHAR											 uctRCDR;						// tRCDR	
-
 
4728
	UCHAR											 uctRCDW;						// tRCDW
-
 
4729
	UCHAR											 uctRP;							// tRP
-
 
4730
	UCHAR											 uctRRD;						// tRRD	
-
 
4731
	UCHAR											 uctWR;							// tWR
-
 
4732
	UCHAR											 uctWTR;						// tWTR
-
 
4733
	UCHAR											 uctPDIX;						// tPDIX
-
 
4734
	UCHAR											 uctFAW;						// tFAW
-
 
4735
	UCHAR											 uctAOND;						// tAOND
-
 
4736
	UCHAR											 ucflag;						// flag to control memory timing calculation. bit0= control EMRS2 Infineon 
-
 
4737
////////////////////////////////////GDDR parameters///////////////////////////////////
-
 
4738
	UCHAR											 uctCCDL;						// 
-
 
4739
	UCHAR											 uctCRCRL;						// 
-
 
4740
	UCHAR											 uctCRCWL;						// 
-
 
4741
	UCHAR											 uctCKE;						// 
-
 
4742
	UCHAR											 uctCKRSE;						// 
-
 
4743
	UCHAR											 uctCKRSX;						// 
-
 
4744
	UCHAR											 uctFAW32;						// 
-
 
4745
	UCHAR											 ucMR4lo;					// 
3883
	UCHAR uctCKRSX;		/*  */
4746
	UCHAR											 ucMR4hi;					// 
-
 
4747
	UCHAR											 ucMR5lo;					// 
3884
	UCHAR uctFAW32;		/*  */
4748
	UCHAR											 ucMR5hi;					// 
3885
	UCHAR ucReserved1;	/*  */
4749
	UCHAR ucTerminator;
3886
	UCHAR ucReserved2;	/*  */
4750
	UCHAR											 ucReserved;	
3887
	UCHAR ucTerminator;
4751
}ATOM_MEMORY_TIMING_FORMAT_V2;
3888
} ATOM_MEMORY_TIMING_FORMAT_V1;
4752
 
3889
 
4753
typedef	struct _ATOM_MEMORY_FORMAT
3890
typedef struct _ATOM_MEMORY_FORMAT {
4754
{
3891
	ULONG ulDllDisClock;	/*  memory DLL will be disable when target memory clock is below this clock */
4755
	ULONG											 ulDllDisClock;			// memory DLL will be disable when target memory clock is below this clock
3892
	union {
4756
  union{
3893
		USHORT usEMRS2Value;	/*  EMRS2 Value is used for GDDR2 and GDDR4 memory type */
4757
    USHORT                     usEMRS2Value;      // EMRS2 Value is used for GDDR2 and GDDR4 memory type
3894
		USHORT usDDR3_Reserved;	/*  Not used for DDR3 memory */
4758
    USHORT                     usDDR3_Reserved;   // Not used for DDR3 memory
3895
	};
4759
	};
3896
	union {
4760
  union{
3897
		USHORT usEMRS3Value;	/*  EMRS3 Value is used for GDDR2 and GDDR4 memory type */
4761
    USHORT                     usEMRS3Value;      // EMRS3 Value is used for GDDR2 and GDDR4 memory type
3898
		USHORT usDDR3_MR3;	/*  Used for DDR3 memory */
4762
    USHORT                     usDDR3_MR3;        // Used for DDR3 memory
3899
	};
4763
	};
3900
	UCHAR ucMemoryType;	/*  [7:4]=0x1:DDR1;=0x2:DDR2;=0x3:DDR3;=0x4:DDR4;[3:0] - must not be used for now; */
4764
  UCHAR                      ucMemoryType;      // [7:4]=0x1:DDR1;=0x2:DDR2;=0x3:DDR3;=0x4:DDR4;[3:0] - must not be used for now;
3901
	UCHAR ucMemoryVenderID;	/*  Predefined,never change across designs or memory type/vender. If not predefined, vendor detection table gets executed */
4765
  UCHAR                      ucMemoryVenderID;  // Predefined,never change across designs or memory type/vender. If not predefined, vendor detection table gets executed
3902
	UCHAR ucRow;		/*  Number of Row,in power of 2; */
4766
  UCHAR                      ucRow;             // Number of Row,in power of 2;
3903
	UCHAR ucColumn;		/*  Number of Column,in power of 2; */
4767
  UCHAR                      ucColumn;          // Number of Column,in power of 2;
3904
	UCHAR ucBank;		/*  Nunber of Bank; */
4768
  UCHAR                      ucBank;            // Nunber of Bank;
3905
	UCHAR ucRank;		/*  Number of Rank, in power of 2 */
4769
  UCHAR                      ucRank;            // Number of Rank, in power of 2
3906
	UCHAR ucBurstSize;	/*  burst size, 0= burst size=4  1= burst size=8 */
4770
	UCHAR											 ucBurstSize;				// burst size, 0= burst size=4  1= burst size=8
Line -... Line 4771...
-
 
4771
  UCHAR                      ucDllDisBit;				// position of DLL Enable/Disable bit in EMRS ( Extended Mode Register )
3907
	UCHAR ucDllDisBit;	/*  position of DLL Enable/Disable bit in EMRS ( Extended Mode Register ) */
4772
  UCHAR                      ucRefreshRateFactor;	// memory refresh rate in unit of ms	
-
 
4773
	UCHAR											 ucDensity;					// _8Mx32, _16Mx32, _16Mx16, _32Mx16
3908
	UCHAR ucRefreshRateFactor;	/*  memory refresh rate in unit of ms */
4774
	UCHAR											 ucPreamble;				//[7:4] Write Preamble, [3:0] Read Preamble
3909
	UCHAR ucDensity;	/*  _8Mx32, _16Mx32, _16Mx16, _32Mx16 */
4775
  UCHAR											 ucMemAttrib;				// Memory Device Addribute, like RDBI/WDBI etc
3910
	UCHAR ucPreamble;	/* [7:4] Write Preamble, [3:0] Read Preamble */
4776
	ATOM_MEMORY_TIMING_FORMAT	 asMemTiming[5];		//Memory Timing block sort from lower clock to higher clock
3911
	UCHAR ucMemAttrib;	/*  Memory Device Addribute, like RDBI/WDBI etc */
4777
}ATOM_MEMORY_FORMAT;
3912
	ATOM_MEMORY_TIMING_FORMAT asMemTiming[5];	/* Memory Timing block sort from lower clock to higher clock */
4778
 
3913
} ATOM_MEMORY_FORMAT;
4779
 
3914
 
4780
typedef struct _ATOM_VRAM_MODULE_V3
3915
typedef struct _ATOM_VRAM_MODULE_V3 {
4781
{
3916
	ULONG ulChannelMapCfg;	/*  board dependent paramenter:Channel combination */
4782
	ULONG											 ulChannelMapCfg;		// board dependent paramenter:Channel combination
3917
	USHORT usSize;		/*  size of ATOM_VRAM_MODULE_V3 */
4783
	USHORT										 usSize;						// size of ATOM_VRAM_MODULE_V3
3918
	USHORT usDefaultMVDDQ;	/*  board dependent parameter:Default Memory Core Voltage */
4784
  USHORT                     usDefaultMVDDQ;		// board dependent parameter:Default Memory Core Voltage
3919
	USHORT usDefaultMVDDC;	/*  board dependent parameter:Default Memory IO Voltage */
4785
  USHORT                     usDefaultMVDDC;		// board dependent parameter:Default Memory IO Voltage
Line -... Line 4786...
-
 
4786
	UCHAR                      ucExtMemoryID;     // An external indicator (by hardcode, callback or pin) to tell what is the current memory module
3920
	UCHAR ucExtMemoryID;	/*  An external indicator (by hardcode, callback or pin) to tell what is the current memory module */
4787
  UCHAR                      ucChannelNum;      // board dependent parameter:Number of channel;
3921
	UCHAR ucChannelNum;	/*  board dependent parameter:Number of channel; */
4788
	UCHAR											 ucChannelSize;			// board dependent parameter:32bit or 64bit	
3922
	UCHAR ucChannelSize;	/*  board dependent parameter:32bit or 64bit */
4789
	UCHAR											 ucVREFI;						// board dependnt parameter: EXT or INT +160mv to -140mv
Line 3923... Line 4790...
3923
	UCHAR ucVREFI;		/*  board dependnt parameter: EXT or INT +160mv to -140mv */
4790
	UCHAR											 ucNPL_RT;					// board dependent parameter:NPL round trip delay, used for calculate memory timing parameters
Line 3924... Line 4791...
3924
	UCHAR ucNPL_RT;		/*  board dependent parameter:NPL round trip delay, used for calculate memory timing parameters */
4791
	UCHAR											 ucFlag;						// To enable/disable functionalities based on memory type
-
 
4792
	ATOM_MEMORY_FORMAT				 asMemory;					// describ all of video memory parameters from memory spec
3925
	UCHAR ucFlag;		/*  To enable/disable functionalities based on memory type */
4793
}ATOM_VRAM_MODULE_V3;
3926
	ATOM_MEMORY_FORMAT asMemory;	/*  describ all of video memory parameters from memory spec */
4794
 
3927
} ATOM_VRAM_MODULE_V3;
4795
 
3928
 
4796
//ATOM_VRAM_MODULE_V3.ucNPL_RT
3929
/* ATOM_VRAM_MODULE_V3.ucNPL_RT */
4797
#define NPL_RT_MASK															0x0f
3930
#define NPL_RT_MASK															0x0f
4798
#define BATTERY_ODT_MASK												0xc0
3931
#define BATTERY_ODT_MASK												0xc0
4799
 
3932
 
4800
#define ATOM_VRAM_MODULE		 ATOM_VRAM_MODULE_V3
3933
#define ATOM_VRAM_MODULE		 ATOM_VRAM_MODULE_V3
4801
 
3934
 
4802
typedef struct _ATOM_VRAM_MODULE_V4
3935
typedef struct _ATOM_VRAM_MODULE_V4 {
4803
{
3936
	ULONG ulChannelMapCfg;	/*  board dependent parameter: Channel combination */
4804
  ULONG	  ulChannelMapCfg;	                // board dependent parameter: Channel combination
3937
	USHORT usModuleSize;	/*  size of ATOM_VRAM_MODULE_V4, make it easy for VBIOS to look for next entry of VRAM_MODULE */
4805
  USHORT  usModuleSize;                     // size of ATOM_VRAM_MODULE_V4, make it easy for VBIOS to look for next entry of VRAM_MODULE
3938
	USHORT usPrivateReserved;	/*  BIOS internal reserved space to optimize code size, updated by the compiler, shouldn't be modified manually!! */
4806
  USHORT  usPrivateReserved;                // BIOS internal reserved space to optimize code size, updated by the compiler, shouldn't be modified manually!!
3939
	/*  MC_ARB_RAMCFG (includes NOOFBANK,NOOFRANKS,NOOFROWS,NOOFCOLS) */
4807
                                            // MC_ARB_RAMCFG (includes NOOFBANK,NOOFRANKS,NOOFROWS,NOOFCOLS)
3940
	USHORT usReserved;
4808
	USHORT usReserved;
3941
	UCHAR ucExtMemoryID;	/*  An external indicator (by hardcode, callback or pin) to tell what is the current memory module */
4809
  UCHAR   ucExtMemoryID;    		            // An external indicator (by hardcode, callback or pin) to tell what is the current memory module
3942
	UCHAR ucMemoryType;	/*  [7:4]=0x1:DDR1;=0x2:DDR2;=0x3:DDR3;=0x4:DDR4; 0x5:DDR5 [3:0] - Must be 0x0 for now; */
4810
  UCHAR   ucMemoryType;                     // [7:4]=0x1:DDR1;=0x2:DDR2;=0x3:DDR3;=0x4:DDR4; 0x5:DDR5 [3:0] - Must be 0x0 for now;
Line 3943... Line 4811...
3943
	UCHAR ucChannelNum;	/*  Number of channels present in this module config */
4811
  UCHAR   ucChannelNum;                     // Number of channels present in this module config
3944
	UCHAR ucChannelWidth;	/*  0 - 32 bits; 1 - 64 bits */
4812
  UCHAR   ucChannelWidth;                   // 0 - 32 bits; 1 - 64 bits
3945
	UCHAR ucDensity;	/*  _8Mx32, _16Mx32, _16Mx16, _32Mx16 */
4813
	UCHAR   ucDensity;                        // _8Mx32, _16Mx32, _16Mx16, _32Mx16
3946
	UCHAR ucFlag;		/*  To enable/disable functionalities based on memory type */
4814
	UCHAR	  ucFlag;						                // To enable/disable functionalities based on memory type
3947
	UCHAR ucMisc;		/*  bit0: 0 - single rank; 1 - dual rank;   bit2: 0 - burstlength 4, 1 - burstlength 8 */
4815
	UCHAR	  ucMisc;						                // bit0: 0 - single rank; 1 - dual rank;   bit2: 0 - burstlength 4, 1 - burstlength 8
3948
	UCHAR ucVREFI;		/*  board dependent parameter */
4816
  UCHAR		ucVREFI;                          // board dependent parameter
3949
	UCHAR ucNPL_RT;		/*  board dependent parameter:NPL round trip delay, used for calculate memory timing parameters */
4817
  UCHAR   ucNPL_RT;                         // board dependent parameter:NPL round trip delay, used for calculate memory timing parameters
3950
	UCHAR ucPreamble;	/*  [7:4] Write Preamble, [3:0] Read Preamble */
4818
  UCHAR		ucPreamble;                       // [7:4] Write Preamble, [3:0] Read Preamble
3951
	UCHAR ucMemorySize;	/*  BIOS internal reserved space to optimize code size, updated by the compiler, shouldn't be modified manually!! */
4819
  UCHAR   ucMemorySize;                     // BIOS internal reserved space to optimize code size, updated by the compiler, shouldn't be modified manually!!
3952
	/*  Total memory size in unit of 16MB for CONFIG_MEMSIZE - bit[23:0] zeros */
4820
                                            // Total memory size in unit of 16MB for CONFIG_MEMSIZE - bit[23:0] zeros
3953
	UCHAR ucReserved[3];
4821
	UCHAR ucReserved[3];
3954
 
4822
 
3955
/* compare with V3, we flat the struct by merging ATOM_MEMORY_FORMAT (as is) into V4 as the same level */
4823
//compare with V3, we flat the struct by merging ATOM_MEMORY_FORMAT (as is) into V4 as the same level
3956
	union {
4824
  union{
Line 3957... Line 4825...
3957
		USHORT usEMRS2Value;	/*  EMRS2 Value is used for GDDR2 and GDDR4 memory type */
4825
    USHORT	usEMRS2Value;                   // EMRS2 Value is used for GDDR2 and GDDR4 memory type
3958
		USHORT usDDR3_Reserved;
4826
		USHORT usDDR3_Reserved;
3959
	};
4827
	};
3960
	union {
4828
  union{
3961
		USHORT usEMRS3Value;	/*  EMRS3 Value is used for GDDR2 and GDDR4 memory type */
4829
    USHORT	usEMRS3Value;                   // EMRS3 Value is used for GDDR2 and GDDR4 memory type
Line 3962... Line 4830...
3962
		USHORT usDDR3_MR3;	/*  Used for DDR3 memory */
4830
    USHORT  usDDR3_MR3;                     // Used for DDR3 memory
-
 
4831
	};
3963
	};
4832
  UCHAR   ucMemoryVenderID;  		            // Predefined, If not predefined, vendor detection table gets executed
3964
	UCHAR ucMemoryVenderID;	/*  Predefined, If not predefined, vendor detection table gets executed */
4833
  UCHAR	  ucRefreshRateFactor;              // [1:0]=RefreshFactor (00=8ms, 01=16ms, 10=32ms,11=64ms)
3965
	UCHAR ucRefreshRateFactor;	/*  [1:0]=RefreshFactor (00=8ms, 01=16ms, 10=32ms,11=64ms) */
4834
	UCHAR ucReserved2[2];
3966
	UCHAR ucReserved2[2];
4835
  ATOM_MEMORY_TIMING_FORMAT  asMemTiming[5];//Memory Timing block sort from lower clock to higher clock
3967
	ATOM_MEMORY_TIMING_FORMAT asMemTiming[5];	/* Memory Timing block sort from lower clock to higher clock */
4836
}ATOM_VRAM_MODULE_V4;
3968
} ATOM_VRAM_MODULE_V4;
4837
 
3969
 
4838
#define VRAM_MODULE_V4_MISC_RANK_MASK       0x3
3970
#define VRAM_MODULE_V4_MISC_RANK_MASK       0x3
4839
#define VRAM_MODULE_V4_MISC_DUAL_RANK       0x1
3971
#define VRAM_MODULE_V4_MISC_DUAL_RANK       0x1
4840
#define VRAM_MODULE_V4_MISC_BL_MASK         0x4
3972
#define VRAM_MODULE_V4_MISC_BL_MASK         0x4
4841
#define VRAM_MODULE_V4_MISC_BL8             0x4
3973
#define VRAM_MODULE_V4_MISC_BL8             0x4
4842
#define VRAM_MODULE_V4_MISC_DUAL_CS         0x10
3974
#define VRAM_MODULE_V4_MISC_DUAL_CS         0x10
4843
 
3975
 
4844
typedef struct _ATOM_VRAM_MODULE_V5
3976
typedef struct _ATOM_VRAM_MODULE_V5 {
4845
{
3977
	ULONG ulChannelMapCfg;	/*  board dependent parameter: Channel combination */
4846
  ULONG	  ulChannelMapCfg;	                // board dependent parameter: Channel combination
3978
	USHORT usModuleSize;	/*  size of ATOM_VRAM_MODULE_V4, make it easy for VBIOS to look for next entry of VRAM_MODULE */
4847
  USHORT  usModuleSize;                     // size of ATOM_VRAM_MODULE_V4, make it easy for VBIOS to look for next entry of VRAM_MODULE
3979
	USHORT usPrivateReserved;	/*  BIOS internal reserved space to optimize code size, updated by the compiler, shouldn't be modified manually!! */
4848
  USHORT  usPrivateReserved;                // BIOS internal reserved space to optimize code size, updated by the compiler, shouldn't be modified manually!!
3980
	/*  MC_ARB_RAMCFG (includes NOOFBANK,NOOFRANKS,NOOFROWS,NOOFCOLS) */
4849
                                            // MC_ARB_RAMCFG (includes NOOFBANK,NOOFRANKS,NOOFROWS,NOOFCOLS)
Line 3981... Line 4850...
3981
	USHORT usReserved;
4850
  USHORT  usReserved;
3982
	UCHAR ucExtMemoryID;	/*  An external indicator (by hardcode, callback or pin) to tell what is the current memory module */
4851
  UCHAR   ucExtMemoryID;    		            // An external indicator (by hardcode, callback or pin) to tell what is the current memory module
3983
	UCHAR ucMemoryType;	/*  [7:4]=0x1:DDR1;=0x2:DDR2;=0x3:DDR3;=0x4:DDR4; 0x5:DDR5 [3:0] - Must be 0x0 for now; */
4852
  UCHAR   ucMemoryType;                     // [7:4]=0x1:DDR1;=0x2:DDR2;=0x3:DDR3;=0x4:DDR4; 0x5:DDR5 [3:0] - Must be 0x0 for now;
3984
	UCHAR ucChannelNum;	/*  Number of channels present in this module config */
4853
  UCHAR   ucChannelNum;                     // Number of channels present in this module config
3985
	UCHAR ucChannelWidth;	/*  0 - 32 bits; 1 - 64 bits */
4854
  UCHAR   ucChannelWidth;                   // 0 - 32 bits; 1 - 64 bits
3986
	UCHAR ucDensity;	/*  _8Mx32, _16Mx32, _16Mx16, _32Mx16 */
4855
	UCHAR   ucDensity;                        // _8Mx32, _16Mx32, _16Mx16, _32Mx16
3987
	UCHAR ucFlag;		/*  To enable/disable functionalities based on memory type */
4856
	UCHAR	  ucFlag;						                // To enable/disable functionalities based on memory type
3988
	UCHAR ucMisc;		/*  bit0: 0 - single rank; 1 - dual rank;   bit2: 0 - burstlength 4, 1 - burstlength 8 */
4857
	UCHAR	  ucMisc;						                // bit0: 0 - single rank; 1 - dual rank;   bit2: 0 - burstlength 4, 1 - burstlength 8
3989
	UCHAR ucVREFI;		/*  board dependent parameter */
4858
  UCHAR		ucVREFI;                          // board dependent parameter
Line -... Line 4859...
-
 
4859
  UCHAR   ucNPL_RT;                         // board dependent parameter:NPL round trip delay, used for calculate memory timing parameters
-
 
4860
  UCHAR		ucPreamble;                       // [7:4] Write Preamble, [3:0] Read Preamble
-
 
4861
  UCHAR   ucMemorySize;                     // BIOS internal reserved space to optimize code size, updated by the compiler, shouldn't be modified manually!!
-
 
4862
                                            // Total memory size in unit of 16MB for CONFIG_MEMSIZE - bit[23:0] zeros
-
 
4863
  UCHAR   ucReserved[3];
-
 
4864
 
-
 
4865
//compare with V3, we flat the struct by merging ATOM_MEMORY_FORMAT (as is) into V4 as the same level
-
 
4866
  USHORT	usEMRS2Value;      		            // EMRS2 Value is used for GDDR2 and GDDR4 memory type
-
 
4867
  USHORT	usEMRS3Value;      		            // EMRS3 Value is used for GDDR2 and GDDR4 memory type
-
 
4868
  UCHAR   ucMemoryVenderID;  		            // Predefined, If not predefined, vendor detection table gets executed
-
 
4869
  UCHAR	  ucRefreshRateFactor;              // [1:0]=RefreshFactor (00=8ms, 01=16ms, 10=32ms,11=64ms)
-
 
4870
  UCHAR	  ucFIFODepth;			                // FIFO depth supposes to be detected during vendor detection, but if we dont do vendor detection we have to hardcode FIFO Depth
-
 
4871
  UCHAR   ucCDR_Bandwidth;		   // [0:3]=Read CDR bandwidth, [4:7] - Write CDR Bandwidth
-
 
4872
  ATOM_MEMORY_TIMING_FORMAT_V1  asMemTiming[5];//Memory Timing block sort from lower clock to higher clock
-
 
4873
}ATOM_VRAM_MODULE_V5;
-
 
4874
 
-
 
4875
typedef struct _ATOM_VRAM_MODULE_V6
-
 
4876
{
-
 
4877
  ULONG	  ulChannelMapCfg;	                // board dependent parameter: Channel combination
-
 
4878
  USHORT  usModuleSize;                     // size of ATOM_VRAM_MODULE_V4, make it easy for VBIOS to look for next entry of VRAM_MODULE
-
 
4879
  USHORT  usPrivateReserved;                // BIOS internal reserved space to optimize code size, updated by the compiler, shouldn't be modified manually!!
-
 
4880
                                            // MC_ARB_RAMCFG (includes NOOFBANK,NOOFRANKS,NOOFROWS,NOOFCOLS)
-
 
4881
	USHORT usReserved;
-
 
4882
  UCHAR   ucExtMemoryID;    		            // An external indicator (by hardcode, callback or pin) to tell what is the current memory module
-
 
4883
  UCHAR   ucMemoryType;                     // [7:4]=0x1:DDR1;=0x2:DDR2;=0x3:DDR3;=0x4:DDR4; 0x5:DDR5 [3:0] - Must be 0x0 for now;
-
 
4884
  UCHAR   ucChannelNum;                     // Number of channels present in this module config
-
 
4885
  UCHAR   ucChannelWidth;                   // 0 - 32 bits; 1 - 64 bits
-
 
4886
	UCHAR   ucDensity;                        // _8Mx32, _16Mx32, _16Mx16, _32Mx16
-
 
4887
	UCHAR	  ucFlag;						                // To enable/disable functionalities based on memory type
-
 
4888
	UCHAR	  ucMisc;						                // bit0: 0 - single rank; 1 - dual rank;   bit2: 0 - burstlength 4, 1 - burstlength 8
-
 
4889
  UCHAR		ucVREFI;                          // board dependent parameter
-
 
4890
  UCHAR   ucNPL_RT;                         // board dependent parameter:NPL round trip delay, used for calculate memory timing parameters
-
 
4891
  UCHAR		ucPreamble;                       // [7:4] Write Preamble, [3:0] Read Preamble
3990
	UCHAR ucNPL_RT;		/*  board dependent parameter:NPL round trip delay, used for calculate memory timing parameters */
4892
  UCHAR   ucMemorySize;                     // BIOS internal reserved space to optimize code size, updated by the compiler, shouldn't be modified manually!!
-
 
4893
                                            // Total memory size in unit of 16MB for CONFIG_MEMSIZE - bit[23:0] zeros
3991
	UCHAR ucPreamble;	/*  [7:4] Write Preamble, [3:0] Read Preamble */
4894
	UCHAR ucReserved[3];
3992
	UCHAR ucMemorySize;	/*  BIOS internal reserved space to optimize code size, updated by the compiler, shouldn't be modified manually!! */
4895
 
3993
	/*  Total memory size in unit of 16MB for CONFIG_MEMSIZE - bit[23:0] zeros */
4896
//compare with V3, we flat the struct by merging ATOM_MEMORY_FORMAT (as is) into V4 as the same level
3994
	UCHAR ucReserved[3];
4897
  USHORT	usEMRS2Value;      		            // EMRS2 Value is used for GDDR2 and GDDR4 memory type
Line 3995... Line 4898...
3995
 
4898
  USHORT	usEMRS3Value;      		            // EMRS3 Value is used for GDDR2 and GDDR4 memory type
-
 
4899
  UCHAR   ucMemoryVenderID;  		            // Predefined, If not predefined, vendor detection table gets executed
3996
/* compare with V3, we flat the struct by merging ATOM_MEMORY_FORMAT (as is) into V4 as the same level */
4900
  UCHAR	  ucRefreshRateFactor;              // [1:0]=RefreshFactor (00=8ms, 01=16ms, 10=32ms,11=64ms)
3997
	USHORT usEMRS2Value;	/*  EMRS2 Value is used for GDDR2 and GDDR4 memory type */
4901
  UCHAR	  ucFIFODepth;			                // FIFO depth supposes to be detected during vendor detection, but if we dont do vendor detection we have to hardcode FIFO Depth
3998
	USHORT usEMRS3Value;	/*  EMRS3 Value is used for GDDR2 and GDDR4 memory type */
4902
  UCHAR   ucCDR_Bandwidth;		   // [0:3]=Read CDR bandwidth, [4:7] - Write CDR Bandwidth
3999
	UCHAR ucMemoryVenderID;	/*  Predefined, If not predefined, vendor detection table gets executed */
4903
  ATOM_MEMORY_TIMING_FORMAT_V2  asMemTiming[5];//Memory Timing block sort from lower clock to higher clock
4000
	UCHAR ucRefreshRateFactor;	/*  [1:0]=RefreshFactor (00=8ms, 01=16ms, 10=32ms,11=64ms) */
4904
}ATOM_VRAM_MODULE_V6;
4001
	UCHAR ucFIFODepth;	/*  FIFO depth supposes to be detected during vendor detection, but if we dont do vendor detection we have to hardcode FIFO Depth */
4905
 
4002
	UCHAR ucCDR_Bandwidth;	/*  [0:3]=Read CDR bandwidth, [4:7] - Write CDR Bandwidth */
4906
 
4003
	ATOM_MEMORY_TIMING_FORMAT_V1 asMemTiming[5];	/* Memory Timing block sort from lower clock to higher clock */
4907
 
4004
} ATOM_VRAM_MODULE_V5;
4908
typedef struct _ATOM_VRAM_INFO_V2
4005
 
4909
{
Line 4006... Line 4910...
4006
typedef struct _ATOM_VRAM_INFO_V2 {
4910
	ATOM_COMMON_TABLE_HEADER sHeader;
Line 4007... Line 4911...
4007
	ATOM_COMMON_TABLE_HEADER sHeader;
4911
	UCHAR ucNumOfVRAMModule;
-
 
4912
  ATOM_VRAM_MODULE           aVramInfo[ATOM_MAX_NUMBER_OF_VRAM_MODULE];      // just for allocation, real number of blocks is in ucNumOfVRAMModule;
4008
	UCHAR ucNumOfVRAMModule;
4913
}ATOM_VRAM_INFO_V2;
4009
	ATOM_VRAM_MODULE aVramInfo[ATOM_MAX_NUMBER_OF_VRAM_MODULE];	/*  just for allocation, real number of blocks is in ucNumOfVRAMModule; */
4914
 
4010
} ATOM_VRAM_INFO_V2;
4915
typedef struct _ATOM_VRAM_INFO_V3
4011
 
4916
{
4012
typedef struct _ATOM_VRAM_INFO_V3 {
4917
	ATOM_COMMON_TABLE_HEADER sHeader;
4013
	ATOM_COMMON_TABLE_HEADER sHeader;
4918
	USHORT										 usMemAdjustTblOffset;													 // offset of ATOM_INIT_REG_BLOCK structure for memory vendor specific MC adjust setting
4014
	USHORT usMemAdjustTblOffset;	/*  offset of ATOM_INIT_REG_BLOCK structure for memory vendor specific MC adjust setting */
4919
	USHORT										 usMemClkPatchTblOffset;												 //	offset of ATOM_INIT_REG_BLOCK structure for memory clock specific MC setting
4015
	USHORT usMemClkPatchTblOffset;	/*      offset of ATOM_INIT_REG_BLOCK structure for memory clock specific MC setting */
4920
	USHORT usRerseved;
4016
	USHORT usRerseved;
4921
	UCHAR           	         aVID_PinsShift[9];															 // 8 bit strap maximum+terminator
4017
	UCHAR aVID_PinsShift[9];	/*  8 bit strap maximum+terminator */
4922
	UCHAR ucNumOfVRAMModule;
4018
	UCHAR ucNumOfVRAMModule;
4923
  ATOM_VRAM_MODULE		       aVramInfo[ATOM_MAX_NUMBER_OF_VRAM_MODULE];      // just for allocation, real number of blocks is in ucNumOfVRAMModule;
4019
	ATOM_VRAM_MODULE aVramInfo[ATOM_MAX_NUMBER_OF_VRAM_MODULE];	/*  just for allocation, real number of blocks is in ucNumOfVRAMModule; */
4924
	ATOM_INIT_REG_BLOCK				 asMemPatch;																		 // for allocation
Line 4020... Line 4925...
4020
	ATOM_INIT_REG_BLOCK asMemPatch;	/*  for allocation */
4925
																																						 //	ATOM_INIT_REG_BLOCK				 aMemAdjust;
-
 
4926
}ATOM_VRAM_INFO_V3;
4021
	/*      ATOM_INIT_REG_BLOCK                              aMemAdjust; */
4927
 
4022
} ATOM_VRAM_INFO_V3;
4928
#define	ATOM_VRAM_INFO_LAST	     ATOM_VRAM_INFO_V3
4023
 
4929
 
Line -... Line 4930...
-
 
4930
typedef struct _ATOM_VRAM_INFO_V4
4024
#define	ATOM_VRAM_INFO_LAST	     ATOM_VRAM_INFO_V3
4931
{
-
 
4932
	ATOM_COMMON_TABLE_HEADER sHeader;
4025
 
4933
	USHORT										 usMemAdjustTblOffset;													 // offset of ATOM_INIT_REG_BLOCK structure for memory vendor specific MC adjust setting
4026
typedef struct _ATOM_VRAM_INFO_V4 {
4934
	USHORT										 usMemClkPatchTblOffset;												 //	offset of ATOM_INIT_REG_BLOCK structure for memory clock specific MC setting
4027
	ATOM_COMMON_TABLE_HEADER sHeader;
4935
	USHORT usRerseved;
4028
	USHORT usMemAdjustTblOffset;	/*  offset of ATOM_INIT_REG_BLOCK structure for memory vendor specific MC adjust setting */
4936
	UCHAR           	         ucMemDQ7_0ByteRemap;													   // DQ line byte remap, =0: Memory Data line BYTE0, =1: BYTE1, =2: BYTE2, =3: BYTE3
4029
	USHORT usMemClkPatchTblOffset;	/*      offset of ATOM_INIT_REG_BLOCK structure for memory clock specific MC setting */
4937
  ULONG                      ulMemDQ7_0BitRemap;                             // each DQ line ( 7~0) use 3bits, like: DQ0=Bit[2:0], DQ1:[5:3], ... DQ7:[23:21]
Line -... Line 4938...
-
 
4938
	UCHAR ucReservde[4];
4030
	USHORT usRerseved;
4939
	UCHAR ucNumOfVRAMModule;
-
 
4940
  ATOM_VRAM_MODULE_V4		     aVramInfo[ATOM_MAX_NUMBER_OF_VRAM_MODULE];      // just for allocation, real number of blocks is in ucNumOfVRAMModule;
4031
	UCHAR ucMemDQ7_0ByteRemap;	/*  DQ line byte remap, =0: Memory Data line BYTE0, =1: BYTE1, =2: BYTE2, =3: BYTE3 */
4941
	ATOM_INIT_REG_BLOCK				 asMemPatch;																		 // for allocation
4032
	ULONG ulMemDQ7_0BitRemap;	/*  each DQ line ( 7~0) use 3bits, like: DQ0=Bit[2:0], DQ1:[5:3], ... DQ7:[23:21] */
4942
																																						 //	ATOM_INIT_REG_BLOCK				 aMemAdjust;
4033
	UCHAR ucReservde[4];
4943
}ATOM_VRAM_INFO_V4;
4034
	UCHAR ucNumOfVRAMModule;
4944
 
4035
	ATOM_VRAM_MODULE_V4 aVramInfo[ATOM_MAX_NUMBER_OF_VRAM_MODULE];	/*  just for allocation, real number of blocks is in ucNumOfVRAMModule; */
4945
typedef struct _ATOM_VRAM_GPIO_DETECTION_INFO
Line 4036... Line 4946...
4036
	ATOM_INIT_REG_BLOCK asMemPatch;	/*  for allocation */
4946
{
Line 4037... Line 4947...
4037
	/*      ATOM_INIT_REG_BLOCK                              aMemAdjust; */
4947
	ATOM_COMMON_TABLE_HEADER sHeader;
-
 
4948
  UCHAR           	         aVID_PinsShift[9];   //8 bit strap maximum+terminator
4038
} ATOM_VRAM_INFO_V4;
4949
}ATOM_VRAM_GPIO_DETECTION_INFO;
4039
 
4950
 
4040
typedef struct _ATOM_VRAM_GPIO_DETECTION_INFO {
4951
 
4041
	ATOM_COMMON_TABLE_HEADER sHeader;
4952
typedef struct _ATOM_MEMORY_TRAINING_INFO
Line 4085... Line 4996...
4085
#define SW_I2C_CNTL_STOP      3
4996
#define SW_I2C_CNTL_STOP      3
4086
#define SW_I2C_CNTL_OPEN      4
4997
#define SW_I2C_CNTL_OPEN      4
4087
#define SW_I2C_CNTL_CLOSE     5
4998
#define SW_I2C_CNTL_CLOSE     5
4088
#define SW_I2C_CNTL_WRITE1BIT 6
4999
#define SW_I2C_CNTL_WRITE1BIT 6
Line 4089... Line 5000...
4089
 
5000
 
4090
/* ==============================VESA definition Portion=============================== */
5001
//==============================VESA definition Portion===============================
4091
#define VESA_OEM_PRODUCT_REV			            '01.00'
5002
#define VESA_OEM_PRODUCT_REV			            '01.00'
4092
#define VESA_MODE_ATTRIBUTE_MODE_SUPPORT	     0xBB	/* refer to VBE spec p.32, no TTY support */
5003
#define VESA_MODE_ATTRIBUTE_MODE_SUPPORT	     0xBB	//refer to VBE spec p.32, no TTY support
4093
#define VESA_MODE_WIN_ATTRIBUTE						     7
5004
#define VESA_MODE_WIN_ATTRIBUTE						     7
Line 4094... Line 5005...
4094
#define VESA_WIN_SIZE											     64
5005
#define VESA_WIN_SIZE											     64
-
 
5006
 
4095
 
5007
typedef struct _PTR_32_BIT_STRUCTURE
4096
typedef struct _PTR_32_BIT_STRUCTURE {
5008
{
4097
	USHORT Offset16;
5009
	USHORT Offset16;
Line 4098... Line 5010...
4098
	USHORT Segment16;
5010
	USHORT Segment16;
-
 
5011
} PTR_32_BIT_STRUCTURE;
4099
} PTR_32_BIT_STRUCTURE;
5012
 
4100
 
5013
typedef union _PTR_32_BIT_UNION
4101
typedef union _PTR_32_BIT_UNION {
5014
{
Line 4102... Line 5015...
4102
	PTR_32_BIT_STRUCTURE SegmentOffset;
5015
	PTR_32_BIT_STRUCTURE SegmentOffset;
-
 
5016
	ULONG Ptr32_Bit;
4103
	ULONG Ptr32_Bit;
5017
} PTR_32_BIT_UNION;
4104
} PTR_32_BIT_UNION;
5018
 
4105
 
5019
typedef struct _VBE_1_2_INFO_BLOCK_UPDATABLE
4106
typedef struct _VBE_1_2_INFO_BLOCK_UPDATABLE {
5020
{
4107
	UCHAR VbeSignature[4];
5021
	UCHAR VbeSignature[4];
4108
	USHORT VbeVersion;
5022
	USHORT VbeVersion;
4109
	PTR_32_BIT_UNION OemStringPtr;
5023
	PTR_32_BIT_UNION OemStringPtr;
Line -... Line 5024...
-
 
5024
	UCHAR Capabilities[4];
4110
	UCHAR Capabilities[4];
5025
	PTR_32_BIT_UNION VideoModePtr;
-
 
5026
	USHORT TotalMemory;
4111
	PTR_32_BIT_UNION VideoModePtr;
5027
} VBE_1_2_INFO_BLOCK_UPDATABLE;
4112
	USHORT TotalMemory;
5028
 
4113
} VBE_1_2_INFO_BLOCK_UPDATABLE;
5029
 
4114
 
5030
typedef struct _VBE_2_0_INFO_BLOCK_UPDATABLE
4115
typedef struct _VBE_2_0_INFO_BLOCK_UPDATABLE {
5031
{
4116
	VBE_1_2_INFO_BLOCK_UPDATABLE CommonBlock;
5032
	VBE_1_2_INFO_BLOCK_UPDATABLE CommonBlock;
Line 4117... Line 5033...
4117
	USHORT OemSoftRev;
5033
	USHORT OemSoftRev;
-
 
5034
	PTR_32_BIT_UNION OemVendorNamePtr;
4118
	PTR_32_BIT_UNION OemVendorNamePtr;
5035
	PTR_32_BIT_UNION OemProductNamePtr;
4119
	PTR_32_BIT_UNION OemProductNamePtr;
5036
	PTR_32_BIT_UNION OemProductRevPtr;
4120
	PTR_32_BIT_UNION OemProductRevPtr;
5037
} VBE_2_0_INFO_BLOCK_UPDATABLE;
Line 4121... Line 5038...
4121
} VBE_2_0_INFO_BLOCK_UPDATABLE;
5038
 
-
 
5039
typedef union _VBE_VERSION_UNION
4122
 
5040
{
4123
typedef union _VBE_VERSION_UNION {
5041
	VBE_2_0_INFO_BLOCK_UPDATABLE VBE_2_0_InfoBlock;
4124
	VBE_2_0_INFO_BLOCK_UPDATABLE VBE_2_0_InfoBlock;
5042
	VBE_1_2_INFO_BLOCK_UPDATABLE VBE_1_2_InfoBlock;
4125
	VBE_1_2_INFO_BLOCK_UPDATABLE VBE_1_2_InfoBlock;
5043
} VBE_VERSION_UNION;
Line 4126... Line 5044...
4126
} VBE_VERSION_UNION;
5044
 
-
 
5045
typedef struct _VBE_INFO_BLOCK
4127
 
5046
{
4128
typedef struct _VBE_INFO_BLOCK {
5047
	VBE_VERSION_UNION UpdatableVBE_Info;
4129
	VBE_VERSION_UNION UpdatableVBE_Info;
5048
	UCHAR Reserved[222];
4130
	UCHAR Reserved[222];
5049
	UCHAR OemData[256];
4131
	UCHAR OemData[256];
5050
} VBE_INFO_BLOCK;
Line 4142... Line 5061...
4142
	ULONG RsvdOffScrnMemSize;
5061
	ULONG RsvdOffScrnMemSize;
4143
	ULONG RsvdOffScrnMEmPtr;
5062
	ULONG RsvdOffScrnMEmPtr;
4144
	UCHAR Reserved[14];
5063
	UCHAR Reserved[14];
4145
} VBE_FP_INFO;
5064
} VBE_FP_INFO;
Line 4146... Line 5065...
4146
 
5065
 
-
 
5066
typedef struct _VESA_MODE_INFO_BLOCK
4147
typedef struct _VESA_MODE_INFO_BLOCK {
5067
{
4148
/*  Mandatory information for all VBE revisions */
5068
// Mandatory information for all VBE revisions
4149
	USHORT ModeAttributes;	/*                  dw      ?       ; mode attributes */
5069
  USHORT    ModeAttributes;  //			dw	?	; mode attributes
4150
	UCHAR WinAAttributes;	/*                    db      ?       ; window A attributes */
5070
	UCHAR     WinAAttributes;  //			db	?	; window A attributes
4151
	UCHAR WinBAttributes;	/*                    db      ?       ; window B attributes */
5071
	UCHAR     WinBAttributes;  //			db	?	; window B attributes
4152
	USHORT WinGranularity;	/*                    dw      ?       ; window granularity */
5072
	USHORT    WinGranularity;  //			dw	?	; window granularity
4153
	USHORT WinSize;		/*                    dw      ?       ; window size */
5073
	USHORT    WinSize;         //			dw	?	; window size
4154
	USHORT WinASegment;	/*                    dw      ?       ; window A start segment */
5074
	USHORT    WinASegment;     //			dw	?	; window A start segment
4155
	USHORT WinBSegment;	/*                    dw      ?       ; window B start segment */
5075
	USHORT    WinBSegment;     //			dw	?	; window B start segment
4156
	ULONG WinFuncPtr;	/*                    dd      ?       ; real mode pointer to window function */
5076
	ULONG     WinFuncPtr;      //			dd	?	; real mode pointer to window function
4157
	USHORT BytesPerScanLine;	/*                    dw      ?       ; bytes per scan line */
5077
	USHORT    BytesPerScanLine;//			dw	?	; bytes per scan line
4158
 
5078
 
4159
/* ; Mandatory information for VBE 1.2 and above */
5079
//; Mandatory information for VBE 1.2 and above
4160
	USHORT XResolution;	/*                         dw      ?       ; horizontal resolution in pixels or characters */
5080
  USHORT    XResolution;      //			dw	?	; horizontal resolution in pixels or characters
4161
	USHORT YResolution;	/*                   dw      ?       ; vertical resolution in pixels or characters */
5081
	USHORT    YResolution;      //			dw	?	; vertical resolution in pixels or characters
4162
	UCHAR XCharSize;	/*                   db      ?       ; character cell width in pixels */
5082
	UCHAR     XCharSize;        //			db	?	; character cell width in pixels
4163
	UCHAR YCharSize;	/*                   db      ?       ; character cell height in pixels */
5083
	UCHAR     YCharSize;        //			db	?	; character cell height in pixels
4164
	UCHAR NumberOfPlanes;	/*                   db      ?       ; number of memory planes */
5084
	UCHAR     NumberOfPlanes;   //			db	?	; number of memory planes
4165
	UCHAR BitsPerPixel;	/*                   db      ?       ; bits per pixel */
5085
	UCHAR     BitsPerPixel;     //			db	?	; bits per pixel
4166
	UCHAR NumberOfBanks;	/*                   db      ?       ; number of banks */
5086
	UCHAR     NumberOfBanks;    //			db	?	; number of banks
4167
	UCHAR MemoryModel;	/*                   db      ?       ; memory model type */
5087
	UCHAR     MemoryModel;      //			db	?	; memory model type
4168
	UCHAR BankSize;		/*                   db      ?       ; bank size in KB */
5088
	UCHAR     BankSize;         //			db	?	; bank size in KB
4169
	UCHAR NumberOfImagePages;	/*            db    ?       ; number of images */
5089
	UCHAR     NumberOfImagePages;//		  db	?	; number of images
4170
	UCHAR ReservedForPageFunction;	/* db  1       ; reserved for page function */
5090
	UCHAR     ReservedForPageFunction;//db	1	; reserved for page function
4171
 
5091
 
4172
/* ; Direct Color fields(required for direct/6 and YUV/7 memory models) */
5092
//; Direct Color fields(required for direct/6 and YUV/7 memory models)
4173
	UCHAR RedMaskSize;	/*           db      ?       ; size of direct color red mask in bits */
5093
	UCHAR			RedMaskSize;        //		db	?	; size of direct color red mask in bits
4174
	UCHAR RedFieldPosition;	/*           db      ?       ; bit position of lsb of red mask */
5094
	UCHAR			RedFieldPosition;   //		db	?	; bit position of lsb of red mask
4175
	UCHAR GreenMaskSize;	/*           db      ?       ; size of direct color green mask in bits */
5095
	UCHAR			GreenMaskSize;      //		db	?	; size of direct color green mask in bits
4176
	UCHAR GreenFieldPosition;	/*           db      ?       ; bit position of lsb of green mask */
5096
	UCHAR			GreenFieldPosition; //		db	?	; bit position of lsb of green mask
4177
	UCHAR BlueMaskSize;	/*           db      ?       ; size of direct color blue mask in bits */
5097
	UCHAR			BlueMaskSize;       //		db	?	; size of direct color blue mask in bits
4178
	UCHAR BlueFieldPosition;	/*           db      ?       ; bit position of lsb of blue mask */
5098
	UCHAR			BlueFieldPosition;  //		db	?	; bit position of lsb of blue mask
4179
	UCHAR RsvdMaskSize;	/*           db      ?       ; size of direct color reserved mask in bits */
5099
	UCHAR			RsvdMaskSize;       //		db	?	; size of direct color reserved mask in bits
4180
	UCHAR RsvdFieldPosition;	/*           db      ?       ; bit position of lsb of reserved mask */
5100
	UCHAR			RsvdFieldPosition;  //		db	?	; bit position of lsb of reserved mask
4181
	UCHAR DirectColorModeInfo;	/*           db      ?       ; direct color mode attributes */
5101
	UCHAR			DirectColorModeInfo;//		db	?	; direct color mode attributes
4182
 
5102
 
4183
/* ; Mandatory information for VBE 2.0 and above */
5103
//; Mandatory information for VBE 2.0 and above
4184
	ULONG PhysBasePtr;	/*           dd      ?       ; physical address for flat memory frame buffer */
5104
	ULONG			PhysBasePtr;        //		dd	?	; physical address for flat memory frame buffer
4185
	ULONG Reserved_1;	/*           dd      0       ; reserved - always set to 0 */
5105
	ULONG			Reserved_1;         //		dd	0	; reserved - always set to 0
4186
	USHORT Reserved_2;	/*     dw    0       ; reserved - always set to 0 */
5106
	USHORT		Reserved_2;         //	  dw	0	; reserved - always set to 0
4187
 
5107
 
4188
/* ; Mandatory information for VBE 3.0 and above */
5108
//; Mandatory information for VBE 3.0 and above
4189
	USHORT LinBytesPerScanLine;	/*         dw      ?       ; bytes per scan line for linear modes */
5109
	USHORT		LinBytesPerScanLine;  //	dw	?	; bytes per scan line for linear modes
4190
	UCHAR BnkNumberOfImagePages;	/*         db      ?       ; number of images for banked modes */
5110
	UCHAR			BnkNumberOfImagePages;//	db	?	; number of images for banked modes
4191
	UCHAR LinNumberOfImagPages;	/*         db      ?       ; number of images for linear modes */
5111
	UCHAR			LinNumberOfImagPages; //	db	?	; number of images for linear modes
4192
	UCHAR LinRedMaskSize;	/*         db      ?       ; size of direct color red mask(linear modes) */
5112
	UCHAR			LinRedMaskSize;       //	db	?	; size of direct color red mask(linear modes)
4193
	UCHAR LinRedFieldPosition;	/*         db      ?       ; bit position of lsb of red mask(linear modes) */
5113
	UCHAR			LinRedFieldPosition;  //	db	?	; bit position of lsb of red mask(linear modes)
4194
	UCHAR LinGreenMaskSize;	/*         db      ?       ; size of direct color green mask(linear modes) */
5114
	UCHAR			LinGreenMaskSize;     //	db	?	; size of direct color green mask(linear modes)
4195
	UCHAR LinGreenFieldPosition;	/*         db      ?       ; bit position of lsb of green mask(linear modes) */
5115
	UCHAR			LinGreenFieldPosition;//	db	?	; bit position of lsb of green mask(linear modes)
4196
	UCHAR LinBlueMaskSize;	/*         db      ?       ; size of direct color blue mask(linear modes) */
5116
	UCHAR			LinBlueMaskSize;      //	db	?	; size of direct color blue mask(linear modes)
4197
	UCHAR LinBlueFieldPosition;	/*         db      ?       ; bit position of lsb of blue mask(linear modes) */
5117
	UCHAR			LinBlueFieldPosition; //	db	?	; bit position of lsb of blue mask(linear modes)
4198
	UCHAR LinRsvdMaskSize;	/*         db      ?       ; size of direct color reserved mask(linear modes) */
5118
	UCHAR			LinRsvdMaskSize;      //	db	?	; size of direct color reserved mask(linear modes)
4199
	UCHAR LinRsvdFieldPosition;	/*         db      ?       ; bit position of lsb of reserved mask(linear modes) */
5119
	UCHAR			LinRsvdFieldPosition; //	db	?	; bit position of lsb of reserved mask(linear modes)
4200
	ULONG MaxPixelClock;	/*         dd      ?       ; maximum pixel clock(in Hz) for graphics mode */
5120
	ULONG			MaxPixelClock;        //	dd	?	; maximum pixel clock(in Hz) for graphics mode
4201
	UCHAR Reserved;		/*         db      190 dup (0) */
5121
	UCHAR			Reserved;             //	db	190 dup (0)
Line 4202... Line 5122...
4202
} VESA_MODE_INFO_BLOCK;
5122
} VESA_MODE_INFO_BLOCK;
4203
 
5123
 
4204
/*  BIOS function CALLS */
5124
// BIOS function CALLS
4205
#define ATOM_BIOS_EXTENDED_FUNCTION_CODE        0xA0	/*  ATI Extended Function code */
5125
#define ATOM_BIOS_EXTENDED_FUNCTION_CODE        0xA0	        // ATI Extended Function code
4206
#define ATOM_BIOS_FUNCTION_COP_MODE             0x00
5126
#define ATOM_BIOS_FUNCTION_COP_MODE             0x00
4207
#define ATOM_BIOS_FUNCTION_SHORT_QUERY1         0x04
5127
#define ATOM_BIOS_FUNCTION_SHORT_QUERY1         0x04
4208
#define ATOM_BIOS_FUNCTION_SHORT_QUERY2         0x05
5128
#define ATOM_BIOS_FUNCTION_SHORT_QUERY2         0x05
Line 4217... Line 5137...
4217
#define ATOM_BIOS_FUNCTION_PANEL_CONTROL        0x82
5137
#define ATOM_BIOS_FUNCTION_PANEL_CONTROL        0x82
4218
#define ATOM_BIOS_FUNCTION_OLD_DEVICE_DET       0x83
5138
#define ATOM_BIOS_FUNCTION_OLD_DEVICE_DET       0x83
4219
#define ATOM_BIOS_FUNCTION_OLD_DEVICE_SWITCH    0x84
5139
#define ATOM_BIOS_FUNCTION_OLD_DEVICE_SWITCH    0x84
4220
#define ATOM_BIOS_FUNCTION_HW_ICON              0x8A
5140
#define ATOM_BIOS_FUNCTION_HW_ICON              0x8A
4221
#define ATOM_BIOS_FUNCTION_SET_CMOS             0x8B
5141
#define ATOM_BIOS_FUNCTION_SET_CMOS             0x8B
4222
#define SUB_FUNCTION_UPDATE_DISPLAY_INFO        0x8000	/*  Sub function 80 */
5142
#define SUB_FUNCTION_UPDATE_DISPLAY_INFO        0x8000          // Sub function 80
4223
#define SUB_FUNCTION_UPDATE_EXPANSION_INFO      0x8100	/*  Sub function 80 */
5143
#define SUB_FUNCTION_UPDATE_EXPANSION_INFO      0x8100          // Sub function 80
Line 4224... Line 5144...
4224
 
5144
 
4225
#define ATOM_BIOS_FUNCTION_DISPLAY_INFO         0x8D
5145
#define ATOM_BIOS_FUNCTION_DISPLAY_INFO         0x8D
4226
#define ATOM_BIOS_FUNCTION_DEVICE_ON_OFF        0x8E
5146
#define ATOM_BIOS_FUNCTION_DEVICE_ON_OFF        0x8E
4227
#define ATOM_BIOS_FUNCTION_VIDEO_STATE          0x8F
5147
#define ATOM_BIOS_FUNCTION_VIDEO_STATE          0x8F
4228
#define ATOM_SUB_FUNCTION_GET_CRITICAL_STATE    0x0300	/*  Sub function 03 */
5148
#define ATOM_SUB_FUNCTION_GET_CRITICAL_STATE    0x0300          // Sub function 03  
4229
#define ATOM_SUB_FUNCTION_GET_LIDSTATE          0x0700	/*  Sub function 7 */
5149
#define ATOM_SUB_FUNCTION_GET_LIDSTATE          0x0700          // Sub function 7
4230
#define ATOM_SUB_FUNCTION_THERMAL_STATE_NOTICE  0x1400	/*  Notify caller the current thermal state */
5150
#define ATOM_SUB_FUNCTION_THERMAL_STATE_NOTICE  0x1400          // Notify caller the current thermal state
4231
#define ATOM_SUB_FUNCTION_CRITICAL_STATE_NOTICE 0x8300	/*  Notify caller the current critical state */
5151
#define ATOM_SUB_FUNCTION_CRITICAL_STATE_NOTICE 0x8300          // Notify caller the current critical state
4232
#define ATOM_SUB_FUNCTION_SET_LIDSTATE          0x8500	/*  Sub function 85 */
5152
#define ATOM_SUB_FUNCTION_SET_LIDSTATE          0x8500          // Sub function 85
4233
#define ATOM_SUB_FUNCTION_GET_REQ_DISPLAY_FROM_SBIOS_MODE 0x8900	/*  Sub function 89 */
5153
#define ATOM_SUB_FUNCTION_GET_REQ_DISPLAY_FROM_SBIOS_MODE 0x8900// Sub function 89
-
 
5154
#define ATOM_SUB_FUNCTION_INFORM_ADC_SUPPORT    0x9400          // Notify caller that ADC is supported
4234
#define ATOM_SUB_FUNCTION_INFORM_ADC_SUPPORT    0x9400	/*  Notify caller that ADC is supported */
5155
     
4235
 
5156
 
4236
#define ATOM_BIOS_FUNCTION_VESA_DPMS            0x4F10	/*  Set DPMS */
5157
#define ATOM_BIOS_FUNCTION_VESA_DPMS            0x4F10          // Set DPMS 
4237
#define ATOM_SUB_FUNCTION_SET_DPMS              0x0001	/*  BL: Sub function 01 */
5158
#define ATOM_SUB_FUNCTION_SET_DPMS              0x0001          // BL: Sub function 01 
4238
#define ATOM_SUB_FUNCTION_GET_DPMS              0x0002	/*  BL: Sub function 02 */
5159
#define ATOM_SUB_FUNCTION_GET_DPMS              0x0002          // BL: Sub function 02 
4239
#define ATOM_PARAMETER_VESA_DPMS_ON             0x0000	/*  BH Parameter for DPMS ON. */
5160
#define ATOM_PARAMETER_VESA_DPMS_ON             0x0000          // BH Parameter for DPMS ON.  
4240
#define ATOM_PARAMETER_VESA_DPMS_STANDBY        0x0100	/*  BH Parameter for DPMS STANDBY */
5161
#define ATOM_PARAMETER_VESA_DPMS_STANDBY        0x0100          // BH Parameter for DPMS STANDBY  
4241
#define ATOM_PARAMETER_VESA_DPMS_SUSPEND        0x0200	/*  BH Parameter for DPMS SUSPEND */
5162
#define ATOM_PARAMETER_VESA_DPMS_SUSPEND        0x0200          // BH Parameter for DPMS SUSPEND
4242
#define ATOM_PARAMETER_VESA_DPMS_OFF            0x0400	/*  BH Parameter for DPMS OFF */
5163
#define ATOM_PARAMETER_VESA_DPMS_OFF            0x0400          // BH Parameter for DPMS OFF
Line 4243... Line 5164...
4243
#define ATOM_PARAMETER_VESA_DPMS_REDUCE_ON      0x0800	/*  BH Parameter for DPMS REDUCE ON (NOT SUPPORTED) */
5164
#define ATOM_PARAMETER_VESA_DPMS_REDUCE_ON      0x0800          // BH Parameter for DPMS REDUCE ON (NOT SUPPORTED)
4244
 
5165
 
4245
#define ATOM_BIOS_RETURN_CODE_MASK              0x0000FF00L
5166
#define ATOM_BIOS_RETURN_CODE_MASK              0x0000FF00L
Line 4246... Line 5167...
4246
#define ATOM_BIOS_REG_HIGH_MASK                 0x0000FF00L
5167
#define ATOM_BIOS_REG_HIGH_MASK                 0x0000FF00L
Line 4247... Line 5168...
4247
#define ATOM_BIOS_REG_LOW_MASK                  0x000000FFL
5168
#define ATOM_BIOS_REG_LOW_MASK                  0x000000FFL
4248
 
5169
 
-
 
5170
// structure used for VBIOS only
4249
/*  structure used for VBIOS only */
5171
 
4250
 
5172
//DispOutInfoTable
4251
/* DispOutInfoTable */
5173
typedef struct _ASIC_TRANSMITTER_INFO
4252
typedef struct _ASIC_TRANSMITTER_INFO {
5174
{
4253
	USHORT usTransmitterObjId;
5175
	USHORT usTransmitterObjId;
4254
	USHORT usSupportDevice;
5176
	USHORT usSupportDevice;
4255
	UCHAR ucTransmitterCmdTblId;
5177
	UCHAR ucTransmitterCmdTblId;
4256
	UCHAR ucConfig;
5178
	UCHAR ucConfig;
4257
	UCHAR ucEncoderID;	/* available 1st encoder ( default ) */
5179
	UCHAR  ucEncoderID;					 //available 1st encoder ( default )
Line 4258... Line 5180...
4258
	UCHAR ucOptionEncoderID;	/* available 2nd encoder ( optional ) */
5180
	UCHAR  ucOptionEncoderID;    //available 2nd encoder ( optional )
-
 
5181
	UCHAR uc2ndEncoderID;
4259
	UCHAR uc2ndEncoderID;
5182
	UCHAR ucReserved;
4260
	UCHAR ucReserved;
5183
}ASIC_TRANSMITTER_INFO;
4261
} ASIC_TRANSMITTER_INFO;
5184
 
4262
 
5185
typedef struct _ASIC_ENCODER_INFO
Line 4263... Line 5186...
4263
typedef struct _ASIC_ENCODER_INFO {
5186
{
-
 
5187
	UCHAR ucEncoderID;
4264
	UCHAR ucEncoderID;
5188
	UCHAR ucEncoderConfig;
4265
	UCHAR ucEncoderConfig;
5189
	USHORT usEncoderCmdTblId;
4266
	USHORT usEncoderCmdTblId;
5190
}ASIC_ENCODER_INFO;
4267
} ASIC_ENCODER_INFO;
5191
 
4268
 
5192
typedef struct _ATOM_DISP_OUT_INFO
4269
typedef struct _ATOM_DISP_OUT_INFO {
5193
{
Line -... Line 5194...
-
 
5194
  ATOM_COMMON_TABLE_HEADER sHeader;  
-
 
5195
	USHORT ptrTransmitterInfo;
-
 
5196
	USHORT ptrEncoderInfo;
-
 
5197
	ASIC_TRANSMITTER_INFO  asTransmitterInfo[1];
-
 
5198
	ASIC_ENCODER_INFO      asEncoderInfo[1];
-
 
5199
}ATOM_DISP_OUT_INFO;
-
 
5200
 
-
 
5201
typedef struct _ATOM_DISP_OUT_INFO_V2
-
 
5202
{
-
 
5203
	ATOM_COMMON_TABLE_HEADER sHeader;
4270
	ATOM_COMMON_TABLE_HEADER sHeader;
5204
	USHORT ptrTransmitterInfo;
4271
	USHORT ptrTransmitterInfo;
5205
	USHORT ptrEncoderInfo;
-
 
5206
  USHORT ptrMainCallParserFar;                  // direct address of main parser call in VBIOS binary. 
4272
	USHORT ptrEncoderInfo;
5207
	ASIC_TRANSMITTER_INFO asTransmitterInfo[1];
4273
	ASIC_TRANSMITTER_INFO asTransmitterInfo[1];
5208
	ASIC_ENCODER_INFO asEncoderInfo[1];
4274
	ASIC_ENCODER_INFO asEncoderInfo[1];
5209
}ATOM_DISP_OUT_INFO_V2;
Line 4275... Line 5210...
4275
} ATOM_DISP_OUT_INFO;
5210
 
4276
 
5211
// DispDevicePriorityInfo
-
 
5212
typedef struct _ATOM_DISPLAY_DEVICE_PRIORITY_INFO
4277
/*  DispDevicePriorityInfo */
5213
{
4278
typedef struct _ATOM_DISPLAY_DEVICE_PRIORITY_INFO {
5214
	ATOM_COMMON_TABLE_HEADER sHeader;
4279
	ATOM_COMMON_TABLE_HEADER sHeader;
5215
	USHORT asDevicePriority[16];
4280
	USHORT asDevicePriority[16];
5216
}ATOM_DISPLAY_DEVICE_PRIORITY_INFO;
-
 
5217
 
4281
} ATOM_DISPLAY_DEVICE_PRIORITY_INFO;
5218
//ProcessAuxChannelTransactionTable
4282
 
5219
typedef struct _PROCESS_AUX_CHANNEL_TRANSACTION_PARAMETERS
4283
/* ProcessAuxChannelTransactionTable */
5220
{
4284
typedef struct _PROCESS_AUX_CHANNEL_TRANSACTION_PARAMETERS {
5221
	USHORT lpAuxRequest;
4285
	USHORT lpAuxRequest;
5222
	USHORT lpDataOut;
4286
	USHORT lpDataOut;
5223
	UCHAR ucChannelID;
Line -... Line 5224...
-
 
5224
	union
-
 
5225
	{
-
 
5226
		UCHAR ucReplyStatus;
-
 
5227
		UCHAR ucDelay;
-
 
5228
	};
-
 
5229
	UCHAR ucDataOutLen;
-
 
5230
	UCHAR ucReserved;
-
 
5231
}PROCESS_AUX_CHANNEL_TRANSACTION_PARAMETERS;
-
 
5232
 
-
 
5233
//ProcessAuxChannelTransactionTable
-
 
5234
typedef struct _PROCESS_AUX_CHANNEL_TRANSACTION_PARAMETERS_V2
-
 
5235
{
-
 
5236
	USHORT	lpAuxRequest;
-
 
5237
	USHORT  lpDataOut;
-
 
5238
	UCHAR		ucChannelID;
4287
	UCHAR ucChannelID;
5239
	union
Line 4288... Line 5240...
4288
	union {
5240
	{
Line 4289... Line 5241...
4289
		UCHAR ucReplyStatus;
5241
  UCHAR   ucReplyStatus;
-
 
5242
	UCHAR   ucDelay;
4290
		UCHAR ucDelay;
5243
	};
4291
	};
5244
  UCHAR   ucDataOutLen;
-
 
5245
	UCHAR   ucHPD_ID;                                       //=0: HPD1, =1: HPD2, =2: HPD3, =3: HPD4, =4: HPD5, =5: HPD6
4292
	UCHAR ucDataOutLen;
5246
}PROCESS_AUX_CHANNEL_TRANSACTION_PARAMETERS_V2;
4293
	UCHAR ucReserved;
5247
 
4294
} PROCESS_AUX_CHANNEL_TRANSACTION_PARAMETERS;
5248
#define PROCESS_AUX_CHANNEL_TRANSACTION_PS_ALLOCATION			PROCESS_AUX_CHANNEL_TRANSACTION_PARAMETERS
4295
 
5249
 
4296
#define PROCESS_AUX_CHANNEL_TRANSACTION_PS_ALLOCATION			PROCESS_AUX_CHANNEL_TRANSACTION_PARAMETERS
5250
//GetSinkType
4297
 
5251
 
4298
/* GetSinkType */
5252
typedef struct _DP_ENCODER_SERVICE_PARAMETERS
4299
 
5253
{
Line 4300... Line 5254...
4300
typedef struct _DP_ENCODER_SERVICE_PARAMETERS {
5254
	USHORT ucLinkClock;
4301
	USHORT ucLinkClock;
5255
	union 
-
 
5256
	{
4302
	union {
5257
	UCHAR ucConfig;				// for DP training command
4303
		UCHAR ucConfig;	/*  for DP training command */
5258
	UCHAR ucI2cId;				// use for GET_SINK_TYPE command
4304
		UCHAR ucI2cId;	/*  use for GET_SINK_TYPE command */
5259
	};
4305
	};
5260
	UCHAR ucAction;
4306
	UCHAR ucAction;
5261
	UCHAR ucStatus;
4307
	UCHAR ucStatus;
5262
	UCHAR ucLaneNum;
Line 4308... Line 5263...
4308
	UCHAR ucLaneNum;
5263
	UCHAR ucReserved[2];
4309
	UCHAR ucReserved[2];
5264
}DP_ENCODER_SERVICE_PARAMETERS;
4310
} DP_ENCODER_SERVICE_PARAMETERS;
5265
 
4311
 
5266
// ucAction
4312
/*  ucAction */
5267
#define ATOM_DP_ACTION_GET_SINK_TYPE							0x01
4313
#define ATOM_DP_ACTION_GET_SINK_TYPE							0x01
5268
/* obselete */
4314
#define ATOM_DP_ACTION_TRAINING_START							0x02
5269
#define ATOM_DP_ACTION_TRAINING_START							0x02
4315
#define ATOM_DP_ACTION_TRAINING_COMPLETE					0x03
5270
#define ATOM_DP_ACTION_TRAINING_COMPLETE					0x03
4316
#define ATOM_DP_ACTION_TRAINING_PATTERN_SEL				0x04
5271
#define ATOM_DP_ACTION_TRAINING_PATTERN_SEL				0x04
4317
#define ATOM_DP_ACTION_SET_VSWING_PREEMP					0x05
5272
#define ATOM_DP_ACTION_SET_VSWING_PREEMP					0x05
Line 4318... Line 5273...
4318
#define ATOM_DP_ACTION_GET_VSWING_PREEMP					0x06
5273
#define ATOM_DP_ACTION_GET_VSWING_PREEMP					0x06
4319
#define ATOM_DP_ACTION_BLANKING                   0x07
5274
#define ATOM_DP_ACTION_BLANKING                   0x07
4320
 
5275
 
4321
/*  ucConfig */
5276
// ucConfig
4322
#define ATOM_DP_CONFIG_ENCODER_SEL_MASK						0x03
5277
#define ATOM_DP_CONFIG_ENCODER_SEL_MASK						0x03
4323
#define ATOM_DP_CONFIG_DIG1_ENCODER								0x00
5278
#define ATOM_DP_CONFIG_DIG1_ENCODER								0x00
Line 4339... Line 5294...
4339
#define	DPCD_GET_LANE_STATUS_ADJUST_TBL_ADDR							(ATOM_DP_TRAINING_TBL_ADDR + 48)
5294
#define	DPCD_GET_LANE_STATUS_ADJUST_TBL_ADDR							(ATOM_DP_TRAINING_TBL_ADDR + 48)
4340
#define DP_I2C_AUX_DDC_WRITE_START_TBL_ADDR								(ATOM_DP_TRAINING_TBL_ADDR + 60)
5295
#define DP_I2C_AUX_DDC_WRITE_START_TBL_ADDR								(ATOM_DP_TRAINING_TBL_ADDR + 60)
4341
#define DP_I2C_AUX_DDC_WRITE_TBL_ADDR											(ATOM_DP_TRAINING_TBL_ADDR + 64)
5296
#define DP_I2C_AUX_DDC_WRITE_TBL_ADDR											(ATOM_DP_TRAINING_TBL_ADDR + 64)
4342
#define DP_I2C_AUX_DDC_READ_START_TBL_ADDR								(ATOM_DP_TRAINING_TBL_ADDR + 72)
5297
#define DP_I2C_AUX_DDC_READ_START_TBL_ADDR								(ATOM_DP_TRAINING_TBL_ADDR + 72)
4343
#define DP_I2C_AUX_DDC_READ_TBL_ADDR											(ATOM_DP_TRAINING_TBL_ADDR + 76)
5298
#define DP_I2C_AUX_DDC_READ_TBL_ADDR											(ATOM_DP_TRAINING_TBL_ADDR + 76)
-
 
5299
#define DP_I2C_AUX_DDC_WRITE_END_TBL_ADDR                 (ATOM_DP_TRAINING_TBL_ADDR + 80) 
4344
#define DP_I2C_AUX_DDC_READ_END_TBL_ADDR									(ATOM_DP_TRAINING_TBL_ADDR + 80)
5300
#define DP_I2C_AUX_DDC_READ_END_TBL_ADDR									(ATOM_DP_TRAINING_TBL_ADDR + 84)
Line 4345... Line 5301...
4345
 
5301
 
-
 
5302
typedef struct _PROCESS_I2C_CHANNEL_TRANSACTION_PARAMETERS
4346
typedef struct _PROCESS_I2C_CHANNEL_TRANSACTION_PARAMETERS {
5303
{
4347
	UCHAR ucI2CSpeed;
5304
	UCHAR ucI2CSpeed;
-
 
5305
 	union
4348
	union {
5306
	{
4349
		UCHAR ucRegIndex;
5307
		UCHAR ucRegIndex;
4350
		UCHAR ucStatus;
5308
		UCHAR ucStatus;
4351
	};
5309
	};
4352
	USHORT lpI2CDataOut;
5310
	USHORT lpI2CDataOut;
Line 4356... Line 5314...
4356
	UCHAR ucLineNumber;
5314
	UCHAR ucLineNumber;
4357
} PROCESS_I2C_CHANNEL_TRANSACTION_PARAMETERS;
5315
}PROCESS_I2C_CHANNEL_TRANSACTION_PARAMETERS;
Line 4358... Line 5316...
4358
 
5316
 
Line 4359... Line 5317...
4359
#define PROCESS_I2C_CHANNEL_TRANSACTION_PS_ALLOCATION       PROCESS_I2C_CHANNEL_TRANSACTION_PARAMETERS
5317
#define PROCESS_I2C_CHANNEL_TRANSACTION_PS_ALLOCATION       PROCESS_I2C_CHANNEL_TRANSACTION_PARAMETERS
4360
 
5318
 
4361
/* ucFlag */
5319
//ucFlag
-
 
5320
#define HW_I2C_WRITE        1
-
 
5321
#define HW_I2C_READ         0
-
 
5322
#define I2C_2BYTE_ADDR      0x02
-
 
5323
 
-
 
5324
typedef struct _SET_HWBLOCK_INSTANCE_PARAMETER_V2
-
 
5325
{
-
 
5326
   UCHAR ucHWBlkInst;                // HW block instance, 0, 1, 2, ...
-
 
5327
   UCHAR ucReserved[3]; 
-
 
5328
}SET_HWBLOCK_INSTANCE_PARAMETER_V2;
-
 
5329
 
-
 
5330
#define HWBLKINST_INSTANCE_MASK       0x07
-
 
5331
#define HWBLKINST_HWBLK_MASK          0xF0
-
 
5332
#define HWBLKINST_HWBLK_SHIFT         0x04
-
 
5333
 
-
 
5334
//ucHWBlock
-
 
5335
#define SELECT_DISP_ENGINE            0
-
 
5336
#define SELECT_DISP_PLL               1
-
 
5337
#define SELECT_DCIO_UNIPHY_LINK0      2
-
 
5338
#define SELECT_DCIO_UNIPHY_LINK1      3
-
 
5339
#define SELECT_DCIO_IMPCAL            4
-
 
5340
#define SELECT_DCIO_DIG               6
-
 
5341
#define SELECT_CRTC_PIXEL_RATE        7
-
 
5342
 
-
 
5343
/****************************************************************************/	
-
 
5344
//Portion VI: Definitinos for vbios MC scratch registers that driver used
-
 
5345
/****************************************************************************/
-
 
5346
 
-
 
5347
#define MC_MISC0__MEMORY_TYPE_MASK    0xF0000000
-
 
5348
#define MC_MISC0__MEMORY_TYPE__GDDR1  0x10000000
-
 
5349
#define MC_MISC0__MEMORY_TYPE__DDR2   0x20000000
-
 
5350
#define MC_MISC0__MEMORY_TYPE__GDDR3  0x30000000
-
 
5351
#define MC_MISC0__MEMORY_TYPE__GDDR4  0x40000000
Line 4362... Line 5352...
4362
#define HW_I2C_WRITE        1
5352
#define MC_MISC0__MEMORY_TYPE__GDDR5  0x50000000
4363
#define HW_I2C_READ         0
5353
#define MC_MISC0__MEMORY_TYPE__DDR3   0xB0000000
4364
 
5354
 
Line 4365... Line 5355...
4365
/****************************************************************************/
5355
/****************************************************************************/
4366
/* Portion VI: Definitinos being oboselete */
5356
//Portion VI: Definitinos being oboselete
4367
/****************************************************************************/
5357
/****************************************************************************/
-
 
5358
 
4368
 
5359
//==========================================================================================
4369
/* ========================================================================================== */
5360
//Remove the definitions below when driver is ready!
4370
/* Remove the definitions below when driver is ready! */
5361
typedef struct _ATOM_DAC_INFO
4371
typedef struct _ATOM_DAC_INFO {
5362
{
Line -... Line 5363...
-
 
5363
	ATOM_COMMON_TABLE_HEADER sHeader;
4372
	ATOM_COMMON_TABLE_HEADER sHeader;
5364
  USHORT                   usMaxFrequency;      // in 10kHz unit
-
 
5365
	USHORT usReserved;
4373
	USHORT usMaxFrequency;	/*  in 10kHz unit */
5366
}ATOM_DAC_INFO;
Line 4374... Line 5367...
4374
	USHORT usReserved;
5367
 
4375
} ATOM_DAC_INFO;
5368
 
4376
 
5369
typedef struct  _COMPASSIONATE_DATA           
4377
typedef struct _COMPASSIONATE_DATA {
5370
{
4378
	ATOM_COMMON_TABLE_HEADER sHeader;
5371
	ATOM_COMMON_TABLE_HEADER sHeader;
4379
 
5372
 
4380
	/* ==============================  DAC1 portion */
5373
  //==============================  DAC1 portion
4381
	UCHAR ucDAC1_BG_Adjustment;
5374
	UCHAR ucDAC1_BG_Adjustment;
4382
	UCHAR ucDAC1_DAC_Adjustment;
5375
	UCHAR ucDAC1_DAC_Adjustment;
4383
	USHORT usDAC1_FORCE_Data;
5376
	USHORT usDAC1_FORCE_Data;
4384
	/* ==============================  DAC2 portion */
5377
  //==============================  DAC2 portion
4385
	UCHAR ucDAC2_CRT2_BG_Adjustment;
5378
	UCHAR ucDAC2_CRT2_BG_Adjustment;
4386
	UCHAR ucDAC2_CRT2_DAC_Adjustment;
5379
	UCHAR ucDAC2_CRT2_DAC_Adjustment;
4387
	USHORT usDAC2_CRT2_FORCE_Data;
5380
	USHORT usDAC2_CRT2_FORCE_Data;
4388
	USHORT usDAC2_CRT2_MUX_RegisterIndex;
5381
	USHORT usDAC2_CRT2_MUX_RegisterIndex;
4389
	UCHAR ucDAC2_CRT2_MUX_RegisterInfo;	/* Bit[4:0]=Bit position,Bit[7]=1:Active High;=0 Active Low */
5382
  UCHAR   ucDAC2_CRT2_MUX_RegisterInfo;     //Bit[4:0]=Bit position,Bit[7]=1:Active High;=0 Active Low
4390
	UCHAR ucDAC2_NTSC_BG_Adjustment;
5383
	UCHAR ucDAC2_NTSC_BG_Adjustment;
4391
	UCHAR ucDAC2_NTSC_DAC_Adjustment;
5384
	UCHAR ucDAC2_NTSC_DAC_Adjustment;
4392
	USHORT usDAC2_TV1_FORCE_Data;
5385
	USHORT usDAC2_TV1_FORCE_Data;
4393
	USHORT usDAC2_TV1_MUX_RegisterIndex;
5386
	USHORT usDAC2_TV1_MUX_RegisterIndex;
4394
	UCHAR ucDAC2_TV1_MUX_RegisterInfo;	/* Bit[4:0]=Bit position,Bit[7]=1:Active High;=0 Active Low */
5387
  UCHAR   ucDAC2_TV1_MUX_RegisterInfo;      //Bit[4:0]=Bit position,Bit[7]=1:Active High;=0 Active Low
4395
	UCHAR ucDAC2_CV_BG_Adjustment;
5388
	UCHAR ucDAC2_CV_BG_Adjustment;
4396
	UCHAR ucDAC2_CV_DAC_Adjustment;
5389
	UCHAR ucDAC2_CV_DAC_Adjustment;
4397
	USHORT usDAC2_CV_FORCE_Data;
5390
	USHORT usDAC2_CV_FORCE_Data;
Line 4398... Line 5391...
4398
	USHORT usDAC2_CV_MUX_RegisterIndex;
5391
	USHORT usDAC2_CV_MUX_RegisterIndex;
4399
	UCHAR ucDAC2_CV_MUX_RegisterInfo;	/* Bit[4:0]=Bit position,Bit[7]=1:Active High;=0 Active Low */
5392
  UCHAR   ucDAC2_CV_MUX_RegisterInfo;       //Bit[4:0]=Bit position,Bit[7]=1:Active High;=0 Active Low
4400
	UCHAR ucDAC2_PAL_BG_Adjustment;
5393
	UCHAR ucDAC2_PAL_BG_Adjustment;
4401
	UCHAR ucDAC2_PAL_DAC_Adjustment;
5394
	UCHAR ucDAC2_PAL_DAC_Adjustment;
4402
	USHORT usDAC2_TV2_FORCE_Data;
5395
	USHORT usDAC2_TV2_FORCE_Data;
4403
} COMPASSIONATE_DATA;
5396
}COMPASSIONATE_DATA;
4404
 
5397
 
4405
/****************************Supported Device Info Table Definitions**********************/
5398
/****************************Supported Device Info Table Definitions**********************/
4406
/*   ucConnectInfo: */
5399
//  ucConnectInfo:
4407
/*     [7:4] - connector type */
5400
//    [7:4] - connector type
4408
/*       = 1   - VGA connector */
5401
//      = 1   - VGA connector   
4409
/*       = 2   - DVI-I */
5402
//      = 2   - DVI-I
4410
/*       = 3   - DVI-D */
5403
//      = 3   - DVI-D
4411
/*       = 4   - DVI-A */
5404
//      = 4   - DVI-A
4412
/*       = 5   - SVIDEO */
5405
//      = 5   - SVIDEO
4413
/*       = 6   - COMPOSITE */
5406
//      = 6   - COMPOSITE
4414
/*       = 7   - LVDS */
5407
//      = 7   - LVDS
4415
/*       = 8   - DIGITAL LINK */
5408
//      = 8   - DIGITAL LINK
4416
/*       = 9   - SCART */
5409
//      = 9   - SCART
4417
/*       = 0xA - HDMI_type A */
5410
//      = 0xA - HDMI_type A
4418
/*       = 0xB - HDMI_type B */
5411
//      = 0xB - HDMI_type B
4419
/*       = 0xE - Special case1 (DVI+DIN) */
5412
//      = 0xE - Special case1 (DVI+DIN)
4420
/*       Others=TBD */
5413
//      Others=TBD
Line 4421... Line 5414...
4421
/*     [3:0] - DAC Associated */
5414
//    [3:0] - DAC Associated
-
 
5415
//      = 0   - no DAC
4422
/*       = 0   - no DAC */
5416
//      = 1   - DACA
4423
/*       = 1   - DACA */
5417
//      = 2   - DACB
4424
/*       = 2   - DACB */
5418
//      = 3   - External DAC
4425
/*       = 3   - External DAC */
5419
//      Others=TBD
4426
/*       Others=TBD */
5420
//    
4427
/*  */
5421
 
4428
 
5422
typedef struct _ATOM_CONNECTOR_INFO
4429
typedef struct _ATOM_CONNECTOR_INFO {
5423
{
Line 4430... Line 5424...
4430
#if ATOM_BIG_ENDIAN
5424
#if ATOM_BIG_ENDIAN
-
 
5425
	UCHAR bfConnectorType:4;
4431
	UCHAR bfConnectorType:4;
5426
	UCHAR bfAssociatedDAC:4;
4432
	UCHAR bfAssociatedDAC:4;
5427
#else
4433
#else
5428
	UCHAR bfAssociatedDAC:4;
Line 4434... Line 5429...
4434
	UCHAR bfAssociatedDAC:4;
5429
	UCHAR bfConnectorType:4;
-
 
5430
#endif
4435
	UCHAR bfConnectorType:4;
5431
}ATOM_CONNECTOR_INFO;
4436
#endif
5432
 
4437
} ATOM_CONNECTOR_INFO;
5433
typedef union _ATOM_CONNECTOR_INFO_ACCESS
Line -... Line 5434...
-
 
5434
{
4438
 
5435
	ATOM_CONNECTOR_INFO sbfAccess;
-
 
5436
	UCHAR ucAccess;
4439
typedef union _ATOM_CONNECTOR_INFO_ACCESS {
5437
}ATOM_CONNECTOR_INFO_ACCESS;
4440
	ATOM_CONNECTOR_INFO sbfAccess;
5438
 
4441
	UCHAR ucAccess;
5439
typedef struct _ATOM_CONNECTOR_INFO_I2C
4442
} ATOM_CONNECTOR_INFO_ACCESS;
5440
{
Line 4443... Line 5441...
4443
 
5441
	ATOM_CONNECTOR_INFO_ACCESS sucConnectorInfo;
Line 4444... Line 5442...
4444
typedef struct _ATOM_CONNECTOR_INFO_I2C {
5442
	ATOM_I2C_ID_CONFIG_ACCESS sucI2cId;
-
 
5443
}ATOM_CONNECTOR_INFO_I2C;
4445
	ATOM_CONNECTOR_INFO_ACCESS sucConnectorInfo;
5444
 
4446
	ATOM_I2C_ID_CONFIG_ACCESS sucI2cId;
5445
 
Line 4447... Line 5446...
4447
} ATOM_CONNECTOR_INFO_I2C;
5446
typedef struct _ATOM_SUPPORTED_DEVICES_INFO
-
 
5447
{ 
4448
 
5448
	ATOM_COMMON_TABLE_HEADER sHeader;
4449
typedef struct _ATOM_SUPPORTED_DEVICES_INFO {
5449
	USHORT usDeviceSupport;
4450
	ATOM_COMMON_TABLE_HEADER sHeader;
5450
	ATOM_CONNECTOR_INFO_I2C asConnInfo[ATOM_MAX_SUPPORTED_DEVICE_INFO];
4451
	USHORT usDeviceSupport;
-
 
4452
	ATOM_CONNECTOR_INFO_I2C asConnInfo[ATOM_MAX_SUPPORTED_DEVICE_INFO];
5451
}ATOM_SUPPORTED_DEVICES_INFO;
4453
} ATOM_SUPPORTED_DEVICES_INFO;
5452
 
Line 4454... Line 5453...
4454
 
5453
#define NO_INT_SRC_MAPPED       0xFF
-
 
5454
 
4455
#define NO_INT_SRC_MAPPED       0xFF
5455
typedef struct _ATOM_CONNECTOR_INC_SRC_BITMAP
4456
 
5456
{
4457
typedef struct _ATOM_CONNECTOR_INC_SRC_BITMAP {
5457
	UCHAR ucIntSrcBitmap;
4458
	UCHAR ucIntSrcBitmap;
5458
}ATOM_CONNECTOR_INC_SRC_BITMAP;
4459
} ATOM_CONNECTOR_INC_SRC_BITMAP;
5459
 
Line 4460... Line 5460...
4460
 
5460
typedef struct _ATOM_SUPPORTED_DEVICES_INFO_2
Line -... Line 5461...
-
 
5461
{ 
-
 
5462
	ATOM_COMMON_TABLE_HEADER sHeader;
4461
typedef struct _ATOM_SUPPORTED_DEVICES_INFO_2 {
5463
	USHORT usDeviceSupport;
-
 
5464
	ATOM_CONNECTOR_INFO_I2C asConnInfo[ATOM_MAX_SUPPORTED_DEVICE_INFO_2];
4462
	ATOM_COMMON_TABLE_HEADER sHeader;
5465
  ATOM_CONNECTOR_INC_SRC_BITMAP asIntSrcInfo[ATOM_MAX_SUPPORTED_DEVICE_INFO_2];
4463
	USHORT usDeviceSupport;
5466
}ATOM_SUPPORTED_DEVICES_INFO_2;
4464
	ATOM_CONNECTOR_INFO_I2C asConnInfo[ATOM_MAX_SUPPORTED_DEVICE_INFO_2];
5467
 
4465
	ATOM_CONNECTOR_INC_SRC_BITMAP
5468
typedef struct _ATOM_SUPPORTED_DEVICES_INFO_2d1
4466
	    asIntSrcInfo[ATOM_MAX_SUPPORTED_DEVICE_INFO_2];
5469
{ 
4467
} ATOM_SUPPORTED_DEVICES_INFO_2;
5470
	ATOM_COMMON_TABLE_HEADER sHeader;
Line -... Line 5471...
-
 
5471
	USHORT usDeviceSupport;
4468
 
5472
	ATOM_CONNECTOR_INFO_I2C asConnInfo[ATOM_MAX_SUPPORTED_DEVICE];
Line 4469... Line 5473...
4469
typedef struct _ATOM_SUPPORTED_DEVICES_INFO_2d1 {
5473
	ATOM_CONNECTOR_INC_SRC_BITMAP asIntSrcInfo[ATOM_MAX_SUPPORTED_DEVICE];
-
 
5474
}ATOM_SUPPORTED_DEVICES_INFO_2d1;
4470
	ATOM_COMMON_TABLE_HEADER sHeader;
5475
 
4471
	USHORT usDeviceSupport;
5476
#define ATOM_SUPPORTED_DEVICES_INFO_LAST ATOM_SUPPORTED_DEVICES_INFO_2d1
4472
	ATOM_CONNECTOR_INFO_I2C asConnInfo[ATOM_MAX_SUPPORTED_DEVICE];
5477
 
4473
	ATOM_CONNECTOR_INC_SRC_BITMAP asIntSrcInfo[ATOM_MAX_SUPPORTED_DEVICE];
5478
 
Line -... Line 5479...
-
 
5479
 
4474
} ATOM_SUPPORTED_DEVICES_INFO_2d1;
5480
typedef struct _ATOM_MISC_CONTROL_INFO
-
 
5481
{
4475
 
5482
	USHORT usFrequency;
4476
#define ATOM_SUPPORTED_DEVICES_INFO_LAST ATOM_SUPPORTED_DEVICES_INFO_2d1
5483
   UCHAR  ucPLL_ChargePump;				                // PLL charge-pump gain control
4477
 
5484
   UCHAR  ucPLL_DutyCycle;				                // PLL duty cycle control
Line 4478... Line 5485...
4478
typedef struct _ATOM_MISC_CONTROL_INFO {
5485
   UCHAR  ucPLL_VCO_Gain;				                  // PLL VCO gain control
-
 
5486
   UCHAR  ucPLL_VoltageSwing;			                // PLL driver voltage swing control
4479
	USHORT usFrequency;
5487
}ATOM_MISC_CONTROL_INFO;  
4480
	UCHAR ucPLL_ChargePump;	/*  PLL charge-pump gain control */
5488
 
4481
	UCHAR ucPLL_DutyCycle;	/*  PLL duty cycle control */
5489
 
Line 4482... Line 5490...
4482
	UCHAR ucPLL_VCO_Gain;	/*  PLL VCO gain control */
5490
#define ATOM_MAX_MISC_INFO       4
-
 
5491
 
4483
	UCHAR ucPLL_VoltageSwing;	/*  PLL driver voltage swing control */
5492
typedef struct _ATOM_TMDS_INFO
4484
} ATOM_MISC_CONTROL_INFO;
5493
{
4485
 
5494
	ATOM_COMMON_TABLE_HEADER sHeader;
Line -... Line 5495...
-
 
5495
  USHORT							usMaxFrequency;             // in 10Khz
4486
#define ATOM_MAX_MISC_INFO       4
5496
	ATOM_MISC_CONTROL_INFO asMiscInfo[ATOM_MAX_MISC_INFO];
-
 
5497
}ATOM_TMDS_INFO;
4487
 
5498
 
4488
typedef struct _ATOM_TMDS_INFO {
5499
 
4489
	ATOM_COMMON_TABLE_HEADER sHeader;
5500
typedef struct _ATOM_ENCODER_ANALOG_ATTRIBUTE
4490
	USHORT usMaxFrequency;	/*  in 10Khz */
5501
{
4491
	ATOM_MISC_CONTROL_INFO asMiscInfo[ATOM_MAX_MISC_INFO];
5502
  UCHAR ucTVStandard;     //Same as TV standards defined above, 
4492
} ATOM_TMDS_INFO;
5503
	UCHAR ucPadding[1];
Line 4493... Line 5504...
4493
 
5504
}ATOM_ENCODER_ANALOG_ATTRIBUTE;
-
 
5505
 
4494
typedef struct _ATOM_ENCODER_ANALOG_ATTRIBUTE {
5506
typedef struct _ATOM_ENCODER_DIGITAL_ATTRIBUTE
4495
	UCHAR ucTVStandard;	/* Same as TV standards defined above, */
5507
{
4496
	UCHAR ucPadding[1];
5508
  UCHAR ucAttribute;      //Same as other digital encoder attributes defined above
Line -... Line 5509...
-
 
5509
	UCHAR ucPadding[1];
4497
} ATOM_ENCODER_ANALOG_ATTRIBUTE;
5510
}ATOM_ENCODER_DIGITAL_ATTRIBUTE;
4498
 
5511
 
4499
typedef struct _ATOM_ENCODER_DIGITAL_ATTRIBUTE {
5512
typedef union _ATOM_ENCODER_ATTRIBUTE
4500
	UCHAR ucAttribute;	/* Same as other digital encoder attributes defined above */
5513
{
4501
	UCHAR ucPadding[1];
5514
	ATOM_ENCODER_ANALOG_ATTRIBUTE sAlgAttrib;
4502
} ATOM_ENCODER_DIGITAL_ATTRIBUTE;
5515
	ATOM_ENCODER_DIGITAL_ATTRIBUTE sDigAttrib;
Line -... Line 5516...
-
 
5516
}ATOM_ENCODER_ATTRIBUTE;
4503
 
5517
 
-
 
5518
 
4504
typedef union _ATOM_ENCODER_ATTRIBUTE {
5519
typedef struct _DVO_ENCODER_CONTROL_PARAMETERS
4505
	ATOM_ENCODER_ANALOG_ATTRIBUTE sAlgAttrib;
5520
{
4506
	ATOM_ENCODER_DIGITAL_ATTRIBUTE sDigAttrib;
5521
	USHORT usPixelClock;
4507
} ATOM_ENCODER_ATTRIBUTE;
5522
	USHORT usEncoderID;
4508
 
5523
  UCHAR  ucDeviceType;												//Use ATOM_DEVICE_xxx1_Index to indicate device type only.	
4509
typedef struct _DVO_ENCODER_CONTROL_PARAMETERS {
5524
  UCHAR  ucAction;														//ATOM_ENABLE/ATOM_DISABLE/ATOM_HPD_INIT
4510
	USHORT usPixelClock;
5525
	ATOM_ENCODER_ATTRIBUTE usDevAttr;
4511
	USHORT usEncoderID;
5526
}DVO_ENCODER_CONTROL_PARAMETERS;
4512
	UCHAR ucDeviceType;	/* Use ATOM_DEVICE_xxx1_Index to indicate device type only. */
5527
 
4513
	UCHAR ucAction;		/* ATOM_ENABLE/ATOM_DISABLE/ATOM_HPD_INIT */
5528
typedef struct _DVO_ENCODER_CONTROL_PS_ALLOCATION
Line 4514... Line 5529...
4514
	ATOM_ENCODER_ATTRIBUTE usDevAttr;
5529
{                               
-
 
5530
	DVO_ENCODER_CONTROL_PARAMETERS sDVOEncoder;
4515
} DVO_ENCODER_CONTROL_PARAMETERS;
5531
  WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION      sReserved;     //Caller doesn't need to init this portion
4516
 
5532
}DVO_ENCODER_CONTROL_PS_ALLOCATION;
4517
typedef struct _DVO_ENCODER_CONTROL_PS_ALLOCATION {
5533
 
4518
	DVO_ENCODER_CONTROL_PARAMETERS sDVOEncoder;
5534
 
Line 4519... Line 5535...
4519
	WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved;	/* Caller doesn't need to init this portion */
5535
#define ATOM_XTMDS_ASIC_SI164_ID        1
Line 4520... Line 5536...
4520
} DVO_ENCODER_CONTROL_PS_ALLOCATION;
5536
#define ATOM_XTMDS_ASIC_SI178_ID        2
4521
 
5537
#define ATOM_XTMDS_ASIC_TFP513_ID       3
4522
#define ATOM_XTMDS_ASIC_SI164_ID        1
5538
#define ATOM_XTMDS_SUPPORTED_SINGLELINK 0x00000001
4523
#define ATOM_XTMDS_ASIC_SI178_ID        2
5539
#define ATOM_XTMDS_SUPPORTED_DUALLINK   0x00000002
Line 4524... Line 5540...
4524
#define ATOM_XTMDS_ASIC_TFP513_ID       3
5540
#define ATOM_XTMDS_MVPU_FPGA            0x00000004
Line 4556... Line 5572...
4556
 
5572
 
Line 4557... Line 5573...
4557
#define ATOM_PM_MISCINFO_LOAD_PERFORMANCE_EN             0x00000010L
5573
#define ATOM_PM_MISCINFO_LOAD_PERFORMANCE_EN             0x00000010L
4558
 
5574
 
4559
#define ATOM_PM_MISCINFO_ENGINE_CLOCK_CONTRL_EN          0x00000020L
5575
#define ATOM_PM_MISCINFO_ENGINE_CLOCK_CONTRL_EN          0x00000020L
Line 4560... Line 5576...
4560
#define ATOM_PM_MISCINFO_MEMORY_CLOCK_CONTRL_EN          0x00000040L
5576
#define ATOM_PM_MISCINFO_MEMORY_CLOCK_CONTRL_EN          0x00000040L
4561
#define ATOM_PM_MISCINFO_PROGRAM_VOLTAGE                 0x00000080L	/* When this bit set, ucVoltageDropIndex is not an index for GPIO pin, but a voltage ID that SW needs program */
5577
#define ATOM_PM_MISCINFO_PROGRAM_VOLTAGE                 0x00000080L  //When this bit set, ucVoltageDropIndex is not an index for GPIO pin, but a voltage ID that SW needs program  
4562
 
5578
 
4563
#define ATOM_PM_MISCINFO_ASIC_REDUCED_SPEED_SCLK_EN      0x00000100L
5579
#define ATOM_PM_MISCINFO_ASIC_REDUCED_SPEED_SCLK_EN      0x00000100L
Line 4572... Line 5588...
4572
#define ATOM_PM_MISCINFO_OVER_CLOCK_MODE                 0x00010000L
5588
#define ATOM_PM_MISCINFO_OVER_CLOCK_MODE                 0x00010000L
4573
#define ATOM_PM_MISCINFO_OVER_DRIVE_MODE                 0x00020000L
5589
#define ATOM_PM_MISCINFO_OVER_DRIVE_MODE                 0x00020000L
4574
#define ATOM_PM_MISCINFO_POWER_SAVING_MODE               0x00040000L
5590
#define ATOM_PM_MISCINFO_POWER_SAVING_MODE               0x00040000L
4575
#define ATOM_PM_MISCINFO_THERMAL_DIODE_MODE              0x00080000L
5591
#define ATOM_PM_MISCINFO_THERMAL_DIODE_MODE              0x00080000L
Line 4576... Line 5592...
4576
 
5592
 
4577
#define ATOM_PM_MISCINFO_FRAME_MODULATION_MASK           0x00300000L	/* 0-FM Disable, 1-2 level FM, 2-4 level FM, 3-Reserved */
5593
#define ATOM_PM_MISCINFO_FRAME_MODULATION_MASK           0x00300000L  //0-FM Disable, 1-2 level FM, 2-4 level FM, 3-Reserved
Line 4578... Line 5594...
4578
#define ATOM_PM_MISCINFO_FRAME_MODULATION_SHIFT          20
5594
#define ATOM_PM_MISCINFO_FRAME_MODULATION_SHIFT          20
4579
 
5595
 
4580
#define ATOM_PM_MISCINFO_DYN_CLK_3D_IDLE                 0x00400000L
5596
#define ATOM_PM_MISCINFO_DYN_CLK_3D_IDLE                 0x00400000L
4581
#define ATOM_PM_MISCINFO_DYNAMIC_CLOCK_DIVIDER_BY_2      0x00800000L
5597
#define ATOM_PM_MISCINFO_DYNAMIC_CLOCK_DIVIDER_BY_2      0x00800000L
4582
#define ATOM_PM_MISCINFO_DYNAMIC_CLOCK_DIVIDER_BY_4      0x01000000L
5598
#define ATOM_PM_MISCINFO_DYNAMIC_CLOCK_DIVIDER_BY_4      0x01000000L
4583
#define ATOM_PM_MISCINFO_DYNAMIC_HDP_BLOCK_EN            0x02000000L	/* When set, Dynamic */
5599
#define ATOM_PM_MISCINFO_DYNAMIC_HDP_BLOCK_EN            0x02000000L  //When set, Dynamic 
Line 4584... Line 5600...
4584
#define ATOM_PM_MISCINFO_DYNAMIC_MC_HOST_BLOCK_EN        0x04000000L	/* When set, Dynamic */
5600
#define ATOM_PM_MISCINFO_DYNAMIC_MC_HOST_BLOCK_EN        0x04000000L  //When set, Dynamic
4585
#define ATOM_PM_MISCINFO_3D_ACCELERATION_EN              0x08000000L	/* When set, This mode is for acceleated 3D mode */
5601
#define ATOM_PM_MISCINFO_3D_ACCELERATION_EN              0x08000000L  //When set, This mode is for acceleated 3D mode
4586
 
5602
 
Line 4587... Line 5603...
4587
#define ATOM_PM_MISCINFO_POWERPLAY_SETTINGS_GROUP_MASK   0x70000000L	/* 1-Optimal Battery Life Group, 2-High Battery, 3-Balanced, 4-High Performance, 5- Optimal Performance (Default state with Default clocks) */
5603
#define ATOM_PM_MISCINFO_POWERPLAY_SETTINGS_GROUP_MASK   0x70000000L  //1-Optimal Battery Life Group, 2-High Battery, 3-Balanced, 4-High Performance, 5- Optimal Performance (Default state with Default clocks) 
4588
#define ATOM_PM_MISCINFO_POWERPLAY_SETTINGS_GROUP_SHIFT  28
5604
#define ATOM_PM_MISCINFO_POWERPLAY_SETTINGS_GROUP_SHIFT  28
4589
#define ATOM_PM_MISCINFO_ENABLE_BACK_BIAS                0x80000000L
5605
#define ATOM_PM_MISCINFO_ENABLE_BACK_BIAS                0x80000000L
4590
 
5606
 
4591
#define ATOM_PM_MISCINFO2_SYSTEM_AC_LITE_MODE            0x00000001L
5607
#define ATOM_PM_MISCINFO2_SYSTEM_AC_LITE_MODE            0x00000001L
4592
#define ATOM_PM_MISCINFO2_MULTI_DISPLAY_SUPPORT          0x00000002L
5608
#define ATOM_PM_MISCINFO2_MULTI_DISPLAY_SUPPORT          0x00000002L
4593
#define ATOM_PM_MISCINFO2_DYNAMIC_BACK_BIAS_EN           0x00000004L
5609
#define ATOM_PM_MISCINFO2_DYNAMIC_BACK_BIAS_EN           0x00000004L
4594
#define ATOM_PM_MISCINFO2_FS3D_OVERDRIVE_INFO            0x00000008L
5610
#define ATOM_PM_MISCINFO2_FS3D_OVERDRIVE_INFO            0x00000008L
4595
#define ATOM_PM_MISCINFO2_FORCEDLOWPWR_MODE              0x00000010L
5611
#define ATOM_PM_MISCINFO2_FORCEDLOWPWR_MODE              0x00000010L
4596
#define ATOM_PM_MISCINFO2_VDDCI_DYNAMIC_VOLTAGE_EN       0x00000020L
5612
#define ATOM_PM_MISCINFO2_VDDCI_DYNAMIC_VOLTAGE_EN       0x00000020L
4597
#define ATOM_PM_MISCINFO2_VIDEO_PLAYBACK_CAPABLE         0x00000040L	/* If this bit is set in multi-pp mode, then driver will pack up one with the minior power consumption. */
5613
#define ATOM_PM_MISCINFO2_VIDEO_PLAYBACK_CAPABLE         0x00000040L  //If this bit is set in multi-pp mode, then driver will pack up one with the minior power consumption. 
Line 4598... Line 5614...
4598
								      /* If it's not set in any pp mode, driver will use its default logic to pick a pp mode in video playback */
5614
                                                                      //If it's not set in any pp mode, driver will use its default logic to pick a pp mode in video playback
4599
#define ATOM_PM_MISCINFO2_NOT_VALID_ON_DC                0x00000080L
5615
#define ATOM_PM_MISCINFO2_NOT_VALID_ON_DC                0x00000080L
4600
#define ATOM_PM_MISCINFO2_STUTTER_MODE_EN                0x00000100L
5616
#define ATOM_PM_MISCINFO2_STUTTER_MODE_EN                0x00000100L
-
 
5617
#define ATOM_PM_MISCINFO2_UVD_SUPPORT_MODE               0x00000200L
4601
#define ATOM_PM_MISCINFO2_UVD_SUPPORT_MODE               0x00000200L
5618
 
4602
 
5619
//ucTableFormatRevision=1
4603
/* ucTableFormatRevision=1 */
5620
//ucTableContentRevision=1
4604
/* ucTableContentRevision=1 */
5621
typedef struct  _ATOM_POWERMODE_INFO
4605
typedef struct _ATOM_POWERMODE_INFO {
5622
{
4606
	ULONG ulMiscInfo;	/* The power level should be arranged in ascending order */
5623
  ULONG     ulMiscInfo;                 //The power level should be arranged in ascending order
4607
	ULONG ulReserved1;	/*  must set to 0 */
5624
  ULONG     ulReserved1;                // must set to 0
4608
	ULONG ulReserved2;	/*  must set to 0 */
5625
  ULONG     ulReserved2;                // must set to 0
4609
	USHORT usEngineClock;
5626
	USHORT usEngineClock;
4610
	USHORT usMemoryClock;
5627
	USHORT usMemoryClock;
4611
	UCHAR ucVoltageDropIndex;	/*  index to GPIO table */
5628
  UCHAR     ucVoltageDropIndex;         // index to GPIO table
Line 4612... Line 5629...
4612
	UCHAR ucSelectedPanel_RefreshRate;	/*  panel refresh rate */
5629
  UCHAR     ucSelectedPanel_RefreshRate;// panel refresh rate
4613
	UCHAR ucMinTemperature;
5630
	UCHAR ucMinTemperature;
4614
	UCHAR ucMaxTemperature;
5631
	UCHAR ucMaxTemperature;
-
 
5632
  UCHAR     ucNumPciELanes;             // number of PCIE lanes
4615
	UCHAR ucNumPciELanes;	/*  number of PCIE lanes */
5633
}ATOM_POWERMODE_INFO;
4616
} ATOM_POWERMODE_INFO;
5634
 
4617
 
5635
//ucTableFormatRevision=2
4618
/* ucTableFormatRevision=2 */
5636
//ucTableContentRevision=1
4619
/* ucTableContentRevision=1 */
5637
typedef struct  _ATOM_POWERMODE_INFO_V2
4620
typedef struct _ATOM_POWERMODE_INFO_V2 {
5638
{
4621
	ULONG ulMiscInfo;	/* The power level should be arranged in ascending order */
5639
  ULONG     ulMiscInfo;                 //The power level should be arranged in ascending order
4622
	ULONG ulMiscInfo2;
5640
	ULONG ulMiscInfo2;
4623
	ULONG ulEngineClock;
5641
	ULONG ulEngineClock;
4624
	ULONG ulMemoryClock;
5642
	ULONG ulMemoryClock;
Line 4625... Line 5643...
4625
	UCHAR ucVoltageDropIndex;	/*  index to GPIO table */
5643
  UCHAR     ucVoltageDropIndex;         // index to GPIO table
4626
	UCHAR ucSelectedPanel_RefreshRate;	/*  panel refresh rate */
5644
  UCHAR     ucSelectedPanel_RefreshRate;// panel refresh rate
4627
	UCHAR ucMinTemperature;
5645
	UCHAR ucMinTemperature;
-
 
5646
	UCHAR ucMaxTemperature;
4628
	UCHAR ucMaxTemperature;
5647
  UCHAR     ucNumPciELanes;             // number of PCIE lanes
4629
	UCHAR ucNumPciELanes;	/*  number of PCIE lanes */
5648
}ATOM_POWERMODE_INFO_V2;
4630
} ATOM_POWERMODE_INFO_V2;
5649
 
4631
 
5650
//ucTableFormatRevision=2
4632
/* ucTableFormatRevision=2 */
5651
//ucTableContentRevision=2
4633
/* ucTableContentRevision=2 */
5652
typedef struct  _ATOM_POWERMODE_INFO_V3
4634
typedef struct _ATOM_POWERMODE_INFO_V3 {
5653
{
4635
	ULONG ulMiscInfo;	/* The power level should be arranged in ascending order */
5654
  ULONG     ulMiscInfo;                 //The power level should be arranged in ascending order
4636
	ULONG ulMiscInfo2;
5655
	ULONG ulMiscInfo2;
4637
	ULONG ulEngineClock;
5656
	ULONG ulEngineClock;
4638
	ULONG ulMemoryClock;
5657
	ULONG ulMemoryClock;
Line -... Line 5658...
-
 
5658
  UCHAR     ucVoltageDropIndex;         // index to Core (VDDC) votage table
4639
	UCHAR ucVoltageDropIndex;	/*  index to Core (VDDC) votage table */
5659
  UCHAR     ucSelectedPanel_RefreshRate;// panel refresh rate
Line 4640... Line 5660...
4640
	UCHAR ucSelectedPanel_RefreshRate;	/*  panel refresh rate */
5660
	UCHAR ucMinTemperature;
4641
	UCHAR ucMinTemperature;
5661
	UCHAR ucMaxTemperature;
Line 4653... Line 5673...
4653
#define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_ADM1032   0x02
5673
#define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_ADM1032   0x02
4654
#define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_ADM1030   0x03
5674
#define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_ADM1030   0x03
4655
#define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_MUA6649   0x04
5675
#define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_MUA6649   0x04
4656
#define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_LM64      0x05
5676
#define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_LM64      0x05
4657
#define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_F75375    0x06
5677
#define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_F75375    0x06
4658
#define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_ASC7512   0x07	/*  Andigilog */
5678
#define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_ASC7512   0x07	// Andigilog
Line -... Line 5679...
-
 
5679
 
4659
 
5680
 
-
 
5681
typedef struct  _ATOM_POWERPLAY_INFO
4660
typedef struct _ATOM_POWERPLAY_INFO {
5682
{
4661
	ATOM_COMMON_TABLE_HEADER sHeader;
5683
	ATOM_COMMON_TABLE_HEADER sHeader;
4662
	UCHAR ucOverdriveThermalController;
5684
	UCHAR ucOverdriveThermalController;
4663
	UCHAR ucOverdriveI2cLine;
5685
	UCHAR ucOverdriveI2cLine;
4664
	UCHAR ucOverdriveIntBitmap;
5686
	UCHAR ucOverdriveIntBitmap;
4665
	UCHAR ucOverdriveControllerAddress;
5687
	UCHAR ucOverdriveControllerAddress;
4666
	UCHAR ucSizeOfPowerModeEntry;
5688
	UCHAR ucSizeOfPowerModeEntry;
4667
	UCHAR ucNumOfPowerModeEntries;
5689
	UCHAR ucNumOfPowerModeEntries;
4668
	ATOM_POWERMODE_INFO asPowerPlayInfo[ATOM_MAX_NUMBEROF_POWER_BLOCK];
5690
	ATOM_POWERMODE_INFO asPowerPlayInfo[ATOM_MAX_NUMBEROF_POWER_BLOCK];
Line 4669... Line 5691...
4669
} ATOM_POWERPLAY_INFO;
5691
}ATOM_POWERPLAY_INFO;
-
 
5692
 
4670
 
5693
typedef struct  _ATOM_POWERPLAY_INFO_V2
4671
typedef struct _ATOM_POWERPLAY_INFO_V2 {
5694
{
4672
	ATOM_COMMON_TABLE_HEADER sHeader;
5695
	ATOM_COMMON_TABLE_HEADER sHeader;
4673
	UCHAR ucOverdriveThermalController;
5696
	UCHAR ucOverdriveThermalController;
4674
	UCHAR ucOverdriveI2cLine;
5697
	UCHAR ucOverdriveI2cLine;
4675
	UCHAR ucOverdriveIntBitmap;
5698
	UCHAR ucOverdriveIntBitmap;
4676
	UCHAR ucOverdriveControllerAddress;
5699
	UCHAR ucOverdriveControllerAddress;
4677
	UCHAR ucSizeOfPowerModeEntry;
5700
	UCHAR ucSizeOfPowerModeEntry;
4678
	UCHAR ucNumOfPowerModeEntries;
5701
	UCHAR ucNumOfPowerModeEntries;
Line 4679... Line 5702...
4679
	ATOM_POWERMODE_INFO_V2 asPowerPlayInfo[ATOM_MAX_NUMBEROF_POWER_BLOCK];
5702
	ATOM_POWERMODE_INFO_V2 asPowerPlayInfo[ATOM_MAX_NUMBEROF_POWER_BLOCK];
-
 
5703
}ATOM_POWERPLAY_INFO_V2;
4680
} ATOM_POWERPLAY_INFO_V2;
5704
 
4681
 
5705
typedef struct  _ATOM_POWERPLAY_INFO_V3
4682
typedef struct _ATOM_POWERPLAY_INFO_V3 {
5706
{
4683
	ATOM_COMMON_TABLE_HEADER sHeader;
5707
	ATOM_COMMON_TABLE_HEADER sHeader;
4684
	UCHAR ucOverdriveThermalController;
5708
	UCHAR ucOverdriveThermalController;
Line 4889... Line 5913...
4889
#define ATOM_PPLIB_RS780_HTLINKFREQ_LOW        1
5913
#define ATOM_PPLIB_RS780_HTLINKFREQ_LOW        1
4890
#define ATOM_PPLIB_RS780_HTLINKFREQ_HIGH       2
5914
#define ATOM_PPLIB_RS780_HTLINKFREQ_HIGH       2
Line 4891... Line 5915...
4891
 
5915
 
Line -... Line 5916...
-
 
5916
/**************************************************************************/
4892
/**************************************************************************/
5917
 
4893
 
5918
 
4894
/*  Following definitions are for compatiblity issue in different SW components. */
5919
// Following definitions are for compatiblity issue in different SW components. 
4895
#define ATOM_MASTER_DATA_TABLE_REVISION   0x01
5920
#define ATOM_MASTER_DATA_TABLE_REVISION   0x01
4896
#define Object_Info												Object_Header
5921
#define Object_Info												Object_Header
4897
#define	AdjustARB_SEQ											MC_InitParameter
5922
#define	AdjustARB_SEQ											MC_InitParameter
Line 4901... Line 5926...
4901
#define SS_Info                           PPLL_SS_Info
5926
#define SS_Info                           PPLL_SS_Info
4902
#define ASIC_MVDDC_Info                   ASIC_InternalSS_Info
5927
#define ASIC_MVDDC_Info                   ASIC_InternalSS_Info
4903
#define DispDevicePriorityInfo						SaveRestoreInfo
5928
#define DispDevicePriorityInfo						SaveRestoreInfo
4904
#define DispOutInfo												TV_VideoMode
5929
#define DispOutInfo												TV_VideoMode
Line -... Line 5930...
-
 
5930
 
4905
 
5931
 
4906
#define ATOM_ENCODER_OBJECT_TABLE         ATOM_OBJECT_TABLE
5932
#define ATOM_ENCODER_OBJECT_TABLE         ATOM_OBJECT_TABLE
Line 4907... Line 5933...
4907
#define ATOM_CONNECTOR_OBJECT_TABLE       ATOM_OBJECT_TABLE
5933
#define ATOM_CONNECTOR_OBJECT_TABLE       ATOM_OBJECT_TABLE
4908
 
5934
 
4909
/* New device naming, remove them when both DAL/VBIOS is ready */
5935
//New device naming, remove them when both DAL/VBIOS is ready
Line 4910... Line 5936...
4910
#define DFP2I_OUTPUT_CONTROL_PARAMETERS    CRT1_OUTPUT_CONTROL_PARAMETERS
5936
#define DFP2I_OUTPUT_CONTROL_PARAMETERS    CRT1_OUTPUT_CONTROL_PARAMETERS
4911
#define DFP2I_OUTPUT_CONTROL_PS_ALLOCATION DFP2I_OUTPUT_CONTROL_PARAMETERS
5937
#define DFP2I_OUTPUT_CONTROL_PS_ALLOCATION DFP2I_OUTPUT_CONTROL_PARAMETERS
Line 4982... Line 6008...
4982
#define DFP1OutputControl   TMDSAOutputControl
6008
#define DFP1OutputControl   TMDSAOutputControl
4983
#define DFP2OutputControl   LVTMAOutputControl
6009
#define DFP2OutputControl   LVTMAOutputControl
4984
#define CRT1OutputControl   DAC1OutputControl
6010
#define CRT1OutputControl   DAC1OutputControl
4985
#define CRT2OutputControl   DAC2OutputControl
6011
#define CRT2OutputControl   DAC2OutputControl
Line 4986... Line 6012...
4986
 
6012
 
4987
/* These two lines will be removed for sure in a few days, will follow up with Michael V. */
6013
//These two lines will be removed for sure in a few days, will follow up with Michael V.
4988
#define EnableLVDS_SS   EnableSpreadSpectrumOnPPLL
6014
#define EnableLVDS_SS   EnableSpreadSpectrumOnPPLL
Line -... Line 6015...
-
 
6015
#define ENABLE_LVDS_SS_PARAMETERS_V3  ENABLE_SPREAD_SPECTRUM_ON_PPLL
-
 
6016
 
-
 
6017
//#define ATOM_S2_CRT1_DPMS_STATE         0x00010000L
-
 
6018
//#define ATOM_S2_LCD1_DPMS_STATE	        ATOM_S2_CRT1_DPMS_STATE
-
 
6019
//#define ATOM_S2_TV1_DPMS_STATE          ATOM_S2_CRT1_DPMS_STATE
-
 
6020
//#define ATOM_S2_DFP1_DPMS_STATE         ATOM_S2_CRT1_DPMS_STATE
-
 
6021
//#define ATOM_S2_CRT2_DPMS_STATE         ATOM_S2_CRT1_DPMS_STATE
-
 
6022
 
-
 
6023
#define ATOM_S6_ACC_REQ_TV2             0x00400000L
-
 
6024
#define ATOM_DEVICE_TV2_INDEX           0x00000006
-
 
6025
#define ATOM_DEVICE_TV2_SUPPORT         (0x1L << ATOM_DEVICE_TV2_INDEX)
-
 
6026
#define ATOM_S0_TV2                     0x00100000L
-
 
6027
#define ATOM_S3_TV2_ACTIVE              ATOM_S3_DFP6_ACTIVE
-
 
6028
#define ATOM_S3_TV2_CRTC_ACTIVE         ATOM_S3_DFP6_CRTC_ACTIVE
-
 
6029
 
-
 
6030
//
-
 
6031
#define ATOM_S2_CRT1_DPMS_STATE         0x00010000L
-
 
6032
#define ATOM_S2_LCD1_DPMS_STATE	        0x00020000L
-
 
6033
#define ATOM_S2_TV1_DPMS_STATE          0x00040000L
-
 
6034
#define ATOM_S2_DFP1_DPMS_STATE         0x00080000L
-
 
6035
#define ATOM_S2_CRT2_DPMS_STATE         0x00100000L
-
 
6036
#define ATOM_S2_LCD2_DPMS_STATE         0x00200000L
-
 
6037
#define ATOM_S2_TV2_DPMS_STATE          0x00400000L
-
 
6038
#define ATOM_S2_DFP2_DPMS_STATE         0x00800000L
-
 
6039
#define ATOM_S2_CV_DPMS_STATE           0x01000000L
-
 
6040
#define ATOM_S2_DFP3_DPMS_STATE					0x02000000L
-
 
6041
#define ATOM_S2_DFP4_DPMS_STATE					0x04000000L
-
 
6042
#define ATOM_S2_DFP5_DPMS_STATE					0x08000000L
-
 
6043
 
-
 
6044
#define ATOM_S2_CRT1_DPMS_STATEb2       0x01
-
 
6045
#define ATOM_S2_LCD1_DPMS_STATEb2       0x02
-
 
6046
#define ATOM_S2_TV1_DPMS_STATEb2        0x04
-
 
6047
#define ATOM_S2_DFP1_DPMS_STATEb2       0x08
-
 
6048
#define ATOM_S2_CRT2_DPMS_STATEb2       0x10
-
 
6049
#define ATOM_S2_LCD2_DPMS_STATEb2       0x20
-
 
6050
#define ATOM_S2_TV2_DPMS_STATEb2        0x40
-
 
6051
#define ATOM_S2_DFP2_DPMS_STATEb2       0x80
-
 
6052
#define ATOM_S2_CV_DPMS_STATEb3         0x01
-
 
6053
#define ATOM_S2_DFP3_DPMS_STATEb3				0x02
-
 
6054
#define ATOM_S2_DFP4_DPMS_STATEb3				0x04
-
 
6055
#define ATOM_S2_DFP5_DPMS_STATEb3				0x08
-
 
6056
 
-
 
6057
#define ATOM_S3_ASIC_GUI_ENGINE_HUNGb3	0x20
-
 
6058
#define ATOM_S3_ALLOW_FAST_PWR_SWITCHb3 0x40
4989
#define ENABLE_LVDS_SS_PARAMETERS_V3  ENABLE_SPREAD_SPECTRUM_ON_PPLL
6059
#define ATOM_S3_RQST_GPU_USE_MIN_PWRb3  0x80
Line 4990... Line 6060...
4990
 
6060
 
Line 4991... Line 6061...
4991
/*********************************************************************************/
6061
/*********************************************************************************/