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