1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 #ifndef _ATOMBIOS_H
30 #define _ATOMBIOS_H
31
32 #define ATOM_VERSION_MAJOR 0x00020000
33 #define ATOM_VERSION_MINOR 0x00000002
34
35 #define ATOM_HEADER_VERSION (ATOM_VERSION_MAJOR | ATOM_VERSION_MINOR)
36
37
38
39
40 #ifndef ATOM_BIG_ENDIAN
41 #error Endian not specified
42 #endif
43
44 #ifdef _H2INC
45 #ifndef ULONG
46 typedef unsigned long ULONG;
47 #endif
48
49 #ifndef UCHAR
50 typedef unsigned char UCHAR;
51 #endif
52
53 #ifndef USHORT
54 typedef unsigned short USHORT;
55 #endif
56 #endif
57
58 #define ATOM_DAC_A 0
59 #define ATOM_DAC_B 1
60 #define ATOM_EXT_DAC 2
61
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
68 #define ATOM_CRTC_INVALID 0xFF
69
70 #define ATOM_DIGA 0
71 #define ATOM_DIGB 1
72
73 #define ATOM_PPLL1 0
74 #define ATOM_PPLL2 1
75 #define ATOM_DCPLL 2
76 #define ATOM_PPLL0 2
77 #define ATOM_PPLL3 3
78
79 #define ATOM_EXT_PLL1 8
80 #define ATOM_EXT_PLL2 9
81 #define ATOM_EXT_CLOCK 10
82 #define ATOM_PPLL_INVALID 0xFF
83
84 #define ENCODER_REFCLK_SRC_P1PLL 0
85 #define ENCODER_REFCLK_SRC_P2PLL 1
86 #define ENCODER_REFCLK_SRC_DCPLL 2
87 #define ENCODER_REFCLK_SRC_EXTCLK 3
88 #define ENCODER_REFCLK_SRC_INVALID 0xFF
89
90 #define ATOM_SCALER1 0
91 #define ATOM_SCALER2 1
92
93 #define ATOM_SCALER_DISABLE 0
94 #define ATOM_SCALER_CENTER 1
95 #define ATOM_SCALER_EXPANSION 2
96 #define ATOM_SCALER_MULTI_EX 3
97
98 #define ATOM_DISABLE 0
99 #define ATOM_ENABLE 1
100 #define ATOM_LCD_BLOFF (ATOM_DISABLE+2)
101 #define ATOM_LCD_BLON (ATOM_ENABLE+2)
102 #define ATOM_LCD_BL_BRIGHTNESS_CONTROL (ATOM_ENABLE+3)
103 #define ATOM_LCD_SELFTEST_START (ATOM_DISABLE+5)
104 #define ATOM_LCD_SELFTEST_STOP (ATOM_ENABLE+5)
105 #define ATOM_ENCODER_INIT (ATOM_DISABLE+7)
106 #define ATOM_INIT (ATOM_DISABLE+7)
107 #define ATOM_GET_STATUS (ATOM_DISABLE+8)
108
109 #define ATOM_BLANKING 1
110 #define ATOM_BLANKING_OFF 0
111
112 #define ATOM_CURSOR1 0
113 #define ATOM_CURSOR2 1
114
115 #define ATOM_ICON1 0
116 #define ATOM_ICON2 1
117
118 #define ATOM_CRT1 0
119 #define ATOM_CRT2 1
120
121 #define ATOM_TV_NTSC 1
122 #define ATOM_TV_NTSCJ 2
123 #define ATOM_TV_PAL 3
124 #define ATOM_TV_PALM 4
125 #define ATOM_TV_PALCN 5
126 #define ATOM_TV_PALN 6
127 #define ATOM_TV_PAL60 7
128 #define ATOM_TV_SECAM 8
129 #define ATOM_TV_CV 16
130
131 #define ATOM_DAC1_PS2 1
132 #define ATOM_DAC1_CV 2
133 #define ATOM_DAC1_NTSC 3
134 #define ATOM_DAC1_PAL 4
135
136 #define ATOM_DAC2_PS2 ATOM_DAC1_PS2
137 #define ATOM_DAC2_CV ATOM_DAC1_CV
138 #define ATOM_DAC2_NTSC ATOM_DAC1_NTSC
139 #define ATOM_DAC2_PAL ATOM_DAC1_PAL
140
141 #define ATOM_PM_ON 0
142 #define ATOM_PM_STANDBY 1
143 #define ATOM_PM_SUSPEND 2
144 #define ATOM_PM_OFF 3
145
146
147
148
149
150
151 #define ATOM_PANEL_MISC_DUAL 0x00000001
152 #define ATOM_PANEL_MISC_888RGB 0x00000002
153 #define ATOM_PANEL_MISC_GREY_LEVEL 0x0000000C
154 #define ATOM_PANEL_MISC_FPDI 0x00000010
155 #define ATOM_PANEL_MISC_GREY_LEVEL_SHIFT 2
156 #define ATOM_PANEL_MISC_SPATIAL 0x00000020
157 #define ATOM_PANEL_MISC_TEMPORAL 0x00000040
158 #define ATOM_PANEL_MISC_API_ENABLED 0x00000080
159
160
161 #define MEMTYPE_DDR1 "DDR1"
162 #define MEMTYPE_DDR2 "DDR2"
163 #define MEMTYPE_DDR3 "DDR3"
164 #define MEMTYPE_DDR4 "DDR4"
165
166 #define ASIC_BUS_TYPE_PCI "PCI"
167 #define ASIC_BUS_TYPE_AGP "AGP"
168 #define ASIC_BUS_TYPE_PCIE "PCI_EXPRESS"
169
170
171
172 #define ATOM_FIREGL_FLAG_STRING "FGL"
173 #define ATOM_MAX_SIZE_OF_FIREGL_FLAG_STRING 3
174
175 #define ATOM_FAKE_DESKTOP_STRING "DSK"
176 #define ATOM_MAX_SIZE_OF_FAKE_DESKTOP_STRING ATOM_MAX_SIZE_OF_FIREGL_FLAG_STRING
177
178 #define ATOM_M54T_FLAG_STRING "M54T"
179 #define ATOM_MAX_SIZE_OF_M54T_FLAG_STRING 4
180
181 #define HW_ASSISTED_I2C_STATUS_FAILURE 2
182 #define HW_ASSISTED_I2C_STATUS_SUCCESS 1
183
184 #pragma pack(1)
185
186
187
188 #define OFFSET_TO_POINTER_TO_ATOM_ROM_HEADER 0x00000048L
189 #define OFFSET_TO_ATOM_ROM_IMAGE_SIZE 0x00000002L
190
191 #define OFFSET_TO_ATOMBIOS_ASIC_BUS_MEM_TYPE 0x94
192 #define MAXSIZE_OF_ATOMBIOS_ASIC_BUS_MEM_TYPE 20
193 #define OFFSET_TO_GET_ATOMBIOS_STRINGS_NUMBER 0x002f
194 #define OFFSET_TO_GET_ATOMBIOS_STRINGS_START 0x006e
195
196
197
198
199
200 typedef struct _ATOM_COMMON_TABLE_HEADER
201 {
202 USHORT usStructureSize;
203 UCHAR ucTableFormatRevision;
204 UCHAR ucTableContentRevision;
205
206 }ATOM_COMMON_TABLE_HEADER;
207
208
209
210
211 typedef struct _ATOM_ROM_HEADER
212 {
213 ATOM_COMMON_TABLE_HEADER sHeader;
214 UCHAR uaFirmWareSignature[4];
215
216 USHORT usBiosRuntimeSegmentAddress;
217 USHORT usProtectedModeInfoOffset;
218 USHORT usConfigFilenameOffset;
219 USHORT usCRC_BlockOffset;
220 USHORT usBIOS_BootupMessageOffset;
221 USHORT usInt10Offset;
222 USHORT usPciBusDevInitCode;
223 USHORT usIoBaseAddress;
224 USHORT usSubsystemVendorID;
225 USHORT usSubsystemID;
226 USHORT usPCI_InfoOffset;
227 USHORT usMasterCommandTableOffset;
228 USHORT usMasterDataTableOffset;
229 UCHAR ucExtendedFunctionCode;
230 UCHAR ucReserved;
231 }ATOM_ROM_HEADER;
232
233
234
235 #ifdef UEFI_BUILD
236 #define UTEMP USHORT
237 #define USHORT void*
238 #endif
239
240
241
242
243 typedef struct _ATOM_MASTER_LIST_OF_COMMAND_TABLES{
244 USHORT ASIC_Init;
245 USHORT GetDisplaySurfaceSize;
246 USHORT ASIC_RegistersInit;
247 USHORT VRAM_BlockVenderDetection;
248 USHORT DIGxEncoderControl;
249 USHORT MemoryControllerInit;
250 USHORT EnableCRTCMemReq;
251 USHORT MemoryParamAdjust;
252 USHORT DVOEncoderControl;
253 USHORT GPIOPinControl;
254 USHORT SetEngineClock;
255 USHORT SetMemoryClock;
256 USHORT SetPixelClock;
257 USHORT EnableDispPowerGating;
258 USHORT ResetMemoryDLL;
259 USHORT ResetMemoryDevice;
260 USHORT MemoryPLLInit;
261 USHORT AdjustDisplayPll;
262 USHORT AdjustMemoryController;
263 USHORT EnableASIC_StaticPwrMgt;
264 USHORT SetUniphyInstance;
265 USHORT DAC_LoadDetection;
266 USHORT LVTMAEncoderControl;
267 USHORT HW_Misc_Operation;
268 USHORT DAC1EncoderControl;
269 USHORT DAC2EncoderControl;
270 USHORT DVOOutputControl;
271 USHORT CV1OutputControl;
272 USHORT GetConditionalGoldenSetting;
273 USHORT TVEncoderControl;
274 USHORT PatchMCSetting;
275 USHORT MC_SEQ_Control;
276 USHORT Gfx_Harvesting;
277 USHORT EnableScaler;
278 USHORT BlankCRTC;
279 USHORT EnableCRTC;
280 USHORT GetPixelClock;
281 USHORT EnableVGA_Render;
282 USHORT GetSCLKOverMCLKRatio;
283 USHORT SetCRTC_Timing;
284 USHORT SetCRTC_OverScan;
285 USHORT SetCRTC_Replication;
286 USHORT SelectCRTC_Source;
287 USHORT EnableGraphSurfaces;
288 USHORT UpdateCRTC_DoubleBufferRegisters;
289 USHORT LUT_AutoFill;
290 USHORT EnableHW_IconCursor;
291 USHORT GetMemoryClock;
292 USHORT GetEngineClock;
293 USHORT SetCRTC_UsingDTDTiming;
294 USHORT ExternalEncoderControl;
295 USHORT LVTMAOutputControl;
296 USHORT VRAM_BlockDetectionByStrap;
297 USHORT MemoryCleanUp;
298 USHORT ProcessI2cChannelTransaction;
299 USHORT WriteOneByteToHWAssistedI2C;
300 USHORT ReadHWAssistedI2CStatus;
301 USHORT SpeedFanControl;
302 USHORT PowerConnectorDetection;
303 USHORT MC_Synchronization;
304 USHORT ComputeMemoryEnginePLL;
305 USHORT MemoryRefreshConversion;
306 USHORT VRAM_GetCurrentInfoBlock;
307 USHORT DynamicMemorySettings;
308 USHORT MemoryTraining;
309 USHORT EnableSpreadSpectrumOnPPLL;
310 USHORT TMDSAOutputControl;
311 USHORT SetVoltage;
312 USHORT DAC1OutputControl;
313 USHORT DAC2OutputControl;
314 USHORT ComputeMemoryClockParam;
315 USHORT ClockSource;
316 USHORT MemoryDeviceInit;
317 USHORT GetDispObjectInfo;
318 USHORT DIG1EncoderControl;
319 USHORT DIG2EncoderControl;
320 USHORT DIG1TransmitterControl;
321 USHORT DIG2TransmitterControl;
322 USHORT ProcessAuxChannelTransaction;
323 USHORT DPEncoderService;
324 USHORT GetVoltageInfo;
325 }ATOM_MASTER_LIST_OF_COMMAND_TABLES;
326
327
328 #define ReadEDIDFromHWAssistedI2C ProcessI2cChannelTransaction
329 #define DPTranslatorControl DIG2EncoderControl
330 #define UNIPHYTransmitterControl DIG1TransmitterControl
331 #define LVTMATransmitterControl DIG2TransmitterControl
332 #define SetCRTC_DPM_State GetConditionalGoldenSetting
333 #define ASIC_StaticPwrMgtStatusChange SetUniphyInstance
334 #define HPDInterruptService ReadHWAssistedI2CStatus
335 #define EnableVGA_Access GetSCLKOverMCLKRatio
336 #define EnableYUV GetDispObjectInfo
337 #define DynamicClockGating EnableDispPowerGating
338 #define SetupHWAssistedI2CStatus ComputeMemoryClockParam
339
340 #define TMDSAEncoderControl PatchMCSetting
341 #define LVDSEncoderControl MC_SEQ_Control
342 #define LCD1OutputControl HW_Misc_Operation
343 #define TV1OutputControl Gfx_Harvesting
344
345 typedef struct _ATOM_MASTER_COMMAND_TABLE
346 {
347 ATOM_COMMON_TABLE_HEADER sHeader;
348 ATOM_MASTER_LIST_OF_COMMAND_TABLES ListOfCommandTables;
349 }ATOM_MASTER_COMMAND_TABLE;
350
351
352
353
354 typedef struct _ATOM_TABLE_ATTRIBUTE
355 {
356 #if ATOM_BIG_ENDIAN
357 USHORT UpdatedByUtility:1;
358 USHORT PS_SizeInBytes:7;
359 USHORT WS_SizeInBytes:8;
360 #else
361 USHORT WS_SizeInBytes:8;
362 USHORT PS_SizeInBytes:7;
363 USHORT UpdatedByUtility:1;
364 #endif
365 }ATOM_TABLE_ATTRIBUTE;
366
367 typedef union _ATOM_TABLE_ATTRIBUTE_ACCESS
368 {
369 ATOM_TABLE_ATTRIBUTE sbfAccess;
370 USHORT susAccess;
371 }ATOM_TABLE_ATTRIBUTE_ACCESS;
372
373
374
375
376
377
378 typedef struct _ATOM_COMMON_ROM_COMMAND_TABLE_HEADER
379 {
380 ATOM_COMMON_TABLE_HEADER CommonHeader;
381 ATOM_TABLE_ATTRIBUTE TableAttribute;
382 }ATOM_COMMON_ROM_COMMAND_TABLE_HEADER;
383
384
385
386
387 #define COMPUTE_MEMORY_PLL_PARAM 1
388 #define COMPUTE_ENGINE_PLL_PARAM 2
389 #define ADJUST_MC_SETTING_PARAM 3
390
391
392
393
394 typedef struct _ATOM_ADJUST_MEMORY_CLOCK_FREQ
395 {
396 #if ATOM_BIG_ENDIAN
397 ULONG ulPointerReturnFlag:1;
398 ULONG ulMemoryModuleNumber:7;
399 ULONG ulClockFreq:24;
400 #else
401 ULONG ulClockFreq:24;
402 ULONG ulMemoryModuleNumber:7;
403 ULONG ulPointerReturnFlag:1;
404 #endif
405 }ATOM_ADJUST_MEMORY_CLOCK_FREQ;
406 #define POINTER_RETURN_FLAG 0x80
407
408 typedef struct _COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS
409 {
410 ULONG ulClock;
411 UCHAR ucAction;
412 UCHAR ucReserved;
413 UCHAR ucFbDiv;
414 UCHAR ucPostDiv;
415 }COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS;
416
417 typedef struct _COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V2
418 {
419 ULONG ulClock;
420 UCHAR ucAction;
421 USHORT usFbDiv;
422 UCHAR ucPostDiv;
423 }COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V2;
424 #define COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_PS_ALLOCATION COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS
425
426
427 #define SET_CLOCK_FREQ_MASK 0x00FFFFFF
428 #define USE_NON_BUS_CLOCK_MASK 0x01000000
429 #define USE_MEMORY_SELF_REFRESH_MASK 0x02000000
430 #define SKIP_INTERNAL_MEMORY_PARAMETER_CHANGE 0x04000000
431 #define FIRST_TIME_CHANGE_CLOCK 0x08000000
432 #define SKIP_SW_PROGRAM_PLL 0x10000000
433 #define USE_SS_ENABLED_PIXEL_CLOCK USE_NON_BUS_CLOCK_MASK
434
435 #define b3USE_NON_BUS_CLOCK_MASK 0x01
436 #define b3USE_MEMORY_SELF_REFRESH 0x02
437 #define b3SKIP_INTERNAL_MEMORY_PARAMETER_CHANGE 0x04
438 #define b3FIRST_TIME_CHANGE_CLOCK 0x08
439 #define b3SKIP_SW_PROGRAM_PLL 0x10
440
441 typedef struct _ATOM_COMPUTE_CLOCK_FREQ
442 {
443 #if ATOM_BIG_ENDIAN
444 ULONG ulComputeClockFlag:8;
445 ULONG ulClockFreq:24;
446 #else
447 ULONG ulClockFreq:24;
448 ULONG ulComputeClockFlag:8;
449 #endif
450 }ATOM_COMPUTE_CLOCK_FREQ;
451
452 typedef struct _ATOM_S_MPLL_FB_DIVIDER
453 {
454 USHORT usFbDivFrac;
455 USHORT usFbDiv;
456 }ATOM_S_MPLL_FB_DIVIDER;
457
458 typedef struct _COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V3
459 {
460 union
461 {
462 ATOM_COMPUTE_CLOCK_FREQ ulClock;
463 ULONG ulClockParams;
464 ATOM_S_MPLL_FB_DIVIDER ulFbDiv;
465 };
466 UCHAR ucRefDiv;
467 UCHAR ucPostDiv;
468 UCHAR ucCntlFlag;
469 UCHAR ucReserved;
470 }COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V3;
471
472
473 #define ATOM_PLL_CNTL_FLAG_PLL_POST_DIV_EN 1
474 #define ATOM_PLL_CNTL_FLAG_MPLL_VCO_MODE 2
475 #define ATOM_PLL_CNTL_FLAG_FRACTION_DISABLE 4
476 #define ATOM_PLL_CNTL_FLAG_SPLL_ISPARE_9 8
477
478
479
480 typedef struct _COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V4
481 {
482 #if ATOM_BIG_ENDIAN
483 ULONG ucPostDiv:8;
484 ULONG ulClock:24;
485 #else
486 ULONG ulClock:24;
487 ULONG ucPostDiv:8;
488 #endif
489 }COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V4;
490
491 typedef struct _COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V5
492 {
493 union
494 {
495 ATOM_COMPUTE_CLOCK_FREQ ulClock;
496 ULONG ulClockParams;
497 ATOM_S_MPLL_FB_DIVIDER ulFbDiv;
498 };
499 UCHAR ucRefDiv;
500 UCHAR ucPostDiv;
501 union
502 {
503 UCHAR ucCntlFlag;
504 UCHAR ucInputFlag;
505 };
506 UCHAR ucReserved;
507 }COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V5;
508
509
510 typedef struct _COMPUTE_GPU_CLOCK_INPUT_PARAMETERS_V1_6
511 {
512 ATOM_COMPUTE_CLOCK_FREQ ulClock;
513 ULONG ulReserved[2];
514 }COMPUTE_GPU_CLOCK_INPUT_PARAMETERS_V1_6;
515
516
517 #define COMPUTE_GPUCLK_INPUT_FLAG_CLK_TYPE_MASK 0x0f
518 #define COMPUTE_GPUCLK_INPUT_FLAG_DEFAULT_GPUCLK 0x00
519 #define COMPUTE_GPUCLK_INPUT_FLAG_SCLK 0x01
520
521 typedef struct _COMPUTE_GPU_CLOCK_OUTPUT_PARAMETERS_V1_6
522 {
523 COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V4 ulClock;
524 ATOM_S_MPLL_FB_DIVIDER ulFbDiv;
525 UCHAR ucPllRefDiv;
526 UCHAR ucPllPostDiv;
527 UCHAR ucPllCntlFlag;
528 UCHAR ucReserved;
529 }COMPUTE_GPU_CLOCK_OUTPUT_PARAMETERS_V1_6;
530
531
532 #define SPLL_CNTL_FLAG_VCO_MODE_MASK 0x03
533
534
535
536 #define ATOM_PLL_INPUT_FLAG_PLL_STROBE_MODE_EN 1
537
538
539 typedef struct _COMPUTE_MEMORY_CLOCK_PARAM_PARAMETERS_V2_1
540 {
541 union
542 {
543 ULONG ulClock;
544 ATOM_S_MPLL_FB_DIVIDER ulFbDiv;
545 };
546 UCHAR ucDllSpeed;
547 UCHAR ucPostDiv;
548 union{
549 UCHAR ucInputFlag;
550 UCHAR ucPllCntlFlag;
551 };
552 UCHAR ucBWCntl;
553 }COMPUTE_MEMORY_CLOCK_PARAM_PARAMETERS_V2_1;
554
555
556 #define MPLL_INPUT_FLAG_STROBE_MODE_EN 0x01
557
558 #define MPLL_CNTL_FLAG_VCO_MODE_MASK 0x03
559 #define MPLL_CNTL_FLAG_BYPASS_DQ_PLL 0x04
560 #define MPLL_CNTL_FLAG_QDR_ENABLE 0x08
561 #define MPLL_CNTL_FLAG_AD_HALF_RATE 0x10
562
563
564 #define MPLL_CNTL_FLAG_BYPASS_AD_PLL 0x04
565
566 typedef struct _DYNAMICE_MEMORY_SETTINGS_PARAMETER
567 {
568 ATOM_COMPUTE_CLOCK_FREQ ulClock;
569 ULONG ulReserved[2];
570 }DYNAMICE_MEMORY_SETTINGS_PARAMETER;
571
572 typedef struct _DYNAMICE_ENGINE_SETTINGS_PARAMETER
573 {
574 ATOM_COMPUTE_CLOCK_FREQ ulClock;
575 ULONG ulMemoryClock;
576 ULONG ulReserved;
577 }DYNAMICE_ENGINE_SETTINGS_PARAMETER;
578
579
580
581
582 typedef struct _SET_ENGINE_CLOCK_PARAMETERS
583 {
584 ULONG ulTargetEngineClock;
585 }SET_ENGINE_CLOCK_PARAMETERS;
586
587 typedef struct _SET_ENGINE_CLOCK_PS_ALLOCATION
588 {
589 ULONG ulTargetEngineClock;
590 COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_PS_ALLOCATION sReserved;
591 }SET_ENGINE_CLOCK_PS_ALLOCATION;
592
593
594
595
596 typedef struct _SET_MEMORY_CLOCK_PARAMETERS
597 {
598 ULONG ulTargetMemoryClock;
599 }SET_MEMORY_CLOCK_PARAMETERS;
600
601 typedef struct _SET_MEMORY_CLOCK_PS_ALLOCATION
602 {
603 ULONG ulTargetMemoryClock;
604 COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_PS_ALLOCATION sReserved;
605 }SET_MEMORY_CLOCK_PS_ALLOCATION;
606
607
608
609
610 typedef struct _ASIC_INIT_PARAMETERS
611 {
612 ULONG ulDefaultEngineClock;
613 ULONG ulDefaultMemoryClock;
614 }ASIC_INIT_PARAMETERS;
615
616 typedef struct _ASIC_INIT_PS_ALLOCATION
617 {
618 ASIC_INIT_PARAMETERS sASICInitClocks;
619 SET_ENGINE_CLOCK_PS_ALLOCATION sReserved;
620 }ASIC_INIT_PS_ALLOCATION;
621
622
623
624
625 typedef struct _DYNAMIC_CLOCK_GATING_PARAMETERS
626 {
627 UCHAR ucEnable;
628 UCHAR ucPadding[3];
629 }DYNAMIC_CLOCK_GATING_PARAMETERS;
630 #define DYNAMIC_CLOCK_GATING_PS_ALLOCATION DYNAMIC_CLOCK_GATING_PARAMETERS
631
632
633
634
635 typedef struct _ENABLE_DISP_POWER_GATING_PARAMETERS_V2_1
636 {
637 UCHAR ucDispPipeId;
638 UCHAR ucEnable;
639 UCHAR ucPadding[2];
640 }ENABLE_DISP_POWER_GATING_PARAMETERS_V2_1;
641
642
643
644
645 typedef struct _ENABLE_ASIC_STATIC_PWR_MGT_PARAMETERS
646 {
647 UCHAR ucEnable;
648 UCHAR ucPadding[3];
649 }ENABLE_ASIC_STATIC_PWR_MGT_PARAMETERS;
650 #define ENABLE_ASIC_STATIC_PWR_MGT_PS_ALLOCATION ENABLE_ASIC_STATIC_PWR_MGT_PARAMETERS
651
652
653
654
655 typedef struct _DAC_LOAD_DETECTION_PARAMETERS
656 {
657 USHORT usDeviceID;
658 UCHAR ucDacType;
659 UCHAR ucMisc;
660 }DAC_LOAD_DETECTION_PARAMETERS;
661
662
663 #define DAC_LOAD_MISC_YPrPb 0x01
664
665 typedef struct _DAC_LOAD_DETECTION_PS_ALLOCATION
666 {
667 DAC_LOAD_DETECTION_PARAMETERS sDacload;
668 ULONG Reserved[2];
669 }DAC_LOAD_DETECTION_PS_ALLOCATION;
670
671
672
673
674 typedef struct _DAC_ENCODER_CONTROL_PARAMETERS
675 {
676 USHORT usPixelClock;
677 UCHAR ucDacStandard;
678 UCHAR ucAction;
679
680
681 }DAC_ENCODER_CONTROL_PARAMETERS;
682
683 #define DAC_ENCODER_CONTROL_PS_ALLOCATION DAC_ENCODER_CONTROL_PARAMETERS
684
685
686
687
688
689
690 typedef struct _DIG_ENCODER_CONTROL_PARAMETERS
691 {
692 USHORT usPixelClock;
693 UCHAR ucConfig;
694
695
696
697
698
699
700
701 UCHAR ucAction;
702
703 UCHAR ucEncoderMode;
704
705
706
707
708
709 UCHAR ucLaneNum;
710 UCHAR ucReserved[2];
711 }DIG_ENCODER_CONTROL_PARAMETERS;
712 #define DIG_ENCODER_CONTROL_PS_ALLOCATION DIG_ENCODER_CONTROL_PARAMETERS
713 #define EXTERNAL_ENCODER_CONTROL_PARAMETER DIG_ENCODER_CONTROL_PARAMETERS
714
715
716 #define ATOM_ENCODER_CONFIG_DPLINKRATE_MASK 0x01
717 #define ATOM_ENCODER_CONFIG_DPLINKRATE_1_62GHZ 0x00
718 #define ATOM_ENCODER_CONFIG_DPLINKRATE_2_70GHZ 0x01
719 #define ATOM_ENCODER_CONFIG_DPLINKRATE_5_40GHZ 0x02
720 #define ATOM_ENCODER_CONFIG_LINK_SEL_MASK 0x04
721 #define ATOM_ENCODER_CONFIG_LINKA 0x00
722 #define ATOM_ENCODER_CONFIG_LINKB 0x04
723 #define ATOM_ENCODER_CONFIG_LINKA_B ATOM_TRANSMITTER_CONFIG_LINKA
724 #define ATOM_ENCODER_CONFIG_LINKB_A ATOM_ENCODER_CONFIG_LINKB
725 #define ATOM_ENCODER_CONFIG_TRANSMITTER_SEL_MASK 0x08
726 #define ATOM_ENCODER_CONFIG_UNIPHY 0x00
727 #define ATOM_ENCODER_CONFIG_LVTMA 0x08
728 #define ATOM_ENCODER_CONFIG_TRANSMITTER1 0x00
729 #define ATOM_ENCODER_CONFIG_TRANSMITTER2 0x08
730 #define ATOM_ENCODER_CONFIG_DIGB 0x80
731
732
733
734
735
736 #define ATOM_ENCODER_MODE_DP 0
737 #define ATOM_ENCODER_MODE_LVDS 1
738 #define ATOM_ENCODER_MODE_DVI 2
739 #define ATOM_ENCODER_MODE_HDMI 3
740 #define ATOM_ENCODER_MODE_SDVO 4
741 #define ATOM_ENCODER_MODE_DP_AUDIO 5
742 #define ATOM_ENCODER_MODE_TV 13
743 #define ATOM_ENCODER_MODE_CV 14
744 #define ATOM_ENCODER_MODE_CRT 15
745 #define ATOM_ENCODER_MODE_DVO 16
746 #define ATOM_ENCODER_MODE_DP_SST ATOM_ENCODER_MODE_DP
747 #define ATOM_ENCODER_MODE_DP_MST 5
748
749 typedef struct _ATOM_DIG_ENCODER_CONFIG_V2
750 {
751 #if ATOM_BIG_ENDIAN
752 UCHAR ucReserved1:2;
753 UCHAR ucTransmitterSel:2;
754 UCHAR ucLinkSel:1;
755 UCHAR ucReserved:1;
756 UCHAR ucDPLinkRate:1;
757 #else
758 UCHAR ucDPLinkRate:1;
759 UCHAR ucReserved:1;
760 UCHAR ucLinkSel:1;
761 UCHAR ucTransmitterSel:2;
762 UCHAR ucReserved1:2;
763 #endif
764 }ATOM_DIG_ENCODER_CONFIG_V2;
765
766
767 typedef struct _DIG_ENCODER_CONTROL_PARAMETERS_V2
768 {
769 USHORT usPixelClock;
770 ATOM_DIG_ENCODER_CONFIG_V2 acConfig;
771 UCHAR ucAction;
772 UCHAR ucEncoderMode;
773
774
775
776
777
778 UCHAR ucLaneNum;
779 UCHAR ucStatus;
780 UCHAR ucReserved;
781 }DIG_ENCODER_CONTROL_PARAMETERS_V2;
782
783
784 #define ATOM_ENCODER_CONFIG_V2_DPLINKRATE_MASK 0x01
785 #define ATOM_ENCODER_CONFIG_V2_DPLINKRATE_1_62GHZ 0x00
786 #define ATOM_ENCODER_CONFIG_V2_DPLINKRATE_2_70GHZ 0x01
787 #define ATOM_ENCODER_CONFIG_V2_LINK_SEL_MASK 0x04
788 #define ATOM_ENCODER_CONFIG_V2_LINKA 0x00
789 #define ATOM_ENCODER_CONFIG_V2_LINKB 0x04
790 #define ATOM_ENCODER_CONFIG_V2_TRANSMITTER_SEL_MASK 0x18
791 #define ATOM_ENCODER_CONFIG_V2_TRANSMITTER1 0x00
792 #define ATOM_ENCODER_CONFIG_V2_TRANSMITTER2 0x08
793 #define ATOM_ENCODER_CONFIG_V2_TRANSMITTER3 0x10
794
795
796
797
798 #define ATOM_ENCODER_CMD_DP_LINK_TRAINING_START 0x08
799 #define ATOM_ENCODER_CMD_DP_LINK_TRAINING_PATTERN1 0x09
800 #define ATOM_ENCODER_CMD_DP_LINK_TRAINING_PATTERN2 0x0a
801 #define ATOM_ENCODER_CMD_DP_LINK_TRAINING_PATTERN3 0x13
802 #define ATOM_ENCODER_CMD_DP_LINK_TRAINING_COMPLETE 0x0b
803 #define ATOM_ENCODER_CMD_DP_VIDEO_OFF 0x0c
804 #define ATOM_ENCODER_CMD_DP_VIDEO_ON 0x0d
805 #define ATOM_ENCODER_CMD_QUERY_DP_LINK_TRAINING_STATUS 0x0e
806 #define ATOM_ENCODER_CMD_SETUP 0x0f
807 #define ATOM_ENCODER_CMD_SETUP_PANEL_MODE 0x10
808
809
810 #define ATOM_ENCODER_STATUS_LINK_TRAINING_COMPLETE 0x10
811 #define ATOM_ENCODER_STATUS_LINK_TRAINING_INCOMPLETE 0x00
812
813
814
815
816 typedef struct _ATOM_DIG_ENCODER_CONFIG_V3
817 {
818 #if ATOM_BIG_ENDIAN
819 UCHAR ucReserved1:1;
820 UCHAR ucDigSel:3;
821 UCHAR ucReserved:3;
822 UCHAR ucDPLinkRate:1;
823 #else
824 UCHAR ucDPLinkRate:1;
825 UCHAR ucReserved:3;
826 UCHAR ucDigSel:3;
827 UCHAR ucReserved1:1;
828 #endif
829 }ATOM_DIG_ENCODER_CONFIG_V3;
830
831 #define ATOM_ENCODER_CONFIG_V3_DPLINKRATE_MASK 0x03
832 #define ATOM_ENCODER_CONFIG_V3_DPLINKRATE_1_62GHZ 0x00
833 #define ATOM_ENCODER_CONFIG_V3_DPLINKRATE_2_70GHZ 0x01
834 #define ATOM_ENCODER_CONFIG_V3_ENCODER_SEL 0x70
835 #define ATOM_ENCODER_CONFIG_V3_DIG0_ENCODER 0x00
836 #define ATOM_ENCODER_CONFIG_V3_DIG1_ENCODER 0x10
837 #define ATOM_ENCODER_CONFIG_V3_DIG2_ENCODER 0x20
838 #define ATOM_ENCODER_CONFIG_V3_DIG3_ENCODER 0x30
839 #define ATOM_ENCODER_CONFIG_V3_DIG4_ENCODER 0x40
840 #define ATOM_ENCODER_CONFIG_V3_DIG5_ENCODER 0x50
841
842 typedef struct _DIG_ENCODER_CONTROL_PARAMETERS_V3
843 {
844 USHORT usPixelClock;
845 ATOM_DIG_ENCODER_CONFIG_V3 acConfig;
846 UCHAR ucAction;
847 union {
848 UCHAR ucEncoderMode;
849
850
851
852
853
854
855 UCHAR ucPanelMode;
856
857
858
859 };
860 UCHAR ucLaneNum;
861 UCHAR ucBitPerColor;
862 UCHAR ucReserved;
863 }DIG_ENCODER_CONTROL_PARAMETERS_V3;
864
865
866
867
868
869 typedef struct _ATOM_DIG_ENCODER_CONFIG_V4
870 {
871 #if ATOM_BIG_ENDIAN
872 UCHAR ucReserved1:1;
873 UCHAR ucDigSel:3;
874 UCHAR ucReserved:2;
875 UCHAR ucDPLinkRate:2;
876 #else
877 UCHAR ucDPLinkRate:2;
878 UCHAR ucReserved:2;
879 UCHAR ucDigSel:3;
880 UCHAR ucReserved1:1;
881 #endif
882 }ATOM_DIG_ENCODER_CONFIG_V4;
883
884 #define ATOM_ENCODER_CONFIG_V4_DPLINKRATE_MASK 0x03
885 #define ATOM_ENCODER_CONFIG_V4_DPLINKRATE_1_62GHZ 0x00
886 #define ATOM_ENCODER_CONFIG_V4_DPLINKRATE_2_70GHZ 0x01
887 #define ATOM_ENCODER_CONFIG_V4_DPLINKRATE_5_40GHZ 0x02
888 #define ATOM_ENCODER_CONFIG_V4_DPLINKRATE_3_24GHZ 0x03
889 #define ATOM_ENCODER_CONFIG_V4_ENCODER_SEL 0x70
890 #define ATOM_ENCODER_CONFIG_V4_DIG0_ENCODER 0x00
891 #define ATOM_ENCODER_CONFIG_V4_DIG1_ENCODER 0x10
892 #define ATOM_ENCODER_CONFIG_V4_DIG2_ENCODER 0x20
893 #define ATOM_ENCODER_CONFIG_V4_DIG3_ENCODER 0x30
894 #define ATOM_ENCODER_CONFIG_V4_DIG4_ENCODER 0x40
895 #define ATOM_ENCODER_CONFIG_V4_DIG5_ENCODER 0x50
896 #define ATOM_ENCODER_CONFIG_V4_DIG6_ENCODER 0x60
897
898 typedef struct _DIG_ENCODER_CONTROL_PARAMETERS_V4
899 {
900 USHORT usPixelClock;
901 union{
902 ATOM_DIG_ENCODER_CONFIG_V4 acConfig;
903 UCHAR ucConfig;
904 };
905 UCHAR ucAction;
906 union {
907 UCHAR ucEncoderMode;
908
909
910
911
912
913
914 UCHAR ucPanelMode;
915
916
917
918 };
919 UCHAR ucLaneNum;
920 UCHAR ucBitPerColor;
921 UCHAR ucHPD_ID;
922 }DIG_ENCODER_CONTROL_PARAMETERS_V4;
923
924
925 #define PANEL_BPC_UNDEFINE 0x00
926 #define PANEL_6BIT_PER_COLOR 0x01
927 #define PANEL_8BIT_PER_COLOR 0x02
928 #define PANEL_10BIT_PER_COLOR 0x03
929 #define PANEL_12BIT_PER_COLOR 0x04
930 #define PANEL_16BIT_PER_COLOR 0x05
931
932
933 #define DP_PANEL_MODE_EXTERNAL_DP_MODE 0x00
934 #define DP_PANEL_MODE_INTERNAL_DP2_MODE 0x01
935 #define DP_PANEL_MODE_INTERNAL_DP1_MODE 0x11
936
937
938
939
940
941
942 typedef struct _ATOM_DP_VS_MODE
943 {
944 UCHAR ucLaneSel;
945 UCHAR ucLaneSet;
946 }ATOM_DP_VS_MODE;
947
948 typedef struct _DIG_TRANSMITTER_CONTROL_PARAMETERS
949 {
950 union
951 {
952 USHORT usPixelClock;
953 USHORT usInitInfo;
954 ATOM_DP_VS_MODE asMode;
955 };
956 UCHAR ucConfig;
957
958
959
960
961
962
963
964
965
966
967
968
969
970 UCHAR ucAction;
971
972 UCHAR ucReserved[4];
973 }DIG_TRANSMITTER_CONTROL_PARAMETERS;
974
975 #define DIG_TRANSMITTER_CONTROL_PS_ALLOCATION DIG_TRANSMITTER_CONTROL_PARAMETERS
976
977
978 #define ATOM_TRAMITTER_INITINFO_CONNECTOR_MASK 0x00ff
979
980
981 #define ATOM_TRANSMITTER_CONFIG_8LANE_LINK 0x01
982 #define ATOM_TRANSMITTER_CONFIG_COHERENT 0x02
983 #define ATOM_TRANSMITTER_CONFIG_LINK_SEL_MASK 0x04
984 #define ATOM_TRANSMITTER_CONFIG_LINKA 0x00
985 #define ATOM_TRANSMITTER_CONFIG_LINKB 0x04
986 #define ATOM_TRANSMITTER_CONFIG_LINKA_B 0x00
987 #define ATOM_TRANSMITTER_CONFIG_LINKB_A 0x04
988
989 #define ATOM_TRANSMITTER_CONFIG_ENCODER_SEL_MASK 0x08
990 #define ATOM_TRANSMITTER_CONFIG_DIG1_ENCODER 0x00
991 #define ATOM_TRANSMITTER_CONFIG_DIG2_ENCODER 0x08
992
993 #define ATOM_TRANSMITTER_CONFIG_CLKSRC_MASK 0x30
994 #define ATOM_TRANSMITTER_CONFIG_CLKSRC_PPLL 0x00
995 #define ATOM_TRANSMITTER_CONFIG_CLKSRC_PCIE 0x20
996 #define ATOM_TRANSMITTER_CONFIG_CLKSRC_XTALIN 0x30
997 #define ATOM_TRANSMITTER_CONFIG_LANE_SEL_MASK 0xc0
998 #define ATOM_TRANSMITTER_CONFIG_LANE_0_3 0x00
999 #define ATOM_TRANSMITTER_CONFIG_LANE_0_7 0x00
1000 #define ATOM_TRANSMITTER_CONFIG_LANE_4_7 0x40
1001 #define ATOM_TRANSMITTER_CONFIG_LANE_8_11 0x80
1002 #define ATOM_TRANSMITTER_CONFIG_LANE_8_15 0x80
1003 #define ATOM_TRANSMITTER_CONFIG_LANE_12_15 0xc0
1004
1005
1006 #define ATOM_TRANSMITTER_ACTION_DISABLE 0
1007 #define ATOM_TRANSMITTER_ACTION_ENABLE 1
1008 #define ATOM_TRANSMITTER_ACTION_LCD_BLOFF 2
1009 #define ATOM_TRANSMITTER_ACTION_LCD_BLON 3
1010 #define ATOM_TRANSMITTER_ACTION_BL_BRIGHTNESS_CONTROL 4
1011 #define ATOM_TRANSMITTER_ACTION_LCD_SELFTEST_START 5
1012 #define ATOM_TRANSMITTER_ACTION_LCD_SELFTEST_STOP 6
1013 #define ATOM_TRANSMITTER_ACTION_INIT 7
1014 #define ATOM_TRANSMITTER_ACTION_DISABLE_OUTPUT 8
1015 #define ATOM_TRANSMITTER_ACTION_ENABLE_OUTPUT 9
1016 #define ATOM_TRANSMITTER_ACTION_SETUP 10
1017 #define ATOM_TRANSMITTER_ACTION_SETUP_VSEMPH 11
1018 #define ATOM_TRANSMITTER_ACTION_POWER_ON 12
1019 #define ATOM_TRANSMITTER_ACTION_POWER_OFF 13
1020
1021
1022 typedef struct _ATOM_DIG_TRANSMITTER_CONFIG_V2
1023 {
1024 #if ATOM_BIG_ENDIAN
1025 UCHAR ucTransmitterSel:2;
1026
1027
1028 UCHAR ucReserved:1;
1029 UCHAR fDPConnector:1;
1030 UCHAR ucEncoderSel:1;
1031 UCHAR ucLinkSel:1;
1032
1033
1034 UCHAR fCoherentMode:1;
1035 UCHAR fDualLinkConnector:1;
1036 #else
1037 UCHAR fDualLinkConnector:1;
1038 UCHAR fCoherentMode:1;
1039 UCHAR ucLinkSel:1;
1040
1041 UCHAR ucEncoderSel:1;
1042 UCHAR fDPConnector:1;
1043 UCHAR ucReserved:1;
1044 UCHAR ucTransmitterSel:2;
1045
1046
1047 #endif
1048 }ATOM_DIG_TRANSMITTER_CONFIG_V2;
1049
1050
1051
1052 #define ATOM_TRANSMITTER_CONFIG_V2_DUAL_LINK_CONNECTOR 0x01
1053
1054
1055 #define ATOM_TRANSMITTER_CONFIG_V2_COHERENT 0x02
1056
1057
1058 #define ATOM_TRANSMITTER_CONFIG_V2_LINK_SEL_MASK 0x04
1059 #define ATOM_TRANSMITTER_CONFIG_V2_LINKA 0x00
1060 #define ATOM_TRANSMITTER_CONFIG_V2_LINKB 0x04
1061
1062
1063 #define ATOM_TRANSMITTER_CONFIG_V2_ENCODER_SEL_MASK 0x08
1064 #define ATOM_TRANSMITTER_CONFIG_V2_DIG1_ENCODER 0x00
1065 #define ATOM_TRANSMITTER_CONFIG_V2_DIG2_ENCODER 0x08
1066
1067
1068 #define ATOM_TRASMITTER_CONFIG_V2_DP_CONNECTOR 0x10
1069
1070
1071 #define ATOM_TRANSMITTER_CONFIG_V2_TRANSMITTER_SEL_MASK 0xC0
1072 #define ATOM_TRANSMITTER_CONFIG_V2_TRANSMITTER1 0x00
1073 #define ATOM_TRANSMITTER_CONFIG_V2_TRANSMITTER2 0x40
1074 #define ATOM_TRANSMITTER_CONFIG_V2_TRANSMITTER3 0x80
1075
1076 typedef struct _DIG_TRANSMITTER_CONTROL_PARAMETERS_V2
1077 {
1078 union
1079 {
1080 USHORT usPixelClock;
1081 USHORT usInitInfo;
1082 ATOM_DP_VS_MODE asMode;
1083 };
1084 ATOM_DIG_TRANSMITTER_CONFIG_V2 acConfig;
1085 UCHAR ucAction;
1086 UCHAR ucReserved[4];
1087 }DIG_TRANSMITTER_CONTROL_PARAMETERS_V2;
1088
1089 typedef struct _ATOM_DIG_TRANSMITTER_CONFIG_V3
1090 {
1091 #if ATOM_BIG_ENDIAN
1092 UCHAR ucTransmitterSel:2;
1093
1094
1095 UCHAR ucRefClkSource:2;
1096 UCHAR ucEncoderSel:1;
1097 UCHAR ucLinkSel:1;
1098
1099 UCHAR fCoherentMode:1;
1100 UCHAR fDualLinkConnector:1;
1101 #else
1102 UCHAR fDualLinkConnector:1;
1103 UCHAR fCoherentMode:1;
1104 UCHAR ucLinkSel:1;
1105
1106 UCHAR ucEncoderSel:1;
1107 UCHAR ucRefClkSource:2;
1108 UCHAR ucTransmitterSel:2;
1109
1110
1111 #endif
1112 }ATOM_DIG_TRANSMITTER_CONFIG_V3;
1113
1114
1115 typedef struct _DIG_TRANSMITTER_CONTROL_PARAMETERS_V3
1116 {
1117 union
1118 {
1119 USHORT usPixelClock;
1120 USHORT usInitInfo;
1121 ATOM_DP_VS_MODE asMode;
1122 };
1123 ATOM_DIG_TRANSMITTER_CONFIG_V3 acConfig;
1124 UCHAR ucAction;
1125 UCHAR ucLaneNum;
1126 UCHAR ucReserved[3];
1127 }DIG_TRANSMITTER_CONTROL_PARAMETERS_V3;
1128
1129
1130
1131 #define ATOM_TRANSMITTER_CONFIG_V3_DUAL_LINK_CONNECTOR 0x01
1132
1133
1134 #define ATOM_TRANSMITTER_CONFIG_V3_COHERENT 0x02
1135
1136
1137 #define ATOM_TRANSMITTER_CONFIG_V3_LINK_SEL_MASK 0x04
1138 #define ATOM_TRANSMITTER_CONFIG_V3_LINKA 0x00
1139 #define ATOM_TRANSMITTER_CONFIG_V3_LINKB 0x04
1140
1141
1142 #define ATOM_TRANSMITTER_CONFIG_V3_ENCODER_SEL_MASK 0x08
1143 #define ATOM_TRANSMITTER_CONFIG_V3_DIG1_ENCODER 0x00
1144 #define ATOM_TRANSMITTER_CONFIG_V3_DIG2_ENCODER 0x08
1145
1146
1147 #define ATOM_TRASMITTER_CONFIG_V3_REFCLK_SEL_MASK 0x30
1148 #define ATOM_TRASMITTER_CONFIG_V3_P1PLL 0x00
1149 #define ATOM_TRASMITTER_CONFIG_V3_P2PLL 0x10
1150 #define ATOM_TRASMITTER_CONFIG_V3_REFCLK_SRC_EXT 0x20
1151
1152
1153 #define ATOM_TRANSMITTER_CONFIG_V3_TRANSMITTER_SEL_MASK 0xC0
1154 #define ATOM_TRANSMITTER_CONFIG_V3_TRANSMITTER1 0x00
1155 #define ATOM_TRANSMITTER_CONFIG_V3_TRANSMITTER2 0x40
1156 #define ATOM_TRANSMITTER_CONFIG_V3_TRANSMITTER3 0x80
1157
1158
1159
1160
1161
1162
1163
1164
1165 typedef struct _ATOM_DP_VS_MODE_V4
1166 {
1167 UCHAR ucLaneSel;
1168 union
1169 {
1170 UCHAR ucLaneSet;
1171 struct {
1172 #if ATOM_BIG_ENDIAN
1173 UCHAR ucPOST_CURSOR2:2;
1174 UCHAR ucPRE_EMPHASIS:3;
1175 UCHAR ucVOLTAGE_SWING:3;
1176 #else
1177 UCHAR ucVOLTAGE_SWING:3;
1178 UCHAR ucPRE_EMPHASIS:3;
1179 UCHAR ucPOST_CURSOR2:2;
1180 #endif
1181 };
1182 };
1183 }ATOM_DP_VS_MODE_V4;
1184
1185 typedef struct _ATOM_DIG_TRANSMITTER_CONFIG_V4
1186 {
1187 #if ATOM_BIG_ENDIAN
1188 UCHAR ucTransmitterSel:2;
1189
1190
1191 UCHAR ucRefClkSource:2;
1192 UCHAR ucEncoderSel:1;
1193 UCHAR ucLinkSel:1;
1194
1195 UCHAR fCoherentMode:1;
1196 UCHAR fDualLinkConnector:1;
1197 #else
1198 UCHAR fDualLinkConnector:1;
1199 UCHAR fCoherentMode:1;
1200 UCHAR ucLinkSel:1;
1201
1202 UCHAR ucEncoderSel:1;
1203 UCHAR ucRefClkSource:2;
1204 UCHAR ucTransmitterSel:2;
1205
1206
1207 #endif
1208 }ATOM_DIG_TRANSMITTER_CONFIG_V4;
1209
1210 typedef struct _DIG_TRANSMITTER_CONTROL_PARAMETERS_V4
1211 {
1212 union
1213 {
1214 USHORT usPixelClock;
1215 USHORT usInitInfo;
1216 ATOM_DP_VS_MODE_V4 asMode;
1217 };
1218 union
1219 {
1220 ATOM_DIG_TRANSMITTER_CONFIG_V4 acConfig;
1221 UCHAR ucConfig;
1222 };
1223 UCHAR ucAction;
1224 UCHAR ucLaneNum;
1225 UCHAR ucReserved[3];
1226 }DIG_TRANSMITTER_CONTROL_PARAMETERS_V4;
1227
1228
1229
1230 #define ATOM_TRANSMITTER_CONFIG_V4_DUAL_LINK_CONNECTOR 0x01
1231
1232 #define ATOM_TRANSMITTER_CONFIG_V4_COHERENT 0x02
1233
1234 #define ATOM_TRANSMITTER_CONFIG_V4_LINK_SEL_MASK 0x04
1235 #define ATOM_TRANSMITTER_CONFIG_V4_LINKA 0x00
1236 #define ATOM_TRANSMITTER_CONFIG_V4_LINKB 0x04
1237
1238 #define ATOM_TRANSMITTER_CONFIG_V4_ENCODER_SEL_MASK 0x08
1239 #define ATOM_TRANSMITTER_CONFIG_V4_DIG1_ENCODER 0x00
1240 #define ATOM_TRANSMITTER_CONFIG_V4_DIG2_ENCODER 0x08
1241
1242 #define ATOM_TRANSMITTER_CONFIG_V4_REFCLK_SEL_MASK 0x30
1243 #define ATOM_TRANSMITTER_CONFIG_V4_P1PLL 0x00
1244 #define ATOM_TRANSMITTER_CONFIG_V4_P2PLL 0x10
1245 #define ATOM_TRANSMITTER_CONFIG_V4_DCPLL 0x20
1246 #define ATOM_TRANSMITTER_CONFIG_V4_REFCLK_SRC_EXT 0x30
1247
1248 #define ATOM_TRANSMITTER_CONFIG_V4_TRANSMITTER_SEL_MASK 0xC0
1249 #define ATOM_TRANSMITTER_CONFIG_V4_TRANSMITTER1 0x00
1250 #define ATOM_TRANSMITTER_CONFIG_V4_TRANSMITTER2 0x40
1251 #define ATOM_TRANSMITTER_CONFIG_V4_TRANSMITTER3 0x80
1252
1253
1254 typedef struct _ATOM_DIG_TRANSMITTER_CONFIG_V5
1255 {
1256 #if ATOM_BIG_ENDIAN
1257 UCHAR ucReservd1:1;
1258 UCHAR ucHPDSel:3;
1259 UCHAR ucPhyClkSrcId:2;
1260 UCHAR ucCoherentMode:1;
1261 UCHAR ucReserved:1;
1262 #else
1263 UCHAR ucReserved:1;
1264 UCHAR ucCoherentMode:1;
1265 UCHAR ucPhyClkSrcId:2;
1266 UCHAR ucHPDSel:3;
1267 UCHAR ucReservd1:1;
1268 #endif
1269 }ATOM_DIG_TRANSMITTER_CONFIG_V5;
1270
1271 typedef struct _DIG_TRANSMITTER_CONTROL_PARAMETERS_V1_5
1272 {
1273 USHORT usSymClock;
1274 UCHAR ucPhyId;
1275 UCHAR ucAction;
1276 UCHAR ucLaneNum;
1277 UCHAR ucConnObjId;
1278 UCHAR ucDigMode;
1279 union{
1280 ATOM_DIG_TRANSMITTER_CONFIG_V5 asConfig;
1281 UCHAR ucConfig;
1282 };
1283 UCHAR ucDigEncoderSel;
1284 UCHAR ucDPLaneSet;
1285 UCHAR ucReserved;
1286 UCHAR ucReserved1;
1287 }DIG_TRANSMITTER_CONTROL_PARAMETERS_V1_5;
1288
1289
1290 #define ATOM_PHY_ID_UNIPHYA 0
1291 #define ATOM_PHY_ID_UNIPHYB 1
1292 #define ATOM_PHY_ID_UNIPHYC 2
1293 #define ATOM_PHY_ID_UNIPHYD 3
1294 #define ATOM_PHY_ID_UNIPHYE 4
1295 #define ATOM_PHY_ID_UNIPHYF 5
1296 #define ATOM_PHY_ID_UNIPHYG 6
1297
1298
1299 #define ATOM_TRANMSITTER_V5__DIGA_SEL 0x01
1300 #define ATOM_TRANMSITTER_V5__DIGB_SEL 0x02
1301 #define ATOM_TRANMSITTER_V5__DIGC_SEL 0x04
1302 #define ATOM_TRANMSITTER_V5__DIGD_SEL 0x08
1303 #define ATOM_TRANMSITTER_V5__DIGE_SEL 0x10
1304 #define ATOM_TRANMSITTER_V5__DIGF_SEL 0x20
1305 #define ATOM_TRANMSITTER_V5__DIGG_SEL 0x40
1306
1307
1308 #define ATOM_TRANSMITTER_DIGMODE_V5_DP 0
1309 #define ATOM_TRANSMITTER_DIGMODE_V5_LVDS 1
1310 #define ATOM_TRANSMITTER_DIGMODE_V5_DVI 2
1311 #define ATOM_TRANSMITTER_DIGMODE_V5_HDMI 3
1312 #define ATOM_TRANSMITTER_DIGMODE_V5_SDVO 4
1313 #define ATOM_TRANSMITTER_DIGMODE_V5_DP_MST 5
1314
1315
1316 #define DP_LANE_SET__0DB_0_4V 0x00
1317 #define DP_LANE_SET__0DB_0_6V 0x01
1318 #define DP_LANE_SET__0DB_0_8V 0x02
1319 #define DP_LANE_SET__0DB_1_2V 0x03
1320 #define DP_LANE_SET__3_5DB_0_4V 0x08
1321 #define DP_LANE_SET__3_5DB_0_6V 0x09
1322 #define DP_LANE_SET__3_5DB_0_8V 0x0a
1323 #define DP_LANE_SET__6DB_0_4V 0x10
1324 #define DP_LANE_SET__6DB_0_6V 0x11
1325 #define DP_LANE_SET__9_5DB_0_4V 0x18
1326
1327
1328
1329 #define ATOM_TRANSMITTER_CONFIG_V5_COHERENT 0x02
1330
1331
1332 #define ATOM_TRANSMITTER_CONFIG_V5_REFCLK_SEL_MASK 0x0c
1333 #define ATOM_TRANSMITTER_CONFIG_V5_REFCLK_SEL_SHIFT 0x02
1334
1335 #define ATOM_TRANSMITTER_CONFIG_V5_P1PLL 0x00
1336 #define ATOM_TRANSMITTER_CONFIG_V5_P2PLL 0x04
1337 #define ATOM_TRANSMITTER_CONFIG_V5_P0PLL 0x08
1338 #define ATOM_TRANSMITTER_CONFIG_V5_REFCLK_SRC_EXT 0x0c
1339
1340 #define ATOM_TRANSMITTER_CONFIG_V5_HPD_SEL_MASK 0x70
1341 #define ATOM_TRANSMITTER_CONFIG_V5_HPD_SEL_SHIFT 0x04
1342
1343 #define ATOM_TRANSMITTER_CONFIG_V5_NO_HPD_SEL 0x00
1344 #define ATOM_TRANSMITTER_CONFIG_V5_HPD1_SEL 0x10
1345 #define ATOM_TRANSMITTER_CONFIG_V5_HPD2_SEL 0x20
1346 #define ATOM_TRANSMITTER_CONFIG_V5_HPD3_SEL 0x30
1347 #define ATOM_TRANSMITTER_CONFIG_V5_HPD4_SEL 0x40
1348 #define ATOM_TRANSMITTER_CONFIG_V5_HPD5_SEL 0x50
1349 #define ATOM_TRANSMITTER_CONFIG_V5_HPD6_SEL 0x60
1350
1351 #define DIG_TRANSMITTER_CONTROL_PS_ALLOCATION_V1_5 DIG_TRANSMITTER_CONTROL_PARAMETERS_V1_5
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361 typedef struct _EXTERNAL_ENCODER_CONTROL_PARAMETERS_V3
1362 {
1363 union{
1364 USHORT usPixelClock;
1365 USHORT usConnectorId;
1366 };
1367 UCHAR ucConfig;
1368 UCHAR ucAction;
1369 UCHAR ucEncoderMode;
1370 UCHAR ucLaneNum;
1371 UCHAR ucBitPerColor;
1372 UCHAR ucReserved;
1373 }EXTERNAL_ENCODER_CONTROL_PARAMETERS_V3;
1374
1375
1376 #define EXTERNAL_ENCODER_ACTION_V3_DISABLE_OUTPUT 0x00
1377 #define EXTERNAL_ENCODER_ACTION_V3_ENABLE_OUTPUT 0x01
1378 #define EXTERNAL_ENCODER_ACTION_V3_ENCODER_INIT 0x07
1379 #define EXTERNAL_ENCODER_ACTION_V3_ENCODER_SETUP 0x0f
1380 #define EXTERNAL_ENCODER_ACTION_V3_ENCODER_BLANKING_OFF 0x10
1381 #define EXTERNAL_ENCODER_ACTION_V3_ENCODER_BLANKING 0x11
1382 #define EXTERNAL_ENCODER_ACTION_V3_DACLOAD_DETECTION 0x12
1383 #define EXTERNAL_ENCODER_ACTION_V3_DDC_SETUP 0x14
1384
1385
1386 #define EXTERNAL_ENCODER_CONFIG_V3_DPLINKRATE_MASK 0x03
1387 #define EXTERNAL_ENCODER_CONFIG_V3_DPLINKRATE_1_62GHZ 0x00
1388 #define EXTERNAL_ENCODER_CONFIG_V3_DPLINKRATE_2_70GHZ 0x01
1389 #define EXTERNAL_ENCODER_CONFIG_V3_DPLINKRATE_5_40GHZ 0x02
1390 #define EXTERNAL_ENCODER_CONFIG_V3_ENCODER_SEL_MASK 0x70
1391 #define EXTERNAL_ENCODER_CONFIG_V3_ENCODER1 0x00
1392 #define EXTERNAL_ENCODER_CONFIG_V3_ENCODER2 0x10
1393 #define EXTERNAL_ENCODER_CONFIG_V3_ENCODER3 0x20
1394
1395 typedef struct _EXTERNAL_ENCODER_CONTROL_PS_ALLOCATION_V3
1396 {
1397 EXTERNAL_ENCODER_CONTROL_PARAMETERS_V3 sExtEncoder;
1398 ULONG ulReserved[2];
1399 }EXTERNAL_ENCODER_CONTROL_PS_ALLOCATION_V3;
1400
1401
1402
1403
1404
1405
1406
1407
1408 typedef struct _DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS
1409 {
1410 UCHAR ucAction;
1411
1412
1413
1414
1415 UCHAR aucPadding[3];
1416 }DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS;
1417
1418 #define DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS
1419
1420
1421 #define CRT1_OUTPUT_CONTROL_PARAMETERS DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS
1422 #define CRT1_OUTPUT_CONTROL_PS_ALLOCATION DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION
1423
1424 #define CRT2_OUTPUT_CONTROL_PARAMETERS DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS
1425 #define CRT2_OUTPUT_CONTROL_PS_ALLOCATION DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION
1426
1427 #define CV1_OUTPUT_CONTROL_PARAMETERS DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS
1428 #define CV1_OUTPUT_CONTROL_PS_ALLOCATION DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION
1429
1430 #define TV1_OUTPUT_CONTROL_PARAMETERS DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS
1431 #define TV1_OUTPUT_CONTROL_PS_ALLOCATION DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION
1432
1433 #define DFP1_OUTPUT_CONTROL_PARAMETERS DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS
1434 #define DFP1_OUTPUT_CONTROL_PS_ALLOCATION DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION
1435
1436 #define DFP2_OUTPUT_CONTROL_PARAMETERS DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS
1437 #define DFP2_OUTPUT_CONTROL_PS_ALLOCATION DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION
1438
1439 #define LCD1_OUTPUT_CONTROL_PARAMETERS DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS
1440 #define LCD1_OUTPUT_CONTROL_PS_ALLOCATION DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION
1441
1442 #define DVO_OUTPUT_CONTROL_PARAMETERS DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS
1443 #define DVO_OUTPUT_CONTROL_PS_ALLOCATION DIG_TRANSMITTER_CONTROL_PS_ALLOCATION
1444 #define DVO_OUTPUT_CONTROL_PARAMETERS_V3 DIG_TRANSMITTER_CONTROL_PARAMETERS
1445
1446
1447
1448
1449 typedef struct _BLANK_CRTC_PARAMETERS
1450 {
1451 UCHAR ucCRTC;
1452 UCHAR ucBlanking;
1453 USHORT usBlackColorRCr;
1454 USHORT usBlackColorGY;
1455 USHORT usBlackColorBCb;
1456 }BLANK_CRTC_PARAMETERS;
1457 #define BLANK_CRTC_PS_ALLOCATION BLANK_CRTC_PARAMETERS
1458
1459
1460
1461
1462
1463
1464 typedef struct _ENABLE_CRTC_PARAMETERS
1465 {
1466 UCHAR ucCRTC;
1467 UCHAR ucEnable;
1468 UCHAR ucPadding[2];
1469 }ENABLE_CRTC_PARAMETERS;
1470 #define ENABLE_CRTC_PS_ALLOCATION ENABLE_CRTC_PARAMETERS
1471
1472
1473
1474
1475 typedef struct _SET_CRTC_OVERSCAN_PARAMETERS
1476 {
1477 USHORT usOverscanRight;
1478 USHORT usOverscanLeft;
1479 USHORT usOverscanBottom;
1480 USHORT usOverscanTop;
1481 UCHAR ucCRTC;
1482 UCHAR ucPadding[3];
1483 }SET_CRTC_OVERSCAN_PARAMETERS;
1484 #define SET_CRTC_OVERSCAN_PS_ALLOCATION SET_CRTC_OVERSCAN_PARAMETERS
1485
1486
1487
1488
1489 typedef struct _SET_CRTC_REPLICATION_PARAMETERS
1490 {
1491 UCHAR ucH_Replication;
1492 UCHAR ucV_Replication;
1493 UCHAR usCRTC;
1494 UCHAR ucPadding;
1495 }SET_CRTC_REPLICATION_PARAMETERS;
1496 #define SET_CRTC_REPLICATION_PS_ALLOCATION SET_CRTC_REPLICATION_PARAMETERS
1497
1498
1499
1500
1501 typedef struct _SELECT_CRTC_SOURCE_PARAMETERS
1502 {
1503 UCHAR ucCRTC;
1504 UCHAR ucDevice;
1505 UCHAR ucPadding[2];
1506 }SELECT_CRTC_SOURCE_PARAMETERS;
1507 #define SELECT_CRTC_SOURCE_PS_ALLOCATION SELECT_CRTC_SOURCE_PARAMETERS
1508
1509 typedef struct _SELECT_CRTC_SOURCE_PARAMETERS_V2
1510 {
1511 UCHAR ucCRTC;
1512 UCHAR ucEncoderID;
1513 UCHAR ucEncodeMode;
1514 UCHAR ucPadding;
1515 }SELECT_CRTC_SOURCE_PARAMETERS_V2;
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542 typedef struct _PIXEL_CLOCK_PARAMETERS
1543 {
1544 USHORT usPixelClock;
1545
1546 USHORT usRefDiv;
1547 USHORT usFbDiv;
1548 UCHAR ucPostDiv;
1549 UCHAR ucFracFbDiv;
1550 UCHAR ucPpll;
1551 UCHAR ucRefDivSrc;
1552 UCHAR ucCRTC;
1553 UCHAR ucPadding;
1554 }PIXEL_CLOCK_PARAMETERS;
1555
1556
1557
1558 #define MISC_FORCE_REPROG_PIXEL_CLOCK 0x1
1559 #define MISC_DEVICE_INDEX_MASK 0xF0
1560 #define MISC_DEVICE_INDEX_SHIFT 4
1561
1562 typedef struct _PIXEL_CLOCK_PARAMETERS_V2
1563 {
1564 USHORT usPixelClock;
1565
1566 USHORT usRefDiv;
1567 USHORT usFbDiv;
1568 UCHAR ucPostDiv;
1569 UCHAR ucFracFbDiv;
1570 UCHAR ucPpll;
1571 UCHAR ucRefDivSrc;
1572 UCHAR ucCRTC;
1573 UCHAR ucMiscInfo;
1574 }PIXEL_CLOCK_PARAMETERS_V2;
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597 #define PIXEL_CLOCK_MISC_FORCE_PROG_PPLL 0x01
1598 #define PIXEL_CLOCK_MISC_VGA_MODE 0x02
1599 #define PIXEL_CLOCK_MISC_CRTC_SEL_MASK 0x04
1600 #define PIXEL_CLOCK_MISC_CRTC_SEL_CRTC1 0x00
1601 #define PIXEL_CLOCK_MISC_CRTC_SEL_CRTC2 0x04
1602 #define PIXEL_CLOCK_MISC_USE_ENGINE_FOR_DISPCLK 0x08
1603 #define PIXEL_CLOCK_MISC_REF_DIV_SRC 0x10
1604
1605 #define PIXEL_CLOCK_V4_MISC_SS_ENABLE 0x10
1606 #define PIXEL_CLOCK_V4_MISC_COHERENT_MODE 0x20
1607
1608
1609 typedef struct _PIXEL_CLOCK_PARAMETERS_V3
1610 {
1611 USHORT usPixelClock;
1612
1613 USHORT usRefDiv;
1614 USHORT usFbDiv;
1615 UCHAR ucPostDiv;
1616 UCHAR ucFracFbDiv;
1617 UCHAR ucPpll;
1618 UCHAR ucTransmitterId;
1619 union
1620 {
1621 UCHAR ucEncoderMode;
1622 UCHAR ucDVOConfig;
1623 };
1624 UCHAR ucMiscInfo;
1625
1626
1627 }PIXEL_CLOCK_PARAMETERS_V3;
1628
1629 #define PIXEL_CLOCK_PARAMETERS_LAST PIXEL_CLOCK_PARAMETERS_V2
1630 #define GET_PIXEL_CLOCK_PS_ALLOCATION PIXEL_CLOCK_PARAMETERS_LAST
1631
1632 typedef struct _PIXEL_CLOCK_PARAMETERS_V5
1633 {
1634 UCHAR ucCRTC;
1635
1636 union{
1637 UCHAR ucReserved;
1638 UCHAR ucFracFbDiv;
1639 };
1640 USHORT usPixelClock;
1641
1642 USHORT usFbDiv;
1643 UCHAR ucPostDiv;
1644 UCHAR ucRefDiv;
1645 UCHAR ucPpll;
1646 UCHAR ucTransmitterID;
1647
1648 UCHAR ucEncoderMode;
1649 UCHAR ucMiscInfo;
1650
1651
1652
1653
1654
1655
1656
1657 ULONG ulFbDivDecFrac;
1658
1659 }PIXEL_CLOCK_PARAMETERS_V5;
1660
1661 #define PIXEL_CLOCK_V5_MISC_FORCE_PROG_PPLL 0x01
1662 #define PIXEL_CLOCK_V5_MISC_VGA_MODE 0x02
1663 #define PIXEL_CLOCK_V5_MISC_HDMI_BPP_MASK 0x0c
1664 #define PIXEL_CLOCK_V5_MISC_HDMI_24BPP 0x00
1665 #define PIXEL_CLOCK_V5_MISC_HDMI_30BPP 0x04
1666 #define PIXEL_CLOCK_V5_MISC_HDMI_32BPP 0x08
1667 #define PIXEL_CLOCK_V5_MISC_REF_DIV_SRC 0x10
1668
1669 typedef struct _CRTC_PIXEL_CLOCK_FREQ
1670 {
1671 #if ATOM_BIG_ENDIAN
1672 ULONG ucCRTC:8;
1673
1674 ULONG ulPixelClock:24;
1675
1676 #else
1677 ULONG ulPixelClock:24;
1678
1679 ULONG ucCRTC:8;
1680
1681 #endif
1682 }CRTC_PIXEL_CLOCK_FREQ;
1683
1684 typedef struct _PIXEL_CLOCK_PARAMETERS_V6
1685 {
1686 union{
1687 CRTC_PIXEL_CLOCK_FREQ ulCrtcPclkFreq;
1688 ULONG ulDispEngClkFreq;
1689 };
1690 USHORT usFbDiv;
1691 UCHAR ucPostDiv;
1692 UCHAR ucRefDiv;
1693 UCHAR ucPpll;
1694 UCHAR ucTransmitterID;
1695
1696 UCHAR ucEncoderMode;
1697 UCHAR ucMiscInfo;
1698
1699
1700
1701
1702
1703
1704
1705 ULONG ulFbDivDecFrac;
1706
1707 }PIXEL_CLOCK_PARAMETERS_V6;
1708
1709 #define PIXEL_CLOCK_V6_MISC_FORCE_PROG_PPLL 0x01
1710 #define PIXEL_CLOCK_V6_MISC_VGA_MODE 0x02
1711 #define PIXEL_CLOCK_V6_MISC_HDMI_BPP_MASK 0x0c
1712 #define PIXEL_CLOCK_V6_MISC_HDMI_24BPP 0x00
1713 #define PIXEL_CLOCK_V6_MISC_HDMI_36BPP 0x04
1714 #define PIXEL_CLOCK_V6_MISC_HDMI_36BPP_V6 0x08
1715 #define PIXEL_CLOCK_V6_MISC_HDMI_30BPP 0x08
1716 #define PIXEL_CLOCK_V6_MISC_HDMI_30BPP_V6 0x04
1717 #define PIXEL_CLOCK_V6_MISC_HDMI_48BPP 0x0c
1718 #define PIXEL_CLOCK_V6_MISC_REF_DIV_SRC 0x10
1719 #define PIXEL_CLOCK_V6_MISC_GEN_DPREFCLK 0x40
1720
1721 typedef struct _GET_DISP_PLL_STATUS_INPUT_PARAMETERS_V2
1722 {
1723 PIXEL_CLOCK_PARAMETERS_V3 sDispClkInput;
1724 }GET_DISP_PLL_STATUS_INPUT_PARAMETERS_V2;
1725
1726 typedef struct _GET_DISP_PLL_STATUS_OUTPUT_PARAMETERS_V2
1727 {
1728 UCHAR ucStatus;
1729 UCHAR ucRefDivSrc;
1730 UCHAR ucReserved[2];
1731 }GET_DISP_PLL_STATUS_OUTPUT_PARAMETERS_V2;
1732
1733 typedef struct _GET_DISP_PLL_STATUS_INPUT_PARAMETERS_V3
1734 {
1735 PIXEL_CLOCK_PARAMETERS_V5 sDispClkInput;
1736 }GET_DISP_PLL_STATUS_INPUT_PARAMETERS_V3;
1737
1738
1739
1740
1741 typedef struct _ADJUST_DISPLAY_PLL_PARAMETERS
1742 {
1743 USHORT usPixelClock;
1744 UCHAR ucTransmitterID;
1745 UCHAR ucEncodeMode;
1746 union
1747 {
1748 UCHAR ucDVOConfig;
1749 UCHAR ucConfig;
1750 };
1751 UCHAR ucReserved[3];
1752 }ADJUST_DISPLAY_PLL_PARAMETERS;
1753
1754 #define ADJUST_DISPLAY_CONFIG_SS_ENABLE 0x10
1755 #define ADJUST_DISPLAY_PLL_PS_ALLOCATION ADJUST_DISPLAY_PLL_PARAMETERS
1756
1757 typedef struct _ADJUST_DISPLAY_PLL_INPUT_PARAMETERS_V3
1758 {
1759 USHORT usPixelClock;
1760 UCHAR ucTransmitterID;
1761 UCHAR ucEncodeMode;
1762 UCHAR ucDispPllConfig;
1763 UCHAR ucExtTransmitterID;
1764 UCHAR ucReserved[2];
1765 }ADJUST_DISPLAY_PLL_INPUT_PARAMETERS_V3;
1766
1767
1768 #define DISPPLL_CONFIG_DVO_RATE_SEL 0x0001
1769 #define DISPPLL_CONFIG_DVO_DDR_SPEED 0x0000
1770 #define DISPPLL_CONFIG_DVO_SDR_SPEED 0x0001
1771 #define DISPPLL_CONFIG_DVO_OUTPUT_SEL 0x000c
1772 #define DISPPLL_CONFIG_DVO_LOW12BIT 0x0000
1773 #define DISPPLL_CONFIG_DVO_UPPER12BIT 0x0004
1774 #define DISPPLL_CONFIG_DVO_24BIT 0x0008
1775 #define DISPPLL_CONFIG_SS_ENABLE 0x0010
1776 #define DISPPLL_CONFIG_COHERENT_MODE 0x0020
1777 #define DISPPLL_CONFIG_DUAL_LINK 0x0040
1778
1779
1780 typedef struct _ADJUST_DISPLAY_PLL_OUTPUT_PARAMETERS_V3
1781 {
1782 ULONG ulDispPllFreq;
1783 UCHAR ucRefDiv;
1784 UCHAR ucPostDiv;
1785 UCHAR ucReserved[2];
1786 }ADJUST_DISPLAY_PLL_OUTPUT_PARAMETERS_V3;
1787
1788 typedef struct _ADJUST_DISPLAY_PLL_PS_ALLOCATION_V3
1789 {
1790 union
1791 {
1792 ADJUST_DISPLAY_PLL_INPUT_PARAMETERS_V3 sInput;
1793 ADJUST_DISPLAY_PLL_OUTPUT_PARAMETERS_V3 sOutput;
1794 };
1795 } ADJUST_DISPLAY_PLL_PS_ALLOCATION_V3;
1796
1797
1798
1799
1800 typedef struct _ENABLE_YUV_PARAMETERS
1801 {
1802 UCHAR ucEnable;
1803 UCHAR ucCRTC;
1804 UCHAR ucPadding[2];
1805 }ENABLE_YUV_PARAMETERS;
1806 #define ENABLE_YUV_PS_ALLOCATION ENABLE_YUV_PARAMETERS
1807
1808
1809
1810
1811 typedef struct _GET_MEMORY_CLOCK_PARAMETERS
1812 {
1813 ULONG ulReturnMemoryClock;
1814 } GET_MEMORY_CLOCK_PARAMETERS;
1815 #define GET_MEMORY_CLOCK_PS_ALLOCATION GET_MEMORY_CLOCK_PARAMETERS
1816
1817
1818
1819
1820 typedef struct _GET_ENGINE_CLOCK_PARAMETERS
1821 {
1822 ULONG ulReturnEngineClock;
1823 } GET_ENGINE_CLOCK_PARAMETERS;
1824 #define GET_ENGINE_CLOCK_PS_ALLOCATION GET_ENGINE_CLOCK_PARAMETERS
1825
1826
1827
1828
1829
1830
1831 typedef struct _READ_EDID_FROM_HW_I2C_DATA_PARAMETERS
1832 {
1833 USHORT usPrescale;
1834 USHORT usVRAMAddress;
1835 USHORT usStatus;
1836
1837 UCHAR ucSlaveAddr;
1838 UCHAR ucLineNumber;
1839 }READ_EDID_FROM_HW_I2C_DATA_PARAMETERS;
1840 #define READ_EDID_FROM_HW_I2C_DATA_PS_ALLOCATION READ_EDID_FROM_HW_I2C_DATA_PARAMETERS
1841
1842
1843 #define ATOM_WRITE_I2C_FORMAT_PSOFFSET_PSDATABYTE 0
1844 #define ATOM_WRITE_I2C_FORMAT_PSOFFSET_PSTWODATABYTES 1
1845 #define ATOM_WRITE_I2C_FORMAT_PSCOUNTER_PSOFFSET_IDDATABLOCK 2
1846 #define ATOM_WRITE_I2C_FORMAT_PSCOUNTER_IDOFFSET_PLUS_IDDATABLOCK 3
1847 #define ATOM_WRITE_I2C_FORMAT_IDCOUNTER_IDOFFSET_IDDATABLOCK 4
1848
1849 typedef struct _WRITE_ONE_BYTE_HW_I2C_DATA_PARAMETERS
1850 {
1851 USHORT usPrescale;
1852 USHORT usByteOffset;
1853
1854
1855
1856
1857
1858
1859 UCHAR ucData;
1860 UCHAR ucStatus;
1861 UCHAR ucSlaveAddr;
1862 UCHAR ucLineNumber;
1863 }WRITE_ONE_BYTE_HW_I2C_DATA_PARAMETERS;
1864
1865 #define WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION WRITE_ONE_BYTE_HW_I2C_DATA_PARAMETERS
1866
1867 typedef struct _SET_UP_HW_I2C_DATA_PARAMETERS
1868 {
1869 USHORT usPrescale;
1870 UCHAR ucSlaveAddr;
1871 UCHAR ucLineNumber;
1872 }SET_UP_HW_I2C_DATA_PARAMETERS;
1873
1874
1875
1876 #define SPEED_FAN_CONTROL_PS_ALLOCATION WRITE_ONE_BYTE_HW_I2C_DATA_PARAMETERS
1877
1878
1879
1880
1881
1882 typedef struct _POWER_CONNECTOR_DETECTION_PARAMETERS
1883 {
1884 UCHAR ucPowerConnectorStatus;
1885 UCHAR ucPwrBehaviorId;
1886 USHORT usPwrBudget;
1887 }POWER_CONNECTOR_DETECTION_PARAMETERS;
1888
1889 typedef struct POWER_CONNECTOR_DETECTION_PS_ALLOCATION
1890 {
1891 UCHAR ucPowerConnectorStatus;
1892 UCHAR ucReserved;
1893 USHORT usPwrBudget;
1894 WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved;
1895 }POWER_CONNECTOR_DETECTION_PS_ALLOCATION;
1896
1897
1898
1899
1900
1901
1902 typedef struct _ENABLE_LVDS_SS_PARAMETERS
1903 {
1904 USHORT usSpreadSpectrumPercentage;
1905 UCHAR ucSpreadSpectrumType;
1906 UCHAR ucSpreadSpectrumStepSize_Delay;
1907 UCHAR ucEnable;
1908 UCHAR ucPadding[3];
1909 }ENABLE_LVDS_SS_PARAMETERS;
1910
1911
1912 typedef struct _ENABLE_LVDS_SS_PARAMETERS_V2
1913 {
1914 USHORT usSpreadSpectrumPercentage;
1915 UCHAR ucSpreadSpectrumType;
1916 UCHAR ucSpreadSpectrumStep;
1917 UCHAR ucEnable;
1918 UCHAR ucSpreadSpectrumDelay;
1919 UCHAR ucSpreadSpectrumRange;
1920 UCHAR ucPadding;
1921 }ENABLE_LVDS_SS_PARAMETERS_V2;
1922
1923
1924 typedef struct _ENABLE_SPREAD_SPECTRUM_ON_PPLL
1925 {
1926 USHORT usSpreadSpectrumPercentage;
1927 UCHAR ucSpreadSpectrumType;
1928 UCHAR ucSpreadSpectrumStep;
1929 UCHAR ucEnable;
1930 UCHAR ucSpreadSpectrumDelay;
1931 UCHAR ucSpreadSpectrumRange;
1932 UCHAR ucPpll;
1933 }ENABLE_SPREAD_SPECTRUM_ON_PPLL;
1934
1935 typedef struct _ENABLE_SPREAD_SPECTRUM_ON_PPLL_V2
1936 {
1937 USHORT usSpreadSpectrumPercentage;
1938 UCHAR ucSpreadSpectrumType;
1939
1940
1941
1942 UCHAR ucEnable;
1943 USHORT usSpreadSpectrumAmount;
1944 USHORT usSpreadSpectrumStep;
1945 }ENABLE_SPREAD_SPECTRUM_ON_PPLL_V2;
1946
1947 #define ATOM_PPLL_SS_TYPE_V2_DOWN_SPREAD 0x00
1948 #define ATOM_PPLL_SS_TYPE_V2_CENTRE_SPREAD 0x01
1949 #define ATOM_PPLL_SS_TYPE_V2_EXT_SPREAD 0x02
1950 #define ATOM_PPLL_SS_TYPE_V2_PPLL_SEL_MASK 0x0c
1951 #define ATOM_PPLL_SS_TYPE_V2_P1PLL 0x00
1952 #define ATOM_PPLL_SS_TYPE_V2_P2PLL 0x04
1953 #define ATOM_PPLL_SS_TYPE_V2_DCPLL 0x08
1954 #define ATOM_PPLL_SS_AMOUNT_V2_FBDIV_MASK 0x00FF
1955 #define ATOM_PPLL_SS_AMOUNT_V2_FBDIV_SHIFT 0
1956 #define ATOM_PPLL_SS_AMOUNT_V2_NFRAC_MASK 0x0F00
1957 #define ATOM_PPLL_SS_AMOUNT_V2_NFRAC_SHIFT 8
1958
1959
1960 typedef struct _ENABLE_SPREAD_SPECTRUM_ON_PPLL_V3
1961 {
1962 USHORT usSpreadSpectrumAmountFrac;
1963 UCHAR ucSpreadSpectrumType;
1964
1965
1966
1967 UCHAR ucEnable;
1968 USHORT usSpreadSpectrumAmount;
1969 USHORT usSpreadSpectrumStep;
1970 }ENABLE_SPREAD_SPECTRUM_ON_PPLL_V3;
1971
1972 #define ATOM_PPLL_SS_TYPE_V3_DOWN_SPREAD 0x00
1973 #define ATOM_PPLL_SS_TYPE_V3_CENTRE_SPREAD 0x01
1974 #define ATOM_PPLL_SS_TYPE_V3_EXT_SPREAD 0x02
1975 #define ATOM_PPLL_SS_TYPE_V3_PPLL_SEL_MASK 0x0c
1976 #define ATOM_PPLL_SS_TYPE_V3_P1PLL 0x00
1977 #define ATOM_PPLL_SS_TYPE_V3_P2PLL 0x04
1978 #define ATOM_PPLL_SS_TYPE_V3_DCPLL 0x08
1979 #define ATOM_PPLL_SS_TYPE_V3_P0PLL ATOM_PPLL_SS_TYPE_V3_DCPLL
1980 #define ATOM_PPLL_SS_AMOUNT_V3_FBDIV_MASK 0x00FF
1981 #define ATOM_PPLL_SS_AMOUNT_V3_FBDIV_SHIFT 0
1982 #define ATOM_PPLL_SS_AMOUNT_V3_NFRAC_MASK 0x0F00
1983 #define ATOM_PPLL_SS_AMOUNT_V3_NFRAC_SHIFT 8
1984
1985 #define ENABLE_SPREAD_SPECTRUM_ON_PPLL_PS_ALLOCATION ENABLE_SPREAD_SPECTRUM_ON_PPLL
1986
1987
1988
1989 typedef struct _SET_PIXEL_CLOCK_PS_ALLOCATION
1990 {
1991 PIXEL_CLOCK_PARAMETERS sPCLKInput;
1992 ENABLE_SPREAD_SPECTRUM_ON_PPLL sReserved;
1993 }SET_PIXEL_CLOCK_PS_ALLOCATION;
1994
1995 #define ENABLE_VGA_RENDER_PS_ALLOCATION SET_PIXEL_CLOCK_PS_ALLOCATION
1996
1997
1998
1999
2000 typedef struct _MEMORY_TRAINING_PARAMETERS
2001 {
2002 ULONG ulTargetMemoryClock;
2003 }MEMORY_TRAINING_PARAMETERS;
2004 #define MEMORY_TRAINING_PS_ALLOCATION MEMORY_TRAINING_PARAMETERS
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015 typedef struct _LVDS_ENCODER_CONTROL_PARAMETERS
2016 {
2017 USHORT usPixelClock;
2018 UCHAR ucMisc;
2019
2020
2021
2022 UCHAR ucAction;
2023
2024 }LVDS_ENCODER_CONTROL_PARAMETERS;
2025
2026 #define LVDS_ENCODER_CONTROL_PS_ALLOCATION LVDS_ENCODER_CONTROL_PARAMETERS
2027
2028 #define TMDS1_ENCODER_CONTROL_PARAMETERS LVDS_ENCODER_CONTROL_PARAMETERS
2029 #define TMDS1_ENCODER_CONTROL_PS_ALLOCATION TMDS1_ENCODER_CONTROL_PARAMETERS
2030
2031 #define TMDS2_ENCODER_CONTROL_PARAMETERS TMDS1_ENCODER_CONTROL_PARAMETERS
2032 #define TMDS2_ENCODER_CONTROL_PS_ALLOCATION TMDS2_ENCODER_CONTROL_PARAMETERS
2033
2034
2035
2036 typedef struct _LVDS_ENCODER_CONTROL_PARAMETERS_V2
2037 {
2038 USHORT usPixelClock;
2039 UCHAR ucMisc;
2040 UCHAR ucAction;
2041
2042 UCHAR ucTruncate;
2043
2044
2045
2046 UCHAR ucSpatial;
2047
2048
2049
2050 UCHAR ucTemporal;
2051
2052
2053
2054
2055
2056 UCHAR ucFRC;
2057
2058
2059
2060
2061
2062
2063
2064 }LVDS_ENCODER_CONTROL_PARAMETERS_V2;
2065
2066 #define LVDS_ENCODER_CONTROL_PS_ALLOCATION_V2 LVDS_ENCODER_CONTROL_PARAMETERS_V2
2067
2068 #define TMDS1_ENCODER_CONTROL_PARAMETERS_V2 LVDS_ENCODER_CONTROL_PARAMETERS_V2
2069 #define TMDS1_ENCODER_CONTROL_PS_ALLOCATION_V2 TMDS1_ENCODER_CONTROL_PARAMETERS_V2
2070
2071 #define TMDS2_ENCODER_CONTROL_PARAMETERS_V2 TMDS1_ENCODER_CONTROL_PARAMETERS_V2
2072 #define TMDS2_ENCODER_CONTROL_PS_ALLOCATION_V2 TMDS2_ENCODER_CONTROL_PARAMETERS_V2
2073
2074 #define LVDS_ENCODER_CONTROL_PARAMETERS_V3 LVDS_ENCODER_CONTROL_PARAMETERS_V2
2075 #define LVDS_ENCODER_CONTROL_PS_ALLOCATION_V3 LVDS_ENCODER_CONTROL_PARAMETERS_V3
2076
2077 #define TMDS1_ENCODER_CONTROL_PARAMETERS_V3 LVDS_ENCODER_CONTROL_PARAMETERS_V3
2078 #define TMDS1_ENCODER_CONTROL_PS_ALLOCATION_V3 TMDS1_ENCODER_CONTROL_PARAMETERS_V3
2079
2080 #define TMDS2_ENCODER_CONTROL_PARAMETERS_V3 LVDS_ENCODER_CONTROL_PARAMETERS_V3
2081 #define TMDS2_ENCODER_CONTROL_PS_ALLOCATION_V3 TMDS2_ENCODER_CONTROL_PARAMETERS_V3
2082
2083
2084
2085
2086 typedef struct _ENABLE_EXTERNAL_TMDS_ENCODER_PARAMETERS
2087 {
2088 UCHAR ucEnable;
2089 UCHAR ucMisc;
2090 UCHAR ucPadding[2];
2091 }ENABLE_EXTERNAL_TMDS_ENCODER_PARAMETERS;
2092
2093 typedef struct _ENABLE_EXTERNAL_TMDS_ENCODER_PS_ALLOCATION
2094 {
2095 ENABLE_EXTERNAL_TMDS_ENCODER_PARAMETERS sXTmdsEncoder;
2096 WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved;
2097 }ENABLE_EXTERNAL_TMDS_ENCODER_PS_ALLOCATION;
2098
2099 #define ENABLE_EXTERNAL_TMDS_ENCODER_PARAMETERS_V2 LVDS_ENCODER_CONTROL_PARAMETERS_V2
2100
2101 typedef struct _ENABLE_EXTERNAL_TMDS_ENCODER_PS_ALLOCATION_V2
2102 {
2103 ENABLE_EXTERNAL_TMDS_ENCODER_PARAMETERS_V2 sXTmdsEncoder;
2104 WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved;
2105 }ENABLE_EXTERNAL_TMDS_ENCODER_PS_ALLOCATION_V2;
2106
2107 typedef struct _EXTERNAL_ENCODER_CONTROL_PS_ALLOCATION
2108 {
2109 DIG_ENCODER_CONTROL_PARAMETERS sDigEncoder;
2110 WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved;
2111 }EXTERNAL_ENCODER_CONTROL_PS_ALLOCATION;
2112
2113
2114
2115
2116
2117
2118
2119 #define DVO_ENCODER_CONFIG_RATE_SEL 0x01
2120 #define DVO_ENCODER_CONFIG_DDR_SPEED 0x00
2121 #define DVO_ENCODER_CONFIG_SDR_SPEED 0x01
2122 #define DVO_ENCODER_CONFIG_OUTPUT_SEL 0x0c
2123 #define DVO_ENCODER_CONFIG_LOW12BIT 0x00
2124 #define DVO_ENCODER_CONFIG_UPPER12BIT 0x04
2125 #define DVO_ENCODER_CONFIG_24BIT 0x08
2126
2127 typedef struct _DVO_ENCODER_CONTROL_PARAMETERS_V3
2128 {
2129 USHORT usPixelClock;
2130 UCHAR ucDVOConfig;
2131 UCHAR ucAction;
2132 UCHAR ucReseved[4];
2133 }DVO_ENCODER_CONTROL_PARAMETERS_V3;
2134 #define DVO_ENCODER_CONTROL_PS_ALLOCATION_V3 DVO_ENCODER_CONTROL_PARAMETERS_V3
2135
2136 typedef struct _DVO_ENCODER_CONTROL_PARAMETERS_V1_4
2137 {
2138 USHORT usPixelClock;
2139 UCHAR ucDVOConfig;
2140 UCHAR ucAction;
2141 UCHAR ucBitPerColor;
2142 UCHAR ucReseved[3];
2143 }DVO_ENCODER_CONTROL_PARAMETERS_V1_4;
2144 #define DVO_ENCODER_CONTROL_PS_ALLOCATION_V1_4 DVO_ENCODER_CONTROL_PARAMETERS_V1_4
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154 #define LVDS_ENCODER_CONTROL_PARAMETERS_LAST LVDS_ENCODER_CONTROL_PARAMETERS_V3
2155 #define LVDS_ENCODER_CONTROL_PS_ALLOCATION_LAST LVDS_ENCODER_CONTROL_PARAMETERS_LAST
2156
2157 #define TMDS1_ENCODER_CONTROL_PARAMETERS_LAST LVDS_ENCODER_CONTROL_PARAMETERS_V3
2158 #define TMDS1_ENCODER_CONTROL_PS_ALLOCATION_LAST TMDS1_ENCODER_CONTROL_PARAMETERS_LAST
2159
2160 #define TMDS2_ENCODER_CONTROL_PARAMETERS_LAST LVDS_ENCODER_CONTROL_PARAMETERS_V3
2161 #define TMDS2_ENCODER_CONTROL_PS_ALLOCATION_LAST TMDS2_ENCODER_CONTROL_PARAMETERS_LAST
2162
2163 #define DVO_ENCODER_CONTROL_PARAMETERS_LAST DVO_ENCODER_CONTROL_PARAMETERS
2164 #define DVO_ENCODER_CONTROL_PS_ALLOCATION_LAST DVO_ENCODER_CONTROL_PS_ALLOCATION
2165
2166
2167 #define PANEL_ENCODER_MISC_DUAL 0x01
2168 #define PANEL_ENCODER_MISC_COHERENT 0x02
2169 #define PANEL_ENCODER_MISC_TMDS_LINKB 0x04
2170 #define PANEL_ENCODER_MISC_HDMI_TYPE 0x08
2171
2172 #define PANEL_ENCODER_ACTION_DISABLE ATOM_DISABLE
2173 #define PANEL_ENCODER_ACTION_ENABLE ATOM_ENABLE
2174 #define PANEL_ENCODER_ACTION_COHERENTSEQ (ATOM_ENABLE+1)
2175
2176 #define PANEL_ENCODER_TRUNCATE_EN 0x01
2177 #define PANEL_ENCODER_TRUNCATE_DEPTH 0x10
2178 #define PANEL_ENCODER_SPATIAL_DITHER_EN 0x01
2179 #define PANEL_ENCODER_SPATIAL_DITHER_DEPTH 0x10
2180 #define PANEL_ENCODER_TEMPORAL_DITHER_EN 0x01
2181 #define PANEL_ENCODER_TEMPORAL_DITHER_DEPTH 0x10
2182 #define PANEL_ENCODER_TEMPORAL_LEVEL_4 0x20
2183 #define PANEL_ENCODER_25FRC_MASK 0x10
2184 #define PANEL_ENCODER_25FRC_E 0x00
2185 #define PANEL_ENCODER_25FRC_F 0x10
2186 #define PANEL_ENCODER_50FRC_MASK 0x60
2187 #define PANEL_ENCODER_50FRC_A 0x00
2188 #define PANEL_ENCODER_50FRC_B 0x20
2189 #define PANEL_ENCODER_50FRC_C 0x40
2190 #define PANEL_ENCODER_50FRC_D 0x60
2191 #define PANEL_ENCODER_75FRC_MASK 0x80
2192 #define PANEL_ENCODER_75FRC_E 0x00
2193 #define PANEL_ENCODER_75FRC_F 0x80
2194
2195
2196
2197
2198 #define SET_VOLTAGE_TYPE_ASIC_VDDC 1
2199 #define SET_VOLTAGE_TYPE_ASIC_MVDDC 2
2200 #define SET_VOLTAGE_TYPE_ASIC_MVDDQ 3
2201 #define SET_VOLTAGE_TYPE_ASIC_VDDCI 4
2202 #define SET_VOLTAGE_INIT_MODE 5
2203 #define SET_VOLTAGE_GET_MAX_VOLTAGE 6
2204
2205 #define SET_ASIC_VOLTAGE_MODE_ALL_SOURCE 0x1
2206 #define SET_ASIC_VOLTAGE_MODE_SOURCE_A 0x2
2207 #define SET_ASIC_VOLTAGE_MODE_SOURCE_B 0x4
2208
2209 #define SET_ASIC_VOLTAGE_MODE_SET_VOLTAGE 0x0
2210 #define SET_ASIC_VOLTAGE_MODE_GET_GPIOVAL 0x1
2211 #define SET_ASIC_VOLTAGE_MODE_GET_GPIOMASK 0x2
2212
2213 typedef struct _SET_VOLTAGE_PARAMETERS
2214 {
2215 UCHAR ucVoltageType;
2216 UCHAR ucVoltageMode;
2217 UCHAR ucVoltageIndex;
2218 UCHAR ucReserved;
2219 }SET_VOLTAGE_PARAMETERS;
2220
2221 typedef struct _SET_VOLTAGE_PARAMETERS_V2
2222 {
2223 UCHAR ucVoltageType;
2224 UCHAR ucVoltageMode;
2225 USHORT usVoltageLevel;
2226 }SET_VOLTAGE_PARAMETERS_V2;
2227
2228
2229 typedef struct _SET_VOLTAGE_PARAMETERS_V1_3
2230 {
2231 UCHAR ucVoltageType;
2232 UCHAR ucVoltageMode;
2233 USHORT usVoltageLevel;
2234 }SET_VOLTAGE_PARAMETERS_V1_3;
2235
2236
2237 #define VOLTAGE_TYPE_VDDC 1
2238 #define VOLTAGE_TYPE_MVDDC 2
2239 #define VOLTAGE_TYPE_MVDDQ 3
2240 #define VOLTAGE_TYPE_VDDCI 4
2241
2242
2243 #define ATOM_SET_VOLTAGE 0
2244 #define ATOM_INIT_VOLTAGE_REGULATOR 3
2245 #define ATOM_SET_VOLTAGE_PHASE 4
2246 #define ATOM_GET_MAX_VOLTAGE 6
2247 #define ATOM_GET_VOLTAGE_LEVEL 6
2248 #define ATOM_GET_LEAKAGE_ID 8
2249
2250
2251 #define ATOM_VIRTUAL_VOLTAGE_ID0 0xff01
2252 #define ATOM_VIRTUAL_VOLTAGE_ID1 0xff02
2253 #define ATOM_VIRTUAL_VOLTAGE_ID2 0xff03
2254 #define ATOM_VIRTUAL_VOLTAGE_ID3 0xff04
2255 #define ATOM_VIRTUAL_VOLTAGE_ID4 0xff05
2256 #define ATOM_VIRTUAL_VOLTAGE_ID5 0xff06
2257 #define ATOM_VIRTUAL_VOLTAGE_ID6 0xff07
2258 #define ATOM_VIRTUAL_VOLTAGE_ID7 0xff08
2259
2260 typedef struct _SET_VOLTAGE_PS_ALLOCATION
2261 {
2262 SET_VOLTAGE_PARAMETERS sASICSetVoltage;
2263 WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved;
2264 }SET_VOLTAGE_PS_ALLOCATION;
2265
2266
2267 typedef struct _GET_VOLTAGE_INFO_INPUT_PARAMETER_V1_1
2268 {
2269 UCHAR ucVoltageType;
2270 UCHAR ucVoltageMode;
2271 USHORT usVoltageLevel;
2272 ULONG ulReserved;
2273 }GET_VOLTAGE_INFO_INPUT_PARAMETER_V1_1;
2274
2275
2276 typedef struct _GET_VOLTAGE_INFO_OUTPUT_PARAMETER_V1_1
2277 {
2278 ULONG ulVotlageGpioState;
2279 ULONG ulVoltageGPioMask;
2280 }GET_VOLTAGE_INFO_OUTPUT_PARAMETER_V1_1;
2281
2282
2283 typedef struct _GET_LEAKAGE_VOLTAGE_INFO_OUTPUT_PARAMETER_V1_1
2284 {
2285 USHORT usVoltageLevel;
2286 USHORT usVoltageId;
2287 ULONG ulReseved;
2288 }GET_LEAKAGE_VOLTAGE_INFO_OUTPUT_PARAMETER_V1_1;
2289
2290
2291
2292 #define ATOM_GET_VOLTAGE_VID 0x00
2293 #define ATOM_GET_VOTLAGE_INIT_SEQ 0x03
2294 #define ATOM_GET_VOLTTAGE_PHASE_PHASE_VID 0x04
2295 #define ATOM_GET_VOLTAGE_SVID2 0x07
2296
2297
2298 #define ATOM_GET_VOLTAGE_STATE0_LEAKAGE_VID 0x10
2299
2300 #define ATOM_GET_VOLTAGE_STATE1_LEAKAGE_VID 0x11
2301
2302 #define ATOM_GET_VOLTAGE_STATE2_LEAKAGE_VID 0x12
2303 #define ATOM_GET_VOLTAGE_STATE3_LEAKAGE_VID 0x13
2304
2305
2306 typedef struct _GET_VOLTAGE_INFO_INPUT_PARAMETER_V1_2
2307 {
2308 UCHAR ucVoltageType;
2309 UCHAR ucVoltageMode;
2310 USHORT usVoltageLevel;
2311 ULONG ulSCLKFreq;
2312 }GET_VOLTAGE_INFO_INPUT_PARAMETER_V1_2;
2313
2314
2315 #define ATOM_GET_VOLTAGE_EVV_VOLTAGE 0x09
2316
2317
2318 typedef struct _GET_EVV_VOLTAGE_INFO_OUTPUT_PARAMETER_V1_2
2319 {
2320 USHORT usVoltageLevel;
2321 USHORT usVoltageId;
2322 ULONG ulReseved;
2323 }GET_EVV_VOLTAGE_INFO_OUTPUT_PARAMETER_V1_2;
2324
2325
2326
2327
2328 typedef struct _TV_ENCODER_CONTROL_PARAMETERS
2329 {
2330 USHORT usPixelClock;
2331 UCHAR ucTvStandard;
2332 UCHAR ucAction;
2333
2334 }TV_ENCODER_CONTROL_PARAMETERS;
2335
2336 typedef struct _TV_ENCODER_CONTROL_PS_ALLOCATION
2337 {
2338 TV_ENCODER_CONTROL_PARAMETERS sTVEncoder;
2339 WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved;
2340 }TV_ENCODER_CONTROL_PS_ALLOCATION;
2341
2342
2343
2344
2345
2346
2347 typedef struct _ATOM_MASTER_LIST_OF_DATA_TABLES
2348 {
2349 USHORT UtilityPipeLine;
2350 USHORT MultimediaCapabilityInfo;
2351 USHORT MultimediaConfigInfo;
2352 USHORT StandardVESA_Timing;
2353 USHORT FirmwareInfo;
2354 USHORT PaletteData;
2355 USHORT LCD_Info;
2356 USHORT DIGTransmitterInfo;
2357 USHORT AnalogTV_Info;
2358 USHORT SupportedDevicesInfo;
2359 USHORT GPIO_I2C_Info;
2360 USHORT VRAM_UsageByFirmware;
2361 USHORT GPIO_Pin_LUT;
2362 USHORT VESA_ToInternalModeLUT;
2363 USHORT ComponentVideoInfo;
2364 USHORT PowerPlayInfo;
2365 USHORT CompassionateData;
2366 USHORT SaveRestoreInfo;
2367 USHORT PPLL_SS_Info;
2368 USHORT OemInfo;
2369 USHORT XTMDS_Info;
2370 USHORT MclkSS_Info;
2371 USHORT Object_Header;
2372 USHORT IndirectIOAccess;
2373 USHORT MC_InitParameter;
2374 USHORT ASIC_VDDC_Info;
2375 USHORT ASIC_InternalSS_Info;
2376 USHORT TV_VideoMode;
2377 USHORT VRAM_Info;
2378 USHORT MemoryTrainingInfo;
2379 USHORT IntegratedSystemInfo;
2380 USHORT ASIC_ProfilingInfo;
2381 USHORT VoltageObjectInfo;
2382 USHORT PowerSourceInfo;
2383 }ATOM_MASTER_LIST_OF_DATA_TABLES;
2384
2385 typedef struct _ATOM_MASTER_DATA_TABLE
2386 {
2387 ATOM_COMMON_TABLE_HEADER sHeader;
2388 ATOM_MASTER_LIST_OF_DATA_TABLES ListOfDataTables;
2389 }ATOM_MASTER_DATA_TABLE;
2390
2391
2392 #define LVDS_Info LCD_Info
2393 #define DAC_Info PaletteData
2394 #define TMDS_Info DIGTransmitterInfo
2395
2396
2397
2398
2399 typedef struct _ATOM_MULTIMEDIA_CAPABILITY_INFO
2400 {
2401 ATOM_COMMON_TABLE_HEADER sHeader;
2402 ULONG ulSignature;
2403 UCHAR ucI2C_Type;
2404 UCHAR ucTV_OutInfo;
2405 UCHAR ucVideoPortInfo;
2406 UCHAR ucHostPortInfo;
2407 }ATOM_MULTIMEDIA_CAPABILITY_INFO;
2408
2409
2410
2411
2412 typedef struct _ATOM_MULTIMEDIA_CONFIG_INFO
2413 {
2414 ATOM_COMMON_TABLE_HEADER sHeader;
2415 ULONG ulSignature;
2416 UCHAR ucTunerInfo;
2417 UCHAR ucAudioChipInfo;
2418 UCHAR ucProductID;
2419 UCHAR ucMiscInfo1;
2420 UCHAR ucMiscInfo2;
2421 UCHAR ucMiscInfo3;
2422 UCHAR ucMiscInfo4;
2423 UCHAR ucVideoInput0Info;
2424 UCHAR ucVideoInput1Info;
2425 UCHAR ucVideoInput2Info;
2426 UCHAR ucVideoInput3Info;
2427 UCHAR ucVideoInput4Info;
2428 }ATOM_MULTIMEDIA_CONFIG_INFO;
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440 #define ATOM_BIOS_INFO_ATOM_FIRMWARE_POSTED 0x0001
2441 #define ATOM_BIOS_INFO_DUAL_CRTC_SUPPORT 0x0002
2442 #define ATOM_BIOS_INFO_EXTENDED_DESKTOP_SUPPORT 0x0004
2443 #define ATOM_BIOS_INFO_MEMORY_CLOCK_SS_SUPPORT 0x0008
2444 #define ATOM_BIOS_INFO_ENGINE_CLOCK_SS_SUPPORT 0x0010
2445 #define ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU 0x0020
2446 #define ATOM_BIOS_INFO_WMI_SUPPORT 0x0040
2447 #define ATOM_BIOS_INFO_PPMODE_ASSIGNGED_BY_SYSTEM 0x0080
2448 #define ATOM_BIOS_INFO_HYPERMEMORY_SUPPORT 0x0100
2449 #define ATOM_BIOS_INFO_HYPERMEMORY_SIZE_MASK 0x1E00
2450 #define ATOM_BIOS_INFO_VPOST_WITHOUT_FIRST_MODE_SET 0x2000
2451 #define ATOM_BIOS_INFO_BIOS_SCRATCH6_SCL2_REDEFINE 0x4000
2452 #define ATOM_BIOS_INFO_MEMORY_CLOCK_EXT_SS_SUPPORT 0x0008
2453 #define ATOM_BIOS_INFO_ENGINE_CLOCK_EXT_SS_SUPPORT 0x0010
2454
2455 #ifndef _H2INC
2456
2457
2458 typedef struct _ATOM_FIRMWARE_CAPABILITY
2459 {
2460 #if ATOM_BIG_ENDIAN
2461 USHORT Reserved:1;
2462 USHORT SCL2Redefined:1;
2463 USHORT PostWithoutModeSet:1;
2464 USHORT HyperMemory_Size:4;
2465 USHORT HyperMemory_Support:1;
2466 USHORT PPMode_Assigned:1;
2467 USHORT WMI_SUPPORT:1;
2468 USHORT GPUControlsBL:1;
2469 USHORT EngineClockSS_Support:1;
2470 USHORT MemoryClockSS_Support:1;
2471 USHORT ExtendedDesktopSupport:1;
2472 USHORT DualCRTC_Support:1;
2473 USHORT FirmwarePosted:1;
2474 #else
2475 USHORT FirmwarePosted:1;
2476 USHORT DualCRTC_Support:1;
2477 USHORT ExtendedDesktopSupport:1;
2478 USHORT MemoryClockSS_Support:1;
2479 USHORT EngineClockSS_Support:1;
2480 USHORT GPUControlsBL:1;
2481 USHORT WMI_SUPPORT:1;
2482 USHORT PPMode_Assigned:1;
2483 USHORT HyperMemory_Support:1;
2484 USHORT HyperMemory_Size:4;
2485 USHORT PostWithoutModeSet:1;
2486 USHORT SCL2Redefined:1;
2487 USHORT Reserved:1;
2488 #endif
2489 }ATOM_FIRMWARE_CAPABILITY;
2490
2491 typedef union _ATOM_FIRMWARE_CAPABILITY_ACCESS
2492 {
2493 ATOM_FIRMWARE_CAPABILITY sbfAccess;
2494 USHORT susAccess;
2495 }ATOM_FIRMWARE_CAPABILITY_ACCESS;
2496
2497 #else
2498
2499 typedef union _ATOM_FIRMWARE_CAPABILITY_ACCESS
2500 {
2501 USHORT susAccess;
2502 }ATOM_FIRMWARE_CAPABILITY_ACCESS;
2503
2504 #endif
2505
2506 typedef struct _ATOM_FIRMWARE_INFO
2507 {
2508 ATOM_COMMON_TABLE_HEADER sHeader;
2509 ULONG ulFirmwareRevision;
2510 ULONG ulDefaultEngineClock;
2511 ULONG ulDefaultMemoryClock;
2512 ULONG ulDriverTargetEngineClock;
2513 ULONG ulDriverTargetMemoryClock;
2514 ULONG ulMaxEngineClockPLL_Output;
2515 ULONG ulMaxMemoryClockPLL_Output;
2516 ULONG ulMaxPixelClockPLL_Output;
2517 ULONG ulASICMaxEngineClock;
2518 ULONG ulASICMaxMemoryClock;
2519 UCHAR ucASICMaxTemperature;
2520 UCHAR ucPadding[3];
2521 ULONG aulReservedForBIOS[3];
2522 USHORT usMinEngineClockPLL_Input;
2523 USHORT usMaxEngineClockPLL_Input;
2524 USHORT usMinEngineClockPLL_Output;
2525 USHORT usMinMemoryClockPLL_Input;
2526 USHORT usMaxMemoryClockPLL_Input;
2527 USHORT usMinMemoryClockPLL_Output;
2528 USHORT usMaxPixelClock;
2529 USHORT usMinPixelClockPLL_Input;
2530 USHORT usMaxPixelClockPLL_Input;
2531 USHORT usMinPixelClockPLL_Output;
2532 ATOM_FIRMWARE_CAPABILITY_ACCESS usFirmwareCapability;
2533 USHORT usReferenceClock;
2534 USHORT usPM_RTS_Location;
2535 UCHAR ucPM_RTS_StreamSize;
2536 UCHAR ucDesign_ID;
2537 UCHAR ucMemoryModule_ID;
2538 }ATOM_FIRMWARE_INFO;
2539
2540 typedef struct _ATOM_FIRMWARE_INFO_V1_2
2541 {
2542 ATOM_COMMON_TABLE_HEADER sHeader;
2543 ULONG ulFirmwareRevision;
2544 ULONG ulDefaultEngineClock;
2545 ULONG ulDefaultMemoryClock;
2546 ULONG ulDriverTargetEngineClock;
2547 ULONG ulDriverTargetMemoryClock;
2548 ULONG ulMaxEngineClockPLL_Output;
2549 ULONG ulMaxMemoryClockPLL_Output;
2550 ULONG ulMaxPixelClockPLL_Output;
2551 ULONG ulASICMaxEngineClock;
2552 ULONG ulASICMaxMemoryClock;
2553 UCHAR ucASICMaxTemperature;
2554 UCHAR ucMinAllowedBL_Level;
2555 UCHAR ucPadding[2];
2556 ULONG aulReservedForBIOS[2];
2557 ULONG ulMinPixelClockPLL_Output;
2558 USHORT usMinEngineClockPLL_Input;
2559 USHORT usMaxEngineClockPLL_Input;
2560 USHORT usMinEngineClockPLL_Output;
2561 USHORT usMinMemoryClockPLL_Input;
2562 USHORT usMaxMemoryClockPLL_Input;
2563 USHORT usMinMemoryClockPLL_Output;
2564 USHORT usMaxPixelClock;
2565 USHORT usMinPixelClockPLL_Input;
2566 USHORT usMaxPixelClockPLL_Input;
2567 USHORT usMinPixelClockPLL_Output;
2568 ATOM_FIRMWARE_CAPABILITY_ACCESS usFirmwareCapability;
2569 USHORT usReferenceClock;
2570 USHORT usPM_RTS_Location;
2571 UCHAR ucPM_RTS_StreamSize;
2572 UCHAR ucDesign_ID;
2573 UCHAR ucMemoryModule_ID;
2574 }ATOM_FIRMWARE_INFO_V1_2;
2575
2576 typedef struct _ATOM_FIRMWARE_INFO_V1_3
2577 {
2578 ATOM_COMMON_TABLE_HEADER sHeader;
2579 ULONG ulFirmwareRevision;
2580 ULONG ulDefaultEngineClock;
2581 ULONG ulDefaultMemoryClock;
2582 ULONG ulDriverTargetEngineClock;
2583 ULONG ulDriverTargetMemoryClock;
2584 ULONG ulMaxEngineClockPLL_Output;
2585 ULONG ulMaxMemoryClockPLL_Output;
2586 ULONG ulMaxPixelClockPLL_Output;
2587 ULONG ulASICMaxEngineClock;
2588 ULONG ulASICMaxMemoryClock;
2589 UCHAR ucASICMaxTemperature;
2590 UCHAR ucMinAllowedBL_Level;
2591 UCHAR ucPadding[2];
2592 ULONG aulReservedForBIOS;
2593 ULONG ul3DAccelerationEngineClock;
2594 ULONG ulMinPixelClockPLL_Output;
2595 USHORT usMinEngineClockPLL_Input;
2596 USHORT usMaxEngineClockPLL_Input;
2597 USHORT usMinEngineClockPLL_Output;
2598 USHORT usMinMemoryClockPLL_Input;
2599 USHORT usMaxMemoryClockPLL_Input;
2600 USHORT usMinMemoryClockPLL_Output;
2601 USHORT usMaxPixelClock;
2602 USHORT usMinPixelClockPLL_Input;
2603 USHORT usMaxPixelClockPLL_Input;
2604 USHORT usMinPixelClockPLL_Output;
2605 ATOM_FIRMWARE_CAPABILITY_ACCESS usFirmwareCapability;
2606 USHORT usReferenceClock;
2607 USHORT usPM_RTS_Location;
2608 UCHAR ucPM_RTS_StreamSize;
2609 UCHAR ucDesign_ID;
2610 UCHAR ucMemoryModule_ID;
2611 }ATOM_FIRMWARE_INFO_V1_3;
2612
2613 typedef struct _ATOM_FIRMWARE_INFO_V1_4
2614 {
2615 ATOM_COMMON_TABLE_HEADER sHeader;
2616 ULONG ulFirmwareRevision;
2617 ULONG ulDefaultEngineClock;
2618 ULONG ulDefaultMemoryClock;
2619 ULONG ulDriverTargetEngineClock;
2620 ULONG ulDriverTargetMemoryClock;
2621 ULONG ulMaxEngineClockPLL_Output;
2622 ULONG ulMaxMemoryClockPLL_Output;
2623 ULONG ulMaxPixelClockPLL_Output;
2624 ULONG ulASICMaxEngineClock;
2625 ULONG ulASICMaxMemoryClock;
2626 UCHAR ucASICMaxTemperature;
2627 UCHAR ucMinAllowedBL_Level;
2628 USHORT usBootUpVDDCVoltage;
2629 USHORT usLcdMinPixelClockPLL_Output;
2630 USHORT usLcdMaxPixelClockPLL_Output;
2631 ULONG ul3DAccelerationEngineClock;
2632 ULONG ulMinPixelClockPLL_Output;
2633 USHORT usMinEngineClockPLL_Input;
2634 USHORT usMaxEngineClockPLL_Input;
2635 USHORT usMinEngineClockPLL_Output;
2636 USHORT usMinMemoryClockPLL_Input;
2637 USHORT usMaxMemoryClockPLL_Input;
2638 USHORT usMinMemoryClockPLL_Output;
2639 USHORT usMaxPixelClock;
2640 USHORT usMinPixelClockPLL_Input;
2641 USHORT usMaxPixelClockPLL_Input;
2642 USHORT usMinPixelClockPLL_Output;
2643 ATOM_FIRMWARE_CAPABILITY_ACCESS usFirmwareCapability;
2644 USHORT usReferenceClock;
2645 USHORT usPM_RTS_Location;
2646 UCHAR ucPM_RTS_StreamSize;
2647 UCHAR ucDesign_ID;
2648 UCHAR ucMemoryModule_ID;
2649 }ATOM_FIRMWARE_INFO_V1_4;
2650
2651
2652 typedef struct _ATOM_FIRMWARE_INFO_V2_1
2653 {
2654 ATOM_COMMON_TABLE_HEADER sHeader;
2655 ULONG ulFirmwareRevision;
2656 ULONG ulDefaultEngineClock;
2657 ULONG ulDefaultMemoryClock;
2658 ULONG ulReserved1;
2659 ULONG ulReserved2;
2660 ULONG ulMaxEngineClockPLL_Output;
2661 ULONG ulMaxMemoryClockPLL_Output;
2662 ULONG ulMaxPixelClockPLL_Output;
2663 ULONG ulBinaryAlteredInfo;
2664 ULONG ulDefaultDispEngineClkFreq;
2665 UCHAR ucReserved1;
2666 UCHAR ucMinAllowedBL_Level;
2667 USHORT usBootUpVDDCVoltage;
2668 USHORT usLcdMinPixelClockPLL_Output;
2669 USHORT usLcdMaxPixelClockPLL_Output;
2670 ULONG ulReserved4;
2671 ULONG ulMinPixelClockPLL_Output;
2672 USHORT usMinEngineClockPLL_Input;
2673 USHORT usMaxEngineClockPLL_Input;
2674 USHORT usMinEngineClockPLL_Output;
2675 USHORT usMinMemoryClockPLL_Input;
2676 USHORT usMaxMemoryClockPLL_Input;
2677 USHORT usMinMemoryClockPLL_Output;
2678 USHORT usMaxPixelClock;
2679 USHORT usMinPixelClockPLL_Input;
2680 USHORT usMaxPixelClockPLL_Input;
2681 USHORT usMinPixelClockPLL_Output;
2682 ATOM_FIRMWARE_CAPABILITY_ACCESS usFirmwareCapability;
2683 USHORT usCoreReferenceClock;
2684 USHORT usMemoryReferenceClock;
2685 USHORT usUniphyDPModeExtClkFreq;
2686 UCHAR ucMemoryModule_ID;
2687 UCHAR ucReserved4[3];
2688 }ATOM_FIRMWARE_INFO_V2_1;
2689
2690
2691
2692
2693 typedef struct _ATOM_FIRMWARE_INFO_V2_2
2694 {
2695 ATOM_COMMON_TABLE_HEADER sHeader;
2696 ULONG ulFirmwareRevision;
2697 ULONG ulDefaultEngineClock;
2698 ULONG ulDefaultMemoryClock;
2699 ULONG ulSPLL_OutputFreq;
2700 ULONG ulGPUPLL_OutputFreq;
2701 ULONG ulReserved1;
2702 ULONG ulReserved2;
2703 ULONG ulMaxPixelClockPLL_Output;
2704 ULONG ulBinaryAlteredInfo;
2705 ULONG ulDefaultDispEngineClkFreq;
2706 UCHAR ucReserved3;
2707 UCHAR ucMinAllowedBL_Level;
2708 USHORT usBootUpVDDCVoltage;
2709 USHORT usLcdMinPixelClockPLL_Output;
2710 USHORT usLcdMaxPixelClockPLL_Output;
2711 ULONG ulReserved4;
2712 ULONG ulMinPixelClockPLL_Output;
2713 UCHAR ucRemoteDisplayConfig;
2714 UCHAR ucReserved5[3];
2715 ULONG ulReserved6;
2716 ULONG ulReserved7;
2717 USHORT usReserved11;
2718 USHORT usMinPixelClockPLL_Input;
2719 USHORT usMaxPixelClockPLL_Input;
2720 USHORT usBootUpVDDCIVoltage;
2721 ATOM_FIRMWARE_CAPABILITY_ACCESS usFirmwareCapability;
2722 USHORT usCoreReferenceClock;
2723 USHORT usMemoryReferenceClock;
2724 USHORT usUniphyDPModeExtClkFreq;
2725 UCHAR ucMemoryModule_ID;
2726 UCHAR ucReserved9[3];
2727 USHORT usBootUpMVDDCVoltage;
2728 USHORT usReserved12;
2729 ULONG ulReserved10[3];
2730 }ATOM_FIRMWARE_INFO_V2_2;
2731
2732 #define ATOM_FIRMWARE_INFO_LAST ATOM_FIRMWARE_INFO_V2_2
2733
2734
2735
2736 #define REMOTE_DISPLAY_DISABLE 0x00
2737 #define REMOTE_DISPLAY_ENABLE 0x01
2738
2739
2740
2741
2742 #define IGP_CAP_FLAG_DYNAMIC_CLOCK_EN 0x2
2743 #define IGP_CAP_FLAG_AC_CARD 0x4
2744 #define IGP_CAP_FLAG_SDVO_CARD 0x8
2745 #define IGP_CAP_FLAG_POSTDIV_BY_2_MODE 0x10
2746
2747 typedef struct _ATOM_INTEGRATED_SYSTEM_INFO
2748 {
2749 ATOM_COMMON_TABLE_HEADER sHeader;
2750 ULONG ulBootUpEngineClock;
2751 ULONG ulBootUpMemoryClock;
2752 ULONG ulMaxSystemMemoryClock;
2753 ULONG ulMinSystemMemoryClock;
2754 UCHAR ucNumberOfCyclesInPeriodHi;
2755 UCHAR ucLCDTimingSel;
2756 USHORT usReserved1;
2757 USHORT usInterNBVoltageLow;
2758 USHORT usInterNBVoltageHigh;
2759 ULONG ulReserved[2];
2760
2761 USHORT usFSBClock;
2762 USHORT usCapabilityFlag;
2763
2764
2765 USHORT usPCIENBCfgReg7;
2766 USHORT usK8MemoryClock;
2767 USHORT usK8SyncStartDelay;
2768 USHORT usK8DataReturnTime;
2769 UCHAR ucMaxNBVoltage;
2770 UCHAR ucMinNBVoltage;
2771 UCHAR ucMemoryType;
2772 UCHAR ucNumberOfCyclesInPeriod;
2773 UCHAR ucStartingPWM_HighTime;
2774 UCHAR ucHTLinkWidth;
2775 UCHAR ucMaxNBVoltageHigh;
2776 UCHAR ucMinNBVoltageHigh;
2777 }ATOM_INTEGRATED_SYSTEM_INFO;
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819 typedef struct _ATOM_INTEGRATED_SYSTEM_INFO_V2
2820 {
2821 ATOM_COMMON_TABLE_HEADER sHeader;
2822 ULONG ulBootUpEngineClock;
2823 ULONG ulReserved1[2];
2824 ULONG ulBootUpUMAClock;
2825 ULONG ulBootUpSidePortClock;
2826 ULONG ulMinSidePortClock;
2827 ULONG ulReserved2[6];
2828 ULONG ulSystemConfig;
2829 ULONG ulBootUpReqDisplayVector;
2830 ULONG ulOtherDisplayMisc;
2831 ULONG ulDDISlot1Config;
2832 ULONG ulDDISlot2Config;
2833 UCHAR ucMemoryType;
2834 UCHAR ucUMAChannelNumber;
2835 UCHAR ucDockingPinBit;
2836 UCHAR ucDockingPinPolarity;
2837 ULONG ulDockingPinCFGInfo;
2838 ULONG ulCPUCapInfo;
2839 USHORT usNumberOfCyclesInPeriod;
2840 USHORT usMaxNBVoltage;
2841 USHORT usMinNBVoltage;
2842 USHORT usBootUpNBVoltage;
2843 ULONG ulHTLinkFreq;
2844 USHORT usMinHTLinkWidth;
2845 USHORT usMaxHTLinkWidth;
2846 USHORT usUMASyncStartDelay;
2847 USHORT usUMADataReturnTime;
2848 USHORT usLinkStatusZeroTime;
2849 USHORT usDACEfuse;
2850 ULONG ulHighVoltageHTLinkFreq;
2851 ULONG ulLowVoltageHTLinkFreq;
2852 USHORT usMaxUpStreamHTLinkWidth;
2853 USHORT usMaxDownStreamHTLinkWidth;
2854 USHORT usMinUpStreamHTLinkWidth;
2855 USHORT usMinDownStreamHTLinkWidth;
2856 USHORT usFirmwareVersion;
2857 USHORT usFullT0Time;
2858 ULONG ulReserved3[96];
2859 }ATOM_INTEGRATED_SYSTEM_INFO_V2;
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956 #define INTEGRATED_SYSTEM_INFO__UNKNOWN_CPU 0
2957 #define INTEGRATED_SYSTEM_INFO__AMD_CPU__GRIFFIN 1
2958 #define INTEGRATED_SYSTEM_INFO__AMD_CPU__GREYHOUND 2
2959 #define INTEGRATED_SYSTEM_INFO__AMD_CPU__K8 3
2960 #define INTEGRATED_SYSTEM_INFO__AMD_CPU__PHARAOH 4
2961 #define INTEGRATED_SYSTEM_INFO__AMD_CPU__OROCHI 5
2962
2963 #define INTEGRATED_SYSTEM_INFO__AMD_CPU__MAX_CODE INTEGRATED_SYSTEM_INFO__AMD_CPU__OROCHI
2964
2965 #define SYSTEM_CONFIG_POWEREXPRESS_ENABLE 0x00000001
2966 #define SYSTEM_CONFIG_RUN_AT_OVERDRIVE_ENGINE 0x00000002
2967 #define SYSTEM_CONFIG_USE_PWM_ON_VOLTAGE 0x00000004
2968 #define SYSTEM_CONFIG_PERFORMANCE_POWERSTATE_ONLY 0x00000008
2969 #define SYSTEM_CONFIG_CLMC_ENABLED 0x00000010
2970 #define SYSTEM_CONFIG_CDLW_ENABLED 0x00000020
2971 #define SYSTEM_CONFIG_HIGH_VOLTAGE_REQUESTED 0x00000040
2972 #define SYSTEM_CONFIG_CLMC_HYBRID_MODE_ENABLED 0x00000080
2973 #define SYSTEM_CONFIG_CDLF_ENABLED 0x00000100
2974 #define SYSTEM_CONFIG_DLL_SHUTDOWN_ENABLED 0x00000200
2975
2976 #define IGP_DDI_SLOT_LANE_CONFIG_MASK 0x000000FF
2977
2978 #define b0IGP_DDI_SLOT_LANE_MAP_MASK 0x0F
2979 #define b0IGP_DDI_SLOT_DOCKING_LANE_MAP_MASK 0xF0
2980 #define b0IGP_DDI_SLOT_CONFIG_LANE_0_3 0x01
2981 #define b0IGP_DDI_SLOT_CONFIG_LANE_4_7 0x02
2982 #define b0IGP_DDI_SLOT_CONFIG_LANE_8_11 0x04
2983 #define b0IGP_DDI_SLOT_CONFIG_LANE_12_15 0x08
2984
2985 #define IGP_DDI_SLOT_ATTRIBUTE_MASK 0x0000FF00
2986 #define IGP_DDI_SLOT_CONFIG_REVERSED 0x00000100
2987 #define b1IGP_DDI_SLOT_CONFIG_REVERSED 0x01
2988
2989 #define IGP_DDI_SLOT_CONNECTOR_TYPE_MASK 0x00FF0000
2990
2991
2992 typedef struct _ATOM_INTEGRATED_SYSTEM_INFO_V5
2993 {
2994 ATOM_COMMON_TABLE_HEADER sHeader;
2995 ULONG ulBootUpEngineClock;
2996 ULONG ulDentistVCOFreq;
2997 ULONG ulLClockFreq;
2998 ULONG ulBootUpUMAClock;
2999 ULONG ulReserved1[8];
3000 ULONG ulBootUpReqDisplayVector;
3001 ULONG ulOtherDisplayMisc;
3002 ULONG ulReserved2[4];
3003 ULONG ulSystemConfig;
3004 ULONG ulCPUCapInfo;
3005 USHORT usMaxNBVoltage;
3006 USHORT usMinNBVoltage;
3007 USHORT usBootUpNBVoltage;
3008 UCHAR ucHtcTmpLmt;
3009 UCHAR ucTjOffset;
3010 ULONG ulReserved3[4];
3011 ULONG ulDDISlot1Config;
3012 ULONG ulDDISlot2Config;
3013 ULONG ulDDISlot3Config;
3014 ULONG ulDDISlot4Config;
3015 ULONG ulReserved4[4];
3016 UCHAR ucMemoryType;
3017 UCHAR ucUMAChannelNumber;
3018 USHORT usReserved;
3019 ULONG ulReserved5[4];
3020 ULONG ulCSR_M3_ARB_CNTL_DEFAULT[10];
3021 ULONG ulCSR_M3_ARB_CNTL_UVD[10];
3022 ULONG ulCSR_M3_ARB_CNTL_FS3D[10];
3023 ULONG ulReserved6[61];
3024 }ATOM_INTEGRATED_SYSTEM_INFO_V5;
3025
3026 #define ATOM_CRT_INT_ENCODER1_INDEX 0x00000000
3027 #define ATOM_LCD_INT_ENCODER1_INDEX 0x00000001
3028 #define ATOM_TV_INT_ENCODER1_INDEX 0x00000002
3029 #define ATOM_DFP_INT_ENCODER1_INDEX 0x00000003
3030 #define ATOM_CRT_INT_ENCODER2_INDEX 0x00000004
3031 #define ATOM_LCD_EXT_ENCODER1_INDEX 0x00000005
3032 #define ATOM_TV_EXT_ENCODER1_INDEX 0x00000006
3033 #define ATOM_DFP_EXT_ENCODER1_INDEX 0x00000007
3034 #define ATOM_CV_INT_ENCODER1_INDEX 0x00000008
3035 #define ATOM_DFP_INT_ENCODER2_INDEX 0x00000009
3036 #define ATOM_CRT_EXT_ENCODER1_INDEX 0x0000000A
3037 #define ATOM_CV_EXT_ENCODER1_INDEX 0x0000000B
3038 #define ATOM_DFP_INT_ENCODER3_INDEX 0x0000000C
3039 #define ATOM_DFP_INT_ENCODER4_INDEX 0x0000000D
3040
3041
3042 #define ASIC_INT_DAC1_ENCODER_ID 0x00
3043 #define ASIC_INT_TV_ENCODER_ID 0x02
3044 #define ASIC_INT_DIG1_ENCODER_ID 0x03
3045 #define ASIC_INT_DAC2_ENCODER_ID 0x04
3046 #define ASIC_EXT_TV_ENCODER_ID 0x06
3047 #define ASIC_INT_DVO_ENCODER_ID 0x07
3048 #define ASIC_INT_DIG2_ENCODER_ID 0x09
3049 #define ASIC_EXT_DIG_ENCODER_ID 0x05
3050 #define ASIC_EXT_DIG2_ENCODER_ID 0x08
3051 #define ASIC_INT_DIG3_ENCODER_ID 0x0a
3052 #define ASIC_INT_DIG4_ENCODER_ID 0x0b
3053 #define ASIC_INT_DIG5_ENCODER_ID 0x0c
3054 #define ASIC_INT_DIG6_ENCODER_ID 0x0d
3055 #define ASIC_INT_DIG7_ENCODER_ID 0x0e
3056
3057
3058 #define ATOM_ANALOG_ENCODER 0
3059 #define ATOM_DIGITAL_ENCODER 1
3060 #define ATOM_DP_ENCODER 2
3061
3062 #define ATOM_ENCODER_ENUM_MASK 0x70
3063 #define ATOM_ENCODER_ENUM_ID1 0x00
3064 #define ATOM_ENCODER_ENUM_ID2 0x10
3065 #define ATOM_ENCODER_ENUM_ID3 0x20
3066 #define ATOM_ENCODER_ENUM_ID4 0x30
3067 #define ATOM_ENCODER_ENUM_ID5 0x40
3068 #define ATOM_ENCODER_ENUM_ID6 0x50
3069
3070 #define ATOM_DEVICE_CRT1_INDEX 0x00000000
3071 #define ATOM_DEVICE_LCD1_INDEX 0x00000001
3072 #define ATOM_DEVICE_TV1_INDEX 0x00000002
3073 #define ATOM_DEVICE_DFP1_INDEX 0x00000003
3074 #define ATOM_DEVICE_CRT2_INDEX 0x00000004
3075 #define ATOM_DEVICE_LCD2_INDEX 0x00000005
3076 #define ATOM_DEVICE_DFP6_INDEX 0x00000006
3077 #define ATOM_DEVICE_DFP2_INDEX 0x00000007
3078 #define ATOM_DEVICE_CV_INDEX 0x00000008
3079 #define ATOM_DEVICE_DFP3_INDEX 0x00000009
3080 #define ATOM_DEVICE_DFP4_INDEX 0x0000000A
3081 #define ATOM_DEVICE_DFP5_INDEX 0x0000000B
3082
3083 #define ATOM_DEVICE_RESERVEDC_INDEX 0x0000000C
3084 #define ATOM_DEVICE_RESERVEDD_INDEX 0x0000000D
3085 #define ATOM_DEVICE_RESERVEDE_INDEX 0x0000000E
3086 #define ATOM_DEVICE_RESERVEDF_INDEX 0x0000000F
3087 #define ATOM_MAX_SUPPORTED_DEVICE_INFO (ATOM_DEVICE_DFP3_INDEX+1)
3088 #define ATOM_MAX_SUPPORTED_DEVICE_INFO_2 ATOM_MAX_SUPPORTED_DEVICE_INFO
3089 #define ATOM_MAX_SUPPORTED_DEVICE_INFO_3 (ATOM_DEVICE_DFP5_INDEX + 1 )
3090
3091 #define ATOM_MAX_SUPPORTED_DEVICE (ATOM_DEVICE_RESERVEDF_INDEX+1)
3092
3093 #define ATOM_DEVICE_CRT1_SUPPORT (0x1L << ATOM_DEVICE_CRT1_INDEX )
3094 #define ATOM_DEVICE_LCD1_SUPPORT (0x1L << ATOM_DEVICE_LCD1_INDEX )
3095 #define ATOM_DEVICE_TV1_SUPPORT (0x1L << ATOM_DEVICE_TV1_INDEX )
3096 #define ATOM_DEVICE_DFP1_SUPPORT (0x1L << ATOM_DEVICE_DFP1_INDEX )
3097 #define ATOM_DEVICE_CRT2_SUPPORT (0x1L << ATOM_DEVICE_CRT2_INDEX )
3098 #define ATOM_DEVICE_LCD2_SUPPORT (0x1L << ATOM_DEVICE_LCD2_INDEX )
3099 #define ATOM_DEVICE_DFP6_SUPPORT (0x1L << ATOM_DEVICE_DFP6_INDEX )
3100 #define ATOM_DEVICE_DFP2_SUPPORT (0x1L << ATOM_DEVICE_DFP2_INDEX )
3101 #define ATOM_DEVICE_CV_SUPPORT (0x1L << ATOM_DEVICE_CV_INDEX )
3102 #define ATOM_DEVICE_DFP3_SUPPORT (0x1L << ATOM_DEVICE_DFP3_INDEX )
3103 #define ATOM_DEVICE_DFP4_SUPPORT (0x1L << ATOM_DEVICE_DFP4_INDEX )
3104 #define ATOM_DEVICE_DFP5_SUPPORT (0x1L << ATOM_DEVICE_DFP5_INDEX )
3105
3106 #define ATOM_DEVICE_CRT_SUPPORT (ATOM_DEVICE_CRT1_SUPPORT | ATOM_DEVICE_CRT2_SUPPORT)
3107 #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)
3108 #define ATOM_DEVICE_TV_SUPPORT (ATOM_DEVICE_TV1_SUPPORT)
3109 #define ATOM_DEVICE_LCD_SUPPORT (ATOM_DEVICE_LCD1_SUPPORT | ATOM_DEVICE_LCD2_SUPPORT)
3110
3111 #define ATOM_DEVICE_CONNECTOR_TYPE_MASK 0x000000F0
3112 #define ATOM_DEVICE_CONNECTOR_TYPE_SHIFT 0x00000004
3113 #define ATOM_DEVICE_CONNECTOR_VGA 0x00000001
3114 #define ATOM_DEVICE_CONNECTOR_DVI_I 0x00000002
3115 #define ATOM_DEVICE_CONNECTOR_DVI_D 0x00000003
3116 #define ATOM_DEVICE_CONNECTOR_DVI_A 0x00000004
3117 #define ATOM_DEVICE_CONNECTOR_SVIDEO 0x00000005
3118 #define ATOM_DEVICE_CONNECTOR_COMPOSITE 0x00000006
3119 #define ATOM_DEVICE_CONNECTOR_LVDS 0x00000007
3120 #define ATOM_DEVICE_CONNECTOR_DIGI_LINK 0x00000008
3121 #define ATOM_DEVICE_CONNECTOR_SCART 0x00000009
3122 #define ATOM_DEVICE_CONNECTOR_HDMI_TYPE_A 0x0000000A
3123 #define ATOM_DEVICE_CONNECTOR_HDMI_TYPE_B 0x0000000B
3124 #define ATOM_DEVICE_CONNECTOR_CASE_1 0x0000000E
3125 #define ATOM_DEVICE_CONNECTOR_DISPLAYPORT 0x0000000F
3126
3127
3128 #define ATOM_DEVICE_DAC_INFO_MASK 0x0000000F
3129 #define ATOM_DEVICE_DAC_INFO_SHIFT 0x00000000
3130 #define ATOM_DEVICE_DAC_INFO_NODAC 0x00000000
3131 #define ATOM_DEVICE_DAC_INFO_DACA 0x00000001
3132 #define ATOM_DEVICE_DAC_INFO_DACB 0x00000002
3133 #define ATOM_DEVICE_DAC_INFO_EXDAC 0x00000003
3134
3135 #define ATOM_DEVICE_I2C_ID_NOI2C 0x00000000
3136
3137 #define ATOM_DEVICE_I2C_LINEMUX_MASK 0x0000000F
3138 #define ATOM_DEVICE_I2C_LINEMUX_SHIFT 0x00000000
3139
3140 #define ATOM_DEVICE_I2C_ID_MASK 0x00000070
3141 #define ATOM_DEVICE_I2C_ID_SHIFT 0x00000004
3142 #define ATOM_DEVICE_I2C_ID_IS_FOR_NON_MM_USE 0x00000001
3143 #define ATOM_DEVICE_I2C_ID_IS_FOR_MM_USE 0x00000002
3144 #define ATOM_DEVICE_I2C_ID_IS_FOR_SDVO_USE 0x00000003
3145 #define ATOM_DEVICE_I2C_ID_IS_FOR_DAC_SCL 0x00000004
3146
3147 #define ATOM_DEVICE_I2C_HARDWARE_CAP_MASK 0x00000080
3148 #define ATOM_DEVICE_I2C_HARDWARE_CAP_SHIFT 0x00000007
3149 #define ATOM_DEVICE_USES_SOFTWARE_ASSISTED_I2C 0x00000000
3150 #define ATOM_DEVICE_USES_HARDWARE_ASSISTED_I2C 0x00000001
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181 typedef struct _ATOM_I2C_ID_CONFIG
3182 {
3183 #if ATOM_BIG_ENDIAN
3184 UCHAR bfHW_Capable:1;
3185 UCHAR bfHW_EngineID:3;
3186 UCHAR bfI2C_LineMux:4;
3187 #else
3188 UCHAR bfI2C_LineMux:4;
3189 UCHAR bfHW_EngineID:3;
3190 UCHAR bfHW_Capable:1;
3191 #endif
3192 }ATOM_I2C_ID_CONFIG;
3193
3194 typedef union _ATOM_I2C_ID_CONFIG_ACCESS
3195 {
3196 ATOM_I2C_ID_CONFIG sbfAccess;
3197 UCHAR ucAccess;
3198 }ATOM_I2C_ID_CONFIG_ACCESS;
3199
3200
3201
3202
3203
3204 typedef struct _ATOM_GPIO_I2C_ASSIGMENT
3205 {
3206 USHORT usClkMaskRegisterIndex;
3207 USHORT usClkEnRegisterIndex;
3208 USHORT usClkY_RegisterIndex;
3209 USHORT usClkA_RegisterIndex;
3210 USHORT usDataMaskRegisterIndex;
3211 USHORT usDataEnRegisterIndex;
3212 USHORT usDataY_RegisterIndex;
3213 USHORT usDataA_RegisterIndex;
3214 ATOM_I2C_ID_CONFIG_ACCESS sucI2cId;
3215 UCHAR ucClkMaskShift;
3216 UCHAR ucClkEnShift;
3217 UCHAR ucClkY_Shift;
3218 UCHAR ucClkA_Shift;
3219 UCHAR ucDataMaskShift;
3220 UCHAR ucDataEnShift;
3221 UCHAR ucDataY_Shift;
3222 UCHAR ucDataA_Shift;
3223 UCHAR ucReserved1;
3224 UCHAR ucReserved2;
3225 }ATOM_GPIO_I2C_ASSIGMENT;
3226
3227 typedef struct _ATOM_GPIO_I2C_INFO
3228 {
3229 ATOM_COMMON_TABLE_HEADER sHeader;
3230 ATOM_GPIO_I2C_ASSIGMENT asGPIO_Info[ATOM_MAX_SUPPORTED_DEVICE];
3231 }ATOM_GPIO_I2C_INFO;
3232
3233
3234
3235
3236
3237 #ifndef _H2INC
3238
3239
3240 typedef struct _ATOM_MODE_MISC_INFO
3241 {
3242 #if ATOM_BIG_ENDIAN
3243 USHORT Reserved:6;
3244 USHORT RGB888:1;
3245 USHORT DoubleClock:1;
3246 USHORT Interlace:1;
3247 USHORT CompositeSync:1;
3248 USHORT V_ReplicationBy2:1;
3249 USHORT H_ReplicationBy2:1;
3250 USHORT VerticalCutOff:1;
3251 USHORT VSyncPolarity:1;
3252 USHORT HSyncPolarity:1;
3253 USHORT HorizontalCutOff:1;
3254 #else
3255 USHORT HorizontalCutOff:1;
3256 USHORT HSyncPolarity:1;
3257 USHORT VSyncPolarity:1;
3258 USHORT VerticalCutOff:1;
3259 USHORT H_ReplicationBy2:1;
3260 USHORT V_ReplicationBy2:1;
3261 USHORT CompositeSync:1;
3262 USHORT Interlace:1;
3263 USHORT DoubleClock:1;
3264 USHORT RGB888:1;
3265 USHORT Reserved:6;
3266 #endif
3267 }ATOM_MODE_MISC_INFO;
3268
3269 typedef union _ATOM_MODE_MISC_INFO_ACCESS
3270 {
3271 ATOM_MODE_MISC_INFO sbfAccess;
3272 USHORT usAccess;
3273 }ATOM_MODE_MISC_INFO_ACCESS;
3274
3275 #else
3276
3277 typedef union _ATOM_MODE_MISC_INFO_ACCESS
3278 {
3279 USHORT usAccess;
3280 }ATOM_MODE_MISC_INFO_ACCESS;
3281
3282 #endif
3283
3284
3285 #define ATOM_H_CUTOFF 0x01
3286 #define ATOM_HSYNC_POLARITY 0x02
3287 #define ATOM_VSYNC_POLARITY 0x04
3288 #define ATOM_V_CUTOFF 0x08
3289 #define ATOM_H_REPLICATIONBY2 0x10
3290 #define ATOM_V_REPLICATIONBY2 0x20
3291 #define ATOM_COMPOSITESYNC 0x40
3292 #define ATOM_INTERLACE 0x80
3293 #define ATOM_DOUBLE_CLOCK_MODE 0x100
3294 #define ATOM_RGB888_MODE 0x200
3295
3296
3297 #define ATOM_REFRESH_43 43
3298 #define ATOM_REFRESH_47 47
3299 #define ATOM_REFRESH_56 56
3300 #define ATOM_REFRESH_60 60
3301 #define ATOM_REFRESH_65 65
3302 #define ATOM_REFRESH_70 70
3303 #define ATOM_REFRESH_72 72
3304 #define ATOM_REFRESH_75 75
3305 #define ATOM_REFRESH_85 85
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321 typedef struct _SET_CRTC_USING_DTD_TIMING_PARAMETERS
3322 {
3323 USHORT usH_Size;
3324 USHORT usH_Blanking_Time;
3325 USHORT usV_Size;
3326 USHORT usV_Blanking_Time;
3327 USHORT usH_SyncOffset;
3328 USHORT usH_SyncWidth;
3329 USHORT usV_SyncOffset;
3330 USHORT usV_SyncWidth;
3331 ATOM_MODE_MISC_INFO_ACCESS susModeMiscInfo;
3332 UCHAR ucH_Border;
3333 UCHAR ucV_Border;
3334 UCHAR ucCRTC;
3335 UCHAR ucPadding[3];
3336 }SET_CRTC_USING_DTD_TIMING_PARAMETERS;
3337
3338
3339
3340
3341 typedef struct _SET_CRTC_TIMING_PARAMETERS
3342 {
3343 USHORT usH_Total;
3344 USHORT usH_Disp;
3345 USHORT usH_SyncStart;
3346 USHORT usH_SyncWidth;
3347 USHORT usV_Total;
3348 USHORT usV_Disp;
3349 USHORT usV_SyncStart;
3350 USHORT usV_SyncWidth;
3351 ATOM_MODE_MISC_INFO_ACCESS susModeMiscInfo;
3352 UCHAR ucCRTC;
3353 UCHAR ucOverscanRight;
3354 UCHAR ucOverscanLeft;
3355 UCHAR ucOverscanBottom;
3356 UCHAR ucOverscanTop;
3357 UCHAR ucReserved;
3358 }SET_CRTC_TIMING_PARAMETERS;
3359 #define SET_CRTC_TIMING_PARAMETERS_PS_ALLOCATION SET_CRTC_TIMING_PARAMETERS
3360
3361
3362
3363
3364
3365
3366 typedef struct _ATOM_MODE_TIMING
3367 {
3368 USHORT usCRTC_H_Total;
3369 USHORT usCRTC_H_Disp;
3370 USHORT usCRTC_H_SyncStart;
3371 USHORT usCRTC_H_SyncWidth;
3372 USHORT usCRTC_V_Total;
3373 USHORT usCRTC_V_Disp;
3374 USHORT usCRTC_V_SyncStart;
3375 USHORT usCRTC_V_SyncWidth;
3376 USHORT usPixelClock;
3377 ATOM_MODE_MISC_INFO_ACCESS susModeMiscInfo;
3378 USHORT usCRTC_OverscanRight;
3379 USHORT usCRTC_OverscanLeft;
3380 USHORT usCRTC_OverscanBottom;
3381 USHORT usCRTC_OverscanTop;
3382 USHORT usReserve;
3383 UCHAR ucInternalModeNumber;
3384 UCHAR ucRefreshRate;
3385 }ATOM_MODE_TIMING;
3386
3387 typedef struct _ATOM_DTD_FORMAT
3388 {
3389 USHORT usPixClk;
3390 USHORT usHActive;
3391 USHORT usHBlanking_Time;
3392 USHORT usVActive;
3393 USHORT usVBlanking_Time;
3394 USHORT usHSyncOffset;
3395 USHORT usHSyncWidth;
3396 USHORT usVSyncOffset;
3397 USHORT usVSyncWidth;
3398 USHORT usImageHSize;
3399 USHORT usImageVSize;
3400 UCHAR ucHBorder;
3401 UCHAR ucVBorder;
3402 ATOM_MODE_MISC_INFO_ACCESS susModeMiscInfo;
3403 UCHAR ucInternalModeNumber;
3404 UCHAR ucRefreshRate;
3405 }ATOM_DTD_FORMAT;
3406
3407
3408
3409
3410
3411 #define SUPPORTED_LCD_REFRESHRATE_30Hz 0x0004
3412 #define SUPPORTED_LCD_REFRESHRATE_40Hz 0x0008
3413 #define SUPPORTED_LCD_REFRESHRATE_50Hz 0x0010
3414 #define SUPPORTED_LCD_REFRESHRATE_60Hz 0x0020
3415
3416
3417
3418 typedef struct _ATOM_LVDS_INFO
3419 {
3420 ATOM_COMMON_TABLE_HEADER sHeader;
3421 ATOM_DTD_FORMAT sLCDTiming;
3422 USHORT usModePatchTableOffset;
3423 USHORT usSupportedRefreshRate;
3424 USHORT usOffDelayInMs;
3425 UCHAR ucPowerSequenceDigOntoDEin10Ms;
3426 UCHAR ucPowerSequenceDEtoBLOnin10Ms;
3427 UCHAR ucLVDS_Misc;
3428
3429
3430
3431 UCHAR ucPanelDefaultRefreshRate;
3432 UCHAR ucPanelIdentification;
3433 UCHAR ucSS_Id;
3434 }ATOM_LVDS_INFO;
3435
3436
3437
3438 typedef struct _ATOM_LVDS_INFO_V12
3439 {
3440 ATOM_COMMON_TABLE_HEADER sHeader;
3441 ATOM_DTD_FORMAT sLCDTiming;
3442 USHORT usExtInfoTableOffset;
3443 USHORT usSupportedRefreshRate;
3444 USHORT usOffDelayInMs;
3445 UCHAR ucPowerSequenceDigOntoDEin10Ms;
3446 UCHAR ucPowerSequenceDEtoBLOnin10Ms;
3447 UCHAR ucLVDS_Misc;
3448
3449
3450
3451 UCHAR ucPanelDefaultRefreshRate;
3452 UCHAR ucPanelIdentification;
3453 UCHAR ucSS_Id;
3454 USHORT usLCDVenderID;
3455 USHORT usLCDProductID;
3456 UCHAR ucLCDPanel_SpecialHandlingCap;
3457 UCHAR ucPanelInfoSize;
3458 UCHAR ucReserved[2];
3459 }ATOM_LVDS_INFO_V12;
3460
3461
3462
3463
3464
3465 #define LCDPANEL_CAP_READ_EDID 0x1
3466
3467
3468
3469
3470 #define LCDPANEL_CAP_DRR_SUPPORTED 0x2
3471
3472
3473 #define LCDPANEL_CAP_eDP 0x4
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487 #define PANEL_COLOR_BIT_DEPTH_MASK 0x70
3488
3489
3490 #define PANEL_RANDOM_DITHER 0x80
3491 #define PANEL_RANDOM_DITHER_MASK 0x80
3492
3493 #define ATOM_LVDS_INFO_LAST ATOM_LVDS_INFO_V12
3494
3495
3496
3497
3498
3499
3500
3501 typedef struct _ATOM_LCD_INFO_V13
3502 {
3503 ATOM_COMMON_TABLE_HEADER sHeader;
3504 ATOM_DTD_FORMAT sLCDTiming;
3505 USHORT usExtInfoTableOffset;
3506 USHORT usSupportedRefreshRate;
3507 ULONG ulReserved0;
3508 UCHAR ucLCD_Misc;
3509
3510
3511
3512
3513
3514 UCHAR ucPanelDefaultRefreshRate;
3515 UCHAR ucPanelIdentification;
3516 UCHAR ucSS_Id;
3517 USHORT usLCDVenderID;
3518 USHORT usLCDProductID;
3519 UCHAR ucLCDPanel_SpecialHandlingCap;
3520
3521
3522
3523
3524 UCHAR ucPanelInfoSize;
3525 USHORT usBacklightPWM;
3526
3527 UCHAR ucPowerSequenceDIGONtoDE_in4Ms;
3528 UCHAR ucPowerSequenceDEtoVARY_BL_in4Ms;
3529 UCHAR ucPowerSequenceVARY_BLtoDE_in4Ms;
3530 UCHAR ucPowerSequenceDEtoDIGON_in4Ms;
3531
3532 UCHAR ucOffDelay_in4Ms;
3533 UCHAR ucPowerSequenceVARY_BLtoBLON_in4Ms;
3534 UCHAR ucPowerSequenceBLONtoVARY_BL_in4Ms;
3535 UCHAR ucReserved1;
3536
3537 UCHAR ucDPCD_eDP_CONFIGURATION_CAP;
3538 UCHAR ucDPCD_MAX_LINK_RATE;
3539 UCHAR ucDPCD_MAX_LANE_COUNT;
3540 UCHAR ucDPCD_MAX_DOWNSPREAD;
3541
3542 USHORT usMaxPclkFreqInSingleLink;
3543 UCHAR uceDPToLVDSRxId;
3544 UCHAR ucLcdReservd;
3545 ULONG ulReserved[2];
3546 }ATOM_LCD_INFO_V13;
3547
3548 #define ATOM_LCD_INFO_LAST ATOM_LCD_INFO_V13
3549
3550
3551 #define ATOM_PANEL_MISC_V13_DUAL 0x00000001
3552 #define ATOM_PANEL_MISC_V13_FPDI 0x00000002
3553 #define ATOM_PANEL_MISC_V13_GREY_LEVEL 0x0000000C
3554 #define ATOM_PANEL_MISC_V13_GREY_LEVEL_SHIFT 2
3555 #define ATOM_PANEL_MISC_V13_COLOR_BIT_DEPTH_MASK 0x70
3556 #define ATOM_PANEL_MISC_V13_6BIT_PER_COLOR 0x10
3557 #define ATOM_PANEL_MISC_V13_8BIT_PER_COLOR 0x20
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574 #define LCDPANEL_CAP_V13_READ_EDID 0x1
3575
3576
3577
3578
3579 #define LCDPANEL_CAP_V13_DRR_SUPPORTED 0x2
3580
3581
3582 #define LCDPANEL_CAP_V13_eDP 0x4
3583
3584
3585 #define eDP_TO_LVDS_RX_DISABLE 0x00
3586 #define eDP_TO_LVDS_COMMON_ID 0x01
3587 #define eDP_TO_LVDS_RT_ID 0x02
3588
3589 typedef struct _ATOM_PATCH_RECORD_MODE
3590 {
3591 UCHAR ucRecordType;
3592 USHORT usHDisp;
3593 USHORT usVDisp;
3594 }ATOM_PATCH_RECORD_MODE;
3595
3596 typedef struct _ATOM_LCD_RTS_RECORD
3597 {
3598 UCHAR ucRecordType;
3599 UCHAR ucRTSValue;
3600 }ATOM_LCD_RTS_RECORD;
3601
3602
3603
3604 typedef struct _ATOM_LCD_MODE_CONTROL_CAP
3605 {
3606 UCHAR ucRecordType;
3607 USHORT usLCDCap;
3608 }ATOM_LCD_MODE_CONTROL_CAP;
3609
3610 #define LCD_MODE_CAP_BL_OFF 1
3611 #define LCD_MODE_CAP_CRTC_OFF 2
3612 #define LCD_MODE_CAP_PANEL_OFF 4
3613
3614 typedef struct _ATOM_FAKE_EDID_PATCH_RECORD
3615 {
3616 UCHAR ucRecordType;
3617 UCHAR ucFakeEDIDLength;
3618 UCHAR ucFakeEDIDString[1];
3619 } ATOM_FAKE_EDID_PATCH_RECORD;
3620
3621 typedef struct _ATOM_PANEL_RESOLUTION_PATCH_RECORD
3622 {
3623 UCHAR ucRecordType;
3624 USHORT usHSize;
3625 USHORT usVSize;
3626 }ATOM_PANEL_RESOLUTION_PATCH_RECORD;
3627
3628 #define LCD_MODE_PATCH_RECORD_MODE_TYPE 1
3629 #define LCD_RTS_RECORD_TYPE 2
3630 #define LCD_CAP_RECORD_TYPE 3
3631 #define LCD_FAKE_EDID_PATCH_RECORD_TYPE 4
3632 #define LCD_PANEL_RESOLUTION_RECORD_TYPE 5
3633 #define LCD_EDID_OFFSET_PATCH_RECORD_TYPE 6
3634 #define ATOM_RECORD_END_TYPE 0xFF
3635
3636
3637
3638
3639
3640 typedef struct _ATOM_SPREAD_SPECTRUM_ASSIGNMENT
3641 {
3642 USHORT usSpreadSpectrumPercentage;
3643 UCHAR ucSpreadSpectrumType;
3644 UCHAR ucSS_Step;
3645 UCHAR ucSS_Delay;
3646 UCHAR ucSS_Id;
3647 UCHAR ucRecommendedRef_Div;
3648 UCHAR ucSS_Range;
3649 }ATOM_SPREAD_SPECTRUM_ASSIGNMENT;
3650
3651 #define ATOM_MAX_SS_ENTRY 16
3652 #define ATOM_DP_SS_ID1 0x0f1
3653 #define ATOM_DP_SS_ID2 0x0f2
3654 #define ATOM_LVLINK_2700MHz_SS_ID 0x0f3
3655 #define ATOM_LVLINK_1620MHz_SS_ID 0x0f4
3656
3657
3658 #define ATOM_SS_DOWN_SPREAD_MODE_MASK 0x00000000
3659 #define ATOM_SS_DOWN_SPREAD_MODE 0x00000000
3660 #define ATOM_SS_CENTRE_SPREAD_MODE_MASK 0x00000001
3661 #define ATOM_SS_CENTRE_SPREAD_MODE 0x00000001
3662 #define ATOM_INTERNAL_SS_MASK 0x00000000
3663 #define ATOM_EXTERNAL_SS_MASK 0x00000002
3664 #define EXEC_SS_STEP_SIZE_SHIFT 2
3665 #define EXEC_SS_DELAY_SHIFT 4
3666 #define ACTIVEDATA_TO_BLON_DELAY_SHIFT 4
3667
3668 typedef struct _ATOM_SPREAD_SPECTRUM_INFO
3669 {
3670 ATOM_COMMON_TABLE_HEADER sHeader;
3671 ATOM_SPREAD_SPECTRUM_ASSIGNMENT asSS_Info[ATOM_MAX_SS_ENTRY];
3672 }ATOM_SPREAD_SPECTRUM_INFO;
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689 #define NTSC_SUPPORT 0x1
3690 #define NTSCJ_SUPPORT 0x2
3691
3692 #define PAL_SUPPORT 0x4
3693 #define PALM_SUPPORT 0x8
3694 #define PALCN_SUPPORT 0x10
3695 #define PALN_SUPPORT 0x20
3696 #define PAL60_SUPPORT 0x40
3697 #define SECAM_SUPPORT 0x80
3698
3699 #define MAX_SUPPORTED_TV_TIMING 2
3700
3701 typedef struct _ATOM_ANALOG_TV_INFO
3702 {
3703 ATOM_COMMON_TABLE_HEADER sHeader;
3704 UCHAR ucTV_SupportedStandard;
3705 UCHAR ucTV_BootUpDefaultStandard;
3706 UCHAR ucExt_TV_ASIC_ID;
3707 UCHAR ucExt_TV_ASIC_SlaveAddr;
3708
3709 ATOM_MODE_TIMING aModeTimings[MAX_SUPPORTED_TV_TIMING];
3710 }ATOM_ANALOG_TV_INFO;
3711
3712 #define MAX_SUPPORTED_TV_TIMING_V1_2 3
3713
3714 typedef struct _ATOM_ANALOG_TV_INFO_V1_2
3715 {
3716 ATOM_COMMON_TABLE_HEADER sHeader;
3717 UCHAR ucTV_SupportedStandard;
3718 UCHAR ucTV_BootUpDefaultStandard;
3719 UCHAR ucExt_TV_ASIC_ID;
3720 UCHAR ucExt_TV_ASIC_SlaveAddr;
3721 ATOM_DTD_FORMAT aModeTimings[MAX_SUPPORTED_TV_TIMING_V1_2];
3722 }ATOM_ANALOG_TV_INFO_V1_2;
3723
3724 typedef struct _ATOM_DPCD_INFO
3725 {
3726 UCHAR ucRevisionNumber;
3727 UCHAR ucMaxLinkRate;
3728 UCHAR ucMaxLane;
3729 UCHAR ucMaxDownSpread;
3730 }ATOM_DPCD_INFO;
3731
3732 #define ATOM_DPCD_MAX_LANE_MASK 0x1F
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743 #ifndef VESA_MEMORY_IN_64K_BLOCK
3744 #define VESA_MEMORY_IN_64K_BLOCK 0x100
3745 #endif
3746
3747 #define ATOM_EDID_RAW_DATASIZE 256
3748 #define ATOM_HWICON_SURFACE_SIZE 4096
3749 #define ATOM_HWICON_INFOTABLE_SIZE 32
3750 #define MAX_DTD_MODE_IN_VRAM 6
3751 #define ATOM_DTD_MODE_SUPPORT_TBL_SIZE (MAX_DTD_MODE_IN_VRAM*28)
3752 #define ATOM_STD_MODE_SUPPORT_TBL_SIZE 32*8
3753
3754 #define DFP_ENCODER_TYPE_OFFSET (ATOM_EDID_RAW_DATASIZE + ATOM_DTD_MODE_SUPPORT_TBL_SIZE + ATOM_STD_MODE_SUPPORT_TBL_SIZE - 20)
3755 #define ATOM_DP_DPCD_OFFSET (DFP_ENCODER_TYPE_OFFSET + 4 )
3756
3757 #define ATOM_HWICON1_SURFACE_ADDR 0
3758 #define ATOM_HWICON2_SURFACE_ADDR (ATOM_HWICON1_SURFACE_ADDR + ATOM_HWICON_SURFACE_SIZE)
3759 #define ATOM_HWICON_INFOTABLE_ADDR (ATOM_HWICON2_SURFACE_ADDR + ATOM_HWICON_SURFACE_SIZE)
3760 #define ATOM_CRT1_EDID_ADDR (ATOM_HWICON_INFOTABLE_ADDR + ATOM_HWICON_INFOTABLE_SIZE)
3761 #define ATOM_CRT1_DTD_MODE_TBL_ADDR (ATOM_CRT1_EDID_ADDR + ATOM_EDID_RAW_DATASIZE)
3762 #define ATOM_CRT1_STD_MODE_TBL_ADDR (ATOM_CRT1_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE)
3763
3764 #define ATOM_LCD1_EDID_ADDR (ATOM_CRT1_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE)
3765 #define ATOM_LCD1_DTD_MODE_TBL_ADDR (ATOM_LCD1_EDID_ADDR + ATOM_EDID_RAW_DATASIZE)
3766 #define ATOM_LCD1_STD_MODE_TBL_ADDR (ATOM_LCD1_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE)
3767
3768 #define ATOM_TV1_DTD_MODE_TBL_ADDR (ATOM_LCD1_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE)
3769
3770 #define ATOM_DFP1_EDID_ADDR (ATOM_TV1_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE)
3771 #define ATOM_DFP1_DTD_MODE_TBL_ADDR (ATOM_DFP1_EDID_ADDR + ATOM_EDID_RAW_DATASIZE)
3772 #define ATOM_DFP1_STD_MODE_TBL_ADDR (ATOM_DFP1_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE)
3773
3774 #define ATOM_CRT2_EDID_ADDR (ATOM_DFP1_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE)
3775 #define ATOM_CRT2_DTD_MODE_TBL_ADDR (ATOM_CRT2_EDID_ADDR + ATOM_EDID_RAW_DATASIZE)
3776 #define ATOM_CRT2_STD_MODE_TBL_ADDR (ATOM_CRT2_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE)
3777
3778 #define ATOM_LCD2_EDID_ADDR (ATOM_CRT2_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE)
3779 #define ATOM_LCD2_DTD_MODE_TBL_ADDR (ATOM_LCD2_EDID_ADDR + ATOM_EDID_RAW_DATASIZE)
3780 #define ATOM_LCD2_STD_MODE_TBL_ADDR (ATOM_LCD2_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE)
3781
3782 #define ATOM_DFP6_EDID_ADDR (ATOM_LCD2_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE)
3783 #define ATOM_DFP6_DTD_MODE_TBL_ADDR (ATOM_DFP6_EDID_ADDR + ATOM_EDID_RAW_DATASIZE)
3784 #define ATOM_DFP6_STD_MODE_TBL_ADDR (ATOM_DFP6_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE)
3785
3786 #define ATOM_DFP2_EDID_ADDR (ATOM_DFP6_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE)
3787 #define ATOM_DFP2_DTD_MODE_TBL_ADDR (ATOM_DFP2_EDID_ADDR + ATOM_EDID_RAW_DATASIZE)
3788 #define ATOM_DFP2_STD_MODE_TBL_ADDR (ATOM_DFP2_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE)
3789
3790 #define ATOM_CV_EDID_ADDR (ATOM_DFP2_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE)
3791 #define ATOM_CV_DTD_MODE_TBL_ADDR (ATOM_CV_EDID_ADDR + ATOM_EDID_RAW_DATASIZE)
3792 #define ATOM_CV_STD_MODE_TBL_ADDR (ATOM_CV_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE)
3793
3794 #define ATOM_DFP3_EDID_ADDR (ATOM_CV_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE)
3795 #define ATOM_DFP3_DTD_MODE_TBL_ADDR (ATOM_DFP3_EDID_ADDR + ATOM_EDID_RAW_DATASIZE)
3796 #define ATOM_DFP3_STD_MODE_TBL_ADDR (ATOM_DFP3_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE)
3797
3798 #define ATOM_DFP4_EDID_ADDR (ATOM_DFP3_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE)
3799 #define ATOM_DFP4_DTD_MODE_TBL_ADDR (ATOM_DFP4_EDID_ADDR + ATOM_EDID_RAW_DATASIZE)
3800 #define ATOM_DFP4_STD_MODE_TBL_ADDR (ATOM_DFP4_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE)
3801
3802 #define ATOM_DFP5_EDID_ADDR (ATOM_DFP4_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE)
3803 #define ATOM_DFP5_DTD_MODE_TBL_ADDR (ATOM_DFP5_EDID_ADDR + ATOM_EDID_RAW_DATASIZE)
3804 #define ATOM_DFP5_STD_MODE_TBL_ADDR (ATOM_DFP5_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE)
3805
3806 #define ATOM_DP_TRAINING_TBL_ADDR (ATOM_DFP5_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE)
3807
3808 #define ATOM_STACK_STORAGE_START (ATOM_DP_TRAINING_TBL_ADDR + 1024)
3809 #define ATOM_STACK_STORAGE_END ATOM_STACK_STORAGE_START + 512
3810
3811
3812 #define ATOM_VRAM_RESERVE_SIZE ((((ATOM_STACK_STORAGE_END - ATOM_HWICON1_SURFACE_ADDR)>>10)+4)&0xFFFC)
3813
3814 #define ATOM_VRAM_RESERVE_V2_SIZE 32
3815
3816 #define ATOM_VRAM_OPERATION_FLAGS_MASK 0xC0000000L
3817 #define ATOM_VRAM_OPERATION_FLAGS_SHIFT 30
3818 #define ATOM_VRAM_BLOCK_NEEDS_NO_RESERVATION 0x1
3819 #define ATOM_VRAM_BLOCK_NEEDS_RESERVATION 0x0
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846 #define ATOM_MAX_FIRMWARE_VRAM_USAGE_INFO 1
3847
3848 typedef struct _ATOM_FIRMWARE_VRAM_RESERVE_INFO
3849 {
3850 ULONG ulStartAddrUsedByFirmware;
3851 USHORT usFirmwareUseInKb;
3852 USHORT usReserved;
3853 }ATOM_FIRMWARE_VRAM_RESERVE_INFO;
3854
3855 typedef struct _ATOM_VRAM_USAGE_BY_FIRMWARE
3856 {
3857 ATOM_COMMON_TABLE_HEADER sHeader;
3858 ATOM_FIRMWARE_VRAM_RESERVE_INFO asFirmwareVramReserveInfo[ATOM_MAX_FIRMWARE_VRAM_USAGE_INFO];
3859 }ATOM_VRAM_USAGE_BY_FIRMWARE;
3860
3861
3862 typedef struct _ATOM_FIRMWARE_VRAM_RESERVE_INFO_V1_5
3863 {
3864 ULONG ulStartAddrUsedByFirmware;
3865 USHORT usFirmwareUseInKb;
3866 USHORT usFBUsedByDrvInKb;
3867 }ATOM_FIRMWARE_VRAM_RESERVE_INFO_V1_5;
3868
3869 typedef struct _ATOM_VRAM_USAGE_BY_FIRMWARE_V1_5
3870 {
3871 ATOM_COMMON_TABLE_HEADER sHeader;
3872 ATOM_FIRMWARE_VRAM_RESERVE_INFO_V1_5 asFirmwareVramReserveInfo[ATOM_MAX_FIRMWARE_VRAM_USAGE_INFO];
3873 }ATOM_VRAM_USAGE_BY_FIRMWARE_V1_5;
3874
3875
3876
3877
3878 typedef struct _ATOM_GPIO_PIN_ASSIGNMENT
3879 {
3880 USHORT usGpioPin_AIndex;
3881 UCHAR ucGpioPinBitShift;
3882 UCHAR ucGPIO_ID;
3883 }ATOM_GPIO_PIN_ASSIGNMENT;
3884
3885
3886
3887 #define PP_AC_DC_SWITCH_GPIO_PINID 60
3888
3889 #define VDDC_VRHOT_GPIO_PINID 61
3890
3891 #define VDDC_PCC_GPIO_PINID 62
3892
3893 typedef struct _ATOM_GPIO_PIN_LUT
3894 {
3895 ATOM_COMMON_TABLE_HEADER sHeader;
3896 ATOM_GPIO_PIN_ASSIGNMENT asGPIO_Pin[1];
3897 }ATOM_GPIO_PIN_LUT;
3898
3899
3900
3901
3902 #define GPIO_PIN_ACTIVE_HIGH 0x1
3903
3904 #define MAX_SUPPORTED_CV_STANDARDS 5
3905
3906
3907 #define ATOM_GPIO_SETTINGS_BITSHIFT_MASK 0x1F
3908 #define ATOM_GPIO_SETTINGS_RESERVED_MASK 0x60
3909 #define ATOM_GPIO_SETTINGS_ACTIVE_MASK 0x80
3910
3911 typedef struct _ATOM_GPIO_INFO
3912 {
3913 USHORT usAOffset;
3914 UCHAR ucSettings;
3915 UCHAR ucReserved;
3916 }ATOM_GPIO_INFO;
3917
3918
3919 #define ATOM_CV_RESTRICT_FORMAT_SELECTION 0x2
3920
3921
3922 #define ATOM_GPIO_DEFAULT_MODE_EN 0x80
3923 #define ATOM_GPIO_SETTING_PERMODE_MASK 0x7F
3924
3925
3926
3927 #define ATOM_CV_LINE3_ASPECTRATIO_16_9_GPIO_A 0x01
3928 #define ATOM_CV_LINE3_ASPECTRATIO_16_9_GPIO_B 0x02
3929 #define ATOM_CV_LINE3_ASPECTRATIO_16_9_GPIO_SHIFT 0x0
3930
3931
3932 #define ATOM_CV_LINE3_ASPECTRATIO_4_3_LETBOX_GPIO_A 0x04
3933 #define ATOM_CV_LINE3_ASPECTRATIO_4_3_LETBOX_GPIO_B 0x08
3934 #define ATOM_CV_LINE3_ASPECTRATIO_4_3_LETBOX_GPIO_SHIFT 0x2
3935
3936
3937 #define ATOM_CV_LINE3_ASPECTRATIO_4_3_GPIO_A 0x10
3938 #define ATOM_CV_LINE3_ASPECTRATIO_4_3_GPIO_B 0x20
3939 #define ATOM_CV_LINE3_ASPECTRATIO_4_3_GPIO_SHIFT 0x4
3940
3941 #define ATOM_CV_LINE3_ASPECTRATIO_MASK 0x3F
3942
3943 #define ATOM_CV_LINE3_ASPECTRATIO_EXIST 0x80
3944
3945
3946 #define ATOM_GPIO_INDEX_LINE3_ASPECRATIO_GPIO_A 3
3947 #define ATOM_GPIO_INDEX_LINE3_ASPECRATIO_GPIO_B 4
3948
3949
3950 typedef struct _ATOM_COMPONENT_VIDEO_INFO
3951 {
3952 ATOM_COMMON_TABLE_HEADER sHeader;
3953 USHORT usMask_PinRegisterIndex;
3954 USHORT usEN_PinRegisterIndex;
3955 USHORT usY_PinRegisterIndex;
3956 USHORT usA_PinRegisterIndex;
3957 UCHAR ucBitShift;
3958 UCHAR ucPinActiveState;
3959 ATOM_DTD_FORMAT sReserved;
3960 UCHAR ucMiscInfo;
3961 UCHAR uc480i;
3962 UCHAR uc480p;
3963 UCHAR uc720p;
3964 UCHAR uc1080i;
3965 UCHAR ucLetterBoxMode;
3966 UCHAR ucReserved[3];
3967 UCHAR ucNumOfWbGpioBlocks;
3968 ATOM_GPIO_INFO aWbGpioStateBlock[MAX_SUPPORTED_CV_STANDARDS];
3969 ATOM_DTD_FORMAT aModeTimings[MAX_SUPPORTED_CV_STANDARDS];
3970 }ATOM_COMPONENT_VIDEO_INFO;
3971
3972
3973
3974 typedef struct _ATOM_COMPONENT_VIDEO_INFO_V21
3975 {
3976 ATOM_COMMON_TABLE_HEADER sHeader;
3977 UCHAR ucMiscInfo;
3978 UCHAR uc480i;
3979 UCHAR uc480p;
3980 UCHAR uc720p;
3981 UCHAR uc1080i;
3982 UCHAR ucReserved;
3983 UCHAR ucLetterBoxMode;
3984 UCHAR ucNumOfWbGpioBlocks;
3985 ATOM_GPIO_INFO aWbGpioStateBlock[MAX_SUPPORTED_CV_STANDARDS];
3986 ATOM_DTD_FORMAT aModeTimings[MAX_SUPPORTED_CV_STANDARDS];
3987 }ATOM_COMPONENT_VIDEO_INFO_V21;
3988
3989 #define ATOM_COMPONENT_VIDEO_INFO_LAST ATOM_COMPONENT_VIDEO_INFO_V21
3990
3991
3992
3993
3994 typedef struct _ATOM_OBJECT_HEADER
3995 {
3996 ATOM_COMMON_TABLE_HEADER sHeader;
3997 USHORT usDeviceSupport;
3998 USHORT usConnectorObjectTableOffset;
3999 USHORT usRouterObjectTableOffset;
4000 USHORT usEncoderObjectTableOffset;
4001 USHORT usProtectionObjectTableOffset;
4002 USHORT usDisplayPathTableOffset;
4003 }ATOM_OBJECT_HEADER;
4004
4005 typedef struct _ATOM_OBJECT_HEADER_V3
4006 {
4007 ATOM_COMMON_TABLE_HEADER sHeader;
4008 USHORT usDeviceSupport;
4009 USHORT usConnectorObjectTableOffset;
4010 USHORT usRouterObjectTableOffset;
4011 USHORT usEncoderObjectTableOffset;
4012 USHORT usProtectionObjectTableOffset;
4013 USHORT usDisplayPathTableOffset;
4014 USHORT usMiscObjectTableOffset;
4015 }ATOM_OBJECT_HEADER_V3;
4016
4017 typedef struct _ATOM_DISPLAY_OBJECT_PATH
4018 {
4019 USHORT usDeviceTag;
4020 USHORT usSize;
4021 USHORT usConnObjectId;
4022 USHORT usGPUObjectId;
4023 USHORT usGraphicObjIds[1];
4024 }ATOM_DISPLAY_OBJECT_PATH;
4025
4026 typedef struct _ATOM_DISPLAY_EXTERNAL_OBJECT_PATH
4027 {
4028 USHORT usDeviceTag;
4029 USHORT usSize;
4030 USHORT usConnObjectId;
4031 USHORT usGPUObjectId;
4032 USHORT usGraphicObjIds[2];
4033 }ATOM_DISPLAY_EXTERNAL_OBJECT_PATH;
4034
4035 typedef struct _ATOM_DISPLAY_OBJECT_PATH_TABLE
4036 {
4037 UCHAR ucNumOfDispPath;
4038 UCHAR ucVersion;
4039 UCHAR ucPadding[2];
4040 ATOM_DISPLAY_OBJECT_PATH asDispPath[1];
4041 }ATOM_DISPLAY_OBJECT_PATH_TABLE;
4042
4043
4044 typedef struct _ATOM_OBJECT
4045 {
4046 USHORT usObjectID;
4047 USHORT usSrcDstTableOffset;
4048 USHORT usRecordOffset;
4049 USHORT usReserved;
4050 }ATOM_OBJECT;
4051
4052 typedef struct _ATOM_OBJECT_TABLE
4053 {
4054 UCHAR ucNumberOfObjects;
4055 UCHAR ucPadding[3];
4056 ATOM_OBJECT asObjects[1];
4057 }ATOM_OBJECT_TABLE;
4058
4059 typedef struct _ATOM_SRC_DST_TABLE_FOR_ONE_OBJECT
4060 {
4061 UCHAR ucNumberOfSrc;
4062 USHORT usSrcObjectID[1];
4063 UCHAR ucNumberOfDst;
4064 USHORT usDstObjectID[1];
4065 }ATOM_SRC_DST_TABLE_FOR_ONE_OBJECT;
4066
4067
4068
4069
4070 #define EXT_HPDPIN_LUTINDEX_0 0
4071 #define EXT_HPDPIN_LUTINDEX_1 1
4072 #define EXT_HPDPIN_LUTINDEX_2 2
4073 #define EXT_HPDPIN_LUTINDEX_3 3
4074 #define EXT_HPDPIN_LUTINDEX_4 4
4075 #define EXT_HPDPIN_LUTINDEX_5 5
4076 #define EXT_HPDPIN_LUTINDEX_6 6
4077 #define EXT_HPDPIN_LUTINDEX_7 7
4078 #define MAX_NUMBER_OF_EXT_HPDPIN_LUT_ENTRIES (EXT_HPDPIN_LUTINDEX_7+1)
4079
4080 #define EXT_AUXDDC_LUTINDEX_0 0
4081 #define EXT_AUXDDC_LUTINDEX_1 1
4082 #define EXT_AUXDDC_LUTINDEX_2 2
4083 #define EXT_AUXDDC_LUTINDEX_3 3
4084 #define EXT_AUXDDC_LUTINDEX_4 4
4085 #define EXT_AUXDDC_LUTINDEX_5 5
4086 #define EXT_AUXDDC_LUTINDEX_6 6
4087 #define EXT_AUXDDC_LUTINDEX_7 7
4088 #define MAX_NUMBER_OF_EXT_AUXDDC_LUT_ENTRIES (EXT_AUXDDC_LUTINDEX_7+1)
4089
4090
4091
4092
4093
4094
4095
4096 typedef struct _ATOM_DP_CONN_CHANNEL_MAPPING
4097 {
4098 #if ATOM_BIG_ENDIAN
4099 UCHAR ucDP_Lane3_Source:2;
4100 UCHAR ucDP_Lane2_Source:2;
4101 UCHAR ucDP_Lane1_Source:2;
4102 UCHAR ucDP_Lane0_Source:2;
4103 #else
4104 UCHAR ucDP_Lane0_Source:2;
4105 UCHAR ucDP_Lane1_Source:2;
4106 UCHAR ucDP_Lane2_Source:2;
4107 UCHAR ucDP_Lane3_Source:2;
4108 #endif
4109 }ATOM_DP_CONN_CHANNEL_MAPPING;
4110
4111
4112
4113
4114
4115
4116 typedef struct _ATOM_DVI_CONN_CHANNEL_MAPPING
4117 {
4118 #if ATOM_BIG_ENDIAN
4119 UCHAR ucDVI_CLK_Source:2;
4120 UCHAR ucDVI_DATA0_Source:2;
4121 UCHAR ucDVI_DATA1_Source:2;
4122 UCHAR ucDVI_DATA2_Source:2;
4123 #else
4124 UCHAR ucDVI_DATA2_Source:2;
4125 UCHAR ucDVI_DATA1_Source:2;
4126 UCHAR ucDVI_DATA0_Source:2;
4127 UCHAR ucDVI_CLK_Source:2;
4128 #endif
4129 }ATOM_DVI_CONN_CHANNEL_MAPPING;
4130
4131 typedef struct _EXT_DISPLAY_PATH
4132 {
4133 USHORT usDeviceTag;
4134 USHORT usDeviceACPIEnum;
4135 USHORT usDeviceConnector;
4136 UCHAR ucExtAUXDDCLutIndex;
4137 UCHAR ucExtHPDPINLutIndex;
4138 USHORT usExtEncoderObjId;
4139 union{
4140 UCHAR ucChannelMapping;
4141 ATOM_DP_CONN_CHANNEL_MAPPING asDPMapping;
4142 ATOM_DVI_CONN_CHANNEL_MAPPING asDVIMapping;
4143 };
4144 UCHAR ucChPNInvert;
4145 USHORT usCaps;
4146 USHORT usReserved;
4147 }EXT_DISPLAY_PATH;
4148
4149 #define NUMBER_OF_UCHAR_FOR_GUID 16
4150 #define MAX_NUMBER_OF_EXT_DISPLAY_PATH 7
4151
4152
4153 #define EXT_DISPLAY_PATH_CAPS__HBR2_DISABLE 0x01
4154 #define EXT_DISPLAY_PATH_CAPS__DP_FIXED_VS_EN 0x02
4155
4156 typedef struct _ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO
4157 {
4158 ATOM_COMMON_TABLE_HEADER sHeader;
4159 UCHAR ucGuid [NUMBER_OF_UCHAR_FOR_GUID];
4160 EXT_DISPLAY_PATH sPath[MAX_NUMBER_OF_EXT_DISPLAY_PATH];
4161 UCHAR ucChecksum;
4162 UCHAR uc3DStereoPinId;
4163 UCHAR ucRemoteDisplayConfig;
4164 UCHAR uceDPToLVDSRxId;
4165 UCHAR ucFixDPVoltageSwing;
4166 UCHAR Reserved[3];
4167 }ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO;
4168
4169
4170 typedef struct _ATOM_COMMON_RECORD_HEADER
4171 {
4172 UCHAR ucRecordType;
4173 UCHAR ucRecordSize;
4174 }ATOM_COMMON_RECORD_HEADER;
4175
4176
4177 #define ATOM_I2C_RECORD_TYPE 1
4178 #define ATOM_HPD_INT_RECORD_TYPE 2
4179 #define ATOM_OUTPUT_PROTECTION_RECORD_TYPE 3
4180 #define ATOM_CONNECTOR_DEVICE_TAG_RECORD_TYPE 4
4181 #define ATOM_CONNECTOR_DVI_EXT_INPUT_RECORD_TYPE 5
4182 #define ATOM_ENCODER_FPGA_CONTROL_RECORD_TYPE 6
4183 #define ATOM_CONNECTOR_CVTV_SHARE_DIN_RECORD_TYPE 7
4184 #define ATOM_JTAG_RECORD_TYPE 8
4185 #define ATOM_OBJECT_GPIO_CNTL_RECORD_TYPE 9
4186 #define ATOM_ENCODER_DVO_CF_RECORD_TYPE 10
4187 #define ATOM_CONNECTOR_CF_RECORD_TYPE 11
4188 #define ATOM_CONNECTOR_HARDCODE_DTD_RECORD_TYPE 12
4189 #define ATOM_CONNECTOR_PCIE_SUBCONNECTOR_RECORD_TYPE 13
4190 #define ATOM_ROUTER_DDC_PATH_SELECT_RECORD_TYPE 14
4191 #define ATOM_ROUTER_DATA_CLOCK_PATH_SELECT_RECORD_TYPE 15
4192 #define ATOM_CONNECTOR_HPDPIN_LUT_RECORD_TYPE 16
4193 #define ATOM_CONNECTOR_AUXDDC_LUT_RECORD_TYPE 17
4194 #define ATOM_OBJECT_LINK_RECORD_TYPE 18
4195 #define ATOM_CONNECTOR_REMOTE_CAP_RECORD_TYPE 19
4196 #define ATOM_ENCODER_CAP_RECORD_TYPE 20
4197 #define ATOM_BRACKET_LAYOUT_RECORD_TYPE 21
4198
4199
4200 #define ATOM_MAX_OBJECT_RECORD_NUMBER ATOM_BRACKET_LAYOUT_RECORD_TYPE
4201
4202 typedef struct _ATOM_I2C_RECORD
4203 {
4204 ATOM_COMMON_RECORD_HEADER sheader;
4205 ATOM_I2C_ID_CONFIG sucI2cId;
4206 UCHAR ucI2CAddr;
4207 }ATOM_I2C_RECORD;
4208
4209 typedef struct _ATOM_HPD_INT_RECORD
4210 {
4211 ATOM_COMMON_RECORD_HEADER sheader;
4212 UCHAR ucHPDIntGPIOID;
4213 UCHAR ucPlugged_PinState;
4214 }ATOM_HPD_INT_RECORD;
4215
4216
4217 typedef struct _ATOM_OUTPUT_PROTECTION_RECORD
4218 {
4219 ATOM_COMMON_RECORD_HEADER sheader;
4220 UCHAR ucProtectionFlag;
4221 UCHAR ucReserved;
4222 }ATOM_OUTPUT_PROTECTION_RECORD;
4223
4224 typedef struct _ATOM_CONNECTOR_DEVICE_TAG
4225 {
4226 ULONG ulACPIDeviceEnum;
4227 USHORT usDeviceID;
4228 USHORT usPadding;
4229 }ATOM_CONNECTOR_DEVICE_TAG;
4230
4231 typedef struct _ATOM_CONNECTOR_DEVICE_TAG_RECORD
4232 {
4233 ATOM_COMMON_RECORD_HEADER sheader;
4234 UCHAR ucNumberOfDevice;
4235 UCHAR ucReserved;
4236 ATOM_CONNECTOR_DEVICE_TAG asDeviceTag[1];
4237 }ATOM_CONNECTOR_DEVICE_TAG_RECORD;
4238
4239
4240 typedef struct _ATOM_CONNECTOR_DVI_EXT_INPUT_RECORD
4241 {
4242 ATOM_COMMON_RECORD_HEADER sheader;
4243 UCHAR ucConfigGPIOID;
4244 UCHAR ucConfigGPIOState;
4245 UCHAR ucFlowinGPIPID;
4246 UCHAR ucExtInGPIPID;
4247 }ATOM_CONNECTOR_DVI_EXT_INPUT_RECORD;
4248
4249 typedef struct _ATOM_ENCODER_FPGA_CONTROL_RECORD
4250 {
4251 ATOM_COMMON_RECORD_HEADER sheader;
4252 UCHAR ucCTL1GPIO_ID;
4253 UCHAR ucCTL1GPIOState;
4254 UCHAR ucCTL2GPIO_ID;
4255 UCHAR ucCTL2GPIOState;
4256 UCHAR ucCTL3GPIO_ID;
4257 UCHAR ucCTL3GPIOState;
4258 UCHAR ucCTLFPGA_IN_ID;
4259 UCHAR ucPadding[3];
4260 }ATOM_ENCODER_FPGA_CONTROL_RECORD;
4261
4262 typedef struct _ATOM_CONNECTOR_CVTV_SHARE_DIN_RECORD
4263 {
4264 ATOM_COMMON_RECORD_HEADER sheader;
4265 UCHAR ucGPIOID;
4266 UCHAR ucTVActiveState;
4267 }ATOM_CONNECTOR_CVTV_SHARE_DIN_RECORD;
4268
4269 typedef struct _ATOM_JTAG_RECORD
4270 {
4271 ATOM_COMMON_RECORD_HEADER sheader;
4272 UCHAR ucTMSGPIO_ID;
4273 UCHAR ucTMSGPIOState;
4274 UCHAR ucTCKGPIO_ID;
4275 UCHAR ucTCKGPIOState;
4276 UCHAR ucTDOGPIO_ID;
4277 UCHAR ucTDOGPIOState;
4278 UCHAR ucTDIGPIO_ID;
4279 UCHAR ucTDIGPIOState;
4280 UCHAR ucPadding[2];
4281 }ATOM_JTAG_RECORD;
4282
4283
4284
4285 typedef struct _ATOM_GPIO_PIN_CONTROL_PAIR
4286 {
4287 UCHAR ucGPIOID;
4288 UCHAR ucGPIO_PinState;
4289 }ATOM_GPIO_PIN_CONTROL_PAIR;
4290
4291 typedef struct _ATOM_OBJECT_GPIO_CNTL_RECORD
4292 {
4293 ATOM_COMMON_RECORD_HEADER sheader;
4294 UCHAR ucFlags;
4295 UCHAR ucNumberOfPins;
4296 ATOM_GPIO_PIN_CONTROL_PAIR asGpio[1];
4297 }ATOM_OBJECT_GPIO_CNTL_RECORD;
4298
4299
4300 #define GPIO_PIN_TYPE_INPUT 0x00
4301 #define GPIO_PIN_TYPE_OUTPUT 0x10
4302 #define GPIO_PIN_TYPE_HW_CONTROL 0x20
4303
4304
4305 #define GPIO_PIN_OUTPUT_STATE_MASK 0x01
4306 #define GPIO_PIN_OUTPUT_STATE_SHIFT 0
4307 #define GPIO_PIN_STATE_ACTIVE_LOW 0x0
4308 #define GPIO_PIN_STATE_ACTIVE_HIGH 0x1
4309
4310
4311
4312 #define ATOM_GPIO_INDEX_GLSYNC_REFCLK 0
4313 #define ATOM_GPIO_INDEX_GLSYNC_HSYNC 1
4314 #define ATOM_GPIO_INDEX_GLSYNC_VSYNC 2
4315 #define ATOM_GPIO_INDEX_GLSYNC_SWAP_REQ 3
4316 #define ATOM_GPIO_INDEX_GLSYNC_SWAP_GNT 4
4317 #define ATOM_GPIO_INDEX_GLSYNC_INTERRUPT 5
4318 #define ATOM_GPIO_INDEX_GLSYNC_V_RESET 6
4319 #define ATOM_GPIO_INDEX_GLSYNC_SWAP_CNTL 7
4320 #define ATOM_GPIO_INDEX_GLSYNC_SWAP_SEL 8
4321 #define ATOM_GPIO_INDEX_GLSYNC_MAX 9
4322
4323 typedef struct _ATOM_ENCODER_DVO_CF_RECORD
4324 {
4325 ATOM_COMMON_RECORD_HEADER sheader;
4326 ULONG ulStrengthControl;
4327 UCHAR ucPadding[2];
4328 }ATOM_ENCODER_DVO_CF_RECORD;
4329
4330
4331 #define ATOM_ENCODER_CAP_RECORD_HBR2 0x01
4332 #define ATOM_ENCODER_CAP_RECORD_HBR2_EN 0x02
4333
4334 typedef struct _ATOM_ENCODER_CAP_RECORD
4335 {
4336 ATOM_COMMON_RECORD_HEADER sheader;
4337 union {
4338 USHORT usEncoderCap;
4339 struct {
4340 #if ATOM_BIG_ENDIAN
4341 USHORT usReserved:14;
4342 USHORT usHBR2En:1;
4343 USHORT usHBR2Cap:1;
4344 #else
4345 USHORT usHBR2Cap:1;
4346 USHORT usHBR2En:1;
4347 USHORT usReserved:14;
4348 #endif
4349 };
4350 };
4351 }ATOM_ENCODER_CAP_RECORD;
4352
4353
4354 #define ATOM_CONNECTOR_CF_RECORD_CONNECTED_UPPER12BITBUNDLEA 1
4355 #define ATOM_CONNECTOR_CF_RECORD_CONNECTED_LOWER12BITBUNDLEB 2
4356
4357 typedef struct _ATOM_CONNECTOR_CF_RECORD
4358 {
4359 ATOM_COMMON_RECORD_HEADER sheader;
4360 USHORT usMaxPixClk;
4361 UCHAR ucFlowCntlGpioId;
4362 UCHAR ucSwapCntlGpioId;
4363 UCHAR ucConnectedDvoBundle;
4364 UCHAR ucPadding;
4365 }ATOM_CONNECTOR_CF_RECORD;
4366
4367 typedef struct _ATOM_CONNECTOR_HARDCODE_DTD_RECORD
4368 {
4369 ATOM_COMMON_RECORD_HEADER sheader;
4370 ATOM_DTD_FORMAT asTiming;
4371 }ATOM_CONNECTOR_HARDCODE_DTD_RECORD;
4372
4373 typedef struct _ATOM_CONNECTOR_PCIE_SUBCONNECTOR_RECORD
4374 {
4375 ATOM_COMMON_RECORD_HEADER sheader;
4376 UCHAR ucSubConnectorType;
4377 UCHAR ucReserved;
4378 }ATOM_CONNECTOR_PCIE_SUBCONNECTOR_RECORD;
4379
4380
4381 typedef struct _ATOM_ROUTER_DDC_PATH_SELECT_RECORD
4382 {
4383 ATOM_COMMON_RECORD_HEADER sheader;
4384 UCHAR ucMuxType;
4385 UCHAR ucMuxControlPin;
4386 UCHAR ucMuxState[2];
4387 }ATOM_ROUTER_DDC_PATH_SELECT_RECORD;
4388
4389 typedef struct _ATOM_ROUTER_DATA_CLOCK_PATH_SELECT_RECORD
4390 {
4391 ATOM_COMMON_RECORD_HEADER sheader;
4392 UCHAR ucMuxType;
4393 UCHAR ucMuxControlPin;
4394 UCHAR ucMuxState[2];
4395 }ATOM_ROUTER_DATA_CLOCK_PATH_SELECT_RECORD;
4396
4397
4398 #define ATOM_ROUTER_MUX_PIN_STATE_MASK 0x0f
4399 #define ATOM_ROUTER_MUX_PIN_SINGLE_STATE_COMPLEMENT 0x01
4400
4401 typedef struct _ATOM_CONNECTOR_HPDPIN_LUT_RECORD
4402 {
4403 ATOM_COMMON_RECORD_HEADER sheader;
4404 UCHAR ucHPDPINMap[MAX_NUMBER_OF_EXT_HPDPIN_LUT_ENTRIES];
4405 }ATOM_CONNECTOR_HPDPIN_LUT_RECORD;
4406
4407 typedef struct _ATOM_CONNECTOR_AUXDDC_LUT_RECORD
4408 {
4409 ATOM_COMMON_RECORD_HEADER sheader;
4410 ATOM_I2C_ID_CONFIG ucAUXDDCMap[MAX_NUMBER_OF_EXT_AUXDDC_LUT_ENTRIES];
4411 }ATOM_CONNECTOR_AUXDDC_LUT_RECORD;
4412
4413 typedef struct _ATOM_OBJECT_LINK_RECORD
4414 {
4415 ATOM_COMMON_RECORD_HEADER sheader;
4416 USHORT usObjectID;
4417 }ATOM_OBJECT_LINK_RECORD;
4418
4419 typedef struct _ATOM_CONNECTOR_REMOTE_CAP_RECORD
4420 {
4421 ATOM_COMMON_RECORD_HEADER sheader;
4422 USHORT usReserved;
4423 }ATOM_CONNECTOR_REMOTE_CAP_RECORD;
4424
4425 typedef struct _ATOM_CONNECTOR_LAYOUT_INFO
4426 {
4427 USHORT usConnectorObjectId;
4428 UCHAR ucConnectorType;
4429 UCHAR ucPosition;
4430 }ATOM_CONNECTOR_LAYOUT_INFO;
4431
4432
4433 #define CONNECTOR_TYPE_DVI_D 1
4434 #define CONNECTOR_TYPE_DVI_I 2
4435 #define CONNECTOR_TYPE_VGA 3
4436 #define CONNECTOR_TYPE_HDMI 4
4437 #define CONNECTOR_TYPE_DISPLAY_PORT 5
4438 #define CONNECTOR_TYPE_MINI_DISPLAY_PORT 6
4439
4440 typedef struct _ATOM_BRACKET_LAYOUT_RECORD
4441 {
4442 ATOM_COMMON_RECORD_HEADER sheader;
4443 UCHAR ucLength;
4444 UCHAR ucWidth;
4445 UCHAR ucConnNum;
4446 UCHAR ucReserved;
4447 ATOM_CONNECTOR_LAYOUT_INFO asConnInfo[1];
4448 }ATOM_BRACKET_LAYOUT_RECORD;
4449
4450
4451
4452
4453 typedef struct _ATOM_VOLTAGE_INFO_HEADER
4454 {
4455 USHORT usVDDCBaseLevel;
4456 USHORT usReserved;
4457 UCHAR ucNumOfVoltageEntries;
4458 UCHAR ucBytesPerVoltageEntry;
4459 UCHAR ucVoltageStep;
4460 UCHAR ucDefaultVoltageEntry;
4461 UCHAR ucVoltageControlI2cLine;
4462 UCHAR ucVoltageControlAddress;
4463 UCHAR ucVoltageControlOffset;
4464 }ATOM_VOLTAGE_INFO_HEADER;
4465
4466 typedef struct _ATOM_VOLTAGE_INFO
4467 {
4468 ATOM_COMMON_TABLE_HEADER sHeader;
4469 ATOM_VOLTAGE_INFO_HEADER viHeader;
4470 UCHAR ucVoltageEntries[64];
4471 }ATOM_VOLTAGE_INFO;
4472
4473
4474 typedef struct _ATOM_VOLTAGE_FORMULA
4475 {
4476 USHORT usVoltageBaseLevel;
4477 USHORT usVoltageStep;
4478 UCHAR ucNumOfVoltageEntries;
4479 UCHAR ucFlag;
4480 UCHAR ucBaseVID;
4481 UCHAR ucReserved;
4482 UCHAR ucVIDAdjustEntries[32];
4483 }ATOM_VOLTAGE_FORMULA;
4484
4485 typedef struct _VOLTAGE_LUT_ENTRY
4486 {
4487 USHORT usVoltageCode;
4488 USHORT usVoltageValue;
4489 }VOLTAGE_LUT_ENTRY;
4490
4491 typedef struct _ATOM_VOLTAGE_FORMULA_V2
4492 {
4493 UCHAR ucNumOfVoltageEntries;
4494 UCHAR ucReserved[3];
4495 VOLTAGE_LUT_ENTRY asVIDAdjustEntries[32];
4496 }ATOM_VOLTAGE_FORMULA_V2;
4497
4498 typedef struct _ATOM_VOLTAGE_CONTROL
4499 {
4500 UCHAR ucVoltageControlId;
4501 UCHAR ucVoltageControlI2cLine;
4502 UCHAR ucVoltageControlAddress;
4503 UCHAR ucVoltageControlOffset;
4504 USHORT usGpioPin_AIndex;
4505 UCHAR ucGpioPinBitShift[9];
4506 UCHAR ucReserved;
4507 }ATOM_VOLTAGE_CONTROL;
4508
4509
4510 #define VOLTAGE_CONTROLLED_BY_HW 0x00
4511 #define VOLTAGE_CONTROLLED_BY_I2C_MASK 0x7F
4512 #define VOLTAGE_CONTROLLED_BY_GPIO 0x80
4513 #define VOLTAGE_CONTROL_ID_LM64 0x01
4514 #define VOLTAGE_CONTROL_ID_DAC 0x02
4515 #define VOLTAGE_CONTROL_ID_VT116xM 0x03
4516 #define VOLTAGE_CONTROL_ID_DS4402 0x04
4517 #define VOLTAGE_CONTROL_ID_UP6266 0x05
4518 #define VOLTAGE_CONTROL_ID_SCORPIO 0x06
4519 #define VOLTAGE_CONTROL_ID_VT1556M 0x07
4520 #define VOLTAGE_CONTROL_ID_CHL822x 0x08
4521 #define VOLTAGE_CONTROL_ID_VT1586M 0x09
4522 #define VOLTAGE_CONTROL_ID_UP1637 0x0A
4523 #define VOLTAGE_CONTROL_ID_CHL8214 0x0B
4524 #define VOLTAGE_CONTROL_ID_UP1801 0x0C
4525 #define VOLTAGE_CONTROL_ID_ST6788A 0x0D
4526 #define VOLTAGE_CONTROL_ID_CHLIR3564SVI2 0x0E
4527 #define VOLTAGE_CONTROL_ID_AD527x 0x0F
4528 #define VOLTAGE_CONTROL_ID_NCP81022 0x10
4529 #define VOLTAGE_CONTROL_ID_LTC2635 0x11
4530
4531 typedef struct _ATOM_VOLTAGE_OBJECT
4532 {
4533 UCHAR ucVoltageType;
4534 UCHAR ucSize;
4535 ATOM_VOLTAGE_CONTROL asControl;
4536 ATOM_VOLTAGE_FORMULA asFormula;
4537 }ATOM_VOLTAGE_OBJECT;
4538
4539 typedef struct _ATOM_VOLTAGE_OBJECT_V2
4540 {
4541 UCHAR ucVoltageType;
4542 UCHAR ucSize;
4543 ATOM_VOLTAGE_CONTROL asControl;
4544 ATOM_VOLTAGE_FORMULA_V2 asFormula;
4545 }ATOM_VOLTAGE_OBJECT_V2;
4546
4547 typedef struct _ATOM_VOLTAGE_OBJECT_INFO
4548 {
4549 ATOM_COMMON_TABLE_HEADER sHeader;
4550 ATOM_VOLTAGE_OBJECT asVoltageObj[3];
4551 }ATOM_VOLTAGE_OBJECT_INFO;
4552
4553 typedef struct _ATOM_VOLTAGE_OBJECT_INFO_V2
4554 {
4555 ATOM_COMMON_TABLE_HEADER sHeader;
4556 ATOM_VOLTAGE_OBJECT_V2 asVoltageObj[3];
4557 }ATOM_VOLTAGE_OBJECT_INFO_V2;
4558
4559 typedef struct _ATOM_LEAKID_VOLTAGE
4560 {
4561 UCHAR ucLeakageId;
4562 UCHAR ucReserved;
4563 USHORT usVoltage;
4564 }ATOM_LEAKID_VOLTAGE;
4565
4566 typedef struct _ATOM_VOLTAGE_OBJECT_HEADER_V3{
4567 UCHAR ucVoltageType;
4568 UCHAR ucVoltageMode;
4569 USHORT usSize;
4570 }ATOM_VOLTAGE_OBJECT_HEADER_V3;
4571
4572
4573 #define VOLTAGE_OBJ_GPIO_LUT 0
4574 #define VOLTAGE_OBJ_VR_I2C_INIT_SEQ 3
4575 #define VOLTAGE_OBJ_PHASE_LUT 4
4576 #define VOLTAGE_OBJ_SVID2 7
4577 #define VOLTAGE_OBJ_EVV 8
4578 #define VOLTAGE_OBJ_PWRBOOST_LEAKAGE_LUT 0x10
4579 #define VOLTAGE_OBJ_HIGH_STATE_LEAKAGE_LUT 0x11
4580 #define VOLTAGE_OBJ_HIGH1_STATE_LEAKAGE_LUT 0x12
4581
4582 typedef struct _VOLTAGE_LUT_ENTRY_V2
4583 {
4584 ULONG ulVoltageId;
4585 USHORT usVoltageValue;
4586 }VOLTAGE_LUT_ENTRY_V2;
4587
4588 typedef struct _LEAKAGE_VOLTAGE_LUT_ENTRY_V2
4589 {
4590 USHORT usVoltageLevel;
4591 USHORT usVoltageId;
4592 USHORT usLeakageId;
4593 }LEAKAGE_VOLTAGE_LUT_ENTRY_V2;
4594
4595 typedef struct _ATOM_I2C_VOLTAGE_OBJECT_V3
4596 {
4597 ATOM_VOLTAGE_OBJECT_HEADER_V3 sHeader;
4598 UCHAR ucVoltageRegulatorId;
4599 UCHAR ucVoltageControlI2cLine;
4600 UCHAR ucVoltageControlAddress;
4601 UCHAR ucVoltageControlOffset;
4602 ULONG ulReserved;
4603 VOLTAGE_LUT_ENTRY asVolI2cLut[1];
4604 }ATOM_I2C_VOLTAGE_OBJECT_V3;
4605
4606
4607 #define VOLTAGE_DATA_ONE_BYTE 0
4608 #define VOLTAGE_DATA_TWO_BYTE 1
4609
4610 typedef struct _ATOM_GPIO_VOLTAGE_OBJECT_V3
4611 {
4612 ATOM_VOLTAGE_OBJECT_HEADER_V3 sHeader;
4613 UCHAR ucVoltageGpioCntlId;
4614 UCHAR ucGpioEntryNum;
4615 UCHAR ucPhaseDelay;
4616 UCHAR ucReserved;
4617 ULONG ulGpioMaskVal;
4618 VOLTAGE_LUT_ENTRY_V2 asVolGpioLut[1];
4619 }ATOM_GPIO_VOLTAGE_OBJECT_V3;
4620
4621 typedef struct _ATOM_LEAKAGE_VOLTAGE_OBJECT_V3
4622 {
4623 ATOM_VOLTAGE_OBJECT_HEADER_V3 sHeader;
4624 UCHAR ucLeakageCntlId;
4625 UCHAR ucLeakageEntryNum;
4626 UCHAR ucReserved[2];
4627 ULONG ulMaxVoltageLevel;
4628 LEAKAGE_VOLTAGE_LUT_ENTRY_V2 asLeakageIdLut[1];
4629 }ATOM_LEAKAGE_VOLTAGE_OBJECT_V3;
4630
4631
4632 typedef struct _ATOM_SVID2_VOLTAGE_OBJECT_V3
4633 {
4634 ATOM_VOLTAGE_OBJECT_HEADER_V3 sHeader;
4635
4636
4637
4638
4639
4640 USHORT usLoadLine_PSI;
4641
4642 UCHAR ucSVDGpioId;
4643 UCHAR ucSVCGpioId;
4644 ULONG ulReserved;
4645 }ATOM_SVID2_VOLTAGE_OBJECT_V3;
4646
4647 typedef union _ATOM_VOLTAGE_OBJECT_V3{
4648 ATOM_GPIO_VOLTAGE_OBJECT_V3 asGpioVoltageObj;
4649 ATOM_I2C_VOLTAGE_OBJECT_V3 asI2cVoltageObj;
4650 ATOM_LEAKAGE_VOLTAGE_OBJECT_V3 asLeakageObj;
4651 ATOM_SVID2_VOLTAGE_OBJECT_V3 asSVID2Obj;
4652 }ATOM_VOLTAGE_OBJECT_V3;
4653
4654 typedef struct _ATOM_VOLTAGE_OBJECT_INFO_V3_1
4655 {
4656 ATOM_COMMON_TABLE_HEADER sHeader;
4657 ATOM_VOLTAGE_OBJECT_V3 asVoltageObj[3];
4658 }ATOM_VOLTAGE_OBJECT_INFO_V3_1;
4659
4660 typedef struct _ATOM_ASIC_PROFILE_VOLTAGE
4661 {
4662 UCHAR ucProfileId;
4663 UCHAR ucReserved;
4664 USHORT usSize;
4665 USHORT usEfuseSpareStartAddr;
4666 USHORT usFuseIndex[8];
4667 ATOM_LEAKID_VOLTAGE asLeakVol[2];
4668 }ATOM_ASIC_PROFILE_VOLTAGE;
4669
4670
4671 #define ATOM_ASIC_PROFILE_ID_EFUSE_VOLTAGE 1
4672 #define ATOM_ASIC_PROFILE_ID_EFUSE_PERFORMANCE_VOLTAGE 1
4673 #define ATOM_ASIC_PROFILE_ID_EFUSE_THERMAL_VOLTAGE 2
4674
4675 typedef struct _ATOM_ASIC_PROFILING_INFO
4676 {
4677 ATOM_COMMON_TABLE_HEADER asHeader;
4678 ATOM_ASIC_PROFILE_VOLTAGE asVoltage;
4679 }ATOM_ASIC_PROFILING_INFO;
4680
4681 typedef struct _ATOM_ASIC_PROFILING_INFO_V2_1
4682 {
4683 ATOM_COMMON_TABLE_HEADER asHeader;
4684 UCHAR ucLeakageBinNum;
4685 USHORT usLeakageBinArrayOffset;
4686
4687 UCHAR ucElbVDDC_Num;
4688 USHORT usElbVDDC_IdArrayOffset;
4689 USHORT usElbVDDC_LevelArrayOffset;
4690
4691 UCHAR ucElbVDDCI_Num;
4692 USHORT usElbVDDCI_IdArrayOffset;
4693 USHORT usElbVDDCI_LevelArrayOffset;
4694 }ATOM_ASIC_PROFILING_INFO_V2_1;
4695
4696 typedef struct _ATOM_ASIC_PROFILING_INFO_V3_1
4697 {
4698 ATOM_COMMON_TABLE_HEADER asHeader;
4699 ULONG ulEvvDerateTdp;
4700 ULONG ulEvvDerateTdc;
4701 ULONG ulBoardCoreTemp;
4702 ULONG ulMaxVddc;
4703 ULONG ulMinVddc;
4704 ULONG ulLoadLineSlop;
4705 ULONG ulLeakageTemp;
4706 ULONG ulLeakageVoltage;
4707 ULONG ulCACmEncodeRange;
4708 ULONG ulCACmEncodeAverage;
4709 ULONG ulCACbEncodeRange;
4710 ULONG ulCACbEncodeAverage;
4711 ULONG ulKt_bEncodeRange;
4712 ULONG ulKt_bEncodeAverage;
4713 ULONG ulKv_mEncodeRange;
4714 ULONG ulKv_mEncodeAverage;
4715 ULONG ulKv_bEncodeRange;
4716 ULONG ulKv_bEncodeAverage;
4717 ULONG ulLkgEncodeLn_MaxDivMin;
4718 ULONG ulLkgEncodeMin;
4719 ULONG ulEfuseLogisticAlpha;
4720 USHORT usPowerDpm0;
4721 USHORT usCurrentDpm0;
4722 USHORT usPowerDpm1;
4723 USHORT usCurrentDpm1;
4724 USHORT usPowerDpm2;
4725 USHORT usCurrentDpm2;
4726 USHORT usPowerDpm3;
4727 USHORT usCurrentDpm3;
4728 USHORT usPowerDpm4;
4729 USHORT usCurrentDpm4;
4730 USHORT usPowerDpm5;
4731 USHORT usCurrentDpm5;
4732 USHORT usPowerDpm6;
4733 USHORT usCurrentDpm6;
4734 USHORT usPowerDpm7;
4735 USHORT usCurrentDpm7;
4736 }ATOM_ASIC_PROFILING_INFO_V3_1;
4737
4738
4739 typedef struct _ATOM_POWER_SOURCE_OBJECT
4740 {
4741 UCHAR ucPwrSrcId;
4742 UCHAR ucPwrSensorType;
4743 UCHAR ucPwrSensId;
4744 UCHAR ucPwrSensSlaveAddr;
4745 UCHAR ucPwrSensRegIndex;
4746 UCHAR ucPwrSensRegBitMask;
4747 UCHAR ucPwrSensActiveState;
4748 UCHAR ucReserve[3];
4749 USHORT usSensPwr;
4750 }ATOM_POWER_SOURCE_OBJECT;
4751
4752 typedef struct _ATOM_POWER_SOURCE_INFO
4753 {
4754 ATOM_COMMON_TABLE_HEADER asHeader;
4755 UCHAR asPwrbehave[16];
4756 ATOM_POWER_SOURCE_OBJECT asPwrObj[1];
4757 }ATOM_POWER_SOURCE_INFO;
4758
4759
4760
4761 #define POWERSOURCE_PCIE_ID1 0x00
4762 #define POWERSOURCE_6PIN_CONNECTOR_ID1 0x01
4763 #define POWERSOURCE_8PIN_CONNECTOR_ID1 0x02
4764 #define POWERSOURCE_6PIN_CONNECTOR_ID2 0x04
4765 #define POWERSOURCE_8PIN_CONNECTOR_ID2 0x08
4766
4767
4768 #define POWER_SENSOR_ALWAYS 0x00
4769 #define POWER_SENSOR_GPIO 0x01
4770 #define POWER_SENSOR_I2C 0x02
4771
4772 typedef struct _ATOM_CLK_VOLT_CAPABILITY
4773 {
4774 ULONG ulVoltageIndex;
4775 ULONG ulMaximumSupportedCLK;
4776 }ATOM_CLK_VOLT_CAPABILITY;
4777
4778 typedef struct _ATOM_AVAILABLE_SCLK_LIST
4779 {
4780 ULONG ulSupportedSCLK;
4781 USHORT usVoltageIndex;
4782 USHORT usVoltageID;
4783 }ATOM_AVAILABLE_SCLK_LIST;
4784
4785
4786 #define ATOM_IGP_INFO_V6_SYSTEM_CONFIG__PCIE_POWER_GATING_ENABLE 1
4787
4788
4789 typedef struct _ATOM_INTEGRATED_SYSTEM_INFO_V6
4790 {
4791 ATOM_COMMON_TABLE_HEADER sHeader;
4792 ULONG ulBootUpEngineClock;
4793 ULONG ulDentistVCOFreq;
4794 ULONG ulBootUpUMAClock;
4795 ATOM_CLK_VOLT_CAPABILITY sDISPCLK_Voltage[4];
4796 ULONG ulBootUpReqDisplayVector;
4797 ULONG ulOtherDisplayMisc;
4798 ULONG ulGPUCapInfo;
4799 ULONG ulSB_MMIO_Base_Addr;
4800 USHORT usRequestedPWMFreqInHz;
4801 UCHAR ucHtcTmpLmt;
4802 UCHAR ucHtcHystLmt;
4803 ULONG ulMinEngineClock;
4804 ULONG ulSystemConfig;
4805 ULONG ulCPUCapInfo;
4806 USHORT usNBP0Voltage;
4807 USHORT usNBP1Voltage;
4808 USHORT usBootUpNBVoltage;
4809 USHORT usExtDispConnInfoOffset;
4810 USHORT usPanelRefreshRateRange;
4811 UCHAR ucMemoryType;
4812 UCHAR ucUMAChannelNumber;
4813 ULONG ulCSR_M3_ARB_CNTL_DEFAULT[10];
4814 ULONG ulCSR_M3_ARB_CNTL_UVD[10];
4815 ULONG ulCSR_M3_ARB_CNTL_FS3D[10];
4816 ATOM_AVAILABLE_SCLK_LIST sAvail_SCLK[5];
4817 ULONG ulGMCRestoreResetTime;
4818 ULONG ulMinimumNClk;
4819 ULONG ulIdleNClk;
4820 ULONG ulDDR_DLL_PowerUpTime;
4821 ULONG ulDDR_PLL_PowerUpTime;
4822 USHORT usPCIEClkSSPercentage;
4823 USHORT usPCIEClkSSType;
4824 USHORT usLvdsSSPercentage;
4825 USHORT usLvdsSSpreadRateIn10Hz;
4826 USHORT usHDMISSPercentage;
4827 USHORT usHDMISSpreadRateIn10Hz;
4828 USHORT usDVISSPercentage;
4829 USHORT usDVISSpreadRateIn10Hz;
4830 ULONG SclkDpmBoostMargin;
4831 ULONG SclkDpmThrottleMargin;
4832 USHORT SclkDpmTdpLimitPG;
4833 USHORT SclkDpmTdpLimitBoost;
4834 ULONG ulBoostEngineCLock;
4835 UCHAR ulBoostVid_2bit;
4836 UCHAR EnableBoost;
4837 USHORT GnbTdpLimit;
4838 USHORT usMaxLVDSPclkFreqInSingleLink;
4839 UCHAR ucLvdsMisc;
4840 UCHAR ucLVDSReserved;
4841 ULONG ulReserved3[15];
4842 ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO sExtDispConnInfo;
4843 }ATOM_INTEGRATED_SYSTEM_INFO_V6;
4844
4845
4846 #define INTEGRATED_SYSTEM_INFO_V6_GPUCAPINFO__TMDSHDMI_COHERENT_SINGLEPLL_MODE 0x01
4847 #define INTEGRATED_SYSTEM_INFO_V6_GPUCAPINFO__DISABLE_AUX_HW_MODE_DETECTION 0x08
4848
4849
4850 #define SYS_INFO_LVDSMISC__888_FPDI_MODE 0x01
4851 #define SYS_INFO_LVDSMISC__DL_CH_SWAP 0x02
4852 #define SYS_INFO_LVDSMISC__888_BPC 0x04
4853 #define SYS_INFO_LVDSMISC__OVERRIDE_EN 0x08
4854 #define SYS_INFO_LVDSMISC__BLON_ACTIVE_LOW 0x10
4855
4856 #define SYS_INFO_LVDSMISC__TRAVIS_LVDS_VOL_OVERRIDE_EN 0x20
4857
4858
4859 #define SYS_INFO_LVDSMISC__VSYNC_ACTIVE_LOW 0x04
4860 #define SYS_INFO_LVDSMISC__HSYNC_ACTIVE_LOW 0x08
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952 typedef struct _ATOM_FUSION_SYSTEM_INFO_V1
4953 {
4954 ATOM_INTEGRATED_SYSTEM_INFO_V6 sIntegratedSysInfo;
4955 ULONG ulPowerplayTable[128];
4956 }ATOM_FUSION_SYSTEM_INFO_V1;
4957
4958
4959 typedef struct _ATOM_TDP_CONFIG_BITS
4960 {
4961 #if ATOM_BIG_ENDIAN
4962 ULONG uReserved:2;
4963 ULONG uTDP_Value:14;
4964 ULONG uCTDP_Value:14;
4965 ULONG uCTDP_Enable:2;
4966 #else
4967 ULONG uCTDP_Enable:2;
4968 ULONG uCTDP_Value:14;
4969 ULONG uTDP_Value:14;
4970 ULONG uReserved:2;
4971 #endif
4972 }ATOM_TDP_CONFIG_BITS;
4973
4974 typedef union _ATOM_TDP_CONFIG
4975 {
4976 ATOM_TDP_CONFIG_BITS TDP_config;
4977 ULONG TDP_config_all;
4978 }ATOM_TDP_CONFIG;
4979
4980
4981
4982
4983
4984
4985
4986
4987 typedef struct _ATOM_INTEGRATED_SYSTEM_INFO_V1_7
4988 {
4989 ATOM_COMMON_TABLE_HEADER sHeader;
4990 ULONG ulBootUpEngineClock;
4991 ULONG ulDentistVCOFreq;
4992 ULONG ulBootUpUMAClock;
4993 ATOM_CLK_VOLT_CAPABILITY sDISPCLK_Voltage[4];
4994 ULONG ulBootUpReqDisplayVector;
4995 ULONG ulOtherDisplayMisc;
4996 ULONG ulGPUCapInfo;
4997 ULONG ulSB_MMIO_Base_Addr;
4998 USHORT usRequestedPWMFreqInHz;
4999 UCHAR ucHtcTmpLmt;
5000 UCHAR ucHtcHystLmt;
5001 ULONG ulMinEngineClock;
5002 ULONG ulSystemConfig;
5003 ULONG ulCPUCapInfo;
5004 USHORT usNBP0Voltage;
5005 USHORT usNBP1Voltage;
5006 USHORT usBootUpNBVoltage;
5007 USHORT usExtDispConnInfoOffset;
5008 USHORT usPanelRefreshRateRange;
5009 UCHAR ucMemoryType;
5010 UCHAR ucUMAChannelNumber;
5011 UCHAR strVBIOSMsg[40];
5012 ATOM_TDP_CONFIG asTdpConfig;
5013 ULONG ulReserved[19];
5014 ATOM_AVAILABLE_SCLK_LIST sAvail_SCLK[5];
5015 ULONG ulGMCRestoreResetTime;
5016 ULONG ulMinimumNClk;
5017 ULONG ulIdleNClk;
5018 ULONG ulDDR_DLL_PowerUpTime;
5019 ULONG ulDDR_PLL_PowerUpTime;
5020 USHORT usPCIEClkSSPercentage;
5021 USHORT usPCIEClkSSType;
5022 USHORT usLvdsSSPercentage;
5023 USHORT usLvdsSSpreadRateIn10Hz;
5024 USHORT usHDMISSPercentage;
5025 USHORT usHDMISSpreadRateIn10Hz;
5026 USHORT usDVISSPercentage;
5027 USHORT usDVISSpreadRateIn10Hz;
5028 ULONG SclkDpmBoostMargin;
5029 ULONG SclkDpmThrottleMargin;
5030 USHORT SclkDpmTdpLimitPG;
5031 USHORT SclkDpmTdpLimitBoost;
5032 ULONG ulBoostEngineCLock;
5033 UCHAR ulBoostVid_2bit;
5034 UCHAR EnableBoost;
5035 USHORT GnbTdpLimit;
5036 USHORT usMaxLVDSPclkFreqInSingleLink;
5037 UCHAR ucLvdsMisc;
5038 UCHAR ucTravisLVDSVolAdjust;
5039 UCHAR ucLVDSPwrOnSeqDIGONtoDE_in4Ms;
5040 UCHAR ucLVDSPwrOnSeqDEtoVARY_BL_in4Ms;
5041 UCHAR ucLVDSPwrOffSeqVARY_BLtoDE_in4Ms;
5042 UCHAR ucLVDSPwrOffSeqDEtoDIGON_in4Ms;
5043 UCHAR ucLVDSOffToOnDelay_in4Ms;
5044 UCHAR ucLVDSPwrOnSeqVARY_BLtoBLON_in4Ms;
5045 UCHAR ucLVDSPwrOffSeqBLONtoVARY_BL_in4Ms;
5046 UCHAR ucMinAllowedBL_Level;
5047 ULONG ulLCDBitDepthControlVal;
5048 ULONG ulNbpStateMemclkFreq[4];
5049 USHORT usNBP2Voltage;
5050 USHORT usNBP3Voltage;
5051 ULONG ulNbpStateNClkFreq[4];
5052 UCHAR ucNBDPMEnable;
5053 UCHAR ucReserved[3];
5054 UCHAR ucDPMState0VclkFid;
5055 UCHAR ucDPMState0DclkFid;
5056 UCHAR ucDPMState1VclkFid;
5057 UCHAR ucDPMState1DclkFid;
5058 UCHAR ucDPMState2VclkFid;
5059 UCHAR ucDPMState2DclkFid;
5060 UCHAR ucDPMState3VclkFid;
5061 UCHAR ucDPMState3DclkFid;
5062 ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO sExtDispConnInfo;
5063 }ATOM_INTEGRATED_SYSTEM_INFO_V1_7;
5064
5065
5066 #define INTEGRATED_SYSTEM_INFO__GET_EDID_CALLBACK_FUNC_SUPPORT 0x01
5067 #define INTEGRATED_SYSTEM_INFO__GET_BOOTUP_DISPLAY_CALLBACK_FUNC_SUPPORT 0x02
5068 #define INTEGRATED_SYSTEM_INFO__GET_EXPANSION_CALLBACK_FUNC_SUPPORT 0x04
5069 #define INTEGRATED_SYSTEM_INFO__FAST_BOOT_SUPPORT 0x08
5070
5071
5072 #define SYS_INFO_GPUCAPS__TMDSHDMI_COHERENT_SINGLEPLL_MODE 0x01
5073 #define SYS_INFO_GPUCAPS__DP_SINGLEPLL_MODE 0x02
5074 #define SYS_INFO_GPUCAPS__DISABLE_AUX_MODE_DETECT 0x08
5075 #define SYS_INFO_GPUCAPS__ENABEL_DFS_BYPASS 0x10
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214 typedef struct _ATOM_INTEGRATED_SYSTEM_INFO_V1_8
5215 {
5216 ATOM_COMMON_TABLE_HEADER sHeader;
5217 ULONG ulBootUpEngineClock;
5218 ULONG ulDentistVCOFreq;
5219 ULONG ulBootUpUMAClock;
5220 ATOM_CLK_VOLT_CAPABILITY sDISPCLK_Voltage[4];
5221 ULONG ulBootUpReqDisplayVector;
5222 ULONG ulVBIOSMisc;
5223 ULONG ulGPUCapInfo;
5224 ULONG ulDISP_CLK2Freq;
5225 USHORT usRequestedPWMFreqInHz;
5226 UCHAR ucHtcTmpLmt;
5227 UCHAR ucHtcHystLmt;
5228 ULONG ulReserved2;
5229 ULONG ulSystemConfig;
5230 ULONG ulCPUCapInfo;
5231 ULONG ulReserved3;
5232 USHORT usGPUReservedSysMemSize;
5233 USHORT usExtDispConnInfoOffset;
5234 USHORT usPanelRefreshRateRange;
5235 UCHAR ucMemoryType;
5236 UCHAR ucUMAChannelNumber;
5237 UCHAR strVBIOSMsg[40];
5238 ATOM_TDP_CONFIG asTdpConfig;
5239 ULONG ulReserved[19];
5240 ATOM_AVAILABLE_SCLK_LIST sAvail_SCLK[5];
5241 ULONG ulGMCRestoreResetTime;
5242 ULONG ulReserved4;
5243 ULONG ulIdleNClk;
5244 ULONG ulDDR_DLL_PowerUpTime;
5245 ULONG ulDDR_PLL_PowerUpTime;
5246 USHORT usPCIEClkSSPercentage;
5247 USHORT usPCIEClkSSType;
5248 USHORT usLvdsSSPercentage;
5249 USHORT usLvdsSSpreadRateIn10Hz;
5250 USHORT usHDMISSPercentage;
5251 USHORT usHDMISSpreadRateIn10Hz;
5252 USHORT usDVISSPercentage;
5253 USHORT usDVISSpreadRateIn10Hz;
5254 ULONG ulGPUReservedSysMemBaseAddrLo;
5255 ULONG ulGPUReservedSysMemBaseAddrHi;
5256 ULONG ulReserved5[3];
5257 USHORT usMaxLVDSPclkFreqInSingleLink;
5258 UCHAR ucLvdsMisc;
5259 UCHAR ucTravisLVDSVolAdjust;
5260 UCHAR ucLVDSPwrOnSeqDIGONtoDE_in4Ms;
5261 UCHAR ucLVDSPwrOnSeqDEtoVARY_BL_in4Ms;
5262 UCHAR ucLVDSPwrOffSeqVARY_BLtoDE_in4Ms;
5263 UCHAR ucLVDSPwrOffSeqDEtoDIGON_in4Ms;
5264 UCHAR ucLVDSOffToOnDelay_in4Ms;
5265 UCHAR ucLVDSPwrOnSeqVARY_BLtoBLON_in4Ms;
5266 UCHAR ucLVDSPwrOffSeqBLONtoVARY_BL_in4Ms;
5267 UCHAR ucMinAllowedBL_Level;
5268 ULONG ulLCDBitDepthControlVal;
5269 ULONG ulNbpStateMemclkFreq[4];
5270 ULONG ulReserved6;
5271 ULONG ulNbpStateNClkFreq[4];
5272 USHORT usNBPStateVoltage[4];
5273 USHORT usBootUpNBVoltage;
5274 USHORT usReserved2;
5275 ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO sExtDispConnInfo;
5276 }ATOM_INTEGRATED_SYSTEM_INFO_V1_8;
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425 typedef struct _ATOM_FUSION_SYSTEM_INFO_V2
5426 {
5427 ATOM_INTEGRATED_SYSTEM_INFO_V1_8 sIntegratedSysInfo;
5428 ULONG ulPowerplayTable[128];
5429 }ATOM_FUSION_SYSTEM_INFO_V2;
5430
5431
5432
5433
5434
5435
5436 #define ICS91719 1
5437 #define ICS91720 2
5438
5439
5440 typedef struct _ATOM_I2C_DATA_RECORD
5441 {
5442 UCHAR ucNunberOfBytes;
5443 UCHAR ucI2CData[1];
5444 }ATOM_I2C_DATA_RECORD;
5445
5446
5447
5448 typedef struct _ATOM_I2C_DEVICE_SETUP_INFO
5449 {
5450 ATOM_I2C_ID_CONFIG_ACCESS sucI2cId;
5451 UCHAR ucSSChipID;
5452 UCHAR ucSSChipSlaveAddr;
5453 UCHAR ucNumOfI2CDataRecords;
5454 ATOM_I2C_DATA_RECORD asI2CData[1];
5455 }ATOM_I2C_DEVICE_SETUP_INFO;
5456
5457
5458 typedef struct _ATOM_ASIC_MVDD_INFO
5459 {
5460 ATOM_COMMON_TABLE_HEADER sHeader;
5461 ATOM_I2C_DEVICE_SETUP_INFO asI2CSetup[1];
5462 }ATOM_ASIC_MVDD_INFO;
5463
5464
5465 #define ATOM_MCLK_SS_INFO ATOM_ASIC_MVDD_INFO
5466
5467
5468
5469
5470 typedef struct _ATOM_ASIC_SS_ASSIGNMENT
5471 {
5472 ULONG ulTargetClockRange;
5473 USHORT usSpreadSpectrumPercentage;
5474 USHORT usSpreadRateInKhz;
5475 UCHAR ucClockIndication;
5476 UCHAR ucSpreadSpectrumMode;
5477 UCHAR ucReserved[2];
5478 }ATOM_ASIC_SS_ASSIGNMENT;
5479
5480
5481
5482 #define ASIC_INTERNAL_MEMORY_SS 1
5483 #define ASIC_INTERNAL_ENGINE_SS 2
5484 #define ASIC_INTERNAL_UVD_SS 3
5485 #define ASIC_INTERNAL_SS_ON_TMDS 4
5486 #define ASIC_INTERNAL_SS_ON_HDMI 5
5487 #define ASIC_INTERNAL_SS_ON_LVDS 6
5488 #define ASIC_INTERNAL_SS_ON_DP 7
5489 #define ASIC_INTERNAL_SS_ON_DCPLL 8
5490 #define ASIC_EXTERNAL_SS_ON_DP_CLOCK 9
5491 #define ASIC_INTERNAL_VCE_SS 10
5492 #define ASIC_INTERNAL_GPUPLL_SS 11
5493
5494
5495 typedef struct _ATOM_ASIC_SS_ASSIGNMENT_V2
5496 {
5497 ULONG ulTargetClockRange;
5498
5499 USHORT usSpreadSpectrumPercentage;
5500 USHORT usSpreadRateIn10Hz;
5501 UCHAR ucClockIndication;
5502 UCHAR ucSpreadSpectrumMode;
5503 UCHAR ucReserved[2];
5504 }ATOM_ASIC_SS_ASSIGNMENT_V2;
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514 typedef struct _ATOM_ASIC_INTERNAL_SS_INFO
5515 {
5516 ATOM_COMMON_TABLE_HEADER sHeader;
5517 ATOM_ASIC_SS_ASSIGNMENT asSpreadSpectrum[4];
5518 }ATOM_ASIC_INTERNAL_SS_INFO;
5519
5520 typedef struct _ATOM_ASIC_INTERNAL_SS_INFO_V2
5521 {
5522 ATOM_COMMON_TABLE_HEADER sHeader;
5523 ATOM_ASIC_SS_ASSIGNMENT_V2 asSpreadSpectrum[1];
5524 }ATOM_ASIC_INTERNAL_SS_INFO_V2;
5525
5526 typedef struct _ATOM_ASIC_SS_ASSIGNMENT_V3
5527 {
5528 ULONG ulTargetClockRange;
5529
5530 USHORT usSpreadSpectrumPercentage;
5531 USHORT usSpreadRateIn10Hz;
5532 UCHAR ucClockIndication;
5533 UCHAR ucSpreadSpectrumMode;
5534 UCHAR ucReserved[2];
5535 }ATOM_ASIC_SS_ASSIGNMENT_V3;
5536
5537
5538 #define SS_MODE_V3_CENTRE_SPREAD_MASK 0x01
5539 #define SS_MODE_V3_EXTERNAL_SS_MASK 0x02
5540 #define SS_MODE_V3_PERCENTAGE_DIV_BY_1000_MASK 0x10
5541
5542 typedef struct _ATOM_ASIC_INTERNAL_SS_INFO_V3
5543 {
5544 ATOM_COMMON_TABLE_HEADER sHeader;
5545 ATOM_ASIC_SS_ASSIGNMENT_V3 asSpreadSpectrum[1];
5546 }ATOM_ASIC_INTERNAL_SS_INFO_V3;
5547
5548
5549
5550 #define ATOM_DEVICE_CONNECT_INFO_DEF 0
5551 #define ATOM_ROM_LOCATION_DEF 1
5552 #define ATOM_TV_STANDARD_DEF 2
5553 #define ATOM_ACTIVE_INFO_DEF 3
5554 #define ATOM_LCD_INFO_DEF 4
5555 #define ATOM_DOS_REQ_INFO_DEF 5
5556 #define ATOM_ACC_CHANGE_INFO_DEF 6
5557 #define ATOM_DOS_MODE_INFO_DEF 7
5558 #define ATOM_I2C_CHANNEL_STATUS_DEF 8
5559 #define ATOM_I2C_CHANNEL_STATUS1_DEF 9
5560 #define ATOM_INTERNAL_TIMER_DEF 10
5561
5562
5563 #define ATOM_S0_CRT1_MONO 0x00000001L
5564 #define ATOM_S0_CRT1_COLOR 0x00000002L
5565 #define ATOM_S0_CRT1_MASK (ATOM_S0_CRT1_MONO+ATOM_S0_CRT1_COLOR)
5566
5567 #define ATOM_S0_TV1_COMPOSITE_A 0x00000004L
5568 #define ATOM_S0_TV1_SVIDEO_A 0x00000008L
5569 #define ATOM_S0_TV1_MASK_A (ATOM_S0_TV1_COMPOSITE_A+ATOM_S0_TV1_SVIDEO_A)
5570
5571 #define ATOM_S0_CV_A 0x00000010L
5572 #define ATOM_S0_CV_DIN_A 0x00000020L
5573 #define ATOM_S0_CV_MASK_A (ATOM_S0_CV_A+ATOM_S0_CV_DIN_A)
5574
5575
5576 #define ATOM_S0_CRT2_MONO 0x00000100L
5577 #define ATOM_S0_CRT2_COLOR 0x00000200L
5578 #define ATOM_S0_CRT2_MASK (ATOM_S0_CRT2_MONO+ATOM_S0_CRT2_COLOR)
5579
5580 #define ATOM_S0_TV1_COMPOSITE 0x00000400L
5581 #define ATOM_S0_TV1_SVIDEO 0x00000800L
5582 #define ATOM_S0_TV1_SCART 0x00004000L
5583 #define ATOM_S0_TV1_MASK (ATOM_S0_TV1_COMPOSITE+ATOM_S0_TV1_SVIDEO+ATOM_S0_TV1_SCART)
5584
5585 #define ATOM_S0_CV 0x00001000L
5586 #define ATOM_S0_CV_DIN 0x00002000L
5587 #define ATOM_S0_CV_MASK (ATOM_S0_CV+ATOM_S0_CV_DIN)
5588
5589 #define ATOM_S0_DFP1 0x00010000L
5590 #define ATOM_S0_DFP2 0x00020000L
5591 #define ATOM_S0_LCD1 0x00040000L
5592 #define ATOM_S0_LCD2 0x00080000L
5593 #define ATOM_S0_DFP6 0x00100000L
5594 #define ATOM_S0_DFP3 0x00200000L
5595 #define ATOM_S0_DFP4 0x00400000L
5596 #define ATOM_S0_DFP5 0x00800000L
5597
5598 #define ATOM_S0_DFP_MASK ATOM_S0_DFP1 | ATOM_S0_DFP2 | ATOM_S0_DFP3 | ATOM_S0_DFP4 | ATOM_S0_DFP5 | ATOM_S0_DFP6
5599
5600 #define ATOM_S0_FAD_REGISTER_BUG 0x02000000L
5601
5602
5603 #define ATOM_S0_THERMAL_STATE_MASK 0x1C000000L
5604 #define ATOM_S0_THERMAL_STATE_SHIFT 26
5605
5606 #define ATOM_S0_SYSTEM_POWER_STATE_MASK 0xE0000000L
5607 #define ATOM_S0_SYSTEM_POWER_STATE_SHIFT 29
5608
5609 #define ATOM_S0_SYSTEM_POWER_STATE_VALUE_AC 1
5610 #define ATOM_S0_SYSTEM_POWER_STATE_VALUE_DC 2
5611 #define ATOM_S0_SYSTEM_POWER_STATE_VALUE_LITEAC 3
5612 #define ATOM_S0_SYSTEM_POWER_STATE_VALUE_LIT2AC 4
5613
5614
5615 #define ATOM_S0_CRT1_MONOb0 0x01
5616 #define ATOM_S0_CRT1_COLORb0 0x02
5617 #define ATOM_S0_CRT1_MASKb0 (ATOM_S0_CRT1_MONOb0+ATOM_S0_CRT1_COLORb0)
5618
5619 #define ATOM_S0_TV1_COMPOSITEb0 0x04
5620 #define ATOM_S0_TV1_SVIDEOb0 0x08
5621 #define ATOM_S0_TV1_MASKb0 (ATOM_S0_TV1_COMPOSITEb0+ATOM_S0_TV1_SVIDEOb0)
5622
5623 #define ATOM_S0_CVb0 0x10
5624 #define ATOM_S0_CV_DINb0 0x20
5625 #define ATOM_S0_CV_MASKb0 (ATOM_S0_CVb0+ATOM_S0_CV_DINb0)
5626
5627 #define ATOM_S0_CRT2_MONOb1 0x01
5628 #define ATOM_S0_CRT2_COLORb1 0x02
5629 #define ATOM_S0_CRT2_MASKb1 (ATOM_S0_CRT2_MONOb1+ATOM_S0_CRT2_COLORb1)
5630
5631 #define ATOM_S0_TV1_COMPOSITEb1 0x04
5632 #define ATOM_S0_TV1_SVIDEOb1 0x08
5633 #define ATOM_S0_TV1_SCARTb1 0x40
5634 #define ATOM_S0_TV1_MASKb1 (ATOM_S0_TV1_COMPOSITEb1+ATOM_S0_TV1_SVIDEOb1+ATOM_S0_TV1_SCARTb1)
5635
5636 #define ATOM_S0_CVb1 0x10
5637 #define ATOM_S0_CV_DINb1 0x20
5638 #define ATOM_S0_CV_MASKb1 (ATOM_S0_CVb1+ATOM_S0_CV_DINb1)
5639
5640 #define ATOM_S0_DFP1b2 0x01
5641 #define ATOM_S0_DFP2b2 0x02
5642 #define ATOM_S0_LCD1b2 0x04
5643 #define ATOM_S0_LCD2b2 0x08
5644 #define ATOM_S0_DFP6b2 0x10
5645 #define ATOM_S0_DFP3b2 0x20
5646 #define ATOM_S0_DFP4b2 0x40
5647 #define ATOM_S0_DFP5b2 0x80
5648
5649
5650 #define ATOM_S0_THERMAL_STATE_MASKb3 0x1C
5651 #define ATOM_S0_THERMAL_STATE_SHIFTb3 2
5652
5653 #define ATOM_S0_SYSTEM_POWER_STATE_MASKb3 0xE0
5654 #define ATOM_S0_LCD1_SHIFT 18
5655
5656
5657 #define ATOM_S1_ROM_LOCATION_MASK 0x0000FFFFL
5658 #define ATOM_S1_PCI_BUS_DEV_MASK 0xFFFF0000L
5659
5660
5661 #define ATOM_S2_TV1_STANDARD_MASK 0x0000000FL
5662 #define ATOM_S2_CURRENT_BL_LEVEL_MASK 0x0000FF00L
5663 #define ATOM_S2_CURRENT_BL_LEVEL_SHIFT 8
5664
5665 #define ATOM_S2_FORCEDLOWPWRMODE_STATE_MASK 0x0C000000L
5666 #define ATOM_S2_FORCEDLOWPWRMODE_STATE_MASK_SHIFT 26
5667 #define ATOM_S2_FORCEDLOWPWRMODE_STATE_CHANGE 0x10000000L
5668
5669 #define ATOM_S2_DEVICE_DPMS_STATE 0x00010000L
5670 #define ATOM_S2_VRI_BRIGHT_ENABLE 0x20000000L
5671
5672 #define ATOM_S2_DISPLAY_ROTATION_0_DEGREE 0x0
5673 #define ATOM_S2_DISPLAY_ROTATION_90_DEGREE 0x1
5674 #define ATOM_S2_DISPLAY_ROTATION_180_DEGREE 0x2
5675 #define ATOM_S2_DISPLAY_ROTATION_270_DEGREE 0x3
5676 #define ATOM_S2_DISPLAY_ROTATION_DEGREE_SHIFT 30
5677 #define ATOM_S2_DISPLAY_ROTATION_ANGLE_MASK 0xC0000000L
5678
5679
5680
5681 #define ATOM_S2_TV1_STANDARD_MASKb0 0x0F
5682 #define ATOM_S2_CURRENT_BL_LEVEL_MASKb1 0xFF
5683 #define ATOM_S2_DEVICE_DPMS_STATEb2 0x01
5684
5685 #define ATOM_S2_DEVICE_DPMS_MASKw1 0x3FF
5686 #define ATOM_S2_FORCEDLOWPWRMODE_STATE_MASKb3 0x0C
5687 #define ATOM_S2_FORCEDLOWPWRMODE_STATE_CHANGEb3 0x10
5688 #define ATOM_S2_TMDS_COHERENT_MODEb3 0x10
5689 #define ATOM_S2_VRI_BRIGHT_ENABLEb3 0x20
5690 #define ATOM_S2_ROTATION_STATE_MASKb3 0xC0
5691
5692
5693
5694 #define ATOM_S3_CRT1_ACTIVE 0x00000001L
5695 #define ATOM_S3_LCD1_ACTIVE 0x00000002L
5696 #define ATOM_S3_TV1_ACTIVE 0x00000004L
5697 #define ATOM_S3_DFP1_ACTIVE 0x00000008L
5698 #define ATOM_S3_CRT2_ACTIVE 0x00000010L
5699 #define ATOM_S3_LCD2_ACTIVE 0x00000020L
5700 #define ATOM_S3_DFP6_ACTIVE 0x00000040L
5701 #define ATOM_S3_DFP2_ACTIVE 0x00000080L
5702 #define ATOM_S3_CV_ACTIVE 0x00000100L
5703 #define ATOM_S3_DFP3_ACTIVE 0x00000200L
5704 #define ATOM_S3_DFP4_ACTIVE 0x00000400L
5705 #define ATOM_S3_DFP5_ACTIVE 0x00000800L
5706
5707 #define ATOM_S3_DEVICE_ACTIVE_MASK 0x00000FFFL
5708
5709 #define ATOM_S3_LCD_FULLEXPANSION_ACTIVE 0x00001000L
5710 #define ATOM_S3_LCD_EXPANSION_ASPEC_RATIO_ACTIVE 0x00002000L
5711
5712 #define ATOM_S3_CRT1_CRTC_ACTIVE 0x00010000L
5713 #define ATOM_S3_LCD1_CRTC_ACTIVE 0x00020000L
5714 #define ATOM_S3_TV1_CRTC_ACTIVE 0x00040000L
5715 #define ATOM_S3_DFP1_CRTC_ACTIVE 0x00080000L
5716 #define ATOM_S3_CRT2_CRTC_ACTIVE 0x00100000L
5717 #define ATOM_S3_LCD2_CRTC_ACTIVE 0x00200000L
5718 #define ATOM_S3_DFP6_CRTC_ACTIVE 0x00400000L
5719 #define ATOM_S3_DFP2_CRTC_ACTIVE 0x00800000L
5720 #define ATOM_S3_CV_CRTC_ACTIVE 0x01000000L
5721 #define ATOM_S3_DFP3_CRTC_ACTIVE 0x02000000L
5722 #define ATOM_S3_DFP4_CRTC_ACTIVE 0x04000000L
5723 #define ATOM_S3_DFP5_CRTC_ACTIVE 0x08000000L
5724
5725 #define ATOM_S3_DEVICE_CRTC_ACTIVE_MASK 0x0FFF0000L
5726 #define ATOM_S3_ASIC_GUI_ENGINE_HUNG 0x20000000L
5727
5728 #define ATOM_S3_ALLOW_FAST_PWR_SWITCH 0x40000000L
5729 #define ATOM_S3_RQST_GPU_USE_MIN_PWR 0x80000000L
5730
5731
5732 #define ATOM_S3_CRT1_ACTIVEb0 0x01
5733 #define ATOM_S3_LCD1_ACTIVEb0 0x02
5734 #define ATOM_S3_TV1_ACTIVEb0 0x04
5735 #define ATOM_S3_DFP1_ACTIVEb0 0x08
5736 #define ATOM_S3_CRT2_ACTIVEb0 0x10
5737 #define ATOM_S3_LCD2_ACTIVEb0 0x20
5738 #define ATOM_S3_DFP6_ACTIVEb0 0x40
5739 #define ATOM_S3_DFP2_ACTIVEb0 0x80
5740 #define ATOM_S3_CV_ACTIVEb1 0x01
5741 #define ATOM_S3_DFP3_ACTIVEb1 0x02
5742 #define ATOM_S3_DFP4_ACTIVEb1 0x04
5743 #define ATOM_S3_DFP5_ACTIVEb1 0x08
5744
5745 #define ATOM_S3_ACTIVE_CRTC1w0 0xFFF
5746
5747 #define ATOM_S3_CRT1_CRTC_ACTIVEb2 0x01
5748 #define ATOM_S3_LCD1_CRTC_ACTIVEb2 0x02
5749 #define ATOM_S3_TV1_CRTC_ACTIVEb2 0x04
5750 #define ATOM_S3_DFP1_CRTC_ACTIVEb2 0x08
5751 #define ATOM_S3_CRT2_CRTC_ACTIVEb2 0x10
5752 #define ATOM_S3_LCD2_CRTC_ACTIVEb2 0x20
5753 #define ATOM_S3_DFP6_CRTC_ACTIVEb2 0x40
5754 #define ATOM_S3_DFP2_CRTC_ACTIVEb2 0x80
5755 #define ATOM_S3_CV_CRTC_ACTIVEb3 0x01
5756 #define ATOM_S3_DFP3_CRTC_ACTIVEb3 0x02
5757 #define ATOM_S3_DFP4_CRTC_ACTIVEb3 0x04
5758 #define ATOM_S3_DFP5_CRTC_ACTIVEb3 0x08
5759
5760 #define ATOM_S3_ACTIVE_CRTC2w1 0xFFF
5761
5762
5763 #define ATOM_S4_LCD1_PANEL_ID_MASK 0x000000FFL
5764 #define ATOM_S4_LCD1_REFRESH_MASK 0x0000FF00L
5765 #define ATOM_S4_LCD1_REFRESH_SHIFT 8
5766
5767
5768 #define ATOM_S4_LCD1_PANEL_ID_MASKb0 0x0FF
5769 #define ATOM_S4_LCD1_REFRESH_MASKb1 ATOM_S4_LCD1_PANEL_ID_MASKb0
5770 #define ATOM_S4_VRAM_INFO_MASKb2 ATOM_S4_LCD1_PANEL_ID_MASKb0
5771
5772
5773 #define ATOM_S5_DOS_REQ_CRT1b0 0x01
5774 #define ATOM_S5_DOS_REQ_LCD1b0 0x02
5775 #define ATOM_S5_DOS_REQ_TV1b0 0x04
5776 #define ATOM_S5_DOS_REQ_DFP1b0 0x08
5777 #define ATOM_S5_DOS_REQ_CRT2b0 0x10
5778 #define ATOM_S5_DOS_REQ_LCD2b0 0x20
5779 #define ATOM_S5_DOS_REQ_DFP6b0 0x40
5780 #define ATOM_S5_DOS_REQ_DFP2b0 0x80
5781 #define ATOM_S5_DOS_REQ_CVb1 0x01
5782 #define ATOM_S5_DOS_REQ_DFP3b1 0x02
5783 #define ATOM_S5_DOS_REQ_DFP4b1 0x04
5784 #define ATOM_S5_DOS_REQ_DFP5b1 0x08
5785
5786 #define ATOM_S5_DOS_REQ_DEVICEw0 0x0FFF
5787
5788 #define ATOM_S5_DOS_REQ_CRT1 0x0001
5789 #define ATOM_S5_DOS_REQ_LCD1 0x0002
5790 #define ATOM_S5_DOS_REQ_TV1 0x0004
5791 #define ATOM_S5_DOS_REQ_DFP1 0x0008
5792 #define ATOM_S5_DOS_REQ_CRT2 0x0010
5793 #define ATOM_S5_DOS_REQ_LCD2 0x0020
5794 #define ATOM_S5_DOS_REQ_DFP6 0x0040
5795 #define ATOM_S5_DOS_REQ_DFP2 0x0080
5796 #define ATOM_S5_DOS_REQ_CV 0x0100
5797 #define ATOM_S5_DOS_REQ_DFP3 0x0200
5798 #define ATOM_S5_DOS_REQ_DFP4 0x0400
5799 #define ATOM_S5_DOS_REQ_DFP5 0x0800
5800
5801 #define ATOM_S5_DOS_FORCE_CRT1b2 ATOM_S5_DOS_REQ_CRT1b0
5802 #define ATOM_S5_DOS_FORCE_TV1b2 ATOM_S5_DOS_REQ_TV1b0
5803 #define ATOM_S5_DOS_FORCE_CRT2b2 ATOM_S5_DOS_REQ_CRT2b0
5804 #define ATOM_S5_DOS_FORCE_CVb3 ATOM_S5_DOS_REQ_CVb1
5805 #define ATOM_S5_DOS_FORCE_DEVICEw1 (ATOM_S5_DOS_FORCE_CRT1b2+ATOM_S5_DOS_FORCE_TV1b2+ATOM_S5_DOS_FORCE_CRT2b2+\
5806 (ATOM_S5_DOS_FORCE_CVb3<<8))
5807
5808
5809 #define ATOM_S6_DEVICE_CHANGE 0x00000001L
5810 #define ATOM_S6_SCALER_CHANGE 0x00000002L
5811 #define ATOM_S6_LID_CHANGE 0x00000004L
5812 #define ATOM_S6_DOCKING_CHANGE 0x00000008L
5813 #define ATOM_S6_ACC_MODE 0x00000010L
5814 #define ATOM_S6_EXT_DESKTOP_MODE 0x00000020L
5815 #define ATOM_S6_LID_STATE 0x00000040L
5816 #define ATOM_S6_DOCK_STATE 0x00000080L
5817 #define ATOM_S6_CRITICAL_STATE 0x00000100L
5818 #define ATOM_S6_HW_I2C_BUSY_STATE 0x00000200L
5819 #define ATOM_S6_THERMAL_STATE_CHANGE 0x00000400L
5820 #define ATOM_S6_INTERRUPT_SET_BY_BIOS 0x00000800L
5821 #define ATOM_S6_REQ_LCD_EXPANSION_FULL 0x00001000L
5822 #define ATOM_S6_REQ_LCD_EXPANSION_ASPEC_RATIO 0x00002000L
5823
5824 #define ATOM_S6_DISPLAY_STATE_CHANGE 0x00004000L
5825 #define ATOM_S6_I2C_STATE_CHANGE 0x00008000L
5826
5827 #define ATOM_S6_ACC_REQ_CRT1 0x00010000L
5828 #define ATOM_S6_ACC_REQ_LCD1 0x00020000L
5829 #define ATOM_S6_ACC_REQ_TV1 0x00040000L
5830 #define ATOM_S6_ACC_REQ_DFP1 0x00080000L
5831 #define ATOM_S6_ACC_REQ_CRT2 0x00100000L
5832 #define ATOM_S6_ACC_REQ_LCD2 0x00200000L
5833 #define ATOM_S6_ACC_REQ_DFP6 0x00400000L
5834 #define ATOM_S6_ACC_REQ_DFP2 0x00800000L
5835 #define ATOM_S6_ACC_REQ_CV 0x01000000L
5836 #define ATOM_S6_ACC_REQ_DFP3 0x02000000L
5837 #define ATOM_S6_ACC_REQ_DFP4 0x04000000L
5838 #define ATOM_S6_ACC_REQ_DFP5 0x08000000L
5839
5840 #define ATOM_S6_ACC_REQ_MASK 0x0FFF0000L
5841 #define ATOM_S6_SYSTEM_POWER_MODE_CHANGE 0x10000000L
5842 #define ATOM_S6_ACC_BLOCK_DISPLAY_SWITCH 0x20000000L
5843 #define ATOM_S6_VRI_BRIGHTNESS_CHANGE 0x40000000L
5844 #define ATOM_S6_CONFIG_DISPLAY_CHANGE_MASK 0x80000000L
5845
5846
5847 #define ATOM_S6_DEVICE_CHANGEb0 0x01
5848 #define ATOM_S6_SCALER_CHANGEb0 0x02
5849 #define ATOM_S6_LID_CHANGEb0 0x04
5850 #define ATOM_S6_DOCKING_CHANGEb0 0x08
5851 #define ATOM_S6_ACC_MODEb0 0x10
5852 #define ATOM_S6_EXT_DESKTOP_MODEb0 0x20
5853 #define ATOM_S6_LID_STATEb0 0x40
5854 #define ATOM_S6_DOCK_STATEb0 0x80
5855 #define ATOM_S6_CRITICAL_STATEb1 0x01
5856 #define ATOM_S6_HW_I2C_BUSY_STATEb1 0x02
5857 #define ATOM_S6_THERMAL_STATE_CHANGEb1 0x04
5858 #define ATOM_S6_INTERRUPT_SET_BY_BIOSb1 0x08
5859 #define ATOM_S6_REQ_LCD_EXPANSION_FULLb1 0x10
5860 #define ATOM_S6_REQ_LCD_EXPANSION_ASPEC_RATIOb1 0x20
5861
5862 #define ATOM_S6_ACC_REQ_CRT1b2 0x01
5863 #define ATOM_S6_ACC_REQ_LCD1b2 0x02
5864 #define ATOM_S6_ACC_REQ_TV1b2 0x04
5865 #define ATOM_S6_ACC_REQ_DFP1b2 0x08
5866 #define ATOM_S6_ACC_REQ_CRT2b2 0x10
5867 #define ATOM_S6_ACC_REQ_LCD2b2 0x20
5868 #define ATOM_S6_ACC_REQ_DFP6b2 0x40
5869 #define ATOM_S6_ACC_REQ_DFP2b2 0x80
5870 #define ATOM_S6_ACC_REQ_CVb3 0x01
5871 #define ATOM_S6_ACC_REQ_DFP3b3 0x02
5872 #define ATOM_S6_ACC_REQ_DFP4b3 0x04
5873 #define ATOM_S6_ACC_REQ_DFP5b3 0x08
5874
5875 #define ATOM_S6_ACC_REQ_DEVICEw1 ATOM_S5_DOS_REQ_DEVICEw0
5876 #define ATOM_S6_SYSTEM_POWER_MODE_CHANGEb3 0x10
5877 #define ATOM_S6_ACC_BLOCK_DISPLAY_SWITCHb3 0x20
5878 #define ATOM_S6_VRI_BRIGHTNESS_CHANGEb3 0x40
5879 #define ATOM_S6_CONFIG_DISPLAY_CHANGEb3 0x80
5880
5881 #define ATOM_S6_DEVICE_CHANGE_SHIFT 0
5882 #define ATOM_S6_SCALER_CHANGE_SHIFT 1
5883 #define ATOM_S6_LID_CHANGE_SHIFT 2
5884 #define ATOM_S6_DOCKING_CHANGE_SHIFT 3
5885 #define ATOM_S6_ACC_MODE_SHIFT 4
5886 #define ATOM_S6_EXT_DESKTOP_MODE_SHIFT 5
5887 #define ATOM_S6_LID_STATE_SHIFT 6
5888 #define ATOM_S6_DOCK_STATE_SHIFT 7
5889 #define ATOM_S6_CRITICAL_STATE_SHIFT 8
5890 #define ATOM_S6_HW_I2C_BUSY_STATE_SHIFT 9
5891 #define ATOM_S6_THERMAL_STATE_CHANGE_SHIFT 10
5892 #define ATOM_S6_INTERRUPT_SET_BY_BIOS_SHIFT 11
5893 #define ATOM_S6_REQ_SCALER_SHIFT 12
5894 #define ATOM_S6_REQ_SCALER_ARATIO_SHIFT 13
5895 #define ATOM_S6_DISPLAY_STATE_CHANGE_SHIFT 14
5896 #define ATOM_S6_I2C_STATE_CHANGE_SHIFT 15
5897 #define ATOM_S6_SYSTEM_POWER_MODE_CHANGE_SHIFT 28
5898 #define ATOM_S6_ACC_BLOCK_DISPLAY_SWITCH_SHIFT 29
5899 #define ATOM_S6_VRI_BRIGHTNESS_CHANGE_SHIFT 30
5900 #define ATOM_S6_CONFIG_DISPLAY_CHANGE_SHIFT 31
5901
5902
5903 #define ATOM_S7_DOS_MODE_TYPEb0 0x03
5904 #define ATOM_S7_DOS_MODE_VGAb0 0x00
5905 #define ATOM_S7_DOS_MODE_VESAb0 0x01
5906 #define ATOM_S7_DOS_MODE_EXTb0 0x02
5907 #define ATOM_S7_DOS_MODE_PIXEL_DEPTHb0 0x0C
5908 #define ATOM_S7_DOS_MODE_PIXEL_FORMATb0 0xF0
5909 #define ATOM_S7_DOS_8BIT_DAC_ENb1 0x01
5910 #define ATOM_S7_ASIC_INIT_COMPLETEb1 0x02
5911 #define ATOM_S7_ASIC_INIT_COMPLETE_MASK 0x00000200
5912 #define ATOM_S7_DOS_MODE_NUMBERw1 0x0FFFF
5913
5914 #define ATOM_S7_DOS_8BIT_DAC_EN_SHIFT 8
5915
5916
5917 #define ATOM_S8_I2C_CHANNEL_BUSY_MASK 0x00000FFFF
5918 #define ATOM_S8_I2C_HW_ENGINE_BUSY_MASK 0x0FFFF0000
5919
5920 #define ATOM_S8_I2C_CHANNEL_BUSY_SHIFT 0
5921 #define ATOM_S8_I2C_ENGINE_BUSY_SHIFT 16
5922
5923
5924 #ifndef ATOM_S9_I2C_CHANNEL_COMPLETED_MASK
5925 #define ATOM_S9_I2C_CHANNEL_COMPLETED_MASK 0x0000FFFF
5926 #endif
5927 #ifndef ATOM_S9_I2C_CHANNEL_ABORTED_MASK
5928 #define ATOM_S9_I2C_CHANNEL_ABORTED_MASK 0xFFFF0000
5929 #endif
5930 #ifndef ATOM_S9_I2C_CHANNEL_COMPLETED_SHIFT
5931 #define ATOM_S9_I2C_CHANNEL_COMPLETED_SHIFT 0
5932 #endif
5933 #ifndef ATOM_S9_I2C_CHANNEL_ABORTED_SHIFT
5934 #define ATOM_S9_I2C_CHANNEL_ABORTED_SHIFT 16
5935 #endif
5936
5937
5938 #define ATOM_FLAG_SET 0x20
5939 #define ATOM_FLAG_CLEAR 0
5940 #define CLEAR_ATOM_S6_ACC_MODE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_ACC_MODE_SHIFT | ATOM_FLAG_CLEAR)
5941 #define SET_ATOM_S6_DEVICE_CHANGE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_DEVICE_CHANGE_SHIFT | ATOM_FLAG_SET)
5942 #define SET_ATOM_S6_VRI_BRIGHTNESS_CHANGE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_VRI_BRIGHTNESS_CHANGE_SHIFT | ATOM_FLAG_SET)
5943 #define SET_ATOM_S6_SCALER_CHANGE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_SCALER_CHANGE_SHIFT | ATOM_FLAG_SET)
5944 #define SET_ATOM_S6_LID_CHANGE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_LID_CHANGE_SHIFT | ATOM_FLAG_SET)
5945
5946 #define SET_ATOM_S6_LID_STATE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_LID_STATE_SHIFT | ATOM_FLAG_SET)
5947 #define CLEAR_ATOM_S6_LID_STATE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_LID_STATE_SHIFT | ATOM_FLAG_CLEAR)
5948
5949 #define SET_ATOM_S6_DOCK_CHANGE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_DOCKING_CHANGE_SHIFT | ATOM_FLAG_SET)
5950 #define SET_ATOM_S6_DOCK_STATE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_DOCK_STATE_SHIFT | ATOM_FLAG_SET)
5951 #define CLEAR_ATOM_S6_DOCK_STATE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_DOCK_STATE_SHIFT | ATOM_FLAG_CLEAR)
5952
5953 #define SET_ATOM_S6_THERMAL_STATE_CHANGE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_THERMAL_STATE_CHANGE_SHIFT | ATOM_FLAG_SET)
5954 #define SET_ATOM_S6_SYSTEM_POWER_MODE_CHANGE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_SYSTEM_POWER_MODE_CHANGE_SHIFT | ATOM_FLAG_SET)
5955 #define SET_ATOM_S6_INTERRUPT_SET_BY_BIOS ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_INTERRUPT_SET_BY_BIOS_SHIFT | ATOM_FLAG_SET)
5956
5957 #define SET_ATOM_S6_CRITICAL_STATE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_CRITICAL_STATE_SHIFT | ATOM_FLAG_SET)
5958 #define CLEAR_ATOM_S6_CRITICAL_STATE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_CRITICAL_STATE_SHIFT | ATOM_FLAG_CLEAR)
5959
5960 #define SET_ATOM_S6_REQ_SCALER ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_REQ_SCALER_SHIFT | ATOM_FLAG_SET)
5961 #define CLEAR_ATOM_S6_REQ_SCALER ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_REQ_SCALER_SHIFT | ATOM_FLAG_CLEAR )
5962
5963 #define SET_ATOM_S6_REQ_SCALER_ARATIO ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_REQ_SCALER_ARATIO_SHIFT | ATOM_FLAG_SET )
5964 #define CLEAR_ATOM_S6_REQ_SCALER_ARATIO ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_REQ_SCALER_ARATIO_SHIFT | ATOM_FLAG_CLEAR )
5965
5966 #define SET_ATOM_S6_I2C_STATE_CHANGE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_I2C_STATE_CHANGE_SHIFT | ATOM_FLAG_SET )
5967
5968 #define SET_ATOM_S6_DISPLAY_STATE_CHANGE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_DISPLAY_STATE_CHANGE_SHIFT | ATOM_FLAG_SET )
5969
5970 #define SET_ATOM_S6_DEVICE_RECONFIG ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_CONFIG_DISPLAY_CHANGE_SHIFT | ATOM_FLAG_SET)
5971 #define CLEAR_ATOM_S0_LCD1 ((ATOM_DEVICE_CONNECT_INFO_DEF << 8 )| ATOM_S0_LCD1_SHIFT | ATOM_FLAG_CLEAR )
5972 #define SET_ATOM_S7_DOS_8BIT_DAC_EN ((ATOM_DOS_MODE_INFO_DEF << 8 )|ATOM_S7_DOS_8BIT_DAC_EN_SHIFT | ATOM_FLAG_SET )
5973 #define CLEAR_ATOM_S7_DOS_8BIT_DAC_EN ((ATOM_DOS_MODE_INFO_DEF << 8 )|ATOM_S7_DOS_8BIT_DAC_EN_SHIFT | ATOM_FLAG_CLEAR )
5974
5975
5976
5977
5978
5979
5980 #ifdef __cplusplus
5981 #define GetIndexIntoMasterTable(MasterOrData, FieldName) ((reinterpret_cast<char*>(&(static_cast<ATOM_MASTER_LIST_OF_##MasterOrData##_TABLES*>(0))->FieldName)-static_cast<char*>(0))/sizeof(USHORT))
5982
5983 #define GET_COMMAND_TABLE_COMMANDSET_REVISION(TABLE_HEADER_OFFSET) (((static_cast<ATOM_COMMON_TABLE_HEADER*>(TABLE_HEADER_OFFSET))->ucTableFormatRevision )&0x3F)
5984 #define GET_COMMAND_TABLE_PARAMETER_REVISION(TABLE_HEADER_OFFSET) (((static_cast<ATOM_COMMON_TABLE_HEADER*>(TABLE_HEADER_OFFSET))->ucTableContentRevision)&0x3F)
5985 #else
5986 #define GetIndexIntoMasterTable(MasterOrData, FieldName) (((char*)(&((ATOM_MASTER_LIST_OF_##MasterOrData##_TABLES*)0)->FieldName)-(char*)0)/sizeof(USHORT))
5987
5988 #define GET_COMMAND_TABLE_COMMANDSET_REVISION(TABLE_HEADER_OFFSET) ((((ATOM_COMMON_TABLE_HEADER*)TABLE_HEADER_OFFSET)->ucTableFormatRevision)&0x3F)
5989 #define GET_COMMAND_TABLE_PARAMETER_REVISION(TABLE_HEADER_OFFSET) ((((ATOM_COMMON_TABLE_HEADER*)TABLE_HEADER_OFFSET)->ucTableContentRevision)&0x3F)
5990 #endif
5991
5992 #define GET_DATA_TABLE_MAJOR_REVISION GET_COMMAND_TABLE_COMMANDSET_REVISION
5993 #define GET_DATA_TABLE_MINOR_REVISION GET_COMMAND_TABLE_PARAMETER_REVISION
5994
5995
5996
5997
5998 #define ATOM_DAC_SRC 0x80
5999 #define ATOM_SRC_DAC1 0
6000 #define ATOM_SRC_DAC2 0x80
6001
6002 typedef struct _MEMORY_PLLINIT_PARAMETERS
6003 {
6004 ULONG ulTargetMemoryClock;
6005 UCHAR ucAction;
6006 UCHAR ucFbDiv_Hi;
6007 UCHAR ucFbDiv;
6008 UCHAR ucPostDiv;
6009 }MEMORY_PLLINIT_PARAMETERS;
6010
6011 #define MEMORY_PLLINIT_PS_ALLOCATION MEMORY_PLLINIT_PARAMETERS
6012
6013
6014 #define GPIO_PIN_WRITE 0x01
6015 #define GPIO_PIN_READ 0x00
6016
6017 typedef struct _GPIO_PIN_CONTROL_PARAMETERS
6018 {
6019 UCHAR ucGPIO_ID;
6020 UCHAR ucGPIOBitShift;
6021 UCHAR ucGPIOBitVal;
6022 UCHAR ucAction;
6023 }GPIO_PIN_CONTROL_PARAMETERS;
6024
6025 typedef struct _ENABLE_SCALER_PARAMETERS
6026 {
6027 UCHAR ucScaler;
6028 UCHAR ucEnable;
6029 UCHAR ucTVStandard;
6030 UCHAR ucPadding[1];
6031 }ENABLE_SCALER_PARAMETERS;
6032 #define ENABLE_SCALER_PS_ALLOCATION ENABLE_SCALER_PARAMETERS
6033
6034
6035 #define SCALER_BYPASS_AUTO_CENTER_NO_REPLICATION 0
6036 #define SCALER_BYPASS_AUTO_CENTER_AUTO_REPLICATION 1
6037 #define SCALER_ENABLE_2TAP_ALPHA_MODE 2
6038 #define SCALER_ENABLE_MULTITAP_MODE 3
6039
6040 typedef struct _ENABLE_HARDWARE_ICON_CURSOR_PARAMETERS
6041 {
6042 ULONG usHWIconHorzVertPosn;
6043 UCHAR ucHWIconVertOffset;
6044 UCHAR ucHWIconHorzOffset;
6045 UCHAR ucSelection;
6046 UCHAR ucEnable;
6047 }ENABLE_HARDWARE_ICON_CURSOR_PARAMETERS;
6048
6049 typedef struct _ENABLE_HARDWARE_ICON_CURSOR_PS_ALLOCATION
6050 {
6051 ENABLE_HARDWARE_ICON_CURSOR_PARAMETERS sEnableIcon;
6052 ENABLE_CRTC_PARAMETERS sReserved;
6053 }ENABLE_HARDWARE_ICON_CURSOR_PS_ALLOCATION;
6054
6055 typedef struct _ENABLE_GRAPH_SURFACE_PARAMETERS
6056 {
6057 USHORT usHight;
6058 USHORT usWidth;
6059 UCHAR ucSurface;
6060 UCHAR ucPadding[3];
6061 }ENABLE_GRAPH_SURFACE_PARAMETERS;
6062
6063 typedef struct _ENABLE_GRAPH_SURFACE_PARAMETERS_V1_2
6064 {
6065 USHORT usHight;
6066 USHORT usWidth;
6067 UCHAR ucSurface;
6068 UCHAR ucEnable;
6069 UCHAR ucPadding[2];
6070 }ENABLE_GRAPH_SURFACE_PARAMETERS_V1_2;
6071
6072 typedef struct _ENABLE_GRAPH_SURFACE_PARAMETERS_V1_3
6073 {
6074 USHORT usHight;
6075 USHORT usWidth;
6076 UCHAR ucSurface;
6077 UCHAR ucEnable;
6078 USHORT usDeviceId;
6079 }ENABLE_GRAPH_SURFACE_PARAMETERS_V1_3;
6080
6081 typedef struct _ENABLE_GRAPH_SURFACE_PARAMETERS_V1_4
6082 {
6083 USHORT usHight;
6084 USHORT usWidth;
6085 USHORT usGraphPitch;
6086 UCHAR ucColorDepth;
6087 UCHAR ucPixelFormat;
6088 UCHAR ucSurface;
6089 UCHAR ucEnable;
6090 UCHAR ucModeType;
6091 UCHAR ucReserved;
6092 }ENABLE_GRAPH_SURFACE_PARAMETERS_V1_4;
6093
6094
6095 #define ATOM_GRAPH_CONTROL_SET_PITCH 0x0f
6096 #define ATOM_GRAPH_CONTROL_SET_DISP_START 0x10
6097
6098 typedef struct _ENABLE_GRAPH_SURFACE_PS_ALLOCATION
6099 {
6100 ENABLE_GRAPH_SURFACE_PARAMETERS sSetSurface;
6101 ENABLE_YUV_PS_ALLOCATION sReserved;
6102 }ENABLE_GRAPH_SURFACE_PS_ALLOCATION;
6103
6104 typedef struct _MEMORY_CLEAN_UP_PARAMETERS
6105 {
6106 USHORT usMemoryStart;
6107 USHORT usMemorySize;
6108 }MEMORY_CLEAN_UP_PARAMETERS;
6109 #define MEMORY_CLEAN_UP_PS_ALLOCATION MEMORY_CLEAN_UP_PARAMETERS
6110
6111 typedef struct _GET_DISPLAY_SURFACE_SIZE_PARAMETERS
6112 {
6113 USHORT usX_Size;
6114 USHORT usY_Size;
6115 }GET_DISPLAY_SURFACE_SIZE_PARAMETERS;
6116
6117 typedef struct _GET_DISPLAY_SURFACE_SIZE_PARAMETERS_V2
6118 {
6119 union{
6120 USHORT usX_Size;
6121 USHORT usSurface;
6122 };
6123 USHORT usY_Size;
6124 USHORT usDispXStart;
6125 USHORT usDispYStart;
6126 }GET_DISPLAY_SURFACE_SIZE_PARAMETERS_V2;
6127
6128
6129 typedef struct _PALETTE_DATA_CONTROL_PARAMETERS_V3
6130 {
6131 UCHAR ucLutId;
6132 UCHAR ucAction;
6133 USHORT usLutStartIndex;
6134 USHORT usLutLength;
6135 USHORT usLutOffsetInVram;
6136 }PALETTE_DATA_CONTROL_PARAMETERS_V3;
6137
6138
6139 #define PALETTE_DATA_AUTO_FILL 1
6140 #define PALETTE_DATA_READ 2
6141 #define PALETTE_DATA_WRITE 3
6142
6143
6144 typedef struct _INTERRUPT_SERVICE_PARAMETERS_V2
6145 {
6146 UCHAR ucInterruptId;
6147 UCHAR ucServiceId;
6148 UCHAR ucStatus;
6149 UCHAR ucReserved;
6150 }INTERRUPT_SERVICE_PARAMETER_V2;
6151
6152
6153 #define HDP1_INTERRUPT_ID 1
6154 #define HDP2_INTERRUPT_ID 2
6155 #define HDP3_INTERRUPT_ID 3
6156 #define HDP4_INTERRUPT_ID 4
6157 #define HDP5_INTERRUPT_ID 5
6158 #define HDP6_INTERRUPT_ID 6
6159 #define SW_INTERRUPT_ID 11
6160
6161
6162 #define INTERRUPT_SERVICE_GEN_SW_INT 1
6163 #define INTERRUPT_SERVICE_GET_STATUS 2
6164
6165
6166 #define INTERRUPT_STATUS__INT_TRIGGER 1
6167 #define INTERRUPT_STATUS__HPD_HIGH 2
6168
6169 typedef struct _INDIRECT_IO_ACCESS
6170 {
6171 ATOM_COMMON_TABLE_HEADER sHeader;
6172 UCHAR IOAccessSequence[256];
6173 } INDIRECT_IO_ACCESS;
6174
6175 #define INDIRECT_READ 0x00
6176 #define INDIRECT_WRITE 0x80
6177
6178 #define INDIRECT_IO_MM 0
6179 #define INDIRECT_IO_PLL 1
6180 #define INDIRECT_IO_MC 2
6181 #define INDIRECT_IO_PCIE 3
6182 #define INDIRECT_IO_PCIEP 4
6183 #define INDIRECT_IO_NBMISC 5
6184 #define INDIRECT_IO_SMU 5
6185
6186 #define INDIRECT_IO_PLL_READ INDIRECT_IO_PLL | INDIRECT_READ
6187 #define INDIRECT_IO_PLL_WRITE INDIRECT_IO_PLL | INDIRECT_WRITE
6188 #define INDIRECT_IO_MC_READ INDIRECT_IO_MC | INDIRECT_READ
6189 #define INDIRECT_IO_MC_WRITE INDIRECT_IO_MC | INDIRECT_WRITE
6190 #define INDIRECT_IO_PCIE_READ INDIRECT_IO_PCIE | INDIRECT_READ
6191 #define INDIRECT_IO_PCIE_WRITE INDIRECT_IO_PCIE | INDIRECT_WRITE
6192 #define INDIRECT_IO_PCIEP_READ INDIRECT_IO_PCIEP | INDIRECT_READ
6193 #define INDIRECT_IO_PCIEP_WRITE INDIRECT_IO_PCIEP | INDIRECT_WRITE
6194 #define INDIRECT_IO_NBMISC_READ INDIRECT_IO_NBMISC | INDIRECT_READ
6195 #define INDIRECT_IO_NBMISC_WRITE INDIRECT_IO_NBMISC | INDIRECT_WRITE
6196 #define INDIRECT_IO_SMU_READ INDIRECT_IO_SMU | INDIRECT_READ
6197 #define INDIRECT_IO_SMU_WRITE INDIRECT_IO_SMU | INDIRECT_WRITE
6198
6199 typedef struct _ATOM_OEM_INFO
6200 {
6201 ATOM_COMMON_TABLE_HEADER sHeader;
6202 ATOM_I2C_ID_CONFIG_ACCESS sucI2cId;
6203 }ATOM_OEM_INFO;
6204
6205 typedef struct _ATOM_TV_MODE
6206 {
6207 UCHAR ucVMode_Num;
6208 UCHAR ucTV_Mode_Num;
6209 }ATOM_TV_MODE;
6210
6211 typedef struct _ATOM_BIOS_INT_TVSTD_MODE
6212 {
6213 ATOM_COMMON_TABLE_HEADER sHeader;
6214 USHORT usTV_Mode_LUT_Offset;
6215 USHORT usTV_FIFO_Offset;
6216 USHORT usNTSC_Tbl_Offset;
6217 USHORT usPAL_Tbl_Offset;
6218 USHORT usCV_Tbl_Offset;
6219 }ATOM_BIOS_INT_TVSTD_MODE;
6220
6221
6222 typedef struct _ATOM_TV_MODE_SCALER_PTR
6223 {
6224 USHORT ucFilter0_Offset;
6225 USHORT usFilter1_Offset;
6226 UCHAR ucTV_Mode_Num;
6227 }ATOM_TV_MODE_SCALER_PTR;
6228
6229 typedef struct _ATOM_STANDARD_VESA_TIMING
6230 {
6231 ATOM_COMMON_TABLE_HEADER sHeader;
6232 ATOM_DTD_FORMAT aModeTimings[16];
6233 }ATOM_STANDARD_VESA_TIMING;
6234
6235
6236 typedef struct _ATOM_STD_FORMAT
6237 {
6238 USHORT usSTD_HDisp;
6239 USHORT usSTD_VDisp;
6240 USHORT usSTD_RefreshRate;
6241 USHORT usReserved;
6242 }ATOM_STD_FORMAT;
6243
6244 typedef struct _ATOM_VESA_TO_EXTENDED_MODE
6245 {
6246 USHORT usVESA_ModeNumber;
6247 USHORT usExtendedModeNumber;
6248 }ATOM_VESA_TO_EXTENDED_MODE;
6249
6250 typedef struct _ATOM_VESA_TO_INTENAL_MODE_LUT
6251 {
6252 ATOM_COMMON_TABLE_HEADER sHeader;
6253 ATOM_VESA_TO_EXTENDED_MODE asVESA_ToExtendedModeInfo[76];
6254 }ATOM_VESA_TO_INTENAL_MODE_LUT;
6255
6256
6257 typedef struct _ATOM_MEMORY_VENDOR_BLOCK{
6258 UCHAR ucMemoryType;
6259 UCHAR ucMemoryVendor;
6260 UCHAR ucAdjMCId;
6261 UCHAR ucDynClkId;
6262 ULONG ulDllResetClkRange;
6263 }ATOM_MEMORY_VENDOR_BLOCK;
6264
6265
6266 typedef struct _ATOM_MEMORY_SETTING_ID_CONFIG{
6267 #if ATOM_BIG_ENDIAN
6268 ULONG ucMemBlkId:8;
6269 ULONG ulMemClockRange:24;
6270 #else
6271 ULONG ulMemClockRange:24;
6272 ULONG ucMemBlkId:8;
6273 #endif
6274 }ATOM_MEMORY_SETTING_ID_CONFIG;
6275
6276 typedef union _ATOM_MEMORY_SETTING_ID_CONFIG_ACCESS
6277 {
6278 ATOM_MEMORY_SETTING_ID_CONFIG slAccess;
6279 ULONG ulAccess;
6280 }ATOM_MEMORY_SETTING_ID_CONFIG_ACCESS;
6281
6282
6283 typedef struct _ATOM_MEMORY_SETTING_DATA_BLOCK{
6284 ATOM_MEMORY_SETTING_ID_CONFIG_ACCESS ulMemoryID;
6285 ULONG aulMemData[1];
6286 }ATOM_MEMORY_SETTING_DATA_BLOCK;
6287
6288
6289 typedef struct _ATOM_INIT_REG_INDEX_FORMAT{
6290 USHORT usRegIndex;
6291 UCHAR ucPreRegDataLength;
6292 }ATOM_INIT_REG_INDEX_FORMAT;
6293
6294
6295 typedef struct _ATOM_INIT_REG_BLOCK{
6296 USHORT usRegIndexTblSize;
6297 USHORT usRegDataBlkSize;
6298 ATOM_INIT_REG_INDEX_FORMAT asRegIndexBuf[1];
6299 ATOM_MEMORY_SETTING_DATA_BLOCK asRegDataBuf[1];
6300 }ATOM_INIT_REG_BLOCK;
6301
6302 #define END_OF_REG_INDEX_BLOCK 0x0ffff
6303 #define END_OF_REG_DATA_BLOCK 0x00000000
6304 #define ATOM_INIT_REG_MASK_FLAG 0x80
6305 #define CLOCK_RANGE_HIGHEST 0x00ffffff
6306
6307 #define VALUE_DWORD SIZEOF ULONG
6308 #define VALUE_SAME_AS_ABOVE 0
6309 #define VALUE_MASK_DWORD 0x84
6310
6311 #define INDEX_ACCESS_RANGE_BEGIN (VALUE_DWORD + 1)
6312 #define INDEX_ACCESS_RANGE_END (INDEX_ACCESS_RANGE_BEGIN + 1)
6313 #define VALUE_INDEX_ACCESS_SINGLE (INDEX_ACCESS_RANGE_END + 1)
6314
6315 #define ACCESS_PLACEHOLDER 0x80
6316
6317 typedef struct _ATOM_MC_INIT_PARAM_TABLE
6318 {
6319 ATOM_COMMON_TABLE_HEADER sHeader;
6320 USHORT usAdjustARB_SEQDataOffset;
6321 USHORT usMCInitMemTypeTblOffset;
6322 USHORT usMCInitCommonTblOffset;
6323 USHORT usMCInitPowerDownTblOffset;
6324 ULONG ulARB_SEQDataBuf[32];
6325 ATOM_INIT_REG_BLOCK asMCInitMemType;
6326 ATOM_INIT_REG_BLOCK asMCInitCommon;
6327 }ATOM_MC_INIT_PARAM_TABLE;
6328
6329
6330 #define _4Mx16 0x2
6331 #define _4Mx32 0x3
6332 #define _8Mx16 0x12
6333 #define _8Mx32 0x13
6334 #define _16Mx16 0x22
6335 #define _16Mx32 0x23
6336 #define _32Mx16 0x32
6337 #define _32Mx32 0x33
6338 #define _64Mx8 0x41
6339 #define _64Mx16 0x42
6340 #define _64Mx32 0x43
6341 #define _128Mx8 0x51
6342 #define _128Mx16 0x52
6343 #define _128Mx32 0x53
6344 #define _256Mx8 0x61
6345 #define _256Mx16 0x62
6346 #define _512Mx8 0x71
6347
6348 #define SAMSUNG 0x1
6349 #define INFINEON 0x2
6350 #define ELPIDA 0x3
6351 #define ETRON 0x4
6352 #define NANYA 0x5
6353 #define HYNIX 0x6
6354 #define MOSEL 0x7
6355 #define WINBOND 0x8
6356 #define ESMT 0x9
6357 #define MICRON 0xF
6358
6359 #define QIMONDA INFINEON
6360 #define PROMOS MOSEL
6361 #define KRETON INFINEON
6362 #define ELIXIR NANYA
6363 #define MEZZA ELPIDA
6364
6365
6366
6367
6368 #define UCODE_ROM_START_ADDRESS 0x1b800
6369 #define UCODE_SIGNATURE 0x4375434d
6370
6371
6372
6373 typedef struct _MCuCodeHeader
6374 {
6375 ULONG ulSignature;
6376 UCHAR ucRevision;
6377 UCHAR ucChecksum;
6378 UCHAR ucReserved1;
6379 UCHAR ucReserved2;
6380 USHORT usParametersLength;
6381 USHORT usUCodeLength;
6382 USHORT usReserved1;
6383 USHORT usReserved2;
6384 } MCuCodeHeader;
6385
6386
6387
6388 #define ATOM_MAX_NUMBER_OF_VRAM_MODULE 16
6389
6390 #define ATOM_VRAM_MODULE_MEMORY_VENDOR_ID_MASK 0xF
6391 typedef struct _ATOM_VRAM_MODULE_V1
6392 {
6393 ULONG ulReserved;
6394 USHORT usEMRSValue;
6395 USHORT usMRSValue;
6396 USHORT usReserved;
6397 UCHAR ucExtMemoryID;
6398 UCHAR ucMemoryType;
6399 UCHAR ucMemoryVenderID;
6400 UCHAR ucMemoryDeviceCfg;
6401 UCHAR ucRow;
6402 UCHAR ucColumn;
6403 UCHAR ucBank;
6404 UCHAR ucRank;
6405 UCHAR ucChannelNum;
6406 UCHAR ucChannelConfig;
6407 UCHAR ucDefaultMVDDQ_ID;
6408 UCHAR ucDefaultMVDDC_ID;
6409 UCHAR ucReserved[2];
6410 }ATOM_VRAM_MODULE_V1;
6411
6412
6413 typedef struct _ATOM_VRAM_MODULE_V2
6414 {
6415 ULONG ulReserved;
6416 ULONG ulFlags;
6417 ULONG ulEngineClock;
6418 ULONG ulMemoryClock;
6419 USHORT usEMRS2Value;
6420 USHORT usEMRS3Value;
6421 USHORT usEMRSValue;
6422 USHORT usMRSValue;
6423 USHORT usReserved;
6424 UCHAR ucExtMemoryID;
6425 UCHAR ucMemoryType;
6426 UCHAR ucMemoryVenderID;
6427 UCHAR ucMemoryDeviceCfg;
6428 UCHAR ucRow;
6429 UCHAR ucColumn;
6430 UCHAR ucBank;
6431 UCHAR ucRank;
6432 UCHAR ucChannelNum;
6433 UCHAR ucChannelConfig;
6434 UCHAR ucDefaultMVDDQ_ID;
6435 UCHAR ucDefaultMVDDC_ID;
6436 UCHAR ucRefreshRateFactor;
6437 UCHAR ucReserved[3];
6438 }ATOM_VRAM_MODULE_V2;
6439
6440
6441 typedef struct _ATOM_MEMORY_TIMING_FORMAT
6442 {
6443 ULONG ulClkRange;
6444 union{
6445 USHORT usMRS;
6446 USHORT usDDR3_MR0;
6447 };
6448 union{
6449 USHORT usEMRS;
6450 USHORT usDDR3_MR1;
6451 };
6452 UCHAR ucCL;
6453 UCHAR ucWL;
6454 UCHAR uctRAS;
6455 UCHAR uctRC;
6456 UCHAR uctRFC;
6457 UCHAR uctRCDR;
6458 UCHAR uctRCDW;
6459 UCHAR uctRP;
6460 UCHAR uctRRD;
6461 UCHAR uctWR;
6462 UCHAR uctWTR;
6463 UCHAR uctPDIX;
6464 UCHAR uctFAW;
6465 UCHAR uctAOND;
6466 union
6467 {
6468 struct {
6469 UCHAR ucflag;
6470 UCHAR ucReserved;
6471 };
6472 USHORT usDDR3_MR2;
6473 };
6474 }ATOM_MEMORY_TIMING_FORMAT;
6475
6476
6477 typedef struct _ATOM_MEMORY_TIMING_FORMAT_V1
6478 {
6479 ULONG ulClkRange;
6480 USHORT usMRS;
6481 USHORT usEMRS;
6482 UCHAR ucCL;
6483 UCHAR ucWL;
6484 UCHAR uctRAS;
6485 UCHAR uctRC;
6486 UCHAR uctRFC;
6487 UCHAR uctRCDR;
6488 UCHAR uctRCDW;
6489 UCHAR uctRP;
6490 UCHAR uctRRD;
6491 UCHAR uctWR;
6492 UCHAR uctWTR;
6493 UCHAR uctPDIX;
6494 UCHAR uctFAW;
6495 UCHAR uctAOND;
6496 UCHAR ucflag;
6497
6498 UCHAR uctCCDL;
6499 UCHAR uctCRCRL;
6500 UCHAR uctCRCWL;
6501 UCHAR uctCKE;
6502 UCHAR uctCKRSE;
6503 UCHAR uctCKRSX;
6504 UCHAR uctFAW32;
6505 UCHAR ucMR5lo;
6506 UCHAR ucMR5hi;
6507 UCHAR ucTerminator;
6508 }ATOM_MEMORY_TIMING_FORMAT_V1;
6509
6510 typedef struct _ATOM_MEMORY_TIMING_FORMAT_V2
6511 {
6512 ULONG ulClkRange;
6513 USHORT usMRS;
6514 USHORT usEMRS;
6515 UCHAR ucCL;
6516 UCHAR ucWL;
6517 UCHAR uctRAS;
6518 UCHAR uctRC;
6519 UCHAR uctRFC;
6520 UCHAR uctRCDR;
6521 UCHAR uctRCDW;
6522 UCHAR uctRP;
6523 UCHAR uctRRD;
6524 UCHAR uctWR;
6525 UCHAR uctWTR;
6526 UCHAR uctPDIX;
6527 UCHAR uctFAW;
6528 UCHAR uctAOND;
6529 UCHAR ucflag;
6530
6531 UCHAR uctCCDL;
6532 UCHAR uctCRCRL;
6533 UCHAR uctCRCWL;
6534 UCHAR uctCKE;
6535 UCHAR uctCKRSE;
6536 UCHAR uctCKRSX;
6537 UCHAR uctFAW32;
6538 UCHAR ucMR4lo;
6539 UCHAR ucMR4hi;
6540 UCHAR ucMR5lo;
6541 UCHAR ucMR5hi;
6542 UCHAR ucTerminator;
6543 UCHAR ucReserved;
6544 }ATOM_MEMORY_TIMING_FORMAT_V2;
6545
6546 typedef struct _ATOM_MEMORY_FORMAT
6547 {
6548 ULONG ulDllDisClock;
6549 union{
6550 USHORT usEMRS2Value;
6551 USHORT usDDR3_Reserved;
6552 };
6553 union{
6554 USHORT usEMRS3Value;
6555 USHORT usDDR3_MR3;
6556 };
6557 UCHAR ucMemoryType;
6558 UCHAR ucMemoryVenderID;
6559 UCHAR ucRow;
6560 UCHAR ucColumn;
6561 UCHAR ucBank;
6562 UCHAR ucRank;
6563 UCHAR ucBurstSize;
6564 UCHAR ucDllDisBit;
6565 UCHAR ucRefreshRateFactor;
6566 UCHAR ucDensity;
6567 UCHAR ucPreamble;
6568 UCHAR ucMemAttrib;
6569 ATOM_MEMORY_TIMING_FORMAT asMemTiming[5];
6570 }ATOM_MEMORY_FORMAT;
6571
6572
6573 typedef struct _ATOM_VRAM_MODULE_V3
6574 {
6575 ULONG ulChannelMapCfg;
6576 USHORT usSize;
6577 USHORT usDefaultMVDDQ;
6578 USHORT usDefaultMVDDC;
6579 UCHAR ucExtMemoryID;
6580 UCHAR ucChannelNum;
6581 UCHAR ucChannelSize;
6582 UCHAR ucVREFI;
6583 UCHAR ucNPL_RT;
6584 UCHAR ucFlag;
6585 ATOM_MEMORY_FORMAT asMemory;
6586 }ATOM_VRAM_MODULE_V3;
6587
6588
6589
6590 #define NPL_RT_MASK 0x0f
6591 #define BATTERY_ODT_MASK 0xc0
6592
6593 #define ATOM_VRAM_MODULE ATOM_VRAM_MODULE_V3
6594
6595 typedef struct _ATOM_VRAM_MODULE_V4
6596 {
6597 ULONG ulChannelMapCfg;
6598 USHORT usModuleSize;
6599 USHORT usPrivateReserved;
6600
6601 USHORT usReserved;
6602 UCHAR ucExtMemoryID;
6603 UCHAR ucMemoryType;
6604 UCHAR ucChannelNum;
6605 UCHAR ucChannelWidth;
6606 UCHAR ucDensity;
6607 UCHAR ucFlag;
6608 UCHAR ucMisc;
6609 UCHAR ucVREFI;
6610 UCHAR ucNPL_RT;
6611 UCHAR ucPreamble;
6612 UCHAR ucMemorySize;
6613
6614 UCHAR ucReserved[3];
6615
6616
6617 union{
6618 USHORT usEMRS2Value;
6619 USHORT usDDR3_Reserved;
6620 };
6621 union{
6622 USHORT usEMRS3Value;
6623 USHORT usDDR3_MR3;
6624 };
6625 UCHAR ucMemoryVenderID;
6626 UCHAR ucRefreshRateFactor;
6627 UCHAR ucReserved2[2];
6628 ATOM_MEMORY_TIMING_FORMAT asMemTiming[5];
6629 }ATOM_VRAM_MODULE_V4;
6630
6631 #define VRAM_MODULE_V4_MISC_RANK_MASK 0x3
6632 #define VRAM_MODULE_V4_MISC_DUAL_RANK 0x1
6633 #define VRAM_MODULE_V4_MISC_BL_MASK 0x4
6634 #define VRAM_MODULE_V4_MISC_BL8 0x4
6635 #define VRAM_MODULE_V4_MISC_DUAL_CS 0x10
6636
6637 typedef struct _ATOM_VRAM_MODULE_V5
6638 {
6639 ULONG ulChannelMapCfg;
6640 USHORT usModuleSize;
6641 USHORT usPrivateReserved;
6642
6643 USHORT usReserved;
6644 UCHAR ucExtMemoryID;
6645 UCHAR ucMemoryType;
6646 UCHAR ucChannelNum;
6647 UCHAR ucChannelWidth;
6648 UCHAR ucDensity;
6649 UCHAR ucFlag;
6650 UCHAR ucMisc;
6651 UCHAR ucVREFI;
6652 UCHAR ucNPL_RT;
6653 UCHAR ucPreamble;
6654 UCHAR ucMemorySize;
6655
6656 UCHAR ucReserved[3];
6657
6658
6659 USHORT usEMRS2Value;
6660 USHORT usEMRS3Value;
6661 UCHAR ucMemoryVenderID;
6662 UCHAR ucRefreshRateFactor;
6663 UCHAR ucFIFODepth;
6664 UCHAR ucCDR_Bandwidth;
6665 ATOM_MEMORY_TIMING_FORMAT_V1 asMemTiming[5];
6666 }ATOM_VRAM_MODULE_V5;
6667
6668 typedef struct _ATOM_VRAM_MODULE_V6
6669 {
6670 ULONG ulChannelMapCfg;
6671 USHORT usModuleSize;
6672 USHORT usPrivateReserved;
6673
6674 USHORT usReserved;
6675 UCHAR ucExtMemoryID;
6676 UCHAR ucMemoryType;
6677 UCHAR ucChannelNum;
6678 UCHAR ucChannelWidth;
6679 UCHAR ucDensity;
6680 UCHAR ucFlag;
6681 UCHAR ucMisc;
6682 UCHAR ucVREFI;
6683 UCHAR ucNPL_RT;
6684 UCHAR ucPreamble;
6685 UCHAR ucMemorySize;
6686
6687 UCHAR ucReserved[3];
6688
6689
6690 USHORT usEMRS2Value;
6691 USHORT usEMRS3Value;
6692 UCHAR ucMemoryVenderID;
6693 UCHAR ucRefreshRateFactor;
6694 UCHAR ucFIFODepth;
6695 UCHAR ucCDR_Bandwidth;
6696 ATOM_MEMORY_TIMING_FORMAT_V2 asMemTiming[5];
6697 }ATOM_VRAM_MODULE_V6;
6698
6699 typedef struct _ATOM_VRAM_MODULE_V7
6700 {
6701
6702 ULONG ulChannelMapCfg;
6703 USHORT usModuleSize;
6704 USHORT usPrivateReserved;
6705 USHORT usEnableChannels;
6706 UCHAR ucExtMemoryID;
6707 UCHAR ucMemoryType;
6708 UCHAR ucChannelNum;
6709 UCHAR ucChannelWidth;
6710 UCHAR ucDensity;
6711 UCHAR ucReserve;
6712 UCHAR ucMisc;
6713 UCHAR ucVREFI;
6714 UCHAR ucNPL_RT;
6715 UCHAR ucPreamble;
6716 UCHAR ucMemorySize;
6717 USHORT usSEQSettingOffset;
6718 UCHAR ucReserved;
6719
6720 USHORT usEMRS2Value;
6721 USHORT usEMRS3Value;
6722 UCHAR ucMemoryVenderID;
6723 UCHAR ucRefreshRateFactor;
6724 UCHAR ucFIFODepth;
6725 UCHAR ucCDR_Bandwidth;
6726 char strMemPNString[20];
6727 }ATOM_VRAM_MODULE_V7;
6728
6729 typedef struct _ATOM_VRAM_INFO_V2
6730 {
6731 ATOM_COMMON_TABLE_HEADER sHeader;
6732 UCHAR ucNumOfVRAMModule;
6733 ATOM_VRAM_MODULE aVramInfo[ATOM_MAX_NUMBER_OF_VRAM_MODULE];
6734 }ATOM_VRAM_INFO_V2;
6735
6736 typedef struct _ATOM_VRAM_INFO_V3
6737 {
6738 ATOM_COMMON_TABLE_HEADER sHeader;
6739 USHORT usMemAdjustTblOffset;
6740 USHORT usMemClkPatchTblOffset;
6741 USHORT usRerseved;
6742 UCHAR aVID_PinsShift[9];
6743 UCHAR ucNumOfVRAMModule;
6744 ATOM_VRAM_MODULE aVramInfo[ATOM_MAX_NUMBER_OF_VRAM_MODULE];
6745 ATOM_INIT_REG_BLOCK asMemPatch;
6746
6747 }ATOM_VRAM_INFO_V3;
6748
6749 #define ATOM_VRAM_INFO_LAST ATOM_VRAM_INFO_V3
6750
6751 typedef struct _ATOM_VRAM_INFO_V4
6752 {
6753 ATOM_COMMON_TABLE_HEADER sHeader;
6754 USHORT usMemAdjustTblOffset;
6755 USHORT usMemClkPatchTblOffset;
6756 USHORT usRerseved;
6757 UCHAR ucMemDQ7_0ByteRemap;
6758 ULONG ulMemDQ7_0BitRemap;
6759 UCHAR ucReservde[4];
6760 UCHAR ucNumOfVRAMModule;
6761 ATOM_VRAM_MODULE_V4 aVramInfo[ATOM_MAX_NUMBER_OF_VRAM_MODULE];
6762 ATOM_INIT_REG_BLOCK asMemPatch;
6763
6764 }ATOM_VRAM_INFO_V4;
6765
6766 typedef struct _ATOM_VRAM_INFO_HEADER_V2_1
6767 {
6768 ATOM_COMMON_TABLE_HEADER sHeader;
6769 USHORT usMemAdjustTblOffset;
6770 USHORT usMemClkPatchTblOffset;
6771 USHORT usPerBytePresetOffset;
6772 USHORT usReserved[3];
6773 UCHAR ucNumOfVRAMModule;
6774 UCHAR ucMemoryClkPatchTblVer;
6775 UCHAR ucVramModuleVer;
6776 UCHAR ucReserved;
6777 ATOM_VRAM_MODULE_V7 aVramInfo[ATOM_MAX_NUMBER_OF_VRAM_MODULE];
6778 }ATOM_VRAM_INFO_HEADER_V2_1;
6779
6780
6781 typedef struct _ATOM_VRAM_GPIO_DETECTION_INFO
6782 {
6783 ATOM_COMMON_TABLE_HEADER sHeader;
6784 UCHAR aVID_PinsShift[9];
6785 }ATOM_VRAM_GPIO_DETECTION_INFO;
6786
6787
6788 typedef struct _ATOM_MEMORY_TRAINING_INFO
6789 {
6790 ATOM_COMMON_TABLE_HEADER sHeader;
6791 UCHAR ucTrainingLoop;
6792 UCHAR ucReserved[3];
6793 ATOM_INIT_REG_BLOCK asMemTrainingSetting;
6794 }ATOM_MEMORY_TRAINING_INFO;
6795
6796
6797 typedef struct SW_I2C_CNTL_DATA_PARAMETERS
6798 {
6799 UCHAR ucControl;
6800 UCHAR ucData;
6801 UCHAR ucSatus;
6802 UCHAR ucTemp;
6803 } SW_I2C_CNTL_DATA_PARAMETERS;
6804
6805 #define SW_I2C_CNTL_DATA_PS_ALLOCATION SW_I2C_CNTL_DATA_PARAMETERS
6806
6807 typedef struct _SW_I2C_IO_DATA_PARAMETERS
6808 {
6809 USHORT GPIO_Info;
6810 UCHAR ucAct;
6811 UCHAR ucData;
6812 } SW_I2C_IO_DATA_PARAMETERS;
6813
6814 #define SW_I2C_IO_DATA_PS_ALLOCATION SW_I2C_IO_DATA_PARAMETERS
6815
6816
6817 #define SW_I2C_IO_RESET 0
6818 #define SW_I2C_IO_GET 1
6819 #define SW_I2C_IO_DRIVE 2
6820 #define SW_I2C_IO_SET 3
6821 #define SW_I2C_IO_START 4
6822
6823 #define SW_I2C_IO_CLOCK 0
6824 #define SW_I2C_IO_DATA 0x80
6825
6826 #define SW_I2C_IO_ZERO 0
6827 #define SW_I2C_IO_ONE 0x100
6828
6829 #define SW_I2C_CNTL_READ 0
6830 #define SW_I2C_CNTL_WRITE 1
6831 #define SW_I2C_CNTL_START 2
6832 #define SW_I2C_CNTL_STOP 3
6833 #define SW_I2C_CNTL_OPEN 4
6834 #define SW_I2C_CNTL_CLOSE 5
6835 #define SW_I2C_CNTL_WRITE1BIT 6
6836
6837
6838 #define VESA_OEM_PRODUCT_REV "01.00"
6839 #define VESA_MODE_ATTRIBUTE_MODE_SUPPORT 0xBB
6840 #define VESA_MODE_WIN_ATTRIBUTE 7
6841 #define VESA_WIN_SIZE 64
6842
6843 typedef struct _PTR_32_BIT_STRUCTURE
6844 {
6845 USHORT Offset16;
6846 USHORT Segment16;
6847 } PTR_32_BIT_STRUCTURE;
6848
6849 typedef union _PTR_32_BIT_UNION
6850 {
6851 PTR_32_BIT_STRUCTURE SegmentOffset;
6852 ULONG Ptr32_Bit;
6853 } PTR_32_BIT_UNION;
6854
6855 typedef struct _VBE_1_2_INFO_BLOCK_UPDATABLE
6856 {
6857 UCHAR VbeSignature[4];
6858 USHORT VbeVersion;
6859 PTR_32_BIT_UNION OemStringPtr;
6860 UCHAR Capabilities[4];
6861 PTR_32_BIT_UNION VideoModePtr;
6862 USHORT TotalMemory;
6863 } VBE_1_2_INFO_BLOCK_UPDATABLE;
6864
6865
6866 typedef struct _VBE_2_0_INFO_BLOCK_UPDATABLE
6867 {
6868 VBE_1_2_INFO_BLOCK_UPDATABLE CommonBlock;
6869 USHORT OemSoftRev;
6870 PTR_32_BIT_UNION OemVendorNamePtr;
6871 PTR_32_BIT_UNION OemProductNamePtr;
6872 PTR_32_BIT_UNION OemProductRevPtr;
6873 } VBE_2_0_INFO_BLOCK_UPDATABLE;
6874
6875 typedef union _VBE_VERSION_UNION
6876 {
6877 VBE_2_0_INFO_BLOCK_UPDATABLE VBE_2_0_InfoBlock;
6878 VBE_1_2_INFO_BLOCK_UPDATABLE VBE_1_2_InfoBlock;
6879 } VBE_VERSION_UNION;
6880
6881 typedef struct _VBE_INFO_BLOCK
6882 {
6883 VBE_VERSION_UNION UpdatableVBE_Info;
6884 UCHAR Reserved[222];
6885 UCHAR OemData[256];
6886 } VBE_INFO_BLOCK;
6887
6888 typedef struct _VBE_FP_INFO
6889 {
6890 USHORT HSize;
6891 USHORT VSize;
6892 USHORT FPType;
6893 UCHAR RedBPP;
6894 UCHAR GreenBPP;
6895 UCHAR BlueBPP;
6896 UCHAR ReservedBPP;
6897 ULONG RsvdOffScrnMemSize;
6898 ULONG RsvdOffScrnMEmPtr;
6899 UCHAR Reserved[14];
6900 } VBE_FP_INFO;
6901
6902 typedef struct _VESA_MODE_INFO_BLOCK
6903 {
6904
6905 USHORT ModeAttributes;
6906 UCHAR WinAAttributes;
6907 UCHAR WinBAttributes;
6908 USHORT WinGranularity;
6909 USHORT WinSize;
6910 USHORT WinASegment;
6911 USHORT WinBSegment;
6912 ULONG WinFuncPtr;
6913 USHORT BytesPerScanLine;
6914
6915
6916 USHORT XResolution;
6917 USHORT YResolution;
6918 UCHAR XCharSize;
6919 UCHAR YCharSize;
6920 UCHAR NumberOfPlanes;
6921 UCHAR BitsPerPixel;
6922 UCHAR NumberOfBanks;
6923 UCHAR MemoryModel;
6924 UCHAR BankSize;
6925 UCHAR NumberOfImagePages;
6926 UCHAR ReservedForPageFunction;
6927
6928
6929 UCHAR RedMaskSize;
6930 UCHAR RedFieldPosition;
6931 UCHAR GreenMaskSize;
6932 UCHAR GreenFieldPosition;
6933 UCHAR BlueMaskSize;
6934 UCHAR BlueFieldPosition;
6935 UCHAR RsvdMaskSize;
6936 UCHAR RsvdFieldPosition;
6937 UCHAR DirectColorModeInfo;
6938
6939
6940 ULONG PhysBasePtr;
6941 ULONG Reserved_1;
6942 USHORT Reserved_2;
6943
6944
6945 USHORT LinBytesPerScanLine;
6946 UCHAR BnkNumberOfImagePages;
6947 UCHAR LinNumberOfImagPages;
6948 UCHAR LinRedMaskSize;
6949 UCHAR LinRedFieldPosition;
6950 UCHAR LinGreenMaskSize;
6951 UCHAR LinGreenFieldPosition;
6952 UCHAR LinBlueMaskSize;
6953 UCHAR LinBlueFieldPosition;
6954 UCHAR LinRsvdMaskSize;
6955 UCHAR LinRsvdFieldPosition;
6956 ULONG MaxPixelClock;
6957 UCHAR Reserved;
6958 } VESA_MODE_INFO_BLOCK;
6959
6960
6961 #define ATOM_BIOS_EXTENDED_FUNCTION_CODE 0xA0
6962 #define ATOM_BIOS_FUNCTION_COP_MODE 0x00
6963 #define ATOM_BIOS_FUNCTION_SHORT_QUERY1 0x04
6964 #define ATOM_BIOS_FUNCTION_SHORT_QUERY2 0x05
6965 #define ATOM_BIOS_FUNCTION_SHORT_QUERY3 0x06
6966 #define ATOM_BIOS_FUNCTION_GET_DDC 0x0B
6967 #define ATOM_BIOS_FUNCTION_ASIC_DSTATE 0x0E
6968 #define ATOM_BIOS_FUNCTION_DEBUG_PLAY 0x0F
6969 #define ATOM_BIOS_FUNCTION_STV_STD 0x16
6970 #define ATOM_BIOS_FUNCTION_DEVICE_DET 0x17
6971 #define ATOM_BIOS_FUNCTION_DEVICE_SWITCH 0x18
6972
6973 #define ATOM_BIOS_FUNCTION_PANEL_CONTROL 0x82
6974 #define ATOM_BIOS_FUNCTION_OLD_DEVICE_DET 0x83
6975 #define ATOM_BIOS_FUNCTION_OLD_DEVICE_SWITCH 0x84
6976 #define ATOM_BIOS_FUNCTION_HW_ICON 0x8A
6977 #define ATOM_BIOS_FUNCTION_SET_CMOS 0x8B
6978 #define SUB_FUNCTION_UPDATE_DISPLAY_INFO 0x8000
6979 #define SUB_FUNCTION_UPDATE_EXPANSION_INFO 0x8100
6980
6981 #define ATOM_BIOS_FUNCTION_DISPLAY_INFO 0x8D
6982 #define ATOM_BIOS_FUNCTION_DEVICE_ON_OFF 0x8E
6983 #define ATOM_BIOS_FUNCTION_VIDEO_STATE 0x8F
6984 #define ATOM_SUB_FUNCTION_GET_CRITICAL_STATE 0x0300
6985 #define ATOM_SUB_FUNCTION_GET_LIDSTATE 0x0700
6986 #define ATOM_SUB_FUNCTION_THERMAL_STATE_NOTICE 0x1400
6987 #define ATOM_SUB_FUNCTION_CRITICAL_STATE_NOTICE 0x8300
6988 #define ATOM_SUB_FUNCTION_SET_LIDSTATE 0x8500
6989 #define ATOM_SUB_FUNCTION_GET_REQ_DISPLAY_FROM_SBIOS_MODE 0x8900
6990 #define ATOM_SUB_FUNCTION_INFORM_ADC_SUPPORT 0x9400
6991
6992
6993 #define ATOM_BIOS_FUNCTION_VESA_DPMS 0x4F10
6994 #define ATOM_SUB_FUNCTION_SET_DPMS 0x0001
6995 #define ATOM_SUB_FUNCTION_GET_DPMS 0x0002
6996 #define ATOM_PARAMETER_VESA_DPMS_ON 0x0000
6997 #define ATOM_PARAMETER_VESA_DPMS_STANDBY 0x0100
6998 #define ATOM_PARAMETER_VESA_DPMS_SUSPEND 0x0200
6999 #define ATOM_PARAMETER_VESA_DPMS_OFF 0x0400
7000 #define ATOM_PARAMETER_VESA_DPMS_REDUCE_ON 0x0800
7001
7002 #define ATOM_BIOS_RETURN_CODE_MASK 0x0000FF00L
7003 #define ATOM_BIOS_REG_HIGH_MASK 0x0000FF00L
7004 #define ATOM_BIOS_REG_LOW_MASK 0x000000FFL
7005
7006
7007
7008
7009 typedef struct _ASIC_TRANSMITTER_INFO
7010 {
7011 USHORT usTransmitterObjId;
7012 USHORT usSupportDevice;
7013 UCHAR ucTransmitterCmdTblId;
7014 UCHAR ucConfig;
7015 UCHAR ucEncoderID;
7016 UCHAR ucOptionEncoderID;
7017 UCHAR uc2ndEncoderID;
7018 UCHAR ucReserved;
7019 }ASIC_TRANSMITTER_INFO;
7020
7021 #define ASIC_TRANSMITTER_INFO_CONFIG__DVO_SDR_MODE 0x01
7022 #define ASIC_TRANSMITTER_INFO_CONFIG__COHERENT_MODE 0x02
7023 #define ASIC_TRANSMITTER_INFO_CONFIG__ENCODEROBJ_ID_MASK 0xc4
7024 #define ASIC_TRANSMITTER_INFO_CONFIG__ENCODER_A 0x00
7025 #define ASIC_TRANSMITTER_INFO_CONFIG__ENCODER_B 0x04
7026 #define ASIC_TRANSMITTER_INFO_CONFIG__ENCODER_C 0x40
7027 #define ASIC_TRANSMITTER_INFO_CONFIG__ENCODER_D 0x44
7028 #define ASIC_TRANSMITTER_INFO_CONFIG__ENCODER_E 0x80
7029 #define ASIC_TRANSMITTER_INFO_CONFIG__ENCODER_F 0x84
7030
7031 typedef struct _ASIC_ENCODER_INFO
7032 {
7033 UCHAR ucEncoderID;
7034 UCHAR ucEncoderConfig;
7035 USHORT usEncoderCmdTblId;
7036 }ASIC_ENCODER_INFO;
7037
7038 typedef struct _ATOM_DISP_OUT_INFO
7039 {
7040 ATOM_COMMON_TABLE_HEADER sHeader;
7041 USHORT ptrTransmitterInfo;
7042 USHORT ptrEncoderInfo;
7043 ASIC_TRANSMITTER_INFO asTransmitterInfo[1];
7044 ASIC_ENCODER_INFO asEncoderInfo[1];
7045 }ATOM_DISP_OUT_INFO;
7046
7047 typedef struct _ATOM_DISP_OUT_INFO_V2
7048 {
7049 ATOM_COMMON_TABLE_HEADER sHeader;
7050 USHORT ptrTransmitterInfo;
7051 USHORT ptrEncoderInfo;
7052 USHORT ptrMainCallParserFar;
7053 ASIC_TRANSMITTER_INFO asTransmitterInfo[1];
7054 ASIC_ENCODER_INFO asEncoderInfo[1];
7055 }ATOM_DISP_OUT_INFO_V2;
7056
7057
7058 typedef struct _ATOM_DISP_CLOCK_ID {
7059 UCHAR ucPpllId;
7060 UCHAR ucPpllAttribute;
7061 }ATOM_DISP_CLOCK_ID;
7062
7063
7064 #define CLOCK_SOURCE_SHAREABLE 0x01
7065 #define CLOCK_SOURCE_DP_MODE 0x02
7066 #define CLOCK_SOURCE_NONE_DP_MODE 0x04
7067
7068
7069 typedef struct _ASIC_TRANSMITTER_INFO_V2
7070 {
7071 USHORT usTransmitterObjId;
7072 USHORT usDispClkIdOffset;
7073 UCHAR ucTransmitterCmdTblId;
7074 UCHAR ucConfig;
7075 UCHAR ucEncoderID;
7076 UCHAR ucOptionEncoderID;
7077 UCHAR uc2ndEncoderID;
7078 UCHAR ucReserved;
7079 }ASIC_TRANSMITTER_INFO_V2;
7080
7081 typedef struct _ATOM_DISP_OUT_INFO_V3
7082 {
7083 ATOM_COMMON_TABLE_HEADER sHeader;
7084 USHORT ptrTransmitterInfo;
7085 USHORT ptrEncoderInfo;
7086 USHORT ptrMainCallParserFar;
7087 USHORT usReserved;
7088 UCHAR ucDCERevision;
7089 UCHAR ucMaxDispEngineNum;
7090 UCHAR ucMaxActiveDispEngineNum;
7091 UCHAR ucMaxPPLLNum;
7092 UCHAR ucCoreRefClkSource;
7093 UCHAR ucDispCaps;
7094 UCHAR ucReserved[2];
7095 ASIC_TRANSMITTER_INFO_V2 asTransmitterInfo[1];
7096 }ATOM_DISP_OUT_INFO_V3;
7097
7098
7099 #define DISPLAY_CAPS__DP_PCLK_FROM_PPLL 0x01
7100 #define DISPLAY_CAPS__FORCE_DISPDEV_CONNECTED 0x02
7101
7102 typedef enum CORE_REF_CLK_SOURCE{
7103 CLOCK_SRC_XTALIN=0,
7104 CLOCK_SRC_XO_IN=1,
7105 CLOCK_SRC_XO_IN2=2,
7106 }CORE_REF_CLK_SOURCE;
7107
7108
7109 typedef struct _ATOM_DISPLAY_DEVICE_PRIORITY_INFO
7110 {
7111 ATOM_COMMON_TABLE_HEADER sHeader;
7112 USHORT asDevicePriority[16];
7113 }ATOM_DISPLAY_DEVICE_PRIORITY_INFO;
7114
7115
7116 typedef struct _PROCESS_AUX_CHANNEL_TRANSACTION_PARAMETERS
7117 {
7118 USHORT lpAuxRequest;
7119 USHORT lpDataOut;
7120 UCHAR ucChannelID;
7121 union
7122 {
7123 UCHAR ucReplyStatus;
7124 UCHAR ucDelay;
7125 };
7126 UCHAR ucDataOutLen;
7127 UCHAR ucReserved;
7128 }PROCESS_AUX_CHANNEL_TRANSACTION_PARAMETERS;
7129
7130
7131 typedef struct _PROCESS_AUX_CHANNEL_TRANSACTION_PARAMETERS_V2
7132 {
7133 USHORT lpAuxRequest;
7134 USHORT lpDataOut;
7135 UCHAR ucChannelID;
7136 union
7137 {
7138 UCHAR ucReplyStatus;
7139 UCHAR ucDelay;
7140 };
7141 UCHAR ucDataOutLen;
7142 UCHAR ucHPD_ID;
7143 }PROCESS_AUX_CHANNEL_TRANSACTION_PARAMETERS_V2;
7144
7145 #define PROCESS_AUX_CHANNEL_TRANSACTION_PS_ALLOCATION PROCESS_AUX_CHANNEL_TRANSACTION_PARAMETERS
7146
7147
7148
7149 typedef struct _DP_ENCODER_SERVICE_PARAMETERS
7150 {
7151 USHORT ucLinkClock;
7152 union
7153 {
7154 UCHAR ucConfig;
7155 UCHAR ucI2cId;
7156 };
7157 UCHAR ucAction;
7158 UCHAR ucStatus;
7159 UCHAR ucLaneNum;
7160 UCHAR ucReserved[2];
7161 }DP_ENCODER_SERVICE_PARAMETERS;
7162
7163
7164 #define ATOM_DP_ACTION_GET_SINK_TYPE 0x01
7165
7166 #define ATOM_DP_ACTION_TRAINING_START 0x02
7167 #define ATOM_DP_ACTION_TRAINING_COMPLETE 0x03
7168 #define ATOM_DP_ACTION_TRAINING_PATTERN_SEL 0x04
7169 #define ATOM_DP_ACTION_SET_VSWING_PREEMP 0x05
7170 #define ATOM_DP_ACTION_GET_VSWING_PREEMP 0x06
7171 #define ATOM_DP_ACTION_BLANKING 0x07
7172
7173
7174 #define ATOM_DP_CONFIG_ENCODER_SEL_MASK 0x03
7175 #define ATOM_DP_CONFIG_DIG1_ENCODER 0x00
7176 #define ATOM_DP_CONFIG_DIG2_ENCODER 0x01
7177 #define ATOM_DP_CONFIG_EXTERNAL_ENCODER 0x02
7178 #define ATOM_DP_CONFIG_LINK_SEL_MASK 0x04
7179 #define ATOM_DP_CONFIG_LINK_A 0x00
7180 #define ATOM_DP_CONFIG_LINK_B 0x04
7181
7182 #define DP_ENCODER_SERVICE_PS_ALLOCATION WRITE_ONE_BYTE_HW_I2C_DATA_PARAMETERS
7183
7184
7185 typedef struct _DP_ENCODER_SERVICE_PARAMETERS_V2
7186 {
7187 USHORT usExtEncoderObjId;
7188 UCHAR ucAuxId;
7189 UCHAR ucAction;
7190 UCHAR ucSinkType;
7191 UCHAR ucHPDId;
7192 UCHAR ucReserved[2];
7193 }DP_ENCODER_SERVICE_PARAMETERS_V2;
7194
7195 typedef struct _DP_ENCODER_SERVICE_PS_ALLOCATION_V2
7196 {
7197 DP_ENCODER_SERVICE_PARAMETERS_V2 asDPServiceParam;
7198 PROCESS_AUX_CHANNEL_TRANSACTION_PARAMETERS_V2 asAuxParam;
7199 }DP_ENCODER_SERVICE_PS_ALLOCATION_V2;
7200
7201
7202 #define DP_SERVICE_V2_ACTION_GET_SINK_TYPE 0x01
7203 #define DP_SERVICE_V2_ACTION_DET_LCD_CONNECTION 0x02
7204
7205
7206
7207 #define DPCD_SET_LINKRATE_LANENUM_PATTERN1_TBL_ADDR ATOM_DP_TRAINING_TBL_ADDR
7208 #define DPCD_SET_SS_CNTL_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 8 )
7209 #define DPCD_SET_LANE_VSWING_PREEMP_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 16 )
7210 #define DPCD_SET_TRAINING_PATTERN0_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 24 )
7211 #define DPCD_SET_TRAINING_PATTERN2_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 32)
7212 #define DPCD_GET_LINKRATE_LANENUM_SS_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 40)
7213 #define DPCD_GET_LANE_STATUS_ADJUST_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 48)
7214 #define DP_I2C_AUX_DDC_WRITE_START_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 60)
7215 #define DP_I2C_AUX_DDC_WRITE_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 64)
7216 #define DP_I2C_AUX_DDC_READ_START_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 72)
7217 #define DP_I2C_AUX_DDC_READ_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 76)
7218 #define DP_I2C_AUX_DDC_WRITE_END_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 80)
7219 #define DP_I2C_AUX_DDC_READ_END_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 84)
7220
7221 typedef struct _PROCESS_I2C_CHANNEL_TRANSACTION_PARAMETERS
7222 {
7223 UCHAR ucI2CSpeed;
7224 union
7225 {
7226 UCHAR ucRegIndex;
7227 UCHAR ucStatus;
7228 };
7229 USHORT lpI2CDataOut;
7230 UCHAR ucFlag;
7231 UCHAR ucTransBytes;
7232 UCHAR ucSlaveAddr;
7233 UCHAR ucLineNumber;
7234 }PROCESS_I2C_CHANNEL_TRANSACTION_PARAMETERS;
7235
7236 #define PROCESS_I2C_CHANNEL_TRANSACTION_PS_ALLOCATION PROCESS_I2C_CHANNEL_TRANSACTION_PARAMETERS
7237
7238
7239 #define HW_I2C_WRITE 1
7240 #define HW_I2C_READ 0
7241 #define I2C_2BYTE_ADDR 0x02
7242
7243
7244
7245
7246 typedef struct _ATOM_HW_MISC_OPERATION_INPUT_PARAMETER_V1_1
7247 {
7248 UCHAR ucCmd;
7249 UCHAR ucReserved[3];
7250 ULONG ulReserved;
7251 }ATOM_HW_MISC_OPERATION_INPUT_PARAMETER_V1_1;
7252
7253 typedef struct _ATOM_HW_MISC_OPERATION_OUTPUT_PARAMETER_V1_1
7254 {
7255 UCHAR ucReturnCode;
7256 UCHAR ucReserved[3];
7257 ULONG ulReserved;
7258 }ATOM_HW_MISC_OPERATION_OUTPUT_PARAMETER_V1_1;
7259
7260
7261 #define ATOM_GET_SDI_SUPPORT 0xF0
7262
7263
7264 #define ATOM_UNKNOWN_CMD 0
7265 #define ATOM_FEATURE_NOT_SUPPORTED 1
7266 #define ATOM_FEATURE_SUPPORTED 2
7267
7268 typedef struct _ATOM_HW_MISC_OPERATION_PS_ALLOCATION
7269 {
7270 ATOM_HW_MISC_OPERATION_INPUT_PARAMETER_V1_1 sInput_Output;
7271 PROCESS_I2C_CHANNEL_TRANSACTION_PARAMETERS sReserved;
7272 }ATOM_HW_MISC_OPERATION_PS_ALLOCATION;
7273
7274
7275
7276 typedef struct _SET_HWBLOCK_INSTANCE_PARAMETER_V2
7277 {
7278 UCHAR ucHWBlkInst;
7279 UCHAR ucReserved[3];
7280 }SET_HWBLOCK_INSTANCE_PARAMETER_V2;
7281
7282 #define HWBLKINST_INSTANCE_MASK 0x07
7283 #define HWBLKINST_HWBLK_MASK 0xF0
7284 #define HWBLKINST_HWBLK_SHIFT 0x04
7285
7286
7287 #define SELECT_DISP_ENGINE 0
7288 #define SELECT_DISP_PLL 1
7289 #define SELECT_DCIO_UNIPHY_LINK0 2
7290 #define SELECT_DCIO_UNIPHY_LINK1 3
7291 #define SELECT_DCIO_IMPCAL 4
7292 #define SELECT_DCIO_DIG 6
7293 #define SELECT_CRTC_PIXEL_RATE 7
7294 #define SELECT_VGA_BLK 8
7295
7296
7297 typedef struct _DIG_TRANSMITTER_INFO_HEADER_V3_1{
7298 ATOM_COMMON_TABLE_HEADER sHeader;
7299 USHORT usDPVsPreEmphSettingOffset;
7300 USHORT usPhyAnalogRegListOffset;
7301 USHORT usPhyAnalogSettingOffset;
7302 USHORT usPhyPllRegListOffset;
7303 USHORT usPhyPllSettingOffset;
7304 }DIG_TRANSMITTER_INFO_HEADER_V3_1;
7305
7306 typedef struct _DIG_TRANSMITTER_INFO_HEADER_V3_2{
7307 ATOM_COMMON_TABLE_HEADER sHeader;
7308 USHORT usDPVsPreEmphSettingOffset;
7309 USHORT usPhyAnalogRegListOffset;
7310 USHORT usPhyAnalogSettingOffset;
7311 USHORT usPhyPllRegListOffset;
7312 USHORT usPhyPllSettingOffset;
7313 USHORT usDPSSRegListOffset;
7314 USHORT usDPSSSettingOffset;
7315 }DIG_TRANSMITTER_INFO_HEADER_V3_2;
7316
7317 typedef struct _CLOCK_CONDITION_REGESTER_INFO{
7318 USHORT usRegisterIndex;
7319 UCHAR ucStartBit;
7320 UCHAR ucEndBit;
7321 }CLOCK_CONDITION_REGESTER_INFO;
7322
7323 typedef struct _CLOCK_CONDITION_SETTING_ENTRY{
7324 USHORT usMaxClockFreq;
7325 UCHAR ucEncodeMode;
7326 UCHAR ucPhySel;
7327 ULONG ulAnalogSetting[1];
7328 }CLOCK_CONDITION_SETTING_ENTRY;
7329
7330 typedef struct _CLOCK_CONDITION_SETTING_INFO{
7331 USHORT usEntrySize;
7332 CLOCK_CONDITION_SETTING_ENTRY asClkCondSettingEntry[1];
7333 }CLOCK_CONDITION_SETTING_INFO;
7334
7335 typedef struct _PHY_CONDITION_REG_VAL{
7336 ULONG ulCondition;
7337 ULONG ulRegVal;
7338 }PHY_CONDITION_REG_VAL;
7339
7340 typedef struct _PHY_CONDITION_REG_VAL_V2{
7341 ULONG ulCondition;
7342 UCHAR ucCondition2;
7343 ULONG ulRegVal;
7344 }PHY_CONDITION_REG_VAL_V2;
7345
7346 typedef struct _PHY_CONDITION_REG_INFO{
7347 USHORT usRegIndex;
7348 USHORT usSize;
7349 PHY_CONDITION_REG_VAL asRegVal[1];
7350 }PHY_CONDITION_REG_INFO;
7351
7352 typedef struct _PHY_CONDITION_REG_INFO_V2{
7353 USHORT usRegIndex;
7354 USHORT usSize;
7355 PHY_CONDITION_REG_VAL_V2 asRegVal[1];
7356 }PHY_CONDITION_REG_INFO_V2;
7357
7358 typedef struct _PHY_ANALOG_SETTING_INFO{
7359 UCHAR ucEncodeMode;
7360 UCHAR ucPhySel;
7361 USHORT usSize;
7362 PHY_CONDITION_REG_INFO asAnalogSetting[1];
7363 }PHY_ANALOG_SETTING_INFO;
7364
7365 typedef struct _PHY_ANALOG_SETTING_INFO_V2{
7366 UCHAR ucEncodeMode;
7367 UCHAR ucPhySel;
7368 USHORT usSize;
7369 PHY_CONDITION_REG_INFO_V2 asAnalogSetting[1];
7370 }PHY_ANALOG_SETTING_INFO_V2;
7371
7372 typedef struct _GFX_HAVESTING_PARAMETERS {
7373 UCHAR ucGfxBlkId;
7374 UCHAR ucReserved;
7375 UCHAR ucActiveUnitNumPerSH;
7376 UCHAR ucMaxUnitNumPerSH;
7377 } GFX_HAVESTING_PARAMETERS;
7378
7379
7380 #define GFX_HARVESTING_CU_ID 0
7381 #define GFX_HARVESTING_RB_ID 1
7382 #define GFX_HARVESTING_PRIM_ID 2
7383
7384
7385
7386
7387
7388 #define MC_MISC0__MEMORY_TYPE_MASK 0xF0000000
7389 #define MC_MISC0__MEMORY_TYPE__GDDR1 0x10000000
7390 #define MC_MISC0__MEMORY_TYPE__DDR2 0x20000000
7391 #define MC_MISC0__MEMORY_TYPE__GDDR3 0x30000000
7392 #define MC_MISC0__MEMORY_TYPE__GDDR4 0x40000000
7393 #define MC_MISC0__MEMORY_TYPE__GDDR5 0x50000000
7394 #define MC_MISC0__MEMORY_TYPE__HBM 0x60000000
7395 #define MC_MISC0__MEMORY_TYPE__DDR3 0xB0000000
7396
7397 #define ATOM_MEM_TYPE_DDR_STRING "DDR"
7398 #define ATOM_MEM_TYPE_DDR2_STRING "DDR2"
7399 #define ATOM_MEM_TYPE_GDDR3_STRING "GDDR3"
7400 #define ATOM_MEM_TYPE_GDDR4_STRING "GDDR4"
7401 #define ATOM_MEM_TYPE_GDDR5_STRING "GDDR5"
7402 #define ATOM_MEM_TYPE_HBM_STRING "HBM"
7403 #define ATOM_MEM_TYPE_DDR3_STRING "DDR3"
7404
7405
7406
7407
7408
7409
7410
7411 typedef struct _ATOM_DAC_INFO
7412 {
7413 ATOM_COMMON_TABLE_HEADER sHeader;
7414 USHORT usMaxFrequency;
7415 USHORT usReserved;
7416 }ATOM_DAC_INFO;
7417
7418
7419 typedef struct _COMPASSIONATE_DATA
7420 {
7421 ATOM_COMMON_TABLE_HEADER sHeader;
7422
7423
7424 UCHAR ucDAC1_BG_Adjustment;
7425 UCHAR ucDAC1_DAC_Adjustment;
7426 USHORT usDAC1_FORCE_Data;
7427
7428 UCHAR ucDAC2_CRT2_BG_Adjustment;
7429 UCHAR ucDAC2_CRT2_DAC_Adjustment;
7430 USHORT usDAC2_CRT2_FORCE_Data;
7431 USHORT usDAC2_CRT2_MUX_RegisterIndex;
7432 UCHAR ucDAC2_CRT2_MUX_RegisterInfo;
7433 UCHAR ucDAC2_NTSC_BG_Adjustment;
7434 UCHAR ucDAC2_NTSC_DAC_Adjustment;
7435 USHORT usDAC2_TV1_FORCE_Data;
7436 USHORT usDAC2_TV1_MUX_RegisterIndex;
7437 UCHAR ucDAC2_TV1_MUX_RegisterInfo;
7438 UCHAR ucDAC2_CV_BG_Adjustment;
7439 UCHAR ucDAC2_CV_DAC_Adjustment;
7440 USHORT usDAC2_CV_FORCE_Data;
7441 USHORT usDAC2_CV_MUX_RegisterIndex;
7442 UCHAR ucDAC2_CV_MUX_RegisterInfo;
7443 UCHAR ucDAC2_PAL_BG_Adjustment;
7444 UCHAR ucDAC2_PAL_DAC_Adjustment;
7445 USHORT usDAC2_TV2_FORCE_Data;
7446 }COMPASSIONATE_DATA;
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472 typedef struct _ATOM_CONNECTOR_INFO
7473 {
7474 #if ATOM_BIG_ENDIAN
7475 UCHAR bfConnectorType:4;
7476 UCHAR bfAssociatedDAC:4;
7477 #else
7478 UCHAR bfAssociatedDAC:4;
7479 UCHAR bfConnectorType:4;
7480 #endif
7481 }ATOM_CONNECTOR_INFO;
7482
7483 typedef union _ATOM_CONNECTOR_INFO_ACCESS
7484 {
7485 ATOM_CONNECTOR_INFO sbfAccess;
7486 UCHAR ucAccess;
7487 }ATOM_CONNECTOR_INFO_ACCESS;
7488
7489 typedef struct _ATOM_CONNECTOR_INFO_I2C
7490 {
7491 ATOM_CONNECTOR_INFO_ACCESS sucConnectorInfo;
7492 ATOM_I2C_ID_CONFIG_ACCESS sucI2cId;
7493 }ATOM_CONNECTOR_INFO_I2C;
7494
7495
7496 typedef struct _ATOM_SUPPORTED_DEVICES_INFO
7497 {
7498 ATOM_COMMON_TABLE_HEADER sHeader;
7499 USHORT usDeviceSupport;
7500 ATOM_CONNECTOR_INFO_I2C asConnInfo[ATOM_MAX_SUPPORTED_DEVICE_INFO];
7501 }ATOM_SUPPORTED_DEVICES_INFO;
7502
7503 #define NO_INT_SRC_MAPPED 0xFF
7504
7505 typedef struct _ATOM_CONNECTOR_INC_SRC_BITMAP
7506 {
7507 UCHAR ucIntSrcBitmap;
7508 }ATOM_CONNECTOR_INC_SRC_BITMAP;
7509
7510 typedef struct _ATOM_SUPPORTED_DEVICES_INFO_2
7511 {
7512 ATOM_COMMON_TABLE_HEADER sHeader;
7513 USHORT usDeviceSupport;
7514 ATOM_CONNECTOR_INFO_I2C asConnInfo[ATOM_MAX_SUPPORTED_DEVICE_INFO_2];
7515 ATOM_CONNECTOR_INC_SRC_BITMAP asIntSrcInfo[ATOM_MAX_SUPPORTED_DEVICE_INFO_2];
7516 }ATOM_SUPPORTED_DEVICES_INFO_2;
7517
7518 typedef struct _ATOM_SUPPORTED_DEVICES_INFO_2d1
7519 {
7520 ATOM_COMMON_TABLE_HEADER sHeader;
7521 USHORT usDeviceSupport;
7522 ATOM_CONNECTOR_INFO_I2C asConnInfo[ATOM_MAX_SUPPORTED_DEVICE];
7523 ATOM_CONNECTOR_INC_SRC_BITMAP asIntSrcInfo[ATOM_MAX_SUPPORTED_DEVICE];
7524 }ATOM_SUPPORTED_DEVICES_INFO_2d1;
7525
7526 #define ATOM_SUPPORTED_DEVICES_INFO_LAST ATOM_SUPPORTED_DEVICES_INFO_2d1
7527
7528
7529
7530 typedef struct _ATOM_MISC_CONTROL_INFO
7531 {
7532 USHORT usFrequency;
7533 UCHAR ucPLL_ChargePump;
7534 UCHAR ucPLL_DutyCycle;
7535 UCHAR ucPLL_VCO_Gain;
7536 UCHAR ucPLL_VoltageSwing;
7537 }ATOM_MISC_CONTROL_INFO;
7538
7539
7540 #define ATOM_MAX_MISC_INFO 4
7541
7542 typedef struct _ATOM_TMDS_INFO
7543 {
7544 ATOM_COMMON_TABLE_HEADER sHeader;
7545 USHORT usMaxFrequency;
7546 ATOM_MISC_CONTROL_INFO asMiscInfo[ATOM_MAX_MISC_INFO];
7547 }ATOM_TMDS_INFO;
7548
7549
7550 typedef struct _ATOM_ENCODER_ANALOG_ATTRIBUTE
7551 {
7552 UCHAR ucTVStandard;
7553 UCHAR ucPadding[1];
7554 }ATOM_ENCODER_ANALOG_ATTRIBUTE;
7555
7556 typedef struct _ATOM_ENCODER_DIGITAL_ATTRIBUTE
7557 {
7558 UCHAR ucAttribute;
7559 UCHAR ucPadding[1];
7560 }ATOM_ENCODER_DIGITAL_ATTRIBUTE;
7561
7562 typedef union _ATOM_ENCODER_ATTRIBUTE
7563 {
7564 ATOM_ENCODER_ANALOG_ATTRIBUTE sAlgAttrib;
7565 ATOM_ENCODER_DIGITAL_ATTRIBUTE sDigAttrib;
7566 }ATOM_ENCODER_ATTRIBUTE;
7567
7568
7569 typedef struct _DVO_ENCODER_CONTROL_PARAMETERS
7570 {
7571 USHORT usPixelClock;
7572 USHORT usEncoderID;
7573 UCHAR ucDeviceType;
7574 UCHAR ucAction;
7575 ATOM_ENCODER_ATTRIBUTE usDevAttr;
7576 }DVO_ENCODER_CONTROL_PARAMETERS;
7577
7578 typedef struct _DVO_ENCODER_CONTROL_PS_ALLOCATION
7579 {
7580 DVO_ENCODER_CONTROL_PARAMETERS sDVOEncoder;
7581 WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved;
7582 }DVO_ENCODER_CONTROL_PS_ALLOCATION;
7583
7584
7585 #define ATOM_XTMDS_ASIC_SI164_ID 1
7586 #define ATOM_XTMDS_ASIC_SI178_ID 2
7587 #define ATOM_XTMDS_ASIC_TFP513_ID 3
7588 #define ATOM_XTMDS_SUPPORTED_SINGLELINK 0x00000001
7589 #define ATOM_XTMDS_SUPPORTED_DUALLINK 0x00000002
7590 #define ATOM_XTMDS_MVPU_FPGA 0x00000004
7591
7592
7593 typedef struct _ATOM_XTMDS_INFO
7594 {
7595 ATOM_COMMON_TABLE_HEADER sHeader;
7596 USHORT usSingleLinkMaxFrequency;
7597 ATOM_I2C_ID_CONFIG_ACCESS sucI2cId;
7598 UCHAR ucXtransimitterID;
7599 UCHAR ucSupportedLink;
7600 UCHAR ucSequnceAlterID;
7601
7602 UCHAR ucMasterAddress;
7603 UCHAR ucSlaveAddress;
7604 }ATOM_XTMDS_INFO;
7605
7606 typedef struct _DFP_DPMS_STATUS_CHANGE_PARAMETERS
7607 {
7608 UCHAR ucEnable;
7609 UCHAR ucDevice;
7610 UCHAR ucPadding[2];
7611 }DFP_DPMS_STATUS_CHANGE_PARAMETERS;
7612
7613
7614
7615
7616 #define ATOM_PM_MISCINFO_SPLIT_CLOCK 0x00000000L
7617 #define ATOM_PM_MISCINFO_USING_MCLK_SRC 0x00000001L
7618 #define ATOM_PM_MISCINFO_USING_SCLK_SRC 0x00000002L
7619
7620 #define ATOM_PM_MISCINFO_VOLTAGE_DROP_SUPPORT 0x00000004L
7621 #define ATOM_PM_MISCINFO_VOLTAGE_DROP_ACTIVE_HIGH 0x00000008L
7622
7623 #define ATOM_PM_MISCINFO_LOAD_PERFORMANCE_EN 0x00000010L
7624
7625 #define ATOM_PM_MISCINFO_ENGINE_CLOCK_CONTRL_EN 0x00000020L
7626 #define ATOM_PM_MISCINFO_MEMORY_CLOCK_CONTRL_EN 0x00000040L
7627 #define ATOM_PM_MISCINFO_PROGRAM_VOLTAGE 0x00000080L
7628
7629 #define ATOM_PM_MISCINFO_ASIC_REDUCED_SPEED_SCLK_EN 0x00000100L
7630 #define ATOM_PM_MISCINFO_ASIC_DYNAMIC_VOLTAGE_EN 0x00000200L
7631 #define ATOM_PM_MISCINFO_ASIC_SLEEP_MODE_EN 0x00000400L
7632 #define ATOM_PM_MISCINFO_LOAD_BALANCE_EN 0x00000800L
7633 #define ATOM_PM_MISCINFO_DEFAULT_DC_STATE_ENTRY_TRUE 0x00001000L
7634 #define ATOM_PM_MISCINFO_DEFAULT_LOW_DC_STATE_ENTRY_TRUE 0x00002000L
7635 #define ATOM_PM_MISCINFO_LOW_LCD_REFRESH_RATE 0x00004000L
7636
7637 #define ATOM_PM_MISCINFO_DRIVER_DEFAULT_MODE 0x00008000L
7638 #define ATOM_PM_MISCINFO_OVER_CLOCK_MODE 0x00010000L
7639 #define ATOM_PM_MISCINFO_OVER_DRIVE_MODE 0x00020000L
7640 #define ATOM_PM_MISCINFO_POWER_SAVING_MODE 0x00040000L
7641 #define ATOM_PM_MISCINFO_THERMAL_DIODE_MODE 0x00080000L
7642
7643 #define ATOM_PM_MISCINFO_FRAME_MODULATION_MASK 0x00300000L
7644 #define ATOM_PM_MISCINFO_FRAME_MODULATION_SHIFT 20
7645
7646 #define ATOM_PM_MISCINFO_DYN_CLK_3D_IDLE 0x00400000L
7647 #define ATOM_PM_MISCINFO_DYNAMIC_CLOCK_DIVIDER_BY_2 0x00800000L
7648 #define ATOM_PM_MISCINFO_DYNAMIC_CLOCK_DIVIDER_BY_4 0x01000000L
7649 #define ATOM_PM_MISCINFO_DYNAMIC_HDP_BLOCK_EN 0x02000000L
7650 #define ATOM_PM_MISCINFO_DYNAMIC_MC_HOST_BLOCK_EN 0x04000000L
7651 #define ATOM_PM_MISCINFO_3D_ACCELERATION_EN 0x08000000L
7652
7653 #define ATOM_PM_MISCINFO_POWERPLAY_SETTINGS_GROUP_MASK 0x70000000L
7654 #define ATOM_PM_MISCINFO_POWERPLAY_SETTINGS_GROUP_SHIFT 28
7655 #define ATOM_PM_MISCINFO_ENABLE_BACK_BIAS 0x80000000L
7656
7657 #define ATOM_PM_MISCINFO2_SYSTEM_AC_LITE_MODE 0x00000001L
7658 #define ATOM_PM_MISCINFO2_MULTI_DISPLAY_SUPPORT 0x00000002L
7659 #define ATOM_PM_MISCINFO2_DYNAMIC_BACK_BIAS_EN 0x00000004L
7660 #define ATOM_PM_MISCINFO2_FS3D_OVERDRIVE_INFO 0x00000008L
7661 #define ATOM_PM_MISCINFO2_FORCEDLOWPWR_MODE 0x00000010L
7662 #define ATOM_PM_MISCINFO2_VDDCI_DYNAMIC_VOLTAGE_EN 0x00000020L
7663 #define ATOM_PM_MISCINFO2_VIDEO_PLAYBACK_CAPABLE 0x00000040L
7664
7665 #define ATOM_PM_MISCINFO2_NOT_VALID_ON_DC 0x00000080L
7666 #define ATOM_PM_MISCINFO2_STUTTER_MODE_EN 0x00000100L
7667 #define ATOM_PM_MISCINFO2_UVD_SUPPORT_MODE 0x00000200L
7668
7669
7670
7671 typedef struct _ATOM_POWERMODE_INFO
7672 {
7673 ULONG ulMiscInfo;
7674 ULONG ulReserved1;
7675 ULONG ulReserved2;
7676 USHORT usEngineClock;
7677 USHORT usMemoryClock;
7678 UCHAR ucVoltageDropIndex;
7679 UCHAR ucSelectedPanel_RefreshRate;
7680 UCHAR ucMinTemperature;
7681 UCHAR ucMaxTemperature;
7682 UCHAR ucNumPciELanes;
7683 }ATOM_POWERMODE_INFO;
7684
7685
7686
7687 typedef struct _ATOM_POWERMODE_INFO_V2
7688 {
7689 ULONG ulMiscInfo;
7690 ULONG ulMiscInfo2;
7691 ULONG ulEngineClock;
7692 ULONG ulMemoryClock;
7693 UCHAR ucVoltageDropIndex;
7694 UCHAR ucSelectedPanel_RefreshRate;
7695 UCHAR ucMinTemperature;
7696 UCHAR ucMaxTemperature;
7697 UCHAR ucNumPciELanes;
7698 }ATOM_POWERMODE_INFO_V2;
7699
7700
7701
7702 typedef struct _ATOM_POWERMODE_INFO_V3
7703 {
7704 ULONG ulMiscInfo;
7705 ULONG ulMiscInfo2;
7706 ULONG ulEngineClock;
7707 ULONG ulMemoryClock;
7708 UCHAR ucVoltageDropIndex;
7709 UCHAR ucSelectedPanel_RefreshRate;
7710 UCHAR ucMinTemperature;
7711 UCHAR ucMaxTemperature;
7712 UCHAR ucNumPciELanes;
7713 UCHAR ucVDDCI_VoltageDropIndex;
7714 }ATOM_POWERMODE_INFO_V3;
7715
7716
7717 #define ATOM_MAX_NUMBEROF_POWER_BLOCK 8
7718
7719 #define ATOM_PP_OVERDRIVE_INTBITMAP_AUXWIN 0x01
7720 #define ATOM_PP_OVERDRIVE_INTBITMAP_OVERDRIVE 0x02
7721
7722 #define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_LM63 0x01
7723 #define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_ADM1032 0x02
7724 #define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_ADM1030 0x03
7725 #define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_MUA6649 0x04
7726 #define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_LM64 0x05
7727 #define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_F75375 0x06
7728 #define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_ASC7512 0x07
7729
7730
7731 typedef struct _ATOM_POWERPLAY_INFO
7732 {
7733 ATOM_COMMON_TABLE_HEADER sHeader;
7734 UCHAR ucOverdriveThermalController;
7735 UCHAR ucOverdriveI2cLine;
7736 UCHAR ucOverdriveIntBitmap;
7737 UCHAR ucOverdriveControllerAddress;
7738 UCHAR ucSizeOfPowerModeEntry;
7739 UCHAR ucNumOfPowerModeEntries;
7740 ATOM_POWERMODE_INFO asPowerPlayInfo[ATOM_MAX_NUMBEROF_POWER_BLOCK];
7741 }ATOM_POWERPLAY_INFO;
7742
7743 typedef struct _ATOM_POWERPLAY_INFO_V2
7744 {
7745 ATOM_COMMON_TABLE_HEADER sHeader;
7746 UCHAR ucOverdriveThermalController;
7747 UCHAR ucOverdriveI2cLine;
7748 UCHAR ucOverdriveIntBitmap;
7749 UCHAR ucOverdriveControllerAddress;
7750 UCHAR ucSizeOfPowerModeEntry;
7751 UCHAR ucNumOfPowerModeEntries;
7752 ATOM_POWERMODE_INFO_V2 asPowerPlayInfo[ATOM_MAX_NUMBEROF_POWER_BLOCK];
7753 }ATOM_POWERPLAY_INFO_V2;
7754
7755 typedef struct _ATOM_POWERPLAY_INFO_V3
7756 {
7757 ATOM_COMMON_TABLE_HEADER sHeader;
7758 UCHAR ucOverdriveThermalController;
7759 UCHAR ucOverdriveI2cLine;
7760 UCHAR ucOverdriveIntBitmap;
7761 UCHAR ucOverdriveControllerAddress;
7762 UCHAR ucSizeOfPowerModeEntry;
7763 UCHAR ucNumOfPowerModeEntries;
7764 ATOM_POWERMODE_INFO_V3 asPowerPlayInfo[ATOM_MAX_NUMBEROF_POWER_BLOCK];
7765 }ATOM_POWERPLAY_INFO_V3;
7766
7767
7768
7769 #define ATOM_MASTER_DATA_TABLE_REVISION 0x01
7770 #define Object_Info Object_Header
7771 #define AdjustARB_SEQ MC_InitParameter
7772 #define VRAM_GPIO_DetectionInfo VoltageObjectInfo
7773 #define ASIC_VDDCI_Info ASIC_ProfilingInfo
7774 #define ASIC_MVDDQ_Info MemoryTrainingInfo
7775 #define SS_Info PPLL_SS_Info
7776 #define ASIC_MVDDC_Info ASIC_InternalSS_Info
7777 #define DispDevicePriorityInfo SaveRestoreInfo
7778 #define DispOutInfo TV_VideoMode
7779
7780
7781 #define ATOM_ENCODER_OBJECT_TABLE ATOM_OBJECT_TABLE
7782 #define ATOM_CONNECTOR_OBJECT_TABLE ATOM_OBJECT_TABLE
7783
7784
7785 #define DFP2I_OUTPUT_CONTROL_PARAMETERS CRT1_OUTPUT_CONTROL_PARAMETERS
7786 #define DFP2I_OUTPUT_CONTROL_PS_ALLOCATION DFP2I_OUTPUT_CONTROL_PARAMETERS
7787
7788 #define DFP1X_OUTPUT_CONTROL_PARAMETERS CRT1_OUTPUT_CONTROL_PARAMETERS
7789 #define DFP1X_OUTPUT_CONTROL_PS_ALLOCATION DFP1X_OUTPUT_CONTROL_PARAMETERS
7790
7791 #define DFP1I_OUTPUT_CONTROL_PARAMETERS DFP1_OUTPUT_CONTROL_PARAMETERS
7792 #define DFP1I_OUTPUT_CONTROL_PS_ALLOCATION DFP1_OUTPUT_CONTROL_PS_ALLOCATION
7793
7794 #define ATOM_DEVICE_DFP1I_SUPPORT ATOM_DEVICE_DFP1_SUPPORT
7795 #define ATOM_DEVICE_DFP1X_SUPPORT ATOM_DEVICE_DFP2_SUPPORT
7796
7797 #define ATOM_DEVICE_DFP1I_INDEX ATOM_DEVICE_DFP1_INDEX
7798 #define ATOM_DEVICE_DFP1X_INDEX ATOM_DEVICE_DFP2_INDEX
7799
7800 #define ATOM_DEVICE_DFP2I_INDEX 0x00000009
7801 #define ATOM_DEVICE_DFP2I_SUPPORT (0x1L << ATOM_DEVICE_DFP2I_INDEX)
7802
7803 #define ATOM_S0_DFP1I ATOM_S0_DFP1
7804 #define ATOM_S0_DFP1X ATOM_S0_DFP2
7805
7806 #define ATOM_S0_DFP2I 0x00200000L
7807 #define ATOM_S0_DFP2Ib2 0x20
7808
7809 #define ATOM_S2_DFP1I_DPMS_STATE ATOM_S2_DFP1_DPMS_STATE
7810 #define ATOM_S2_DFP1X_DPMS_STATE ATOM_S2_DFP2_DPMS_STATE
7811
7812 #define ATOM_S2_DFP2I_DPMS_STATE 0x02000000L
7813 #define ATOM_S2_DFP2I_DPMS_STATEb3 0x02
7814
7815 #define ATOM_S3_DFP2I_ACTIVEb1 0x02
7816
7817 #define ATOM_S3_DFP1I_ACTIVE ATOM_S3_DFP1_ACTIVE
7818 #define ATOM_S3_DFP1X_ACTIVE ATOM_S3_DFP2_ACTIVE
7819
7820 #define ATOM_S3_DFP2I_ACTIVE 0x00000200L
7821
7822 #define ATOM_S3_DFP1I_CRTC_ACTIVE ATOM_S3_DFP1_CRTC_ACTIVE
7823 #define ATOM_S3_DFP1X_CRTC_ACTIVE ATOM_S3_DFP2_CRTC_ACTIVE
7824 #define ATOM_S3_DFP2I_CRTC_ACTIVE 0x02000000L
7825
7826 #define ATOM_S3_DFP2I_CRTC_ACTIVEb3 0x02
7827 #define ATOM_S5_DOS_REQ_DFP2Ib1 0x02
7828
7829 #define ATOM_S5_DOS_REQ_DFP2I 0x0200
7830 #define ATOM_S6_ACC_REQ_DFP1I ATOM_S6_ACC_REQ_DFP1
7831 #define ATOM_S6_ACC_REQ_DFP1X ATOM_S6_ACC_REQ_DFP2
7832
7833 #define ATOM_S6_ACC_REQ_DFP2Ib3 0x02
7834 #define ATOM_S6_ACC_REQ_DFP2I 0x02000000L
7835
7836 #define TMDS1XEncoderControl DVOEncoderControl
7837 #define DFP1XOutputControl DVOOutputControl
7838
7839 #define ExternalDFPOutputControl DFP1XOutputControl
7840 #define EnableExternalTMDS_Encoder TMDS1XEncoderControl
7841
7842 #define DFP1IOutputControl TMDSAOutputControl
7843 #define DFP2IOutputControl LVTMAOutputControl
7844
7845 #define DAC1_ENCODER_CONTROL_PARAMETERS DAC_ENCODER_CONTROL_PARAMETERS
7846 #define DAC1_ENCODER_CONTROL_PS_ALLOCATION DAC_ENCODER_CONTROL_PS_ALLOCATION
7847
7848 #define DAC2_ENCODER_CONTROL_PARAMETERS DAC_ENCODER_CONTROL_PARAMETERS
7849 #define DAC2_ENCODER_CONTROL_PS_ALLOCATION DAC_ENCODER_CONTROL_PS_ALLOCATION
7850
7851 #define ucDac1Standard ucDacStandard
7852 #define ucDac2Standard ucDacStandard
7853
7854 #define TMDS1EncoderControl TMDSAEncoderControl
7855 #define TMDS2EncoderControl LVTMAEncoderControl
7856
7857 #define DFP1OutputControl TMDSAOutputControl
7858 #define DFP2OutputControl LVTMAOutputControl
7859 #define CRT1OutputControl DAC1OutputControl
7860 #define CRT2OutputControl DAC2OutputControl
7861
7862
7863 #define EnableLVDS_SS EnableSpreadSpectrumOnPPLL
7864 #define ENABLE_LVDS_SS_PARAMETERS_V3 ENABLE_SPREAD_SPECTRUM_ON_PPLL
7865
7866
7867
7868
7869
7870
7871
7872 #define ATOM_S6_ACC_REQ_TV2 0x00400000L
7873 #define ATOM_DEVICE_TV2_INDEX 0x00000006
7874 #define ATOM_DEVICE_TV2_SUPPORT (0x1L << ATOM_DEVICE_TV2_INDEX)
7875 #define ATOM_S0_TV2 0x00100000L
7876 #define ATOM_S3_TV2_ACTIVE ATOM_S3_DFP6_ACTIVE
7877 #define ATOM_S3_TV2_CRTC_ACTIVE ATOM_S3_DFP6_CRTC_ACTIVE
7878
7879
7880 #define ATOM_S2_CRT1_DPMS_STATE 0x00010000L
7881 #define ATOM_S2_LCD1_DPMS_STATE 0x00020000L
7882 #define ATOM_S2_TV1_DPMS_STATE 0x00040000L
7883 #define ATOM_S2_DFP1_DPMS_STATE 0x00080000L
7884 #define ATOM_S2_CRT2_DPMS_STATE 0x00100000L
7885 #define ATOM_S2_LCD2_DPMS_STATE 0x00200000L
7886 #define ATOM_S2_TV2_DPMS_STATE 0x00400000L
7887 #define ATOM_S2_DFP2_DPMS_STATE 0x00800000L
7888 #define ATOM_S2_CV_DPMS_STATE 0x01000000L
7889 #define ATOM_S2_DFP3_DPMS_STATE 0x02000000L
7890 #define ATOM_S2_DFP4_DPMS_STATE 0x04000000L
7891 #define ATOM_S2_DFP5_DPMS_STATE 0x08000000L
7892
7893 #define ATOM_S2_CRT1_DPMS_STATEb2 0x01
7894 #define ATOM_S2_LCD1_DPMS_STATEb2 0x02
7895 #define ATOM_S2_TV1_DPMS_STATEb2 0x04
7896 #define ATOM_S2_DFP1_DPMS_STATEb2 0x08
7897 #define ATOM_S2_CRT2_DPMS_STATEb2 0x10
7898 #define ATOM_S2_LCD2_DPMS_STATEb2 0x20
7899 #define ATOM_S2_TV2_DPMS_STATEb2 0x40
7900 #define ATOM_S2_DFP2_DPMS_STATEb2 0x80
7901 #define ATOM_S2_CV_DPMS_STATEb3 0x01
7902 #define ATOM_S2_DFP3_DPMS_STATEb3 0x02
7903 #define ATOM_S2_DFP4_DPMS_STATEb3 0x04
7904 #define ATOM_S2_DFP5_DPMS_STATEb3 0x08
7905
7906 #define ATOM_S3_ASIC_GUI_ENGINE_HUNGb3 0x20
7907 #define ATOM_S3_ALLOW_FAST_PWR_SWITCHb3 0x40
7908 #define ATOM_S3_RQST_GPU_USE_MIN_PWRb3 0x80
7909
7910
7911
7912 #pragma pack()
7913
7914
7915
7916
7917 #pragma pack(1)
7918
7919 typedef struct {
7920 ULONG Signature;
7921 ULONG TableLength;
7922 UCHAR Revision;
7923 UCHAR Checksum;
7924 UCHAR OemId[6];
7925 UCHAR OemTableId[8];
7926 ULONG OemRevision;
7927 ULONG CreatorId;
7928 ULONG CreatorRevision;
7929 } AMD_ACPI_DESCRIPTION_HEADER;
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944 typedef struct {
7945 AMD_ACPI_DESCRIPTION_HEADER SHeader;
7946 UCHAR TableUUID[16];
7947 ULONG VBIOSImageOffset;
7948 ULONG Lib1ImageOffset;
7949 ULONG Reserved[4];
7950 }UEFI_ACPI_VFCT;
7951
7952 typedef struct {
7953 ULONG PCIBus;
7954 ULONG PCIDevice;
7955 ULONG PCIFunction;
7956 USHORT VendorID;
7957 USHORT DeviceID;
7958 USHORT SSVID;
7959 USHORT SSID;
7960 ULONG Revision;
7961 ULONG ImageLength;
7962 }VFCT_IMAGE_HEADER;
7963
7964
7965 typedef struct {
7966 VFCT_IMAGE_HEADER VbiosHeader;
7967 UCHAR VbiosContent[1];
7968 }GOP_VBIOS_CONTENT;
7969
7970 typedef struct {
7971 VFCT_IMAGE_HEADER Lib1Header;
7972 UCHAR Lib1Content[1];
7973 }GOP_LIB1_CONTENT;
7974
7975 #pragma pack()
7976
7977
7978 #endif
7979
7980 #include "pptable.h"
7981