diff options
Diffstat (limited to 'drivers/gpu/drm/radeon/atombios.h')
-rw-r--r-- | drivers/gpu/drm/radeon/atombios.h | 1040 |
1 files changed, 963 insertions, 77 deletions
diff --git a/drivers/gpu/drm/radeon/atombios.h b/drivers/gpu/drm/radeon/atombios.h index fe359a239df3..1b50ad8919d5 100644 --- a/drivers/gpu/drm/radeon/atombios.h +++ b/drivers/gpu/drm/radeon/atombios.h | |||
@@ -73,8 +73,18 @@ | |||
73 | #define ATOM_PPLL1 0 | 73 | #define ATOM_PPLL1 0 |
74 | #define ATOM_PPLL2 1 | 74 | #define ATOM_PPLL2 1 |
75 | #define ATOM_DCPLL 2 | 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 | ||
76 | #define ATOM_PPLL_INVALID 0xFF | 80 | #define ATOM_PPLL_INVALID 0xFF |
77 | 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 | |||
78 | #define ATOM_SCALER1 0 | 88 | #define ATOM_SCALER1 0 |
79 | #define ATOM_SCALER2 1 | 89 | #define ATOM_SCALER2 1 |
80 | 90 | ||
@@ -192,6 +202,9 @@ typedef struct _ATOM_COMMON_TABLE_HEADER | |||
192 | /*Image can't be updated, while Driver needs to carry the new table! */ | 202 | /*Image can't be updated, while Driver needs to carry the new table! */ |
193 | }ATOM_COMMON_TABLE_HEADER; | 203 | }ATOM_COMMON_TABLE_HEADER; |
194 | 204 | ||
205 | /****************************************************************************/ | ||
206 | // Structure stores the ROM header. | ||
207 | /****************************************************************************/ | ||
195 | typedef struct _ATOM_ROM_HEADER | 208 | typedef struct _ATOM_ROM_HEADER |
196 | { | 209 | { |
197 | ATOM_COMMON_TABLE_HEADER sHeader; | 210 | ATOM_COMMON_TABLE_HEADER sHeader; |
@@ -221,6 +234,9 @@ typedef struct _ATOM_ROM_HEADER | |||
221 | #define USHORT void* | 234 | #define USHORT void* |
222 | #endif | 235 | #endif |
223 | 236 | ||
237 | /****************************************************************************/ | ||
238 | // Structures used in Command.mtb | ||
239 | /****************************************************************************/ | ||
224 | typedef struct _ATOM_MASTER_LIST_OF_COMMAND_TABLES{ | 240 | typedef struct _ATOM_MASTER_LIST_OF_COMMAND_TABLES{ |
225 | USHORT ASIC_Init; //Function Table, used by various SW components,latest version 1.1 | 241 | USHORT ASIC_Init; //Function Table, used by various SW components,latest version 1.1 |
226 | USHORT GetDisplaySurfaceSize; //Atomic Table, Used by Bios when enabling HW ICON | 242 | USHORT GetDisplaySurfaceSize; //Atomic Table, Used by Bios when enabling HW ICON |
@@ -312,6 +328,7 @@ typedef struct _ATOM_MASTER_LIST_OF_COMMAND_TABLES{ | |||
312 | #define SetUniphyInstance ASIC_StaticPwrMgtStatusChange | 328 | #define SetUniphyInstance ASIC_StaticPwrMgtStatusChange |
313 | #define HPDInterruptService ReadHWAssistedI2CStatus | 329 | #define HPDInterruptService ReadHWAssistedI2CStatus |
314 | #define EnableVGA_Access GetSCLKOverMCLKRatio | 330 | #define EnableVGA_Access GetSCLKOverMCLKRatio |
331 | #define GetDispObjectInfo EnableYUV | ||
315 | 332 | ||
316 | typedef struct _ATOM_MASTER_COMMAND_TABLE | 333 | typedef struct _ATOM_MASTER_COMMAND_TABLE |
317 | { | 334 | { |
@@ -357,6 +374,24 @@ typedef struct _ATOM_COMMON_ROM_COMMAND_TABLE_HEADER | |||
357 | /****************************************************************************/ | 374 | /****************************************************************************/ |
358 | #define COMPUTE_MEMORY_PLL_PARAM 1 | 375 | #define COMPUTE_MEMORY_PLL_PARAM 1 |
359 | #define COMPUTE_ENGINE_PLL_PARAM 2 | 376 | #define COMPUTE_ENGINE_PLL_PARAM 2 |
377 | #define ADJUST_MC_SETTING_PARAM 3 | ||
378 | |||
379 | /****************************************************************************/ | ||
380 | // Structures used by AdjustMemoryControllerTable | ||
381 | /****************************************************************************/ | ||
382 | typedef struct _ATOM_ADJUST_MEMORY_CLOCK_FREQ | ||
383 | { | ||
384 | #if ATOM_BIG_ENDIAN | ||
385 | ULONG ulPointerReturnFlag:1; // BYTE_3[7]=1 - Return the pointer to the right Data Block; BYTE_3[7]=0 - Program the right Data Block | ||
386 | ULONG ulMemoryModuleNumber:7; // BYTE_3[6:0] | ||
387 | ULONG ulClockFreq:24; | ||
388 | #else | ||
389 | ULONG ulClockFreq:24; | ||
390 | ULONG ulMemoryModuleNumber:7; // BYTE_3[6:0] | ||
391 | ULONG ulPointerReturnFlag:1; // BYTE_3[7]=1 - Return the pointer to the right Data Block; BYTE_3[7]=0 - Program the right Data Block | ||
392 | #endif | ||
393 | }ATOM_ADJUST_MEMORY_CLOCK_FREQ; | ||
394 | #define POINTER_RETURN_FLAG 0x80 | ||
360 | 395 | ||
361 | typedef struct _COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS | 396 | typedef struct _COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS |
362 | { | 397 | { |
@@ -440,6 +475,26 @@ typedef struct _COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V4 | |||
440 | #endif | 475 | #endif |
441 | }COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V4; | 476 | }COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V4; |
442 | 477 | ||
478 | typedef struct _COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V5 | ||
479 | { | ||
480 | union | ||
481 | { | ||
482 | ATOM_COMPUTE_CLOCK_FREQ ulClock; //Input Parameter | ||
483 | ATOM_S_MPLL_FB_DIVIDER ulFbDiv; //Output Parameter | ||
484 | }; | ||
485 | UCHAR ucRefDiv; //Output Parameter | ||
486 | UCHAR ucPostDiv; //Output Parameter | ||
487 | union | ||
488 | { | ||
489 | UCHAR ucCntlFlag; //Output Flags | ||
490 | UCHAR ucInputFlag; //Input Flags. ucInputFlag[0] - Strobe(1)/Performance(0) mode | ||
491 | }; | ||
492 | UCHAR ucReserved; | ||
493 | }COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V5; | ||
494 | |||
495 | // ucInputFlag | ||
496 | #define ATOM_PLL_INPUT_FLAG_PLL_STROBE_MODE_EN 1 // 1-StrobeMode, 0-PerformanceMode | ||
497 | |||
443 | typedef struct _DYNAMICE_MEMORY_SETTINGS_PARAMETER | 498 | typedef struct _DYNAMICE_MEMORY_SETTINGS_PARAMETER |
444 | { | 499 | { |
445 | ATOM_COMPUTE_CLOCK_FREQ ulClock; | 500 | ATOM_COMPUTE_CLOCK_FREQ ulClock; |
@@ -583,6 +638,7 @@ typedef struct _DIG_ENCODER_CONTROL_PARAMETERS | |||
583 | #define ATOM_ENCODER_CONFIG_DPLINKRATE_MASK 0x01 | 638 | #define ATOM_ENCODER_CONFIG_DPLINKRATE_MASK 0x01 |
584 | #define ATOM_ENCODER_CONFIG_DPLINKRATE_1_62GHZ 0x00 | 639 | #define ATOM_ENCODER_CONFIG_DPLINKRATE_1_62GHZ 0x00 |
585 | #define ATOM_ENCODER_CONFIG_DPLINKRATE_2_70GHZ 0x01 | 640 | #define ATOM_ENCODER_CONFIG_DPLINKRATE_2_70GHZ 0x01 |
641 | #define ATOM_ENCODER_CONFIG_DPLINKRATE_5_40GHZ 0x02 | ||
586 | #define ATOM_ENCODER_CONFIG_LINK_SEL_MASK 0x04 | 642 | #define ATOM_ENCODER_CONFIG_LINK_SEL_MASK 0x04 |
587 | #define ATOM_ENCODER_CONFIG_LINKA 0x00 | 643 | #define ATOM_ENCODER_CONFIG_LINKA 0x00 |
588 | #define ATOM_ENCODER_CONFIG_LINKB 0x04 | 644 | #define ATOM_ENCODER_CONFIG_LINKB 0x04 |
@@ -608,6 +664,9 @@ typedef struct _DIG_ENCODER_CONTROL_PARAMETERS | |||
608 | #define ATOM_ENCODER_MODE_TV 13 | 664 | #define ATOM_ENCODER_MODE_TV 13 |
609 | #define ATOM_ENCODER_MODE_CV 14 | 665 | #define ATOM_ENCODER_MODE_CV 14 |
610 | #define ATOM_ENCODER_MODE_CRT 15 | 666 | #define ATOM_ENCODER_MODE_CRT 15 |
667 | #define ATOM_ENCODER_MODE_DVO 16 | ||
668 | #define ATOM_ENCODER_MODE_DP_SST ATOM_ENCODER_MODE_DP // For DP1.2 | ||
669 | #define ATOM_ENCODER_MODE_DP_MST 5 // For DP1.2 | ||
611 | 670 | ||
612 | typedef struct _ATOM_DIG_ENCODER_CONFIG_V2 | 671 | typedef struct _ATOM_DIG_ENCODER_CONFIG_V2 |
613 | { | 672 | { |
@@ -661,52 +720,126 @@ typedef struct _DIG_ENCODER_CONTROL_PARAMETERS_V2 | |||
661 | #define ATOM_ENCODER_CMD_DP_LINK_TRAINING_START 0x08 | 720 | #define ATOM_ENCODER_CMD_DP_LINK_TRAINING_START 0x08 |
662 | #define ATOM_ENCODER_CMD_DP_LINK_TRAINING_PATTERN1 0x09 | 721 | #define ATOM_ENCODER_CMD_DP_LINK_TRAINING_PATTERN1 0x09 |
663 | #define ATOM_ENCODER_CMD_DP_LINK_TRAINING_PATTERN2 0x0a | 722 | #define ATOM_ENCODER_CMD_DP_LINK_TRAINING_PATTERN2 0x0a |
723 | #define ATOM_ENCODER_CMD_DP_LINK_TRAINING_PATTERN3 0x13 | ||
664 | #define ATOM_ENCODER_CMD_DP_LINK_TRAINING_COMPLETE 0x0b | 724 | #define ATOM_ENCODER_CMD_DP_LINK_TRAINING_COMPLETE 0x0b |
665 | #define ATOM_ENCODER_CMD_DP_VIDEO_OFF 0x0c | 725 | #define ATOM_ENCODER_CMD_DP_VIDEO_OFF 0x0c |
666 | #define ATOM_ENCODER_CMD_DP_VIDEO_ON 0x0d | 726 | #define ATOM_ENCODER_CMD_DP_VIDEO_ON 0x0d |
667 | #define ATOM_ENCODER_CMD_QUERY_DP_LINK_TRAINING_STATUS 0x0e | 727 | #define ATOM_ENCODER_CMD_QUERY_DP_LINK_TRAINING_STATUS 0x0e |
668 | #define ATOM_ENCODER_CMD_SETUP 0x0f | 728 | #define ATOM_ENCODER_CMD_SETUP 0x0f |
729 | #define ATOM_ENCODER_CMD_SETUP_PANEL_MODE 0x10 | ||
669 | 730 | ||
670 | // ucStatus | 731 | // ucStatus |
671 | #define ATOM_ENCODER_STATUS_LINK_TRAINING_COMPLETE 0x10 | 732 | #define ATOM_ENCODER_STATUS_LINK_TRAINING_COMPLETE 0x10 |
672 | #define ATOM_ENCODER_STATUS_LINK_TRAINING_INCOMPLETE 0x00 | 733 | #define ATOM_ENCODER_STATUS_LINK_TRAINING_INCOMPLETE 0x00 |
673 | 734 | ||
735 | //ucTableFormatRevision=1 | ||
736 | //ucTableContentRevision=3 | ||
674 | // Following function ENABLE sub-function will be used by driver when TMDS/HDMI/LVDS is used, disable function will be used by driver | 737 | // Following function ENABLE sub-function will be used by driver when TMDS/HDMI/LVDS is used, disable function will be used by driver |
675 | typedef struct _ATOM_DIG_ENCODER_CONFIG_V3 | 738 | typedef struct _ATOM_DIG_ENCODER_CONFIG_V3 |
676 | { | 739 | { |
677 | #if ATOM_BIG_ENDIAN | 740 | #if ATOM_BIG_ENDIAN |
678 | UCHAR ucReserved1:1; | 741 | UCHAR ucReserved1:1; |
679 | UCHAR ucDigSel:3; // =0: DIGA/B/C/D/E/F | 742 | UCHAR ucDigSel:3; // =0/1/2/3/4/5: DIG0/1/2/3/4/5 (In register spec also referred as DIGA/B/C/D/E/F) |
680 | UCHAR ucReserved:3; | 743 | UCHAR ucReserved:3; |
681 | UCHAR ucDPLinkRate:1; // =0: 1.62Ghz, =1: 2.7Ghz | 744 | UCHAR ucDPLinkRate:1; // =0: 1.62Ghz, =1: 2.7Ghz |
682 | #else | 745 | #else |
683 | UCHAR ucDPLinkRate:1; // =0: 1.62Ghz, =1: 2.7Ghz | 746 | UCHAR ucDPLinkRate:1; // =0: 1.62Ghz, =1: 2.7Ghz |
684 | UCHAR ucReserved:3; | 747 | UCHAR ucReserved:3; |
685 | UCHAR ucDigSel:3; // =0: DIGA/B/C/D/E/F | 748 | UCHAR ucDigSel:3; // =0/1/2/3/4/5: DIG0/1/2/3/4/5 (In register spec also referred as DIGA/B/C/D/E/F) |
686 | UCHAR ucReserved1:1; | 749 | UCHAR ucReserved1:1; |
687 | #endif | 750 | #endif |
688 | }ATOM_DIG_ENCODER_CONFIG_V3; | 751 | }ATOM_DIG_ENCODER_CONFIG_V3; |
689 | 752 | ||
753 | #define ATOM_ENCODER_CONFIG_V3_DPLINKRATE_MASK 0x03 | ||
754 | #define ATOM_ENCODER_CONFIG_V3_DPLINKRATE_1_62GHZ 0x00 | ||
755 | #define ATOM_ENCODER_CONFIG_V3_DPLINKRATE_2_70GHZ 0x01 | ||
690 | #define ATOM_ENCODER_CONFIG_V3_ENCODER_SEL 0x70 | 756 | #define ATOM_ENCODER_CONFIG_V3_ENCODER_SEL 0x70 |
691 | 757 | #define ATOM_ENCODER_CONFIG_V3_DIG0_ENCODER 0x00 | |
758 | #define ATOM_ENCODER_CONFIG_V3_DIG1_ENCODER 0x10 | ||
759 | #define ATOM_ENCODER_CONFIG_V3_DIG2_ENCODER 0x20 | ||
760 | #define ATOM_ENCODER_CONFIG_V3_DIG3_ENCODER 0x30 | ||
761 | #define ATOM_ENCODER_CONFIG_V3_DIG4_ENCODER 0x40 | ||
762 | #define ATOM_ENCODER_CONFIG_V3_DIG5_ENCODER 0x50 | ||
692 | 763 | ||
693 | typedef struct _DIG_ENCODER_CONTROL_PARAMETERS_V3 | 764 | typedef struct _DIG_ENCODER_CONTROL_PARAMETERS_V3 |
694 | { | 765 | { |
695 | USHORT usPixelClock; // in 10KHz; for bios convenient | 766 | USHORT usPixelClock; // in 10KHz; for bios convenient |
696 | ATOM_DIG_ENCODER_CONFIG_V3 acConfig; | 767 | ATOM_DIG_ENCODER_CONFIG_V3 acConfig; |
697 | UCHAR ucAction; | 768 | UCHAR ucAction; |
698 | UCHAR ucEncoderMode; | 769 | union { |
770 | UCHAR ucEncoderMode; | ||
699 | // =0: DP encoder | 771 | // =0: DP encoder |
700 | // =1: LVDS encoder | 772 | // =1: LVDS encoder |
701 | // =2: DVI encoder | 773 | // =2: DVI encoder |
702 | // =3: HDMI encoder | 774 | // =3: HDMI encoder |
703 | // =4: SDVO encoder | 775 | // =4: SDVO encoder |
704 | // =5: DP audio | 776 | // =5: DP audio |
777 | UCHAR ucPanelMode; // only valid when ucAction == ATOM_ENCODER_CMD_SETUP_PANEL_MODE | ||
778 | // =0: external DP | ||
779 | // =1: internal DP2 | ||
780 | // =0x11: internal DP1 for NutMeg/Travis DP translator | ||
781 | }; | ||
705 | UCHAR ucLaneNum; // how many lanes to enable | 782 | UCHAR ucLaneNum; // how many lanes to enable |
706 | UCHAR ucBitPerColor; // only valid for DP mode when ucAction = ATOM_ENCODER_CMD_SETUP | 783 | UCHAR ucBitPerColor; // only valid for DP mode when ucAction = ATOM_ENCODER_CMD_SETUP |
707 | UCHAR ucReserved; | 784 | UCHAR ucReserved; |
708 | }DIG_ENCODER_CONTROL_PARAMETERS_V3; | 785 | }DIG_ENCODER_CONTROL_PARAMETERS_V3; |
709 | 786 | ||
787 | //ucTableFormatRevision=1 | ||
788 | //ucTableContentRevision=4 | ||
789 | // start from NI | ||
790 | // Following function ENABLE sub-function will be used by driver when TMDS/HDMI/LVDS is used, disable function will be used by driver | ||
791 | typedef struct _ATOM_DIG_ENCODER_CONFIG_V4 | ||
792 | { | ||
793 | #if ATOM_BIG_ENDIAN | ||
794 | UCHAR ucReserved1:1; | ||
795 | UCHAR ucDigSel:3; // =0/1/2/3/4/5: DIG0/1/2/3/4/5 (In register spec also referred as DIGA/B/C/D/E/F) | ||
796 | UCHAR ucReserved:2; | ||
797 | UCHAR ucDPLinkRate:2; // =0: 1.62Ghz, =1: 2.7Ghz, 2=5.4Ghz <= Changed comparing to previous version | ||
798 | #else | ||
799 | UCHAR ucDPLinkRate:2; // =0: 1.62Ghz, =1: 2.7Ghz, 2=5.4Ghz <= Changed comparing to previous version | ||
800 | UCHAR ucReserved:2; | ||
801 | UCHAR ucDigSel:3; // =0/1/2/3/4/5: DIG0/1/2/3/4/5 (In register spec also referred as DIGA/B/C/D/E/F) | ||
802 | UCHAR ucReserved1:1; | ||
803 | #endif | ||
804 | }ATOM_DIG_ENCODER_CONFIG_V4; | ||
805 | |||
806 | #define ATOM_ENCODER_CONFIG_V4_DPLINKRATE_MASK 0x03 | ||
807 | #define ATOM_ENCODER_CONFIG_V4_DPLINKRATE_1_62GHZ 0x00 | ||
808 | #define ATOM_ENCODER_CONFIG_V4_DPLINKRATE_2_70GHZ 0x01 | ||
809 | #define ATOM_ENCODER_CONFIG_V4_DPLINKRATE_5_40GHZ 0x02 | ||
810 | #define ATOM_ENCODER_CONFIG_V4_ENCODER_SEL 0x70 | ||
811 | #define ATOM_ENCODER_CONFIG_V4_DIG0_ENCODER 0x00 | ||
812 | #define ATOM_ENCODER_CONFIG_V4_DIG1_ENCODER 0x10 | ||
813 | #define ATOM_ENCODER_CONFIG_V4_DIG2_ENCODER 0x20 | ||
814 | #define ATOM_ENCODER_CONFIG_V4_DIG3_ENCODER 0x30 | ||
815 | #define ATOM_ENCODER_CONFIG_V4_DIG4_ENCODER 0x40 | ||
816 | #define ATOM_ENCODER_CONFIG_V4_DIG5_ENCODER 0x50 | ||
817 | |||
818 | typedef struct _DIG_ENCODER_CONTROL_PARAMETERS_V4 | ||
819 | { | ||
820 | USHORT usPixelClock; // in 10KHz; for bios convenient | ||
821 | union{ | ||
822 | ATOM_DIG_ENCODER_CONFIG_V4 acConfig; | ||
823 | UCHAR ucConfig; | ||
824 | }; | ||
825 | UCHAR ucAction; | ||
826 | union { | ||
827 | UCHAR ucEncoderMode; | ||
828 | // =0: DP encoder | ||
829 | // =1: LVDS encoder | ||
830 | // =2: DVI encoder | ||
831 | // =3: HDMI encoder | ||
832 | // =4: SDVO encoder | ||
833 | // =5: DP audio | ||
834 | UCHAR ucPanelMode; // only valid when ucAction == ATOM_ENCODER_CMD_SETUP_PANEL_MODE | ||
835 | // =0: external DP | ||
836 | // =1: internal DP2 | ||
837 | // =0x11: internal DP1 for NutMeg/Travis DP translator | ||
838 | }; | ||
839 | UCHAR ucLaneNum; // how many lanes to enable | ||
840 | UCHAR ucBitPerColor; // only valid for DP mode when ucAction = ATOM_ENCODER_CMD_SETUP | ||
841 | UCHAR ucHPD_ID; // HPD ID (1-6). =0 means to skip HDP programming. New comparing to previous version | ||
842 | }DIG_ENCODER_CONTROL_PARAMETERS_V4; | ||
710 | 843 | ||
711 | // define ucBitPerColor: | 844 | // define ucBitPerColor: |
712 | #define PANEL_BPC_UNDEFINE 0x00 | 845 | #define PANEL_BPC_UNDEFINE 0x00 |
@@ -716,6 +849,11 @@ typedef struct _DIG_ENCODER_CONTROL_PARAMETERS_V3 | |||
716 | #define PANEL_12BIT_PER_COLOR 0x04 | 849 | #define PANEL_12BIT_PER_COLOR 0x04 |
717 | #define PANEL_16BIT_PER_COLOR 0x05 | 850 | #define PANEL_16BIT_PER_COLOR 0x05 |
718 | 851 | ||
852 | //define ucPanelMode | ||
853 | #define DP_PANEL_MODE_EXTERNAL_DP_MODE 0x00 | ||
854 | #define DP_PANEL_MODE_INTERNAL_DP2_MODE 0x01 | ||
855 | #define DP_PANEL_MODE_INTERNAL_DP1_MODE 0x11 | ||
856 | |||
719 | /****************************************************************************/ | 857 | /****************************************************************************/ |
720 | // Structures used by UNIPHYTransmitterControlTable | 858 | // Structures used by UNIPHYTransmitterControlTable |
721 | // LVTMATransmitterControlTable | 859 | // LVTMATransmitterControlTable |
@@ -893,6 +1031,7 @@ typedef struct _ATOM_DIG_TRANSMITTER_CONFIG_V3 | |||
893 | #endif | 1031 | #endif |
894 | }ATOM_DIG_TRANSMITTER_CONFIG_V3; | 1032 | }ATOM_DIG_TRANSMITTER_CONFIG_V3; |
895 | 1033 | ||
1034 | |||
896 | typedef struct _DIG_TRANSMITTER_CONTROL_PARAMETERS_V3 | 1035 | typedef struct _DIG_TRANSMITTER_CONTROL_PARAMETERS_V3 |
897 | { | 1036 | { |
898 | union | 1037 | union |
@@ -936,6 +1075,150 @@ typedef struct _DIG_TRANSMITTER_CONTROL_PARAMETERS_V3 | |||
936 | #define ATOM_TRANSMITTER_CONFIG_V3_TRANSMITTER2 0x40 //CD | 1075 | #define ATOM_TRANSMITTER_CONFIG_V3_TRANSMITTER2 0x40 //CD |
937 | #define ATOM_TRANSMITTER_CONFIG_V3_TRANSMITTER3 0x80 //EF | 1076 | #define ATOM_TRANSMITTER_CONFIG_V3_TRANSMITTER3 0x80 //EF |
938 | 1077 | ||
1078 | |||
1079 | /****************************************************************************/ | ||
1080 | // Structures used by UNIPHYTransmitterControlTable V1.4 | ||
1081 | // ASIC Families: NI | ||
1082 | // ucTableFormatRevision=1 | ||
1083 | // ucTableContentRevision=4 | ||
1084 | /****************************************************************************/ | ||
1085 | typedef struct _ATOM_DP_VS_MODE_V4 | ||
1086 | { | ||
1087 | UCHAR ucLaneSel; | ||
1088 | union | ||
1089 | { | ||
1090 | UCHAR ucLaneSet; | ||
1091 | struct { | ||
1092 | #if ATOM_BIG_ENDIAN | ||
1093 | UCHAR ucPOST_CURSOR2:2; //Bit[7:6] Post Cursor2 Level <= New in V4 | ||
1094 | UCHAR ucPRE_EMPHASIS:3; //Bit[5:3] Pre-emphasis Level | ||
1095 | UCHAR ucVOLTAGE_SWING:3; //Bit[2:0] Voltage Swing Level | ||
1096 | #else | ||
1097 | UCHAR ucVOLTAGE_SWING:3; //Bit[2:0] Voltage Swing Level | ||
1098 | UCHAR ucPRE_EMPHASIS:3; //Bit[5:3] Pre-emphasis Level | ||
1099 | UCHAR ucPOST_CURSOR2:2; //Bit[7:6] Post Cursor2 Level <= New in V4 | ||
1100 | #endif | ||
1101 | }; | ||
1102 | }; | ||
1103 | }ATOM_DP_VS_MODE_V4; | ||
1104 | |||
1105 | typedef struct _ATOM_DIG_TRANSMITTER_CONFIG_V4 | ||
1106 | { | ||
1107 | #if ATOM_BIG_ENDIAN | ||
1108 | UCHAR ucTransmitterSel:2; //bit7:6: =0 Dig Transmitter 1 ( Uniphy AB ) | ||
1109 | // =1 Dig Transmitter 2 ( Uniphy CD ) | ||
1110 | // =2 Dig Transmitter 3 ( Uniphy EF ) | ||
1111 | UCHAR ucRefClkSource:2; //bit5:4: PPLL1 =0, PPLL2=1, DCPLL=2, EXT_CLK=3 <= New | ||
1112 | UCHAR ucEncoderSel:1; //bit3=0: Data/Clk path source from DIGA/C/E. =1: Data/clk path source from DIGB/D/F | ||
1113 | UCHAR ucLinkSel:1; //bit2=0: Uniphy LINKA or C or E when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is A or C or E | ||
1114 | // =1: Uniphy LINKB or D or F when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is B or D or F | ||
1115 | UCHAR fCoherentMode:1; //bit1=1: Coherent Mode ( for DVI/HDMI mode ) | ||
1116 | UCHAR fDualLinkConnector:1; //bit0=1: Dual Link DVI connector | ||
1117 | #else | ||
1118 | UCHAR fDualLinkConnector:1; //bit0=1: Dual Link DVI connector | ||
1119 | UCHAR fCoherentMode:1; //bit1=1: Coherent Mode ( for DVI/HDMI mode ) | ||
1120 | UCHAR ucLinkSel:1; //bit2=0: Uniphy LINKA or C or E when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is A or C or E | ||
1121 | // =1: Uniphy LINKB or D or F when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is B or D or F | ||
1122 | UCHAR ucEncoderSel:1; //bit3=0: Data/Clk path source from DIGA/C/E. =1: Data/clk path source from DIGB/D/F | ||
1123 | UCHAR ucRefClkSource:2; //bit5:4: PPLL1 =0, PPLL2=1, DCPLL=2, EXT_CLK=3 <= New | ||
1124 | UCHAR ucTransmitterSel:2; //bit7:6: =0 Dig Transmitter 1 ( Uniphy AB ) | ||
1125 | // =1 Dig Transmitter 2 ( Uniphy CD ) | ||
1126 | // =2 Dig Transmitter 3 ( Uniphy EF ) | ||
1127 | #endif | ||
1128 | }ATOM_DIG_TRANSMITTER_CONFIG_V4; | ||
1129 | |||
1130 | typedef struct _DIG_TRANSMITTER_CONTROL_PARAMETERS_V4 | ||
1131 | { | ||
1132 | union | ||
1133 | { | ||
1134 | USHORT usPixelClock; // in 10KHz; for bios convenient | ||
1135 | USHORT usInitInfo; // when init uniphy,lower 8bit is used for connector type defined in objectid.h | ||
1136 | ATOM_DP_VS_MODE_V4 asMode; // DP Voltage swing mode Redefined comparing to previous version | ||
1137 | }; | ||
1138 | union | ||
1139 | { | ||
1140 | ATOM_DIG_TRANSMITTER_CONFIG_V4 acConfig; | ||
1141 | UCHAR ucConfig; | ||
1142 | }; | ||
1143 | UCHAR ucAction; // define as ATOM_TRANSMITER_ACTION_XXX | ||
1144 | UCHAR ucLaneNum; | ||
1145 | UCHAR ucReserved[3]; | ||
1146 | }DIG_TRANSMITTER_CONTROL_PARAMETERS_V4; | ||
1147 | |||
1148 | //ucConfig | ||
1149 | //Bit0 | ||
1150 | #define ATOM_TRANSMITTER_CONFIG_V4_DUAL_LINK_CONNECTOR 0x01 | ||
1151 | //Bit1 | ||
1152 | #define ATOM_TRANSMITTER_CONFIG_V4_COHERENT 0x02 | ||
1153 | //Bit2 | ||
1154 | #define ATOM_TRANSMITTER_CONFIG_V4_LINK_SEL_MASK 0x04 | ||
1155 | #define ATOM_TRANSMITTER_CONFIG_V4_LINKA 0x00 | ||
1156 | #define ATOM_TRANSMITTER_CONFIG_V4_LINKB 0x04 | ||
1157 | // Bit3 | ||
1158 | #define ATOM_TRANSMITTER_CONFIG_V4_ENCODER_SEL_MASK 0x08 | ||
1159 | #define ATOM_TRANSMITTER_CONFIG_V4_DIG1_ENCODER 0x00 | ||
1160 | #define ATOM_TRANSMITTER_CONFIG_V4_DIG2_ENCODER 0x08 | ||
1161 | // Bit5:4 | ||
1162 | #define ATOM_TRANSMITTER_CONFIG_V4_REFCLK_SEL_MASK 0x30 | ||
1163 | #define ATOM_TRANSMITTER_CONFIG_V4_P1PLL 0x00 | ||
1164 | #define ATOM_TRANSMITTER_CONFIG_V4_P2PLL 0x10 | ||
1165 | #define ATOM_TRANSMITTER_CONFIG_V4_DCPLL 0x20 // New in _V4 | ||
1166 | #define ATOM_TRANSMITTER_CONFIG_V4_REFCLK_SRC_EXT 0x30 // Changed comparing to V3 | ||
1167 | // Bit7:6 | ||
1168 | #define ATOM_TRANSMITTER_CONFIG_V4_TRANSMITTER_SEL_MASK 0xC0 | ||
1169 | #define ATOM_TRANSMITTER_CONFIG_V4_TRANSMITTER1 0x00 //AB | ||
1170 | #define ATOM_TRANSMITTER_CONFIG_V4_TRANSMITTER2 0x40 //CD | ||
1171 | #define ATOM_TRANSMITTER_CONFIG_V4_TRANSMITTER3 0x80 //EF | ||
1172 | |||
1173 | |||
1174 | /****************************************************************************/ | ||
1175 | // Structures used by ExternalEncoderControlTable V1.3 | ||
1176 | // ASIC Families: Evergreen, Llano, NI | ||
1177 | // ucTableFormatRevision=1 | ||
1178 | // ucTableContentRevision=3 | ||
1179 | /****************************************************************************/ | ||
1180 | |||
1181 | typedef struct _EXTERNAL_ENCODER_CONTROL_PARAMETERS_V3 | ||
1182 | { | ||
1183 | union{ | ||
1184 | USHORT usPixelClock; // pixel clock in 10Khz, valid when ucAction=SETUP/ENABLE_OUTPUT | ||
1185 | USHORT usConnectorId; // connector id, valid when ucAction = INIT | ||
1186 | }; | ||
1187 | UCHAR ucConfig; // indicate which encoder, and DP link rate when ucAction = SETUP/ENABLE_OUTPUT | ||
1188 | UCHAR ucAction; // | ||
1189 | UCHAR ucEncoderMode; // encoder mode, only used when ucAction = SETUP/ENABLE_OUTPUT | ||
1190 | UCHAR ucLaneNum; // lane number, only used when ucAction = SETUP/ENABLE_OUTPUT | ||
1191 | UCHAR ucBitPerColor; // output bit per color, only valid when ucAction = SETUP/ENABLE_OUTPUT and ucEncodeMode= DP | ||
1192 | UCHAR ucReserved; | ||
1193 | }EXTERNAL_ENCODER_CONTROL_PARAMETERS_V3; | ||
1194 | |||
1195 | // ucAction | ||
1196 | #define EXTERNAL_ENCODER_ACTION_V3_DISABLE_OUTPUT 0x00 | ||
1197 | #define EXTERNAL_ENCODER_ACTION_V3_ENABLE_OUTPUT 0x01 | ||
1198 | #define EXTERNAL_ENCODER_ACTION_V3_ENCODER_INIT 0x07 | ||
1199 | #define EXTERNAL_ENCODER_ACTION_V3_ENCODER_SETUP 0x0f | ||
1200 | #define EXTERNAL_ENCODER_ACTION_V3_ENCODER_BLANKING_OFF 0x10 | ||
1201 | #define EXTERNAL_ENCODER_ACTION_V3_ENCODER_BLANKING 0x11 | ||
1202 | #define EXTERNAL_ENCODER_ACTION_V3_DACLOAD_DETECTION 0x12 | ||
1203 | #define EXTERNAL_ENCODER_ACTION_V3_DDC_SETUP 0x14 | ||
1204 | |||
1205 | // ucConfig | ||
1206 | #define EXTERNAL_ENCODER_CONFIG_V3_DPLINKRATE_MASK 0x03 | ||
1207 | #define EXTERNAL_ENCODER_CONFIG_V3_DPLINKRATE_1_62GHZ 0x00 | ||
1208 | #define EXTERNAL_ENCODER_CONFIG_V3_DPLINKRATE_2_70GHZ 0x01 | ||
1209 | #define EXTERNAL_ENCODER_CONFIG_V3_DPLINKRATE_5_40GHZ 0x02 | ||
1210 | #define EXTERNAL_ENCODER_CONFIG_V3_ENCODER_SEL_MASK 0x70 | ||
1211 | #define EXTERNAL_ENCODER_CONFIG_V3_ENCODER1 0x00 | ||
1212 | #define EXTERNAL_ENCODER_CONFIG_V3_ENCODER2 0x10 | ||
1213 | #define EXTERNAL_ENCODER_CONFIG_V3_ENCODER3 0x20 | ||
1214 | |||
1215 | typedef struct _EXTERNAL_ENCODER_CONTROL_PS_ALLOCATION_V3 | ||
1216 | { | ||
1217 | EXTERNAL_ENCODER_CONTROL_PARAMETERS_V3 sExtEncoder; | ||
1218 | ULONG ulReserved[2]; | ||
1219 | }EXTERNAL_ENCODER_CONTROL_PS_ALLOCATION_V3; | ||
1220 | |||
1221 | |||
939 | /****************************************************************************/ | 1222 | /****************************************************************************/ |
940 | // Structures used by DAC1OuputControlTable | 1223 | // Structures used by DAC1OuputControlTable |
941 | // DAC2OuputControlTable | 1224 | // DAC2OuputControlTable |
@@ -1142,6 +1425,7 @@ typedef struct _PIXEL_CLOCK_PARAMETERS_V2 | |||
1142 | #define PIXEL_CLOCK_V4_MISC_SS_ENABLE 0x10 | 1425 | #define PIXEL_CLOCK_V4_MISC_SS_ENABLE 0x10 |
1143 | #define PIXEL_CLOCK_V4_MISC_COHERENT_MODE 0x20 | 1426 | #define PIXEL_CLOCK_V4_MISC_COHERENT_MODE 0x20 |
1144 | 1427 | ||
1428 | |||
1145 | typedef struct _PIXEL_CLOCK_PARAMETERS_V3 | 1429 | typedef struct _PIXEL_CLOCK_PARAMETERS_V3 |
1146 | { | 1430 | { |
1147 | USHORT usPixelClock; // in 10kHz unit; for bios convenient = (RefClk*FB_Div)/(Ref_Div*Post_Div) | 1431 | USHORT usPixelClock; // in 10kHz unit; for bios convenient = (RefClk*FB_Div)/(Ref_Div*Post_Div) |
@@ -1202,6 +1486,55 @@ typedef struct _PIXEL_CLOCK_PARAMETERS_V5 | |||
1202 | #define PIXEL_CLOCK_V5_MISC_HDMI_32BPP 0x08 | 1486 | #define PIXEL_CLOCK_V5_MISC_HDMI_32BPP 0x08 |
1203 | #define PIXEL_CLOCK_V5_MISC_REF_DIV_SRC 0x10 | 1487 | #define PIXEL_CLOCK_V5_MISC_REF_DIV_SRC 0x10 |
1204 | 1488 | ||
1489 | typedef struct _CRTC_PIXEL_CLOCK_FREQ | ||
1490 | { | ||
1491 | #if ATOM_BIG_ENDIAN | ||
1492 | ULONG ucCRTC:8; // ATOM_CRTC1~6, indicate the CRTC controller to | ||
1493 | // drive the pixel clock. not used for DCPLL case. | ||
1494 | ULONG ulPixelClock:24; // target the pixel clock to drive the CRTC timing. | ||
1495 | // 0 means disable PPLL/DCPLL. Expanded to 24 bits comparing to previous version. | ||
1496 | #else | ||
1497 | ULONG ulPixelClock:24; // target the pixel clock to drive the CRTC timing. | ||
1498 | // 0 means disable PPLL/DCPLL. Expanded to 24 bits comparing to previous version. | ||
1499 | ULONG ucCRTC:8; // ATOM_CRTC1~6, indicate the CRTC controller to | ||
1500 | // drive the pixel clock. not used for DCPLL case. | ||
1501 | #endif | ||
1502 | }CRTC_PIXEL_CLOCK_FREQ; | ||
1503 | |||
1504 | typedef struct _PIXEL_CLOCK_PARAMETERS_V6 | ||
1505 | { | ||
1506 | union{ | ||
1507 | CRTC_PIXEL_CLOCK_FREQ ulCrtcPclkFreq; // pixel clock and CRTC id frequency | ||
1508 | ULONG ulDispEngClkFreq; // dispclk frequency | ||
1509 | }; | ||
1510 | USHORT usFbDiv; // feedback divider integer part. | ||
1511 | UCHAR ucPostDiv; // post divider. | ||
1512 | UCHAR ucRefDiv; // Reference divider | ||
1513 | UCHAR ucPpll; // ATOM_PPLL1/ATOM_PPLL2/ATOM_DCPLL | ||
1514 | UCHAR ucTransmitterID; // ASIC encoder id defined in objectId.h, | ||
1515 | // indicate which graphic encoder will be used. | ||
1516 | UCHAR ucEncoderMode; // Encoder mode: | ||
1517 | UCHAR ucMiscInfo; // bit[0]= Force program PPLL | ||
1518 | // bit[1]= when VGA timing is used. | ||
1519 | // bit[3:2]= HDMI panel bit depth: =0: 24bpp =1:30bpp, =2:32bpp | ||
1520 | // bit[4]= RefClock source for PPLL. | ||
1521 | // =0: XTLAIN( default mode ) | ||
1522 | // =1: other external clock source, which is pre-defined | ||
1523 | // by VBIOS depend on the feature required. | ||
1524 | // bit[7:5]: reserved. | ||
1525 | ULONG ulFbDivDecFrac; // 20 bit feedback divider decimal fraction part, range from 1~999999 ( 0.000001 to 0.999999 ) | ||
1526 | |||
1527 | }PIXEL_CLOCK_PARAMETERS_V6; | ||
1528 | |||
1529 | #define PIXEL_CLOCK_V6_MISC_FORCE_PROG_PPLL 0x01 | ||
1530 | #define PIXEL_CLOCK_V6_MISC_VGA_MODE 0x02 | ||
1531 | #define PIXEL_CLOCK_V6_MISC_HDMI_BPP_MASK 0x0c | ||
1532 | #define PIXEL_CLOCK_V6_MISC_HDMI_24BPP 0x00 | ||
1533 | #define PIXEL_CLOCK_V6_MISC_HDMI_36BPP 0x04 | ||
1534 | #define PIXEL_CLOCK_V6_MISC_HDMI_30BPP 0x08 | ||
1535 | #define PIXEL_CLOCK_V6_MISC_HDMI_48BPP 0x0c | ||
1536 | #define PIXEL_CLOCK_V6_MISC_REF_DIV_SRC 0x10 | ||
1537 | |||
1205 | typedef struct _GET_DISP_PLL_STATUS_INPUT_PARAMETERS_V2 | 1538 | typedef struct _GET_DISP_PLL_STATUS_INPUT_PARAMETERS_V2 |
1206 | { | 1539 | { |
1207 | PIXEL_CLOCK_PARAMETERS_V3 sDispClkInput; | 1540 | PIXEL_CLOCK_PARAMETERS_V3 sDispClkInput; |
@@ -1241,10 +1574,11 @@ typedef struct _ADJUST_DISPLAY_PLL_PARAMETERS | |||
1241 | typedef struct _ADJUST_DISPLAY_PLL_INPUT_PARAMETERS_V3 | 1574 | typedef struct _ADJUST_DISPLAY_PLL_INPUT_PARAMETERS_V3 |
1242 | { | 1575 | { |
1243 | USHORT usPixelClock; // target pixel clock | 1576 | USHORT usPixelClock; // target pixel clock |
1244 | UCHAR ucTransmitterID; // transmitter id defined in objectid.h | 1577 | UCHAR ucTransmitterID; // GPU transmitter id defined in objectid.h |
1245 | UCHAR ucEncodeMode; // encoder mode: CRT, LVDS, DP, TMDS or HDMI | 1578 | UCHAR ucEncodeMode; // encoder mode: CRT, LVDS, DP, TMDS or HDMI |
1246 | UCHAR ucDispPllConfig; // display pll configure parameter defined as following DISPPLL_CONFIG_XXXX | 1579 | UCHAR ucDispPllConfig; // display pll configure parameter defined as following DISPPLL_CONFIG_XXXX |
1247 | UCHAR ucReserved[3]; | 1580 | UCHAR ucExtTransmitterID; // external encoder id. |
1581 | UCHAR ucReserved[2]; | ||
1248 | }ADJUST_DISPLAY_PLL_INPUT_PARAMETERS_V3; | 1582 | }ADJUST_DISPLAY_PLL_INPUT_PARAMETERS_V3; |
1249 | 1583 | ||
1250 | // usDispPllConfig v1.2 for RoadRunner | 1584 | // usDispPllConfig v1.2 for RoadRunner |
@@ -1314,7 +1648,7 @@ typedef struct _GET_ENGINE_CLOCK_PARAMETERS | |||
1314 | typedef struct _READ_EDID_FROM_HW_I2C_DATA_PARAMETERS | 1648 | typedef struct _READ_EDID_FROM_HW_I2C_DATA_PARAMETERS |
1315 | { | 1649 | { |
1316 | USHORT usPrescale; //Ratio between Engine clock and I2C clock | 1650 | USHORT usPrescale; //Ratio between Engine clock and I2C clock |
1317 | USHORT usVRAMAddress; //Adress in Frame Buffer where to pace raw EDID | 1651 | USHORT usVRAMAddress; //Address in Frame Buffer where to pace raw EDID |
1318 | USHORT usStatus; //When use output: lower byte EDID checksum, high byte hardware status | 1652 | USHORT usStatus; //When use output: lower byte EDID checksum, high byte hardware status |
1319 | //WHen use input: lower byte as 'byte to read':currently limited to 128byte or 1byte | 1653 | //WHen use input: lower byte as 'byte to read':currently limited to 128byte or 1byte |
1320 | UCHAR ucSlaveAddr; //Read from which slave | 1654 | UCHAR ucSlaveAddr; //Read from which slave |
@@ -1358,6 +1692,7 @@ typedef struct _SET_UP_HW_I2C_DATA_PARAMETERS | |||
1358 | /**************************************************************************/ | 1692 | /**************************************************************************/ |
1359 | #define SPEED_FAN_CONTROL_PS_ALLOCATION WRITE_ONE_BYTE_HW_I2C_DATA_PARAMETERS | 1693 | #define SPEED_FAN_CONTROL_PS_ALLOCATION WRITE_ONE_BYTE_HW_I2C_DATA_PARAMETERS |
1360 | 1694 | ||
1695 | |||
1361 | /****************************************************************************/ | 1696 | /****************************************************************************/ |
1362 | // Structures used by PowerConnectorDetectionTable | 1697 | // Structures used by PowerConnectorDetectionTable |
1363 | /****************************************************************************/ | 1698 | /****************************************************************************/ |
@@ -1438,6 +1773,31 @@ typedef struct _ENABLE_SPREAD_SPECTRUM_ON_PPLL_V2 | |||
1438 | #define ATOM_PPLL_SS_AMOUNT_V2_NFRAC_MASK 0x0F00 | 1773 | #define ATOM_PPLL_SS_AMOUNT_V2_NFRAC_MASK 0x0F00 |
1439 | #define ATOM_PPLL_SS_AMOUNT_V2_NFRAC_SHIFT 8 | 1774 | #define ATOM_PPLL_SS_AMOUNT_V2_NFRAC_SHIFT 8 |
1440 | 1775 | ||
1776 | // Used by DCE5.0 | ||
1777 | typedef struct _ENABLE_SPREAD_SPECTRUM_ON_PPLL_V3 | ||
1778 | { | ||
1779 | USHORT usSpreadSpectrumAmountFrac; // SS_AMOUNT_DSFRAC New in DCE5.0 | ||
1780 | UCHAR ucSpreadSpectrumType; // Bit[0]: 0-Down Spread,1-Center Spread. | ||
1781 | // Bit[1]: 1-Ext. 0-Int. | ||
1782 | // Bit[3:2]: =0 P1PLL =1 P2PLL =2 DCPLL | ||
1783 | // Bits[7:4] reserved | ||
1784 | UCHAR ucEnable; // ATOM_ENABLE or ATOM_DISABLE | ||
1785 | USHORT usSpreadSpectrumAmount; // Includes SS_AMOUNT_FBDIV[7:0] and SS_AMOUNT_NFRAC_SLIP[11:8] | ||
1786 | USHORT usSpreadSpectrumStep; // SS_STEP_SIZE_DSFRAC | ||
1787 | }ENABLE_SPREAD_SPECTRUM_ON_PPLL_V3; | ||
1788 | |||
1789 | #define ATOM_PPLL_SS_TYPE_V3_DOWN_SPREAD 0x00 | ||
1790 | #define ATOM_PPLL_SS_TYPE_V3_CENTRE_SPREAD 0x01 | ||
1791 | #define ATOM_PPLL_SS_TYPE_V3_EXT_SPREAD 0x02 | ||
1792 | #define ATOM_PPLL_SS_TYPE_V3_PPLL_SEL_MASK 0x0c | ||
1793 | #define ATOM_PPLL_SS_TYPE_V3_P1PLL 0x00 | ||
1794 | #define ATOM_PPLL_SS_TYPE_V3_P2PLL 0x04 | ||
1795 | #define ATOM_PPLL_SS_TYPE_V3_DCPLL 0x08 | ||
1796 | #define ATOM_PPLL_SS_AMOUNT_V3_FBDIV_MASK 0x00FF | ||
1797 | #define ATOM_PPLL_SS_AMOUNT_V3_FBDIV_SHIFT 0 | ||
1798 | #define ATOM_PPLL_SS_AMOUNT_V3_NFRAC_MASK 0x0F00 | ||
1799 | #define ATOM_PPLL_SS_AMOUNT_V3_NFRAC_SHIFT 8 | ||
1800 | |||
1441 | #define ENABLE_SPREAD_SPECTRUM_ON_PPLL_PS_ALLOCATION ENABLE_SPREAD_SPECTRUM_ON_PPLL | 1801 | #define ENABLE_SPREAD_SPECTRUM_ON_PPLL_PS_ALLOCATION ENABLE_SPREAD_SPECTRUM_ON_PPLL |
1442 | 1802 | ||
1443 | /**************************************************************************/ | 1803 | /**************************************************************************/ |
@@ -1706,7 +2066,7 @@ typedef struct _ATOM_MASTER_LIST_OF_DATA_TABLES | |||
1706 | USHORT StandardVESA_Timing; // Only used by Bios | 2066 | USHORT StandardVESA_Timing; // Only used by Bios |
1707 | USHORT FirmwareInfo; // Shared by various SW components,latest version 1.4 | 2067 | USHORT FirmwareInfo; // Shared by various SW components,latest version 1.4 |
1708 | USHORT DAC_Info; // Will be obsolete from R600 | 2068 | USHORT DAC_Info; // Will be obsolete from R600 |
1709 | USHORT LVDS_Info; // Shared by various SW components,latest version 1.1 | 2069 | USHORT LCD_Info; // Shared by various SW components,latest version 1.3, was called LVDS_Info |
1710 | USHORT TMDS_Info; // Will be obsolete from R600 | 2070 | USHORT TMDS_Info; // Will be obsolete from R600 |
1711 | USHORT AnalogTV_Info; // Shared by various SW components,latest version 1.1 | 2071 | USHORT AnalogTV_Info; // Shared by various SW components,latest version 1.1 |
1712 | USHORT SupportedDevicesInfo; // Will be obsolete from R600 | 2072 | USHORT SupportedDevicesInfo; // Will be obsolete from R600 |
@@ -1736,12 +2096,16 @@ typedef struct _ATOM_MASTER_LIST_OF_DATA_TABLES | |||
1736 | USHORT PowerSourceInfo; // Shared by various SW components, latest versoin 1.1 | 2096 | USHORT PowerSourceInfo; // Shared by various SW components, latest versoin 1.1 |
1737 | }ATOM_MASTER_LIST_OF_DATA_TABLES; | 2097 | }ATOM_MASTER_LIST_OF_DATA_TABLES; |
1738 | 2098 | ||
2099 | // For backward compatible | ||
2100 | #define LVDS_Info LCD_Info | ||
2101 | |||
1739 | typedef struct _ATOM_MASTER_DATA_TABLE | 2102 | typedef struct _ATOM_MASTER_DATA_TABLE |
1740 | { | 2103 | { |
1741 | ATOM_COMMON_TABLE_HEADER sHeader; | 2104 | ATOM_COMMON_TABLE_HEADER sHeader; |
1742 | ATOM_MASTER_LIST_OF_DATA_TABLES ListOfDataTables; | 2105 | ATOM_MASTER_LIST_OF_DATA_TABLES ListOfDataTables; |
1743 | }ATOM_MASTER_DATA_TABLE; | 2106 | }ATOM_MASTER_DATA_TABLE; |
1744 | 2107 | ||
2108 | |||
1745 | /****************************************************************************/ | 2109 | /****************************************************************************/ |
1746 | // Structure used in MultimediaCapabilityInfoTable | 2110 | // Structure used in MultimediaCapabilityInfoTable |
1747 | /****************************************************************************/ | 2111 | /****************************************************************************/ |
@@ -1776,11 +2140,12 @@ typedef struct _ATOM_MULTIMEDIA_CONFIG_INFO | |||
1776 | UCHAR ucVideoInput4Info;// Video Input 4 Type (1:0) F/B setting (2) physical connector ID (5:3) reserved (7:6) | 2140 | UCHAR ucVideoInput4Info;// Video Input 4 Type (1:0) F/B setting (2) physical connector ID (5:3) reserved (7:6) |
1777 | }ATOM_MULTIMEDIA_CONFIG_INFO; | 2141 | }ATOM_MULTIMEDIA_CONFIG_INFO; |
1778 | 2142 | ||
2143 | |||
1779 | /****************************************************************************/ | 2144 | /****************************************************************************/ |
1780 | // Structures used in FirmwareInfoTable | 2145 | // Structures used in FirmwareInfoTable |
1781 | /****************************************************************************/ | 2146 | /****************************************************************************/ |
1782 | 2147 | ||
1783 | // usBIOSCapability Defintion: | 2148 | // usBIOSCapability Definition: |
1784 | // Bit 0 = 0: Bios image is not Posted, =1:Bios image is Posted; | 2149 | // Bit 0 = 0: Bios image is not Posted, =1:Bios image is Posted; |
1785 | // Bit 1 = 0: Dual CRTC is not supported, =1: Dual CRTC is supported; | 2150 | // Bit 1 = 0: Dual CRTC is not supported, =1: Dual CRTC is supported; |
1786 | // Bit 2 = 0: Extended Desktop is not supported, =1: Extended Desktop is supported; | 2151 | // Bit 2 = 0: Extended Desktop is not supported, =1: Extended Desktop is supported; |
@@ -2031,8 +2396,47 @@ typedef struct _ATOM_FIRMWARE_INFO_V2_1 | |||
2031 | UCHAR ucReserved4[3]; | 2396 | UCHAR ucReserved4[3]; |
2032 | }ATOM_FIRMWARE_INFO_V2_1; | 2397 | }ATOM_FIRMWARE_INFO_V2_1; |
2033 | 2398 | ||
2399 | //the structure below to be used from NI | ||
2400 | //ucTableFormatRevision=2 | ||
2401 | //ucTableContentRevision=2 | ||
2402 | typedef struct _ATOM_FIRMWARE_INFO_V2_2 | ||
2403 | { | ||
2404 | ATOM_COMMON_TABLE_HEADER sHeader; | ||
2405 | ULONG ulFirmwareRevision; | ||
2406 | ULONG ulDefaultEngineClock; //In 10Khz unit | ||
2407 | ULONG ulDefaultMemoryClock; //In 10Khz unit | ||
2408 | ULONG ulReserved[2]; | ||
2409 | ULONG ulReserved1; //Was ulMaxEngineClockPLL_Output; //In 10Khz unit* | ||
2410 | ULONG ulReserved2; //Was ulMaxMemoryClockPLL_Output; //In 10Khz unit* | ||
2411 | ULONG ulMaxPixelClockPLL_Output; //In 10Khz unit | ||
2412 | ULONG ulBinaryAlteredInfo; //Was ulASICMaxEngineClock ? | ||
2413 | ULONG ulDefaultDispEngineClkFreq; //In 10Khz unit. This is the frequency before DCDTO, corresponding to usBootUpVDDCVoltage. | ||
2414 | UCHAR ucReserved3; //Was ucASICMaxTemperature; | ||
2415 | UCHAR ucMinAllowedBL_Level; | ||
2416 | USHORT usBootUpVDDCVoltage; //In MV unit | ||
2417 | USHORT usLcdMinPixelClockPLL_Output; // In MHz unit | ||
2418 | USHORT usLcdMaxPixelClockPLL_Output; // In MHz unit | ||
2419 | ULONG ulReserved4; //Was ulAsicMaximumVoltage | ||
2420 | ULONG ulMinPixelClockPLL_Output; //In 10Khz unit | ||
2421 | ULONG ulReserved5; //Was usMinEngineClockPLL_Input and usMaxEngineClockPLL_Input | ||
2422 | ULONG ulReserved6; //Was usMinEngineClockPLL_Output and usMinMemoryClockPLL_Input | ||
2423 | ULONG ulReserved7; //Was usMaxMemoryClockPLL_Input and usMinMemoryClockPLL_Output | ||
2424 | USHORT usReserved11; //Was usMaxPixelClock; //In 10Khz unit, Max. Pclk used only for DAC | ||
2425 | USHORT usMinPixelClockPLL_Input; //In 10Khz unit | ||
2426 | USHORT usMaxPixelClockPLL_Input; //In 10Khz unit | ||
2427 | USHORT usBootUpVDDCIVoltage; //In unit of mv; Was usMinPixelClockPLL_Output; | ||
2428 | ATOM_FIRMWARE_CAPABILITY_ACCESS usFirmwareCapability; | ||
2429 | USHORT usCoreReferenceClock; //In 10Khz unit | ||
2430 | USHORT usMemoryReferenceClock; //In 10Khz unit | ||
2431 | USHORT usUniphyDPModeExtClkFreq; //In 10Khz unit, if it is 0, In DP Mode Uniphy Input clock from internal PPLL, otherwise Input clock from external Spread clock | ||
2432 | UCHAR ucMemoryModule_ID; //Indicate what is the board design | ||
2433 | UCHAR ucReserved9[3]; | ||
2434 | USHORT usBootUpMVDDCVoltage; //In unit of mv; Was usMinPixelClockPLL_Output; | ||
2435 | USHORT usReserved12; | ||
2436 | ULONG ulReserved10[3]; // New added comparing to previous version | ||
2437 | }ATOM_FIRMWARE_INFO_V2_2; | ||
2034 | 2438 | ||
2035 | #define ATOM_FIRMWARE_INFO_LAST ATOM_FIRMWARE_INFO_V2_1 | 2439 | #define ATOM_FIRMWARE_INFO_LAST ATOM_FIRMWARE_INFO_V2_2 |
2036 | 2440 | ||
2037 | /****************************************************************************/ | 2441 | /****************************************************************************/ |
2038 | // Structures used in IntegratedSystemInfoTable | 2442 | // Structures used in IntegratedSystemInfoTable |
@@ -2212,7 +2616,7 @@ ulDockingPinCFGInfo: [15:0]-Bus/Device/Function # to CFG to read this Docking Pi | |||
2212 | ucDockingPinBit: which bit in this register to read the pin status; | 2616 | ucDockingPinBit: which bit in this register to read the pin status; |
2213 | ucDockingPinPolarity:Polarity of the pin when docked; | 2617 | ucDockingPinPolarity:Polarity of the pin when docked; |
2214 | 2618 | ||
2215 | ulCPUCapInfo: [7:0]=1:Griffin;[7:0]=2:Greyhound;[7:0]=3:K8, other bits reserved for now and must be 0x0 | 2619 | ulCPUCapInfo: [7:0]=1:Griffin;[7:0]=2:Greyhound;[7:0]=3:K8, [7:0]=4:Pharaoh, other bits reserved for now and must be 0x0 |
2216 | 2620 | ||
2217 | usNumberOfCyclesInPeriod:Indicate how many cycles when PWM duty is 100%. | 2621 | usNumberOfCyclesInPeriod:Indicate how many cycles when PWM duty is 100%. |
2218 | 2622 | ||
@@ -2250,6 +2654,14 @@ usMinUpStreamHTLinkWidth: Asymmetric link width support in the future, to rep | |||
2250 | usMinDownStreamHTLinkWidth: same as above. | 2654 | usMinDownStreamHTLinkWidth: same as above. |
2251 | */ | 2655 | */ |
2252 | 2656 | ||
2657 | // ATOM_INTEGRATED_SYSTEM_INFO::ulCPUCapInfo - CPU type definition | ||
2658 | #define INTEGRATED_SYSTEM_INFO__UNKNOWN_CPU 0 | ||
2659 | #define INTEGRATED_SYSTEM_INFO__AMD_CPU__GRIFFIN 1 | ||
2660 | #define INTEGRATED_SYSTEM_INFO__AMD_CPU__GREYHOUND 2 | ||
2661 | #define INTEGRATED_SYSTEM_INFO__AMD_CPU__K8 3 | ||
2662 | #define INTEGRATED_SYSTEM_INFO__AMD_CPU__PHARAOH 4 | ||
2663 | |||
2664 | #define INTEGRATED_SYSTEM_INFO__AMD_CPU__MAX_CODE INTEGRATED_SYSTEM_INFO__AMD_CPU__PHARAOH // this deff reflects max defined CPU code | ||
2253 | 2665 | ||
2254 | #define SYSTEM_CONFIG_POWEREXPRESS_ENABLE 0x00000001 | 2666 | #define SYSTEM_CONFIG_POWEREXPRESS_ENABLE 0x00000001 |
2255 | #define SYSTEM_CONFIG_RUN_AT_OVERDRIVE_ENGINE 0x00000002 | 2667 | #define SYSTEM_CONFIG_RUN_AT_OVERDRIVE_ENGINE 0x00000002 |
@@ -2778,8 +3190,88 @@ typedef struct _ATOM_LVDS_INFO_V12 | |||
2778 | #define PANEL_RANDOM_DITHER 0x80 | 3190 | #define PANEL_RANDOM_DITHER 0x80 |
2779 | #define PANEL_RANDOM_DITHER_MASK 0x80 | 3191 | #define PANEL_RANDOM_DITHER_MASK 0x80 |
2780 | 3192 | ||
3193 | #define ATOM_LVDS_INFO_LAST ATOM_LVDS_INFO_V12 // no need to change this | ||
3194 | |||
3195 | /****************************************************************************/ | ||
3196 | // Structures used by LCD_InfoTable V1.3 Note: previous version was called ATOM_LVDS_INFO_V12 | ||
3197 | // ASIC Families: NI | ||
3198 | // ucTableFormatRevision=1 | ||
3199 | // ucTableContentRevision=3 | ||
3200 | /****************************************************************************/ | ||
3201 | typedef struct _ATOM_LCD_INFO_V13 | ||
3202 | { | ||
3203 | ATOM_COMMON_TABLE_HEADER sHeader; | ||
3204 | ATOM_DTD_FORMAT sLCDTiming; | ||
3205 | USHORT usExtInfoTableOffset; | ||
3206 | USHORT usSupportedRefreshRate; //Refer to panel info table in ATOMBIOS extension Spec. | ||
3207 | ULONG ulReserved0; | ||
3208 | UCHAR ucLCD_Misc; // Reorganized in V13 | ||
3209 | // Bit0: {=0:single, =1:dual}, | ||
3210 | // Bit1: {=0:LDI format for RGB888, =1 FPDI format for RGB888} // was {=0:666RGB, =1:888RGB}, | ||
3211 | // Bit3:2: {Grey level} | ||
3212 | // Bit6:4 Color Bit Depth definition (see below definition in EDID V1.4 @BYTE 14h) | ||
3213 | // Bit7 Reserved. was for ATOM_PANEL_MISC_API_ENABLED, still need it? | ||
3214 | UCHAR ucPanelDefaultRefreshRate; | ||
3215 | UCHAR ucPanelIdentification; | ||
3216 | UCHAR ucSS_Id; | ||
3217 | USHORT usLCDVenderID; | ||
3218 | USHORT usLCDProductID; | ||
3219 | UCHAR ucLCDPanel_SpecialHandlingCap; // Reorganized in V13 | ||
3220 | // Bit0: Once DAL sees this CAP is set, it will read EDID from LCD on its own | ||
3221 | // Bit1: See LCDPANEL_CAP_DRR_SUPPORTED | ||
3222 | // Bit2: a quick reference whether an embadded panel (LCD1 ) is LVDS (0) or eDP (1) | ||
3223 | // Bit7-3: Reserved | ||
3224 | UCHAR ucPanelInfoSize; // start from ATOM_DTD_FORMAT to end of panel info, include ExtInfoTable | ||
3225 | USHORT usBacklightPWM; // Backlight PWM in Hz. New in _V13 | ||
3226 | |||
3227 | UCHAR ucPowerSequenceDIGONtoDE_in4Ms; | ||
3228 | UCHAR ucPowerSequenceDEtoVARY_BL_in4Ms; | ||
3229 | UCHAR ucPowerSequenceDEtoDIGON_in4Ms; | ||
3230 | UCHAR ucPowerSequenceVARY_BLtoDE_in4Ms; | ||
3231 | |||
3232 | UCHAR ucOffDelay_in4Ms; | ||
3233 | UCHAR ucPowerSequenceVARY_BLtoBLON_in4Ms; | ||
3234 | UCHAR ucPowerSequenceBLONtoVARY_BL_in4Ms; | ||
3235 | UCHAR ucReserved1; | ||
3236 | |||
3237 | ULONG ulReserved[4]; | ||
3238 | }ATOM_LCD_INFO_V13; | ||
3239 | |||
3240 | #define ATOM_LCD_INFO_LAST ATOM_LCD_INFO_V13 | ||
3241 | |||
3242 | //Definitions for ucLCD_Misc | ||
3243 | #define ATOM_PANEL_MISC_V13_DUAL 0x00000001 | ||
3244 | #define ATOM_PANEL_MISC_V13_FPDI 0x00000002 | ||
3245 | #define ATOM_PANEL_MISC_V13_GREY_LEVEL 0x0000000C | ||
3246 | #define ATOM_PANEL_MISC_V13_GREY_LEVEL_SHIFT 2 | ||
3247 | #define ATOM_PANEL_MISC_V13_COLOR_BIT_DEPTH_MASK 0x70 | ||
3248 | #define ATOM_PANEL_MISC_V13_6BIT_PER_COLOR 0x10 | ||
3249 | #define ATOM_PANEL_MISC_V13_8BIT_PER_COLOR 0x20 | ||
3250 | |||
3251 | //Color Bit Depth definition in EDID V1.4 @BYTE 14h | ||
3252 | //Bit 6 5 4 | ||
3253 | // 0 0 0 - Color bit depth is undefined | ||
3254 | // 0 0 1 - 6 Bits per Primary Color | ||
3255 | // 0 1 0 - 8 Bits per Primary Color | ||
3256 | // 0 1 1 - 10 Bits per Primary Color | ||
3257 | // 1 0 0 - 12 Bits per Primary Color | ||
3258 | // 1 0 1 - 14 Bits per Primary Color | ||
3259 | // 1 1 0 - 16 Bits per Primary Color | ||
3260 | // 1 1 1 - Reserved | ||
3261 | |||
3262 | //Definitions for ucLCDPanel_SpecialHandlingCap: | ||
3263 | |||
3264 | //Once DAL sees this CAP is set, it will read EDID from LCD on its own instead of using sLCDTiming in ATOM_LVDS_INFO_V12. | ||
3265 | //Other entries in ATOM_LVDS_INFO_V12 are still valid/useful to DAL | ||
3266 | #define LCDPANEL_CAP_V13_READ_EDID 0x1 // = LCDPANEL_CAP_READ_EDID no change comparing to previous version | ||
3267 | |||
3268 | //If a design supports DRR (dynamic refresh rate) on internal panels (LVDS or EDP), this cap is set in ucLCDPanel_SpecialHandlingCap together | ||
3269 | //with multiple supported refresh rates@usSupportedRefreshRate. This cap should not be set when only slow refresh rate is supported (static | ||
3270 | //refresh rate switch by SW. This is only valid from ATOM_LVDS_INFO_V12 | ||
3271 | #define LCDPANEL_CAP_V13_DRR_SUPPORTED 0x2 // = LCDPANEL_CAP_DRR_SUPPORTED no change comparing to previous version | ||
2781 | 3272 | ||
2782 | #define ATOM_LVDS_INFO_LAST ATOM_LVDS_INFO_V12 | 3273 | //Use this cap bit for a quick reference whether an embadded panel (LCD1 ) is LVDS or eDP. |
3274 | #define LCDPANEL_CAP_V13_eDP 0x4 // = LCDPANEL_CAP_eDP no change comparing to previous version | ||
2783 | 3275 | ||
2784 | typedef struct _ATOM_PATCH_RECORD_MODE | 3276 | typedef struct _ATOM_PATCH_RECORD_MODE |
2785 | { | 3277 | { |
@@ -2868,7 +3360,7 @@ typedef struct _ATOM_SPREAD_SPECTRUM_INFO | |||
2868 | /****************************************************************************/ | 3360 | /****************************************************************************/ |
2869 | // Structure used in AnalogTV_InfoTable (Top level) | 3361 | // Structure used in AnalogTV_InfoTable (Top level) |
2870 | /****************************************************************************/ | 3362 | /****************************************************************************/ |
2871 | //ucTVBootUpDefaultStd definiton: | 3363 | //ucTVBootUpDefaultStd definition: |
2872 | 3364 | ||
2873 | //ATOM_TV_NTSC 1 | 3365 | //ATOM_TV_NTSC 1 |
2874 | //ATOM_TV_NTSCJ 2 | 3366 | //ATOM_TV_NTSCJ 2 |
@@ -2944,9 +3436,9 @@ typedef struct _ATOM_DPCD_INFO | |||
2944 | #define MAX_DTD_MODE_IN_VRAM 6 | 3436 | #define MAX_DTD_MODE_IN_VRAM 6 |
2945 | #define ATOM_DTD_MODE_SUPPORT_TBL_SIZE (MAX_DTD_MODE_IN_VRAM*28) //28= (SIZEOF ATOM_DTD_FORMAT) | 3437 | #define ATOM_DTD_MODE_SUPPORT_TBL_SIZE (MAX_DTD_MODE_IN_VRAM*28) //28= (SIZEOF ATOM_DTD_FORMAT) |
2946 | #define ATOM_STD_MODE_SUPPORT_TBL_SIZE 32*8 //32 is a predefined number,8= (SIZEOF ATOM_STD_FORMAT) | 3438 | #define ATOM_STD_MODE_SUPPORT_TBL_SIZE 32*8 //32 is a predefined number,8= (SIZEOF ATOM_STD_FORMAT) |
2947 | #define DFP_ENCODER_TYPE_OFFSET 0x80 | 3439 | //20 bytes for Encoder Type and DPCD in STD EDID area |
2948 | #define DP_ENCODER_LANE_NUM_OFFSET 0x84 | 3440 | #define DFP_ENCODER_TYPE_OFFSET (ATOM_EDID_RAW_DATASIZE + ATOM_DTD_MODE_SUPPORT_TBL_SIZE + ATOM_STD_MODE_SUPPORT_TBL_SIZE - 20) |
2949 | #define DP_ENCODER_LINK_RATE_OFFSET 0x88 | 3441 | #define ATOM_DP_DPCD_OFFSET (DFP_ENCODER_TYPE_OFFSET + 4 ) |
2950 | 3442 | ||
2951 | #define ATOM_HWICON1_SURFACE_ADDR 0 | 3443 | #define ATOM_HWICON1_SURFACE_ADDR 0 |
2952 | #define ATOM_HWICON2_SURFACE_ADDR (ATOM_HWICON1_SURFACE_ADDR + ATOM_HWICON_SURFACE_SIZE) | 3444 | #define ATOM_HWICON2_SURFACE_ADDR (ATOM_HWICON1_SURFACE_ADDR + ATOM_HWICON_SURFACE_SIZE) |
@@ -2997,14 +3489,16 @@ typedef struct _ATOM_DPCD_INFO | |||
2997 | #define ATOM_DFP5_DTD_MODE_TBL_ADDR (ATOM_DFP5_EDID_ADDR + ATOM_EDID_RAW_DATASIZE) | 3489 | #define ATOM_DFP5_DTD_MODE_TBL_ADDR (ATOM_DFP5_EDID_ADDR + ATOM_EDID_RAW_DATASIZE) |
2998 | #define ATOM_DFP5_STD_MODE_TBL_ADDR (ATOM_DFP5_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE) | 3490 | #define ATOM_DFP5_STD_MODE_TBL_ADDR (ATOM_DFP5_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE) |
2999 | 3491 | ||
3000 | #define ATOM_DP_TRAINING_TBL_ADDR (ATOM_DFP5_STD_MODE_TBL_ADDR+ATOM_STD_MODE_SUPPORT_TBL_SIZE) | 3492 | #define ATOM_DP_TRAINING_TBL_ADDR (ATOM_DFP5_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE) |
3001 | 3493 | ||
3002 | #define ATOM_STACK_STORAGE_START (ATOM_DP_TRAINING_TBL_ADDR+256) | 3494 | #define ATOM_STACK_STORAGE_START (ATOM_DP_TRAINING_TBL_ADDR + 1024) |
3003 | #define ATOM_STACK_STORAGE_END ATOM_STACK_STORAGE_START+512 | 3495 | #define ATOM_STACK_STORAGE_END ATOM_STACK_STORAGE_START + 512 |
3004 | 3496 | ||
3005 | //The size below is in Kb! | 3497 | //The size below is in Kb! |
3006 | #define ATOM_VRAM_RESERVE_SIZE ((((ATOM_STACK_STORAGE_END - ATOM_HWICON1_SURFACE_ADDR)>>10)+4)&0xFFFC) | 3498 | #define ATOM_VRAM_RESERVE_SIZE ((((ATOM_STACK_STORAGE_END - ATOM_HWICON1_SURFACE_ADDR)>>10)+4)&0xFFFC) |
3007 | 3499 | ||
3500 | #define ATOM_VRAM_RESERVE_V2_SIZE 32 | ||
3501 | |||
3008 | #define ATOM_VRAM_OPERATION_FLAGS_MASK 0xC0000000L | 3502 | #define ATOM_VRAM_OPERATION_FLAGS_MASK 0xC0000000L |
3009 | #define ATOM_VRAM_OPERATION_FLAGS_SHIFT 30 | 3503 | #define ATOM_VRAM_OPERATION_FLAGS_SHIFT 30 |
3010 | #define ATOM_VRAM_BLOCK_NEEDS_NO_RESERVATION 0x1 | 3504 | #define ATOM_VRAM_BLOCK_NEEDS_NO_RESERVATION 0x1 |
@@ -3206,6 +3700,15 @@ typedef struct _ATOM_DISPLAY_OBJECT_PATH | |||
3206 | USHORT usGraphicObjIds[1]; //1st Encoder Obj source from GPU to last Graphic Obj destinate to connector. | 3700 | USHORT usGraphicObjIds[1]; //1st Encoder Obj source from GPU to last Graphic Obj destinate to connector. |
3207 | }ATOM_DISPLAY_OBJECT_PATH; | 3701 | }ATOM_DISPLAY_OBJECT_PATH; |
3208 | 3702 | ||
3703 | typedef struct _ATOM_DISPLAY_EXTERNAL_OBJECT_PATH | ||
3704 | { | ||
3705 | USHORT usDeviceTag; //supported device | ||
3706 | USHORT usSize; //the size of ATOM_DISPLAY_OBJECT_PATH | ||
3707 | USHORT usConnObjectId; //Connector Object ID | ||
3708 | USHORT usGPUObjectId; //GPU ID | ||
3709 | USHORT usGraphicObjIds[2]; //usGraphicObjIds[0]= GPU internal encoder, usGraphicObjIds[1]= external encoder | ||
3710 | }ATOM_DISPLAY_EXTERNAL_OBJECT_PATH; | ||
3711 | |||
3209 | typedef struct _ATOM_DISPLAY_OBJECT_PATH_TABLE | 3712 | typedef struct _ATOM_DISPLAY_OBJECT_PATH_TABLE |
3210 | { | 3713 | { |
3211 | UCHAR ucNumOfDispPath; | 3714 | UCHAR ucNumOfDispPath; |
@@ -3261,6 +3764,47 @@ typedef struct _ATOM_SRC_DST_TABLE_FOR_ONE_OBJECT //usSrcDstTableOffset | |||
3261 | #define EXT_AUXDDC_LUTINDEX_7 7 | 3764 | #define EXT_AUXDDC_LUTINDEX_7 7 |
3262 | #define MAX_NUMBER_OF_EXT_AUXDDC_LUT_ENTRIES (EXT_AUXDDC_LUTINDEX_7+1) | 3765 | #define MAX_NUMBER_OF_EXT_AUXDDC_LUT_ENTRIES (EXT_AUXDDC_LUTINDEX_7+1) |
3263 | 3766 | ||
3767 | //ucChannelMapping are defined as following | ||
3768 | //for DP connector, eDP, DP to VGA/LVDS | ||
3769 | //Bit[1:0]: Define which pin connect to DP connector DP_Lane0, =0: source from GPU pin TX0, =1: from GPU pin TX1, =2: from GPU pin TX2, =3 from GPU pin TX3 | ||
3770 | //Bit[3:2]: Define which pin connect to DP connector DP_Lane1, =0: source from GPU pin TX0, =1: from GPU pin TX1, =2: from GPU pin TX2, =3 from GPU pin TX3 | ||
3771 | //Bit[5:4]: Define which pin connect to DP connector DP_Lane2, =0: source from GPU pin TX0, =1: from GPU pin TX1, =2: from GPU pin TX2, =3 from GPU pin TX3 | ||
3772 | //Bit[7:6]: Define which pin connect to DP connector DP_Lane3, =0: source from GPU pin TX0, =1: from GPU pin TX1, =2: from GPU pin TX2, =3 from GPU pin TX3 | ||
3773 | typedef struct _ATOM_DP_CONN_CHANNEL_MAPPING | ||
3774 | { | ||
3775 | #if ATOM_BIG_ENDIAN | ||
3776 | UCHAR ucDP_Lane3_Source:2; | ||
3777 | UCHAR ucDP_Lane2_Source:2; | ||
3778 | UCHAR ucDP_Lane1_Source:2; | ||
3779 | UCHAR ucDP_Lane0_Source:2; | ||
3780 | #else | ||
3781 | UCHAR ucDP_Lane0_Source:2; | ||
3782 | UCHAR ucDP_Lane1_Source:2; | ||
3783 | UCHAR ucDP_Lane2_Source:2; | ||
3784 | UCHAR ucDP_Lane3_Source:2; | ||
3785 | #endif | ||
3786 | }ATOM_DP_CONN_CHANNEL_MAPPING; | ||
3787 | |||
3788 | //for DVI/HDMI, in dual link case, both links have to have same mapping. | ||
3789 | //Bit[1:0]: Define which pin connect to DVI connector data Lane2, =0: source from GPU pin TX0, =1: from GPU pin TX1, =2: from GPU pin TX2, =3 from GPU pin TX3 | ||
3790 | //Bit[3:2]: Define which pin connect to DVI connector data Lane1, =0: source from GPU pin TX0, =1: from GPU pin TX1, =2: from GPU pin TX2, =3 from GPU pin TX3 | ||
3791 | //Bit[5:4]: Define which pin connect to DVI connector data Lane0, =0: source from GPU pin TX0, =1: from GPU pin TX1, =2: from GPU pin TX2, =3 from GPU pin TX3 | ||
3792 | //Bit[7:6]: Define which pin connect to DVI connector clock lane, =0: source from GPU pin TX0, =1: from GPU pin TX1, =2: from GPU pin TX2, =3 from GPU pin TX3 | ||
3793 | typedef struct _ATOM_DVI_CONN_CHANNEL_MAPPING | ||
3794 | { | ||
3795 | #if ATOM_BIG_ENDIAN | ||
3796 | UCHAR ucDVI_CLK_Source:2; | ||
3797 | UCHAR ucDVI_DATA0_Source:2; | ||
3798 | UCHAR ucDVI_DATA1_Source:2; | ||
3799 | UCHAR ucDVI_DATA2_Source:2; | ||
3800 | #else | ||
3801 | UCHAR ucDVI_DATA2_Source:2; | ||
3802 | UCHAR ucDVI_DATA1_Source:2; | ||
3803 | UCHAR ucDVI_DATA0_Source:2; | ||
3804 | UCHAR ucDVI_CLK_Source:2; | ||
3805 | #endif | ||
3806 | }ATOM_DVI_CONN_CHANNEL_MAPPING; | ||
3807 | |||
3264 | typedef struct _EXT_DISPLAY_PATH | 3808 | typedef struct _EXT_DISPLAY_PATH |
3265 | { | 3809 | { |
3266 | USHORT usDeviceTag; //A bit vector to show what devices are supported | 3810 | USHORT usDeviceTag; //A bit vector to show what devices are supported |
@@ -3269,7 +3813,13 @@ typedef struct _EXT_DISPLAY_PATH | |||
3269 | UCHAR ucExtAUXDDCLutIndex; //An index into external AUX/DDC channel LUT | 3813 | UCHAR ucExtAUXDDCLutIndex; //An index into external AUX/DDC channel LUT |
3270 | UCHAR ucExtHPDPINLutIndex; //An index into external HPD pin LUT | 3814 | UCHAR ucExtHPDPINLutIndex; //An index into external HPD pin LUT |
3271 | USHORT usExtEncoderObjId; //external encoder object id | 3815 | USHORT usExtEncoderObjId; //external encoder object id |
3272 | USHORT usReserved[3]; | 3816 | union{ |
3817 | UCHAR ucChannelMapping; // if ucChannelMapping=0, using default one to one mapping | ||
3818 | ATOM_DP_CONN_CHANNEL_MAPPING asDPMapping; | ||
3819 | ATOM_DVI_CONN_CHANNEL_MAPPING asDVIMapping; | ||
3820 | }; | ||
3821 | UCHAR ucReserved; | ||
3822 | USHORT usReserved[2]; | ||
3273 | }EXT_DISPLAY_PATH; | 3823 | }EXT_DISPLAY_PATH; |
3274 | 3824 | ||
3275 | #define NUMBER_OF_UCHAR_FOR_GUID 16 | 3825 | #define NUMBER_OF_UCHAR_FOR_GUID 16 |
@@ -3281,10 +3831,11 @@ typedef struct _ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO | |||
3281 | UCHAR ucGuid [NUMBER_OF_UCHAR_FOR_GUID]; // a GUID is a 16 byte long string | 3831 | UCHAR ucGuid [NUMBER_OF_UCHAR_FOR_GUID]; // a GUID is a 16 byte long string |
3282 | EXT_DISPLAY_PATH sPath[MAX_NUMBER_OF_EXT_DISPLAY_PATH]; // total of fixed 7 entries. | 3832 | EXT_DISPLAY_PATH sPath[MAX_NUMBER_OF_EXT_DISPLAY_PATH]; // total of fixed 7 entries. |
3283 | UCHAR ucChecksum; // a simple Checksum of the sum of whole structure equal to 0x0. | 3833 | UCHAR ucChecksum; // a simple Checksum of the sum of whole structure equal to 0x0. |
3284 | UCHAR Reserved [7]; // for potential expansion | 3834 | UCHAR uc3DStereoPinId; // use for eDP panel |
3835 | UCHAR Reserved [6]; // for potential expansion | ||
3285 | }ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO; | 3836 | }ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO; |
3286 | 3837 | ||
3287 | //Related definitions, all records are differnt but they have a commond header | 3838 | //Related definitions, all records are different but they have a commond header |
3288 | typedef struct _ATOM_COMMON_RECORD_HEADER | 3839 | typedef struct _ATOM_COMMON_RECORD_HEADER |
3289 | { | 3840 | { |
3290 | UCHAR ucRecordType; //An emun to indicate the record type | 3841 | UCHAR ucRecordType; //An emun to indicate the record type |
@@ -3311,10 +3862,11 @@ typedef struct _ATOM_COMMON_RECORD_HEADER | |||
3311 | #define ATOM_CONNECTOR_AUXDDC_LUT_RECORD_TYPE 17 //This is for the case when connectors are not known to object table | 3862 | #define ATOM_CONNECTOR_AUXDDC_LUT_RECORD_TYPE 17 //This is for the case when connectors are not known to object table |
3312 | #define ATOM_OBJECT_LINK_RECORD_TYPE 18 //Once this record is present under one object, it indicats the oobject is linked to another obj described by the record | 3863 | #define ATOM_OBJECT_LINK_RECORD_TYPE 18 //Once this record is present under one object, it indicats the oobject is linked to another obj described by the record |
3313 | #define ATOM_CONNECTOR_REMOTE_CAP_RECORD_TYPE 19 | 3864 | #define ATOM_CONNECTOR_REMOTE_CAP_RECORD_TYPE 19 |
3865 | #define ATOM_ENCODER_CAP_RECORD_TYPE 20 | ||
3314 | 3866 | ||
3315 | 3867 | ||
3316 | //Must be updated when new record type is added,equal to that record definition! | 3868 | //Must be updated when new record type is added,equal to that record definition! |
3317 | #define ATOM_MAX_OBJECT_RECORD_NUMBER ATOM_CONNECTOR_REMOTE_CAP_RECORD_TYPE | 3869 | #define ATOM_MAX_OBJECT_RECORD_NUMBER ATOM_ENCODER_CAP_RECORD_TYPE |
3318 | 3870 | ||
3319 | typedef struct _ATOM_I2C_RECORD | 3871 | typedef struct _ATOM_I2C_RECORD |
3320 | { | 3872 | { |
@@ -3441,6 +3993,26 @@ typedef struct _ATOM_ENCODER_DVO_CF_RECORD | |||
3441 | UCHAR ucPadding[2]; | 3993 | UCHAR ucPadding[2]; |
3442 | }ATOM_ENCODER_DVO_CF_RECORD; | 3994 | }ATOM_ENCODER_DVO_CF_RECORD; |
3443 | 3995 | ||
3996 | // Bit maps for ATOM_ENCODER_CAP_RECORD.ucEncoderCap | ||
3997 | #define ATOM_ENCODER_CAP_RECORD_HBR2 0x01 // DP1.2 HBR2 is supported by this path | ||
3998 | |||
3999 | typedef struct _ATOM_ENCODER_CAP_RECORD | ||
4000 | { | ||
4001 | ATOM_COMMON_RECORD_HEADER sheader; | ||
4002 | union { | ||
4003 | USHORT usEncoderCap; | ||
4004 | struct { | ||
4005 | #if ATOM_BIG_ENDIAN | ||
4006 | USHORT usReserved:15; // Bit1-15 may be defined for other capability in future | ||
4007 | USHORT usHBR2Cap:1; // Bit0 is for DP1.2 HBR2 capability. | ||
4008 | #else | ||
4009 | USHORT usHBR2Cap:1; // Bit0 is for DP1.2 HBR2 capability. | ||
4010 | USHORT usReserved:15; // Bit1-15 may be defined for other capability in future | ||
4011 | #endif | ||
4012 | }; | ||
4013 | }; | ||
4014 | }ATOM_ENCODER_CAP_RECORD; | ||
4015 | |||
3444 | // value for ATOM_CONNECTOR_CF_RECORD.ucConnectedDvoBundle | 4016 | // value for ATOM_CONNECTOR_CF_RECORD.ucConnectedDvoBundle |
3445 | #define ATOM_CONNECTOR_CF_RECORD_CONNECTED_UPPER12BITBUNDLEA 1 | 4017 | #define ATOM_CONNECTOR_CF_RECORD_CONNECTED_UPPER12BITBUNDLEA 1 |
3446 | #define ATOM_CONNECTOR_CF_RECORD_CONNECTED_LOWER12BITBUNDLEB 2 | 4018 | #define ATOM_CONNECTOR_CF_RECORD_CONNECTED_LOWER12BITBUNDLEB 2 |
@@ -3580,6 +4152,11 @@ typedef struct _ATOM_VOLTAGE_CONTROL | |||
3580 | #define VOLTAGE_CONTROL_ID_DAC 0x02 //I2C control, used for R5xx/R6xx MVDDC,MVDDQ or VDDCI | 4152 | #define VOLTAGE_CONTROL_ID_DAC 0x02 //I2C control, used for R5xx/R6xx MVDDC,MVDDQ or VDDCI |
3581 | #define VOLTAGE_CONTROL_ID_VT116xM 0x03 //I2C control, used for R6xx Core Voltage | 4153 | #define VOLTAGE_CONTROL_ID_VT116xM 0x03 //I2C control, used for R6xx Core Voltage |
3582 | #define VOLTAGE_CONTROL_ID_DS4402 0x04 | 4154 | #define VOLTAGE_CONTROL_ID_DS4402 0x04 |
4155 | #define VOLTAGE_CONTROL_ID_UP6266 0x05 | ||
4156 | #define VOLTAGE_CONTROL_ID_SCORPIO 0x06 | ||
4157 | #define VOLTAGE_CONTROL_ID_VT1556M 0x07 | ||
4158 | #define VOLTAGE_CONTROL_ID_CHL822x 0x08 | ||
4159 | #define VOLTAGE_CONTROL_ID_VT1586M 0x09 | ||
3583 | 4160 | ||
3584 | typedef struct _ATOM_VOLTAGE_OBJECT | 4161 | typedef struct _ATOM_VOLTAGE_OBJECT |
3585 | { | 4162 | { |
@@ -3670,66 +4247,157 @@ typedef struct _ATOM_POWER_SOURCE_INFO | |||
3670 | #define POWER_SENSOR_GPIO 0x01 | 4247 | #define POWER_SENSOR_GPIO 0x01 |
3671 | #define POWER_SENSOR_I2C 0x02 | 4248 | #define POWER_SENSOR_I2C 0x02 |
3672 | 4249 | ||
4250 | typedef struct _ATOM_CLK_VOLT_CAPABILITY | ||
4251 | { | ||
4252 | ULONG ulVoltageIndex; // The Voltage Index indicated by FUSE, same voltage index shared with SCLK DPM fuse table | ||
4253 | ULONG ulMaximumSupportedCLK; // Maximum clock supported with specified voltage index, unit in 10kHz | ||
4254 | }ATOM_CLK_VOLT_CAPABILITY; | ||
4255 | |||
4256 | typedef struct _ATOM_AVAILABLE_SCLK_LIST | ||
4257 | { | ||
4258 | ULONG ulSupportedSCLK; // Maximum clock supported with specified voltage index, unit in 10kHz | ||
4259 | USHORT usVoltageIndex; // The Voltage Index indicated by FUSE for specified SCLK | ||
4260 | USHORT usVoltageID; // The Voltage ID indicated by FUSE for specified SCLK | ||
4261 | }ATOM_AVAILABLE_SCLK_LIST; | ||
4262 | |||
4263 | // ATOM_INTEGRATED_SYSTEM_INFO_V6 ulSystemConfig cap definition | ||
4264 | #define ATOM_IGP_INFO_V6_SYSTEM_CONFIG__PCIE_POWER_GATING_ENABLE 1 // refer to ulSystemConfig bit[0] | ||
4265 | |||
4266 | // this IntegrateSystemInfoTable is used for Liano/Ontario APU | ||
3673 | typedef struct _ATOM_INTEGRATED_SYSTEM_INFO_V6 | 4267 | typedef struct _ATOM_INTEGRATED_SYSTEM_INFO_V6 |
3674 | { | 4268 | { |
3675 | ATOM_COMMON_TABLE_HEADER sHeader; | 4269 | ATOM_COMMON_TABLE_HEADER sHeader; |
3676 | ULONG ulBootUpEngineClock; | 4270 | ULONG ulBootUpEngineClock; |
3677 | ULONG ulDentistVCOFreq; | 4271 | ULONG ulDentistVCOFreq; |
3678 | ULONG ulBootUpUMAClock; | 4272 | ULONG ulBootUpUMAClock; |
3679 | ULONG ulReserved1[8]; | 4273 | ATOM_CLK_VOLT_CAPABILITY sDISPCLK_Voltage[4]; |
3680 | ULONG ulBootUpReqDisplayVector; | 4274 | ULONG ulBootUpReqDisplayVector; |
3681 | ULONG ulOtherDisplayMisc; | 4275 | ULONG ulOtherDisplayMisc; |
3682 | ULONG ulGPUCapInfo; | 4276 | ULONG ulGPUCapInfo; |
3683 | ULONG ulReserved2[3]; | 4277 | ULONG ulSB_MMIO_Base_Addr; |
4278 | USHORT usRequestedPWMFreqInHz; | ||
4279 | UCHAR ucHtcTmpLmt; | ||
4280 | UCHAR ucHtcHystLmt; | ||
4281 | ULONG ulMinEngineClock; | ||
3684 | ULONG ulSystemConfig; | 4282 | ULONG ulSystemConfig; |
3685 | ULONG ulCPUCapInfo; | 4283 | ULONG ulCPUCapInfo; |
3686 | USHORT usMaxNBVoltage; | 4284 | USHORT usNBP0Voltage; |
3687 | USHORT usMinNBVoltage; | 4285 | USHORT usNBP1Voltage; |
3688 | USHORT usBootUpNBVoltage; | 4286 | USHORT usBootUpNBVoltage; |
3689 | USHORT usExtDispConnInfoOffset; | 4287 | USHORT usExtDispConnInfoOffset; |
3690 | UCHAR ucHtcTmpLmt; | 4288 | USHORT usPanelRefreshRateRange; |
3691 | UCHAR ucTjOffset; | ||
3692 | UCHAR ucMemoryType; | 4289 | UCHAR ucMemoryType; |
3693 | UCHAR ucUMAChannelNumber; | 4290 | UCHAR ucUMAChannelNumber; |
3694 | ULONG ulCSR_M3_ARB_CNTL_DEFAULT[10]; | 4291 | ULONG ulCSR_M3_ARB_CNTL_DEFAULT[10]; |
3695 | ULONG ulCSR_M3_ARB_CNTL_UVD[10]; | 4292 | ULONG ulCSR_M3_ARB_CNTL_UVD[10]; |
3696 | ULONG ulCSR_M3_ARB_CNTL_FS3D[10]; | 4293 | ULONG ulCSR_M3_ARB_CNTL_FS3D[10]; |
3697 | ULONG ulReserved3[42]; | 4294 | ATOM_AVAILABLE_SCLK_LIST sAvail_SCLK[5]; |
4295 | ULONG ulGMCRestoreResetTime; | ||
4296 | ULONG ulMinimumNClk; | ||
4297 | ULONG ulIdleNClk; | ||
4298 | ULONG ulDDR_DLL_PowerUpTime; | ||
4299 | ULONG ulDDR_PLL_PowerUpTime; | ||
4300 | USHORT usPCIEClkSSPercentage; | ||
4301 | USHORT usPCIEClkSSType; | ||
4302 | USHORT usLvdsSSPercentage; | ||
4303 | USHORT usLvdsSSpreadRateIn10Hz; | ||
4304 | USHORT usHDMISSPercentage; | ||
4305 | USHORT usHDMISSpreadRateIn10Hz; | ||
4306 | USHORT usDVISSPercentage; | ||
4307 | USHORT usDVISSpreadRateIn10Hz; | ||
4308 | ULONG ulReserved3[21]; | ||
3698 | ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO sExtDispConnInfo; | 4309 | ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO sExtDispConnInfo; |
3699 | }ATOM_INTEGRATED_SYSTEM_INFO_V6; | 4310 | }ATOM_INTEGRATED_SYSTEM_INFO_V6; |
3700 | 4311 | ||
4312 | // ulGPUCapInfo | ||
4313 | #define INTEGRATED_SYSTEM_INFO_V6_GPUCAPINFO__TMDSHDMI_COHERENT_SINGLEPLL_MODE 0x01 | ||
4314 | #define INTEGRATED_SYSTEM_INFO_V6_GPUCAPINFO__DISABLE_AUX_HW_MODE_DETECTION 0x08 | ||
4315 | |||
4316 | // ulOtherDisplayMisc | ||
4317 | #define INTEGRATED_SYSTEM_INFO__GET_EDID_CALLBACK_FUNC_SUPPORT 0x01 | ||
4318 | |||
4319 | |||
3701 | /********************************************************************************************************************** | 4320 | /********************************************************************************************************************** |
3702 | // ATOM_INTEGRATED_SYSTEM_INFO_V6 Description | 4321 | ATOM_INTEGRATED_SYSTEM_INFO_V6 Description |
3703 | //ulBootUpEngineClock: VBIOS bootup Engine clock frequency, in 10kHz unit. | 4322 | ulBootUpEngineClock: VBIOS bootup Engine clock frequency, in 10kHz unit. if it is equal 0, then VBIOS use pre-defined bootup engine clock |
3704 | //ulDentistVCOFreq: Dentist VCO clock in 10kHz unit. | 4323 | ulDentistVCOFreq: Dentist VCO clock in 10kHz unit. |
3705 | //ulBootUpUMAClock: System memory boot up clock frequency in 10Khz unit. | 4324 | ulBootUpUMAClock: System memory boot up clock frequency in 10Khz unit. |
3706 | //ulReserved1[8] Reserved by now, must be 0x0. | 4325 | sDISPCLK_Voltage: Report Display clock voltage requirement. |
3707 | //ulBootUpReqDisplayVector VBIOS boot up display IDs | 4326 | |
3708 | // ATOM_DEVICE_CRT1_SUPPORT 0x0001 | 4327 | ulBootUpReqDisplayVector: VBIOS boot up display IDs, following are supported devices in Liano/Ontaio projects: |
3709 | // ATOM_DEVICE_CRT2_SUPPORT 0x0010 | 4328 | ATOM_DEVICE_CRT1_SUPPORT 0x0001 |
3710 | // ATOM_DEVICE_DFP1_SUPPORT 0x0008 | 4329 | ATOM_DEVICE_CRT2_SUPPORT 0x0010 |
3711 | // ATOM_DEVICE_DFP6_SUPPORT 0x0040 | 4330 | ATOM_DEVICE_DFP1_SUPPORT 0x0008 |
3712 | // ATOM_DEVICE_DFP2_SUPPORT 0x0080 | 4331 | ATOM_DEVICE_DFP6_SUPPORT 0x0040 |
3713 | // ATOM_DEVICE_DFP3_SUPPORT 0x0200 | 4332 | ATOM_DEVICE_DFP2_SUPPORT 0x0080 |
3714 | // ATOM_DEVICE_DFP4_SUPPORT 0x0400 | 4333 | ATOM_DEVICE_DFP3_SUPPORT 0x0200 |
3715 | // ATOM_DEVICE_DFP5_SUPPORT 0x0800 | 4334 | ATOM_DEVICE_DFP4_SUPPORT 0x0400 |
3716 | // ATOM_DEVICE_LCD1_SUPPORT 0x0002 | 4335 | ATOM_DEVICE_DFP5_SUPPORT 0x0800 |
3717 | //ulOtherDisplayMisc Other display related flags, not defined yet. | 4336 | ATOM_DEVICE_LCD1_SUPPORT 0x0002 |
3718 | //ulGPUCapInfo TBD | 4337 | ulOtherDisplayMisc: Other display related flags, not defined yet. |
3719 | //ulReserved2[3] must be 0x0 for the reserved. | 4338 | ulGPUCapInfo: bit[0]=0: TMDS/HDMI Coherent Mode use cascade PLL mode. |
3720 | //ulSystemConfig TBD | 4339 | =1: TMDS/HDMI Coherent Mode use signel PLL mode. |
3721 | //ulCPUCapInfo TBD | 4340 | bit[3]=0: Enable HW AUX mode detection logic |
3722 | //usMaxNBVoltage High NB voltage in unit of mv, calculated using current VDDNB (D24F2xDC) and VDDNB offset fuse. | 4341 | =1: Disable HW AUX mode dettion logic |
3723 | //usMinNBVoltage Low NB voltage in unit of mv, calculated using current VDDNB (D24F2xDC) and VDDNB offset fuse. | 4342 | ulSB_MMIO_Base_Addr: Physical Base address to SB MMIO space. Driver needs to initialize it for SMU usage. |
3724 | //usBootUpNBVoltage Boot up NB voltage in unit of mv. | 4343 | |
3725 | //ucHtcTmpLmt Bit [22:16] of D24F3x64 Thermal Control (HTC) Register. | 4344 | usRequestedPWMFreqInHz: When it's set to 0x0 by SBIOS: the LCD BackLight is not controlled by GPU(SW). |
3726 | //ucTjOffset Bit [28:22] of D24F3xE4 Thermtrip Status Register,may not be needed. | 4345 | Any attempt to change BL using VBIOS function or enable VariBri from PP table is not effective since ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU==0; |
3727 | //ucMemoryType [3:0]=1:DDR1;=2:DDR2;=3:DDR3.[7:4] is reserved. | 4346 | |
3728 | //ucUMAChannelNumber System memory channel numbers. | 4347 | When it's set to a non-zero frequency, the BackLight is controlled by GPU (SW) in one of two ways below: |
3729 | //usExtDispConnectionInfoOffset ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO offset relative to beginning of this table. | 4348 | 1. SW uses the GPU BL PWM output to control the BL, in chis case, this non-zero frequency determines what freq GPU should use; |
3730 | //ulCSR_M3_ARB_CNTL_DEFAULT[10] Arrays with values for CSR M3 arbiter for default | 4349 | VBIOS will set up proper PWM frequency and ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU==1,as the result, |
3731 | //ulCSR_M3_ARB_CNTL_UVD[10] Arrays with values for CSR M3 arbiter for UVD playback. | 4350 | Changing BL using VBIOS function is functional in both driver and non-driver present environment; |
3732 | //ulCSR_M3_ARB_CNTL_FS3D[10] Arrays with values for CSR M3 arbiter for Full Screen 3D applications. | 4351 | and enabling VariBri under the driver environment from PP table is optional. |
4352 | |||
4353 | 2. SW uses other means to control BL (like DPCD),this non-zero frequency serves as a flag only indicating | ||
4354 | that BL control from GPU is expected. | ||
4355 | VBIOS will NOT set up PWM frequency but make ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU==1 | ||
4356 | Changing BL using VBIOS function could be functional in both driver and non-driver present environment,but | ||
4357 | it's per platform | ||
4358 | and enabling VariBri under the driver environment from PP table is optional. | ||
4359 | |||
4360 | ucHtcTmpLmt: Refer to D18F3x64 bit[22:16], HtcTmpLmt. | ||
4361 | Threshold on value to enter HTC_active state. | ||
4362 | ucHtcHystLmt: Refer to D18F3x64 bit[27:24], HtcHystLmt. | ||
4363 | To calculate threshold off value to exit HTC_active state, which is Threshold on vlaue minus ucHtcHystLmt. | ||
4364 | ulMinEngineClock: Minimum SCLK allowed in 10kHz unit. This is calculated based on WRCK Fuse settings. | ||
4365 | ulSystemConfig: Bit[0]=0: PCIE Power Gating Disabled | ||
4366 | =1: PCIE Power Gating Enabled | ||
4367 | Bit[1]=0: DDR-DLL shut-down feature disabled. | ||
4368 | 1: DDR-DLL shut-down feature enabled. | ||
4369 | Bit[2]=0: DDR-PLL Power down feature disabled. | ||
4370 | 1: DDR-PLL Power down feature enabled. | ||
4371 | ulCPUCapInfo: TBD | ||
4372 | usNBP0Voltage: VID for voltage on NB P0 State | ||
4373 | usNBP1Voltage: VID for voltage on NB P1 State | ||
4374 | usBootUpNBVoltage: Voltage Index of GNB voltage configured by SBIOS, which is suffcient to support VBIOS DISPCLK requirement. | ||
4375 | usExtDispConnInfoOffset: Offset to sExtDispConnInfo inside the structure | ||
4376 | usPanelRefreshRateRange: Bit vector for LCD supported refresh rate range. If DRR is requestd by the platform, at least two bits need to be set | ||
4377 | to indicate a range. | ||
4378 | SUPPORTED_LCD_REFRESHRATE_30Hz 0x0004 | ||
4379 | SUPPORTED_LCD_REFRESHRATE_40Hz 0x0008 | ||
4380 | SUPPORTED_LCD_REFRESHRATE_50Hz 0x0010 | ||
4381 | SUPPORTED_LCD_REFRESHRATE_60Hz 0x0020 | ||
4382 | ucMemoryType: [3:0]=1:DDR1;=2:DDR2;=3:DDR3.[7:4] is reserved. | ||
4383 | ucUMAChannelNumber: System memory channel numbers. | ||
4384 | ulCSR_M3_ARB_CNTL_DEFAULT[10]: Arrays with values for CSR M3 arbiter for default | ||
4385 | ulCSR_M3_ARB_CNTL_UVD[10]: Arrays with values for CSR M3 arbiter for UVD playback. | ||
4386 | ulCSR_M3_ARB_CNTL_FS3D[10]: Arrays with values for CSR M3 arbiter for Full Screen 3D applications. | ||
4387 | sAvail_SCLK[5]: Arrays to provide available list of SLCK and corresponding voltage, order from low to high | ||
4388 | ulGMCRestoreResetTime: GMC power restore and GMC reset time to calculate data reconnection latency. Unit in ns. | ||
4389 | ulMinimumNClk: Minimum NCLK speed among all NB-Pstates to calcualte data reconnection latency. Unit in 10kHz. | ||
4390 | ulIdleNClk: NCLK speed while memory runs in self-refresh state. Unit in 10kHz. | ||
4391 | ulDDR_DLL_PowerUpTime: DDR PHY DLL power up time. Unit in ns. | ||
4392 | ulDDR_PLL_PowerUpTime: DDR PHY PLL power up time. Unit in ns. | ||
4393 | usPCIEClkSSPercentage: PCIE Clock Spread Spectrum Percentage in unit 0.01%; 100 mean 1%. | ||
4394 | usPCIEClkSSType: PCIE Clock Spread Spectrum Type. 0 for Down spread(default); 1 for Center spread. | ||
4395 | usLvdsSSPercentage: LVDS panel ( not include eDP ) Spread Spectrum Percentage in unit of 0.01%, =0, use VBIOS default setting. | ||
4396 | usLvdsSSpreadRateIn10Hz: LVDS panel ( not include eDP ) Spread Spectrum frequency in unit of 10Hz, =0, use VBIOS default setting. | ||
4397 | usHDMISSPercentage: HDMI Spread Spectrum Percentage in unit 0.01%; 100 mean 1%, =0, use VBIOS default setting. | ||
4398 | usHDMISSpreadRateIn10Hz: HDMI Spread Spectrum frequency in unit of 10Hz, =0, use VBIOS default setting. | ||
4399 | usDVISSPercentage: DVI Spread Spectrum Percentage in unit 0.01%; 100 mean 1%, =0, use VBIOS default setting. | ||
4400 | usDVISSpreadRateIn10Hz: DVI Spread Spectrum frequency in unit of 10Hz, =0, use VBIOS default setting. | ||
3733 | **********************************************************************************************************************/ | 4401 | **********************************************************************************************************************/ |
3734 | 4402 | ||
3735 | /**************************************************************************/ | 4403 | /**************************************************************************/ |
@@ -3790,6 +4458,7 @@ typedef struct _ATOM_ASIC_SS_ASSIGNMENT | |||
3790 | #define ASIC_INTERNAL_SS_ON_LVDS 6 | 4458 | #define ASIC_INTERNAL_SS_ON_LVDS 6 |
3791 | #define ASIC_INTERNAL_SS_ON_DP 7 | 4459 | #define ASIC_INTERNAL_SS_ON_DP 7 |
3792 | #define ASIC_INTERNAL_SS_ON_DCPLL 8 | 4460 | #define ASIC_INTERNAL_SS_ON_DCPLL 8 |
4461 | #define ASIC_EXTERNAL_SS_ON_DP_CLOCK 9 | ||
3793 | 4462 | ||
3794 | typedef struct _ATOM_ASIC_SS_ASSIGNMENT_V2 | 4463 | typedef struct _ATOM_ASIC_SS_ASSIGNMENT_V2 |
3795 | { | 4464 | { |
@@ -3903,8 +4572,9 @@ typedef struct _ATOM_ASIC_INTERNAL_SS_INFO_V3 | |||
3903 | #define ATOM_S0_SYSTEM_POWER_STATE_VALUE_AC 1 | 4572 | #define ATOM_S0_SYSTEM_POWER_STATE_VALUE_AC 1 |
3904 | #define ATOM_S0_SYSTEM_POWER_STATE_VALUE_DC 2 | 4573 | #define ATOM_S0_SYSTEM_POWER_STATE_VALUE_DC 2 |
3905 | #define ATOM_S0_SYSTEM_POWER_STATE_VALUE_LITEAC 3 | 4574 | #define ATOM_S0_SYSTEM_POWER_STATE_VALUE_LITEAC 3 |
4575 | #define ATOM_S0_SYSTEM_POWER_STATE_VALUE_LIT2AC 4 | ||
3906 | 4576 | ||
3907 | //Byte aligned defintion for BIOS usage | 4577 | //Byte aligned definition for BIOS usage |
3908 | #define ATOM_S0_CRT1_MONOb0 0x01 | 4578 | #define ATOM_S0_CRT1_MONOb0 0x01 |
3909 | #define ATOM_S0_CRT1_COLORb0 0x02 | 4579 | #define ATOM_S0_CRT1_COLORb0 0x02 |
3910 | #define ATOM_S0_CRT1_MASKb0 (ATOM_S0_CRT1_MONOb0+ATOM_S0_CRT1_COLORb0) | 4580 | #define ATOM_S0_CRT1_MASKb0 (ATOM_S0_CRT1_MONOb0+ATOM_S0_CRT1_COLORb0) |
@@ -3970,7 +4640,7 @@ typedef struct _ATOM_ASIC_INTERNAL_SS_INFO_V3 | |||
3970 | #define ATOM_S2_DISPLAY_ROTATION_ANGLE_MASK 0xC0000000L | 4640 | #define ATOM_S2_DISPLAY_ROTATION_ANGLE_MASK 0xC0000000L |
3971 | 4641 | ||
3972 | 4642 | ||
3973 | //Byte aligned defintion for BIOS usage | 4643 | //Byte aligned definition for BIOS usage |
3974 | #define ATOM_S2_TV1_STANDARD_MASKb0 0x0F | 4644 | #define ATOM_S2_TV1_STANDARD_MASKb0 0x0F |
3975 | #define ATOM_S2_CURRENT_BL_LEVEL_MASKb1 0xFF | 4645 | #define ATOM_S2_CURRENT_BL_LEVEL_MASKb1 0xFF |
3976 | #define ATOM_S2_DEVICE_DPMS_STATEb2 0x01 | 4646 | #define ATOM_S2_DEVICE_DPMS_STATEb2 0x01 |
@@ -4020,7 +4690,7 @@ typedef struct _ATOM_ASIC_INTERNAL_SS_INFO_V3 | |||
4020 | #define ATOM_S3_ALLOW_FAST_PWR_SWITCH 0x40000000L | 4690 | #define ATOM_S3_ALLOW_FAST_PWR_SWITCH 0x40000000L |
4021 | #define ATOM_S3_RQST_GPU_USE_MIN_PWR 0x80000000L | 4691 | #define ATOM_S3_RQST_GPU_USE_MIN_PWR 0x80000000L |
4022 | 4692 | ||
4023 | //Byte aligned defintion for BIOS usage | 4693 | //Byte aligned definition for BIOS usage |
4024 | #define ATOM_S3_CRT1_ACTIVEb0 0x01 | 4694 | #define ATOM_S3_CRT1_ACTIVEb0 0x01 |
4025 | #define ATOM_S3_LCD1_ACTIVEb0 0x02 | 4695 | #define ATOM_S3_LCD1_ACTIVEb0 0x02 |
4026 | #define ATOM_S3_TV1_ACTIVEb0 0x04 | 4696 | #define ATOM_S3_TV1_ACTIVEb0 0x04 |
@@ -4056,7 +4726,7 @@ typedef struct _ATOM_ASIC_INTERNAL_SS_INFO_V3 | |||
4056 | #define ATOM_S4_LCD1_REFRESH_MASK 0x0000FF00L | 4726 | #define ATOM_S4_LCD1_REFRESH_MASK 0x0000FF00L |
4057 | #define ATOM_S4_LCD1_REFRESH_SHIFT 8 | 4727 | #define ATOM_S4_LCD1_REFRESH_SHIFT 8 |
4058 | 4728 | ||
4059 | //Byte aligned defintion for BIOS usage | 4729 | //Byte aligned definition for BIOS usage |
4060 | #define ATOM_S4_LCD1_PANEL_ID_MASKb0 0x0FF | 4730 | #define ATOM_S4_LCD1_PANEL_ID_MASKb0 0x0FF |
4061 | #define ATOM_S4_LCD1_REFRESH_MASKb1 ATOM_S4_LCD1_PANEL_ID_MASKb0 | 4731 | #define ATOM_S4_LCD1_REFRESH_MASKb1 ATOM_S4_LCD1_PANEL_ID_MASKb0 |
4062 | #define ATOM_S4_VRAM_INFO_MASKb2 ATOM_S4_LCD1_PANEL_ID_MASKb0 | 4732 | #define ATOM_S4_VRAM_INFO_MASKb2 ATOM_S4_LCD1_PANEL_ID_MASKb0 |
@@ -4135,7 +4805,7 @@ typedef struct _ATOM_ASIC_INTERNAL_SS_INFO_V3 | |||
4135 | #define ATOM_S6_VRI_BRIGHTNESS_CHANGE 0x40000000L | 4805 | #define ATOM_S6_VRI_BRIGHTNESS_CHANGE 0x40000000L |
4136 | #define ATOM_S6_CONFIG_DISPLAY_CHANGE_MASK 0x80000000L | 4806 | #define ATOM_S6_CONFIG_DISPLAY_CHANGE_MASK 0x80000000L |
4137 | 4807 | ||
4138 | //Byte aligned defintion for BIOS usage | 4808 | //Byte aligned definition for BIOS usage |
4139 | #define ATOM_S6_DEVICE_CHANGEb0 0x01 | 4809 | #define ATOM_S6_DEVICE_CHANGEb0 0x01 |
4140 | #define ATOM_S6_SCALER_CHANGEb0 0x02 | 4810 | #define ATOM_S6_SCALER_CHANGEb0 0x02 |
4141 | #define ATOM_S6_LID_CHANGEb0 0x04 | 4811 | #define ATOM_S6_LID_CHANGEb0 0x04 |
@@ -4376,7 +5046,7 @@ typedef struct _ENABLE_GRAPH_SURFACE_PS_ALLOCATION | |||
4376 | 5046 | ||
4377 | typedef struct _MEMORY_CLEAN_UP_PARAMETERS | 5047 | typedef struct _MEMORY_CLEAN_UP_PARAMETERS |
4378 | { | 5048 | { |
4379 | USHORT usMemoryStart; //in 8Kb boundry, offset from memory base address | 5049 | USHORT usMemoryStart; //in 8Kb boundary, offset from memory base address |
4380 | USHORT usMemorySize; //8Kb blocks aligned | 5050 | USHORT usMemorySize; //8Kb blocks aligned |
4381 | }MEMORY_CLEAN_UP_PARAMETERS; | 5051 | }MEMORY_CLEAN_UP_PARAMETERS; |
4382 | #define MEMORY_CLEAN_UP_PS_ALLOCATION MEMORY_CLEAN_UP_PARAMETERS | 5052 | #define MEMORY_CLEAN_UP_PS_ALLOCATION MEMORY_CLEAN_UP_PARAMETERS |
@@ -4529,7 +5199,8 @@ typedef struct _ATOM_INIT_REG_BLOCK{ | |||
4529 | #define INDEX_ACCESS_RANGE_BEGIN (VALUE_DWORD + 1) | 5199 | #define INDEX_ACCESS_RANGE_BEGIN (VALUE_DWORD + 1) |
4530 | #define INDEX_ACCESS_RANGE_END (INDEX_ACCESS_RANGE_BEGIN + 1) | 5200 | #define INDEX_ACCESS_RANGE_END (INDEX_ACCESS_RANGE_BEGIN + 1) |
4531 | #define VALUE_INDEX_ACCESS_SINGLE (INDEX_ACCESS_RANGE_END + 1) | 5201 | #define VALUE_INDEX_ACCESS_SINGLE (INDEX_ACCESS_RANGE_END + 1) |
4532 | 5202 | //#define ACCESS_MCIODEBUGIND 0x40 //defined in BIOS code | |
5203 | #define ACCESS_PLACEHOLDER 0x80 | ||
4533 | 5204 | ||
4534 | typedef struct _ATOM_MC_INIT_PARAM_TABLE | 5205 | typedef struct _ATOM_MC_INIT_PARAM_TABLE |
4535 | { | 5206 | { |
@@ -4554,6 +5225,10 @@ typedef struct _ATOM_MC_INIT_PARAM_TABLE | |||
4554 | #define _32Mx32 0x33 | 5225 | #define _32Mx32 0x33 |
4555 | #define _64Mx8 0x41 | 5226 | #define _64Mx8 0x41 |
4556 | #define _64Mx16 0x42 | 5227 | #define _64Mx16 0x42 |
5228 | #define _64Mx32 0x43 | ||
5229 | #define _128Mx8 0x51 | ||
5230 | #define _128Mx16 0x52 | ||
5231 | #define _256Mx8 0x61 | ||
4557 | 5232 | ||
4558 | #define SAMSUNG 0x1 | 5233 | #define SAMSUNG 0x1 |
4559 | #define INFINEON 0x2 | 5234 | #define INFINEON 0x2 |
@@ -4569,10 +5244,11 @@ typedef struct _ATOM_MC_INIT_PARAM_TABLE | |||
4569 | #define QIMONDA INFINEON | 5244 | #define QIMONDA INFINEON |
4570 | #define PROMOS MOSEL | 5245 | #define PROMOS MOSEL |
4571 | #define KRETON INFINEON | 5246 | #define KRETON INFINEON |
5247 | #define ELIXIR NANYA | ||
4572 | 5248 | ||
4573 | /////////////Support for GDDR5 MC uCode to reside in upper 64K of ROM///////////// | 5249 | /////////////Support for GDDR5 MC uCode to reside in upper 64K of ROM///////////// |
4574 | 5250 | ||
4575 | #define UCODE_ROM_START_ADDRESS 0x1c000 | 5251 | #define UCODE_ROM_START_ADDRESS 0x1b800 |
4576 | #define UCODE_SIGNATURE 0x4375434d // 'MCuC' - MC uCode | 5252 | #define UCODE_SIGNATURE 0x4375434d // 'MCuC' - MC uCode |
4577 | 5253 | ||
4578 | //uCode block header for reference | 5254 | //uCode block header for reference |
@@ -4903,7 +5579,34 @@ typedef struct _ATOM_VRAM_MODULE_V6 | |||
4903 | ATOM_MEMORY_TIMING_FORMAT_V2 asMemTiming[5];//Memory Timing block sort from lower clock to higher clock | 5579 | ATOM_MEMORY_TIMING_FORMAT_V2 asMemTiming[5];//Memory Timing block sort from lower clock to higher clock |
4904 | }ATOM_VRAM_MODULE_V6; | 5580 | }ATOM_VRAM_MODULE_V6; |
4905 | 5581 | ||
4906 | 5582 | typedef struct _ATOM_VRAM_MODULE_V7 | |
5583 | { | ||
5584 | // Design Specific Values | ||
5585 | ULONG ulChannelMapCfg; // mmMC_SHARED_CHREMAP | ||
5586 | USHORT usModuleSize; // Size of ATOM_VRAM_MODULE_V7 | ||
5587 | USHORT usPrivateReserved; // MC_ARB_RAMCFG (includes NOOFBANK,NOOFRANKS,NOOFROWS,NOOFCOLS) | ||
5588 | USHORT usReserved; | ||
5589 | UCHAR ucExtMemoryID; // Current memory module ID | ||
5590 | UCHAR ucMemoryType; // MEM_TYPE_DDR2/DDR3/GDDR3/GDDR5 | ||
5591 | UCHAR ucChannelNum; // Number of mem. channels supported in this module | ||
5592 | UCHAR ucChannelWidth; // CHANNEL_16BIT/CHANNEL_32BIT/CHANNEL_64BIT | ||
5593 | UCHAR ucDensity; // _8Mx32, _16Mx32, _16Mx16, _32Mx16 | ||
5594 | UCHAR ucReserve; // Former container for Mx_FLAGS like DBI_AC_MODE_ENABLE_ASIC for GDDR4. Not used now. | ||
5595 | UCHAR ucMisc; // RANK_OF_THISMEMORY etc. | ||
5596 | UCHAR ucVREFI; // Not used. | ||
5597 | UCHAR ucNPL_RT; // Round trip delay (MC_SEQ_CAS_TIMING [28:24]:TCL=CL+NPL_RT-2). Always 2. | ||
5598 | UCHAR ucPreamble; // [7:4] Write Preamble, [3:0] Read Preamble | ||
5599 | UCHAR ucMemorySize; // Total memory size in unit of 16MB for CONFIG_MEMSIZE - bit[23:0] zeros | ||
5600 | UCHAR ucReserved[3]; | ||
5601 | // Memory Module specific values | ||
5602 | USHORT usEMRS2Value; // EMRS2/MR2 Value. | ||
5603 | USHORT usEMRS3Value; // EMRS3/MR3 Value. | ||
5604 | UCHAR ucMemoryVenderID; // [7:4] Revision, [3:0] Vendor code | ||
5605 | UCHAR ucRefreshRateFactor; // [1:0]=RefreshFactor (00=8ms, 01=16ms, 10=32ms,11=64ms) | ||
5606 | UCHAR ucFIFODepth; // FIFO depth can be detected during vendor detection, here is hardcoded per memory | ||
5607 | UCHAR ucCDR_Bandwidth; // [0:3]=Read CDR bandwidth, [4:7] - Write CDR Bandwidth | ||
5608 | char strMemPNString[20]; // part number end with '0'. | ||
5609 | }ATOM_VRAM_MODULE_V7; | ||
4907 | 5610 | ||
4908 | typedef struct _ATOM_VRAM_INFO_V2 | 5611 | typedef struct _ATOM_VRAM_INFO_V2 |
4909 | { | 5612 | { |
@@ -4942,6 +5645,20 @@ typedef struct _ATOM_VRAM_INFO_V4 | |||
4942 | // ATOM_INIT_REG_BLOCK aMemAdjust; | 5645 | // ATOM_INIT_REG_BLOCK aMemAdjust; |
4943 | }ATOM_VRAM_INFO_V4; | 5646 | }ATOM_VRAM_INFO_V4; |
4944 | 5647 | ||
5648 | typedef struct _ATOM_VRAM_INFO_HEADER_V2_1 | ||
5649 | { | ||
5650 | ATOM_COMMON_TABLE_HEADER sHeader; | ||
5651 | USHORT usMemAdjustTblOffset; // offset of ATOM_INIT_REG_BLOCK structure for memory vendor specific MC adjust setting | ||
5652 | USHORT usMemClkPatchTblOffset; // offset of ATOM_INIT_REG_BLOCK structure for memory clock specific MC setting | ||
5653 | USHORT usReserved[4]; | ||
5654 | UCHAR ucNumOfVRAMModule; // indicate number of VRAM module | ||
5655 | UCHAR ucMemoryClkPatchTblVer; // version of memory AC timing register list | ||
5656 | UCHAR ucVramModuleVer; // indicate ATOM_VRAM_MODUE version | ||
5657 | UCHAR ucReserved; | ||
5658 | ATOM_VRAM_MODULE_V7 aVramInfo[ATOM_MAX_NUMBER_OF_VRAM_MODULE]; // just for allocation, real number of blocks is in ucNumOfVRAMModule; | ||
5659 | }ATOM_VRAM_INFO_HEADER_V2_1; | ||
5660 | |||
5661 | |||
4945 | typedef struct _ATOM_VRAM_GPIO_DETECTION_INFO | 5662 | typedef struct _ATOM_VRAM_GPIO_DETECTION_INFO |
4946 | { | 5663 | { |
4947 | ATOM_COMMON_TABLE_HEADER sHeader; | 5664 | ATOM_COMMON_TABLE_HEADER sHeader; |
@@ -5182,6 +5899,16 @@ typedef struct _ASIC_TRANSMITTER_INFO | |||
5182 | UCHAR ucReserved; | 5899 | UCHAR ucReserved; |
5183 | }ASIC_TRANSMITTER_INFO; | 5900 | }ASIC_TRANSMITTER_INFO; |
5184 | 5901 | ||
5902 | #define ASIC_TRANSMITTER_INFO_CONFIG__DVO_SDR_MODE 0x01 | ||
5903 | #define ASIC_TRANSMITTER_INFO_CONFIG__COHERENT_MODE 0x02 | ||
5904 | #define ASIC_TRANSMITTER_INFO_CONFIG__ENCODEROBJ_ID_MASK 0xc4 | ||
5905 | #define ASIC_TRANSMITTER_INFO_CONFIG__ENCODER_A 0x00 | ||
5906 | #define ASIC_TRANSMITTER_INFO_CONFIG__ENCODER_B 0x04 | ||
5907 | #define ASIC_TRANSMITTER_INFO_CONFIG__ENCODER_C 0x40 | ||
5908 | #define ASIC_TRANSMITTER_INFO_CONFIG__ENCODER_D 0x44 | ||
5909 | #define ASIC_TRANSMITTER_INFO_CONFIG__ENCODER_E 0x80 | ||
5910 | #define ASIC_TRANSMITTER_INFO_CONFIG__ENCODER_F 0x84 | ||
5911 | |||
5185 | typedef struct _ASIC_ENCODER_INFO | 5912 | typedef struct _ASIC_ENCODER_INFO |
5186 | { | 5913 | { |
5187 | UCHAR ucEncoderID; | 5914 | UCHAR ucEncoderID; |
@@ -5284,6 +6011,28 @@ typedef struct _DP_ENCODER_SERVICE_PARAMETERS | |||
5284 | /* /obselete */ | 6011 | /* /obselete */ |
5285 | #define DP_ENCODER_SERVICE_PS_ALLOCATION WRITE_ONE_BYTE_HW_I2C_DATA_PARAMETERS | 6012 | #define DP_ENCODER_SERVICE_PS_ALLOCATION WRITE_ONE_BYTE_HW_I2C_DATA_PARAMETERS |
5286 | 6013 | ||
6014 | |||
6015 | typedef struct _DP_ENCODER_SERVICE_PARAMETERS_V2 | ||
6016 | { | ||
6017 | USHORT usExtEncoderObjId; // External Encoder Object Id, output parameter only, use when ucAction = DP_SERVICE_V2_ACTION_DET_EXT_CONNECTION | ||
6018 | UCHAR ucAuxId; | ||
6019 | UCHAR ucAction; | ||
6020 | UCHAR ucSinkType; // Iput and Output parameters. | ||
6021 | UCHAR ucHPDId; // Input parameter, used when ucAction = DP_SERVICE_V2_ACTION_DET_EXT_CONNECTION | ||
6022 | UCHAR ucReserved[2]; | ||
6023 | }DP_ENCODER_SERVICE_PARAMETERS_V2; | ||
6024 | |||
6025 | typedef struct _DP_ENCODER_SERVICE_PS_ALLOCATION_V2 | ||
6026 | { | ||
6027 | DP_ENCODER_SERVICE_PARAMETERS_V2 asDPServiceParam; | ||
6028 | PROCESS_AUX_CHANNEL_TRANSACTION_PARAMETERS_V2 asAuxParam; | ||
6029 | }DP_ENCODER_SERVICE_PS_ALLOCATION_V2; | ||
6030 | |||
6031 | // ucAction | ||
6032 | #define DP_SERVICE_V2_ACTION_GET_SINK_TYPE 0x01 | ||
6033 | #define DP_SERVICE_V2_ACTION_DET_LCD_CONNECTION 0x02 | ||
6034 | |||
6035 | |||
5287 | // DP_TRAINING_TABLE | 6036 | // DP_TRAINING_TABLE |
5288 | #define DPCD_SET_LINKRATE_LANENUM_PATTERN1_TBL_ADDR ATOM_DP_TRAINING_TBL_ADDR | 6037 | #define DPCD_SET_LINKRATE_LANENUM_PATTERN1_TBL_ADDR ATOM_DP_TRAINING_TBL_ADDR |
5289 | #define DPCD_SET_SS_CNTL_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 8 ) | 6038 | #define DPCD_SET_SS_CNTL_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 8 ) |
@@ -5339,6 +6088,7 @@ typedef struct _SET_HWBLOCK_INSTANCE_PARAMETER_V2 | |||
5339 | #define SELECT_DCIO_IMPCAL 4 | 6088 | #define SELECT_DCIO_IMPCAL 4 |
5340 | #define SELECT_DCIO_DIG 6 | 6089 | #define SELECT_DCIO_DIG 6 |
5341 | #define SELECT_CRTC_PIXEL_RATE 7 | 6090 | #define SELECT_CRTC_PIXEL_RATE 7 |
6091 | #define SELECT_VGA_BLK 8 | ||
5342 | 6092 | ||
5343 | /****************************************************************************/ | 6093 | /****************************************************************************/ |
5344 | //Portion VI: Definitinos for vbios MC scratch registers that driver used | 6094 | //Portion VI: Definitinos for vbios MC scratch registers that driver used |
@@ -5744,7 +6494,17 @@ typedef struct _ATOM_PPLIB_THERMALCONTROLLER | |||
5744 | #define ATOM_PP_THERMALCONTROLLER_ADT7473 9 | 6494 | #define ATOM_PP_THERMALCONTROLLER_ADT7473 9 |
5745 | #define ATOM_PP_THERMALCONTROLLER_EXTERNAL_GPIO 11 | 6495 | #define ATOM_PP_THERMALCONTROLLER_EXTERNAL_GPIO 11 |
5746 | #define ATOM_PP_THERMALCONTROLLER_EVERGREEN 12 | 6496 | #define ATOM_PP_THERMALCONTROLLER_EVERGREEN 12 |
6497 | #define ATOM_PP_THERMALCONTROLLER_EMC2103 13 /* 0x0D */ // Only fan control will be implemented, do NOT show this in PPGen. | ||
6498 | #define ATOM_PP_THERMALCONTROLLER_SUMO 14 /* 0x0E */ // Sumo type, used internally | ||
6499 | #define ATOM_PP_THERMALCONTROLLER_NISLANDS 15 | ||
6500 | |||
6501 | // Thermal controller 'combo type' to use an external controller for Fan control and an internal controller for thermal. | ||
6502 | // We probably should reserve the bit 0x80 for this use. | ||
6503 | // To keep the number of these types low we should also use the same code for all ASICs (i.e. do not distinguish RV6xx and RV7xx Internal here). | ||
6504 | // The driver can pick the correct internal controller based on the ASIC. | ||
6505 | |||
5747 | #define ATOM_PP_THERMALCONTROLLER_ADT7473_WITH_INTERNAL 0x89 // ADT7473 Fan Control + Internal Thermal Controller | 6506 | #define ATOM_PP_THERMALCONTROLLER_ADT7473_WITH_INTERNAL 0x89 // ADT7473 Fan Control + Internal Thermal Controller |
6507 | #define ATOM_PP_THERMALCONTROLLER_EMC2103_WITH_INTERNAL 0x8D // EMC2103 Fan Control + Internal Thermal Controller | ||
5748 | 6508 | ||
5749 | typedef struct _ATOM_PPLIB_STATE | 6509 | typedef struct _ATOM_PPLIB_STATE |
5750 | { | 6510 | { |
@@ -5841,6 +6601,29 @@ typedef struct _ATOM_PPLIB_POWERPLAYTABLE3 | |||
5841 | USHORT usExtendendedHeaderOffset; | 6601 | USHORT usExtendendedHeaderOffset; |
5842 | } ATOM_PPLIB_POWERPLAYTABLE3, *LPATOM_PPLIB_POWERPLAYTABLE3; | 6602 | } ATOM_PPLIB_POWERPLAYTABLE3, *LPATOM_PPLIB_POWERPLAYTABLE3; |
5843 | 6603 | ||
6604 | typedef struct _ATOM_PPLIB_POWERPLAYTABLE4 | ||
6605 | { | ||
6606 | ATOM_PPLIB_POWERPLAYTABLE3 basicTable3; | ||
6607 | ULONG ulGoldenPPID; // PPGen use only | ||
6608 | ULONG ulGoldenRevision; // PPGen use only | ||
6609 | USHORT usVddcDependencyOnSCLKOffset; | ||
6610 | USHORT usVddciDependencyOnMCLKOffset; | ||
6611 | USHORT usVddcDependencyOnMCLKOffset; | ||
6612 | USHORT usMaxClockVoltageOnDCOffset; | ||
6613 | USHORT usReserved[2]; | ||
6614 | } ATOM_PPLIB_POWERPLAYTABLE4, *LPATOM_PPLIB_POWERPLAYTABLE4; | ||
6615 | |||
6616 | typedef struct _ATOM_PPLIB_POWERPLAYTABLE5 | ||
6617 | { | ||
6618 | ATOM_PPLIB_POWERPLAYTABLE4 basicTable4; | ||
6619 | ULONG ulTDPLimit; | ||
6620 | ULONG ulNearTDPLimit; | ||
6621 | ULONG ulSQRampingThreshold; | ||
6622 | USHORT usCACLeakageTableOffset; // Points to ATOM_PPLIB_CAC_Leakage_Table | ||
6623 | ULONG ulCACLeakage; // TBD, this parameter is still under discussion. Change to ulReserved if not needed. | ||
6624 | ULONG ulReserved; | ||
6625 | } ATOM_PPLIB_POWERPLAYTABLE5, *LPATOM_PPLIB_POWERPLAYTABLE5; | ||
6626 | |||
5844 | //// ATOM_PPLIB_NONCLOCK_INFO::usClassification | 6627 | //// ATOM_PPLIB_NONCLOCK_INFO::usClassification |
5845 | #define ATOM_PPLIB_CLASSIFICATION_UI_MASK 0x0007 | 6628 | #define ATOM_PPLIB_CLASSIFICATION_UI_MASK 0x0007 |
5846 | #define ATOM_PPLIB_CLASSIFICATION_UI_SHIFT 0 | 6629 | #define ATOM_PPLIB_CLASSIFICATION_UI_SHIFT 0 |
@@ -5864,6 +6647,10 @@ typedef struct _ATOM_PPLIB_POWERPLAYTABLE3 | |||
5864 | #define ATOM_PPLIB_CLASSIFICATION_HDSTATE 0x4000 | 6647 | #define ATOM_PPLIB_CLASSIFICATION_HDSTATE 0x4000 |
5865 | #define ATOM_PPLIB_CLASSIFICATION_SDSTATE 0x8000 | 6648 | #define ATOM_PPLIB_CLASSIFICATION_SDSTATE 0x8000 |
5866 | 6649 | ||
6650 | //// ATOM_PPLIB_NONCLOCK_INFO::usClassification2 | ||
6651 | #define ATOM_PPLIB_CLASSIFICATION2_LIMITEDPOWERSOURCE_2 0x0001 | ||
6652 | #define ATOM_PPLIB_CLASSIFICATION2_ULV 0x0002 | ||
6653 | |||
5867 | //// ATOM_PPLIB_NONCLOCK_INFO::ulCapsAndSettings | 6654 | //// ATOM_PPLIB_NONCLOCK_INFO::ulCapsAndSettings |
5868 | #define ATOM_PPLIB_SINGLE_DISPLAY_ONLY 0x00000001 | 6655 | #define ATOM_PPLIB_SINGLE_DISPLAY_ONLY 0x00000001 |
5869 | #define ATOM_PPLIB_SUPPORTS_VIDEO_PLAYBACK 0x00000002 | 6656 | #define ATOM_PPLIB_SUPPORTS_VIDEO_PLAYBACK 0x00000002 |
@@ -5896,9 +6683,21 @@ typedef struct _ATOM_PPLIB_POWERPLAYTABLE3 | |||
5896 | #define ATOM_PPLIB_M3ARB_MASK 0x00060000 | 6683 | #define ATOM_PPLIB_M3ARB_MASK 0x00060000 |
5897 | #define ATOM_PPLIB_M3ARB_SHIFT 17 | 6684 | #define ATOM_PPLIB_M3ARB_SHIFT 17 |
5898 | 6685 | ||
6686 | #define ATOM_PPLIB_ENABLE_DRR 0x00080000 | ||
6687 | |||
6688 | // remaining 16 bits are reserved | ||
6689 | typedef struct _ATOM_PPLIB_THERMAL_STATE | ||
6690 | { | ||
6691 | UCHAR ucMinTemperature; | ||
6692 | UCHAR ucMaxTemperature; | ||
6693 | UCHAR ucThermalAction; | ||
6694 | }ATOM_PPLIB_THERMAL_STATE, *LPATOM_PPLIB_THERMAL_STATE; | ||
6695 | |||
5899 | // Contained in an array starting at the offset | 6696 | // Contained in an array starting at the offset |
5900 | // in ATOM_PPLIB_POWERPLAYTABLE::usNonClockInfoArrayOffset. | 6697 | // in ATOM_PPLIB_POWERPLAYTABLE::usNonClockInfoArrayOffset. |
5901 | // referenced from ATOM_PPLIB_STATE_INFO::ucNonClockStateIndex | 6698 | // referenced from ATOM_PPLIB_STATE_INFO::ucNonClockStateIndex |
6699 | #define ATOM_PPLIB_NONCLOCKINFO_VER1 12 | ||
6700 | #define ATOM_PPLIB_NONCLOCKINFO_VER2 24 | ||
5902 | typedef struct _ATOM_PPLIB_NONCLOCK_INFO | 6701 | typedef struct _ATOM_PPLIB_NONCLOCK_INFO |
5903 | { | 6702 | { |
5904 | USHORT usClassification; | 6703 | USHORT usClassification; |
@@ -5906,15 +6705,15 @@ typedef struct _ATOM_PPLIB_NONCLOCK_INFO | |||
5906 | UCHAR ucMaxTemperature; | 6705 | UCHAR ucMaxTemperature; |
5907 | ULONG ulCapsAndSettings; | 6706 | ULONG ulCapsAndSettings; |
5908 | UCHAR ucRequiredPower; | 6707 | UCHAR ucRequiredPower; |
5909 | UCHAR ucUnused1[3]; | 6708 | USHORT usClassification2; |
6709 | ULONG ulVCLK; | ||
6710 | ULONG ulDCLK; | ||
6711 | UCHAR ucUnused[5]; | ||
5910 | } ATOM_PPLIB_NONCLOCK_INFO; | 6712 | } ATOM_PPLIB_NONCLOCK_INFO; |
5911 | 6713 | ||
5912 | // Contained in an array starting at the offset | 6714 | // Contained in an array starting at the offset |
5913 | // in ATOM_PPLIB_POWERPLAYTABLE::usClockInfoArrayOffset. | 6715 | // in ATOM_PPLIB_POWERPLAYTABLE::usClockInfoArrayOffset. |
5914 | // referenced from ATOM_PPLIB_STATE::ucClockStateIndices | 6716 | // referenced from ATOM_PPLIB_STATE::ucClockStateIndices |
5915 | #define ATOM_PPLIB_NONCLOCKINFO_VER1 12 | ||
5916 | #define ATOM_PPLIB_NONCLOCKINFO_VER2 24 | ||
5917 | |||
5918 | typedef struct _ATOM_PPLIB_R600_CLOCK_INFO | 6717 | typedef struct _ATOM_PPLIB_R600_CLOCK_INFO |
5919 | { | 6718 | { |
5920 | USHORT usEngineClockLow; | 6719 | USHORT usEngineClockLow; |
@@ -5985,10 +6784,97 @@ typedef struct _ATOM_PPLIB_RS780_CLOCK_INFO | |||
5985 | #define ATOM_PPLIB_RS780_HTLINKFREQ_LOW 1 | 6784 | #define ATOM_PPLIB_RS780_HTLINKFREQ_LOW 1 |
5986 | #define ATOM_PPLIB_RS780_HTLINKFREQ_HIGH 2 | 6785 | #define ATOM_PPLIB_RS780_HTLINKFREQ_HIGH 2 |
5987 | 6786 | ||
6787 | typedef struct _ATOM_PPLIB_SUMO_CLOCK_INFO{ | ||
6788 | USHORT usEngineClockLow; //clockfrequency & 0xFFFF. The unit is in 10khz | ||
6789 | UCHAR ucEngineClockHigh; //clockfrequency >> 16. | ||
6790 | UCHAR vddcIndex; //2-bit vddc index; | ||
6791 | UCHAR leakage; //please use 8-bit absolute value, not the 6-bit % value | ||
6792 | //please initalize to 0 | ||
6793 | UCHAR rsv; | ||
6794 | //please initalize to 0 | ||
6795 | USHORT rsv1; | ||
6796 | //please initialize to 0s | ||
6797 | ULONG rsv2[2]; | ||
6798 | }ATOM_PPLIB_SUMO_CLOCK_INFO; | ||
6799 | |||
6800 | |||
6801 | |||
6802 | typedef struct _ATOM_PPLIB_STATE_V2 | ||
6803 | { | ||
6804 | //number of valid dpm levels in this state; Driver uses it to calculate the whole | ||
6805 | //size of the state: sizeof(ATOM_PPLIB_STATE_V2) + (ucNumDPMLevels - 1) * sizeof(UCHAR) | ||
6806 | UCHAR ucNumDPMLevels; | ||
6807 | |||
6808 | //a index to the array of nonClockInfos | ||
6809 | UCHAR nonClockInfoIndex; | ||
6810 | /** | ||
6811 | * Driver will read the first ucNumDPMLevels in this array | ||
6812 | */ | ||
6813 | UCHAR clockInfoIndex[1]; | ||
6814 | } ATOM_PPLIB_STATE_V2; | ||
6815 | |||
6816 | typedef struct StateArray{ | ||
6817 | //how many states we have | ||
6818 | UCHAR ucNumEntries; | ||
6819 | |||
6820 | ATOM_PPLIB_STATE_V2 states[1]; | ||
6821 | }StateArray; | ||
6822 | |||
6823 | |||
6824 | typedef struct ClockInfoArray{ | ||
6825 | //how many clock levels we have | ||
6826 | UCHAR ucNumEntries; | ||
6827 | |||
6828 | //sizeof(ATOM_PPLIB_SUMO_CLOCK_INFO) | ||
6829 | UCHAR ucEntrySize; | ||
6830 | |||
6831 | //this is for Sumo | ||
6832 | ATOM_PPLIB_SUMO_CLOCK_INFO clockInfo[1]; | ||
6833 | }ClockInfoArray; | ||
6834 | |||
6835 | typedef struct NonClockInfoArray{ | ||
6836 | |||
6837 | //how many non-clock levels we have. normally should be same as number of states | ||
6838 | UCHAR ucNumEntries; | ||
6839 | //sizeof(ATOM_PPLIB_NONCLOCK_INFO) | ||
6840 | UCHAR ucEntrySize; | ||
6841 | |||
6842 | ATOM_PPLIB_NONCLOCK_INFO nonClockInfo[1]; | ||
6843 | }NonClockInfoArray; | ||
6844 | |||
6845 | typedef struct _ATOM_PPLIB_Clock_Voltage_Dependency_Record | ||
6846 | { | ||
6847 | USHORT usClockLow; | ||
6848 | UCHAR ucClockHigh; | ||
6849 | USHORT usVoltage; | ||
6850 | }ATOM_PPLIB_Clock_Voltage_Dependency_Record; | ||
6851 | |||
6852 | typedef struct _ATOM_PPLIB_Clock_Voltage_Dependency_Table | ||
6853 | { | ||
6854 | UCHAR ucNumEntries; // Number of entries. | ||
6855 | ATOM_PPLIB_Clock_Voltage_Dependency_Record entries[1]; // Dynamically allocate entries. | ||
6856 | }ATOM_PPLIB_Clock_Voltage_Dependency_Table; | ||
6857 | |||
6858 | typedef struct _ATOM_PPLIB_Clock_Voltage_Limit_Record | ||
6859 | { | ||
6860 | USHORT usSclkLow; | ||
6861 | UCHAR ucSclkHigh; | ||
6862 | USHORT usMclkLow; | ||
6863 | UCHAR ucMclkHigh; | ||
6864 | USHORT usVddc; | ||
6865 | USHORT usVddci; | ||
6866 | }ATOM_PPLIB_Clock_Voltage_Limit_Record; | ||
6867 | |||
6868 | typedef struct _ATOM_PPLIB_Clock_Voltage_Limit_Table | ||
6869 | { | ||
6870 | UCHAR ucNumEntries; // Number of entries. | ||
6871 | ATOM_PPLIB_Clock_Voltage_Limit_Record entries[1]; // Dynamically allocate entries. | ||
6872 | }ATOM_PPLIB_Clock_Voltage_Limit_Table; | ||
6873 | |||
5988 | /**************************************************************************/ | 6874 | /**************************************************************************/ |
5989 | 6875 | ||
5990 | 6876 | ||
5991 | // Following definitions are for compatiblity issue in different SW components. | 6877 | // Following definitions are for compatibility issue in different SW components. |
5992 | #define ATOM_MASTER_DATA_TABLE_REVISION 0x01 | 6878 | #define ATOM_MASTER_DATA_TABLE_REVISION 0x01 |
5993 | #define Object_Info Object_Header | 6879 | #define Object_Info Object_Header |
5994 | #define AdjustARB_SEQ MC_InitParameter | 6880 | #define AdjustARB_SEQ MC_InitParameter |