diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2010-11-22 17:56:21 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-11-22 18:23:17 -0500 |
commit | 603a9da37b83c2b4cc4495ecab7916f45cf5837e (patch) | |
tree | 65f409ed9d86c8597bbf334523085e29f8ff26e8 /drivers/gpu/drm/radeon/atombios.h | |
parent | 1422ef52efa2b9abcf8e9d4d641f3a12579f1027 (diff) |
drm/radeon/kms: upstream power table updates
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/atombios.h')
-rw-r--r-- | drivers/gpu/drm/radeon/atombios.h | 144 |
1 files changed, 140 insertions, 4 deletions
diff --git a/drivers/gpu/drm/radeon/atombios.h b/drivers/gpu/drm/radeon/atombios.h index 6a9baa2443f8..58a0cd02c0a2 100644 --- a/drivers/gpu/drm/radeon/atombios.h +++ b/drivers/gpu/drm/radeon/atombios.h | |||
@@ -6475,7 +6475,17 @@ typedef struct _ATOM_PPLIB_THERMALCONTROLLER | |||
6475 | #define ATOM_PP_THERMALCONTROLLER_ADT7473 9 | 6475 | #define ATOM_PP_THERMALCONTROLLER_ADT7473 9 |
6476 | #define ATOM_PP_THERMALCONTROLLER_EXTERNAL_GPIO 11 | 6476 | #define ATOM_PP_THERMALCONTROLLER_EXTERNAL_GPIO 11 |
6477 | #define ATOM_PP_THERMALCONTROLLER_EVERGREEN 12 | 6477 | #define ATOM_PP_THERMALCONTROLLER_EVERGREEN 12 |
6478 | #define ATOM_PP_THERMALCONTROLLER_EMC2103 13 /* 0x0D */ // Only fan control will be implemented, do NOT show this in PPGen. | ||
6479 | #define ATOM_PP_THERMALCONTROLLER_SUMO 14 /* 0x0E */ // Sumo type, used internally | ||
6480 | #define ATOM_PP_THERMALCONTROLLER_NISLANDS 15 | ||
6481 | |||
6482 | // Thermal controller 'combo type' to use an external controller for Fan control and an internal controller for thermal. | ||
6483 | // We probably should reserve the bit 0x80 for this use. | ||
6484 | // 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). | ||
6485 | // The driver can pick the correct internal controller based on the ASIC. | ||
6486 | |||
6478 | #define ATOM_PP_THERMALCONTROLLER_ADT7473_WITH_INTERNAL 0x89 // ADT7473 Fan Control + Internal Thermal Controller | 6487 | #define ATOM_PP_THERMALCONTROLLER_ADT7473_WITH_INTERNAL 0x89 // ADT7473 Fan Control + Internal Thermal Controller |
6488 | #define ATOM_PP_THERMALCONTROLLER_EMC2103_WITH_INTERNAL 0x8D // EMC2103 Fan Control + Internal Thermal Controller | ||
6479 | 6489 | ||
6480 | typedef struct _ATOM_PPLIB_STATE | 6490 | typedef struct _ATOM_PPLIB_STATE |
6481 | { | 6491 | { |
@@ -6572,6 +6582,29 @@ typedef struct _ATOM_PPLIB_POWERPLAYTABLE3 | |||
6572 | USHORT usExtendendedHeaderOffset; | 6582 | USHORT usExtendendedHeaderOffset; |
6573 | } ATOM_PPLIB_POWERPLAYTABLE3, *LPATOM_PPLIB_POWERPLAYTABLE3; | 6583 | } ATOM_PPLIB_POWERPLAYTABLE3, *LPATOM_PPLIB_POWERPLAYTABLE3; |
6574 | 6584 | ||
6585 | typedef struct _ATOM_PPLIB_POWERPLAYTABLE4 | ||
6586 | { | ||
6587 | ATOM_PPLIB_POWERPLAYTABLE3 basicTable3; | ||
6588 | ULONG ulGoldenPPID; // PPGen use only | ||
6589 | ULONG ulGoldenRevision; // PPGen use only | ||
6590 | USHORT usVddcDependencyOnSCLKOffset; | ||
6591 | USHORT usVddciDependencyOnMCLKOffset; | ||
6592 | USHORT usVddcDependencyOnMCLKOffset; | ||
6593 | USHORT usMaxClockVoltageOnDCOffset; | ||
6594 | USHORT usReserved[2]; | ||
6595 | } ATOM_PPLIB_POWERPLAYTABLE4, *LPATOM_PPLIB_POWERPLAYTABLE4; | ||
6596 | |||
6597 | typedef struct _ATOM_PPLIB_POWERPLAYTABLE5 | ||
6598 | { | ||
6599 | ATOM_PPLIB_POWERPLAYTABLE4 basicTable4; | ||
6600 | ULONG ulTDPLimit; | ||
6601 | ULONG ulNearTDPLimit; | ||
6602 | ULONG ulSQRampingThreshold; | ||
6603 | USHORT usCACLeakageTableOffset; // Points to ATOM_PPLIB_CAC_Leakage_Table | ||
6604 | ULONG ulCACLeakage; // TBD, this parameter is still under discussion. Change to ulReserved if not needed. | ||
6605 | ULONG ulReserved; | ||
6606 | } ATOM_PPLIB_POWERPLAYTABLE5, *LPATOM_PPLIB_POWERPLAYTABLE5; | ||
6607 | |||
6575 | //// ATOM_PPLIB_NONCLOCK_INFO::usClassification | 6608 | //// ATOM_PPLIB_NONCLOCK_INFO::usClassification |
6576 | #define ATOM_PPLIB_CLASSIFICATION_UI_MASK 0x0007 | 6609 | #define ATOM_PPLIB_CLASSIFICATION_UI_MASK 0x0007 |
6577 | #define ATOM_PPLIB_CLASSIFICATION_UI_SHIFT 0 | 6610 | #define ATOM_PPLIB_CLASSIFICATION_UI_SHIFT 0 |
@@ -6595,6 +6628,10 @@ typedef struct _ATOM_PPLIB_POWERPLAYTABLE3 | |||
6595 | #define ATOM_PPLIB_CLASSIFICATION_HDSTATE 0x4000 | 6628 | #define ATOM_PPLIB_CLASSIFICATION_HDSTATE 0x4000 |
6596 | #define ATOM_PPLIB_CLASSIFICATION_SDSTATE 0x8000 | 6629 | #define ATOM_PPLIB_CLASSIFICATION_SDSTATE 0x8000 |
6597 | 6630 | ||
6631 | //// ATOM_PPLIB_NONCLOCK_INFO::usClassification2 | ||
6632 | #define ATOM_PPLIB_CLASSIFICATION2_LIMITEDPOWERSOURCE_2 0x0001 | ||
6633 | #define ATOM_PPLIB_CLASSIFICATION2_ULV 0x0002 | ||
6634 | |||
6598 | //// ATOM_PPLIB_NONCLOCK_INFO::ulCapsAndSettings | 6635 | //// ATOM_PPLIB_NONCLOCK_INFO::ulCapsAndSettings |
6599 | #define ATOM_PPLIB_SINGLE_DISPLAY_ONLY 0x00000001 | 6636 | #define ATOM_PPLIB_SINGLE_DISPLAY_ONLY 0x00000001 |
6600 | #define ATOM_PPLIB_SUPPORTS_VIDEO_PLAYBACK 0x00000002 | 6637 | #define ATOM_PPLIB_SUPPORTS_VIDEO_PLAYBACK 0x00000002 |
@@ -6627,9 +6664,21 @@ typedef struct _ATOM_PPLIB_POWERPLAYTABLE3 | |||
6627 | #define ATOM_PPLIB_M3ARB_MASK 0x00060000 | 6664 | #define ATOM_PPLIB_M3ARB_MASK 0x00060000 |
6628 | #define ATOM_PPLIB_M3ARB_SHIFT 17 | 6665 | #define ATOM_PPLIB_M3ARB_SHIFT 17 |
6629 | 6666 | ||
6667 | #define ATOM_PPLIB_ENABLE_DRR 0x00080000 | ||
6668 | |||
6669 | // remaining 16 bits are reserved | ||
6670 | typedef struct _ATOM_PPLIB_THERMAL_STATE | ||
6671 | { | ||
6672 | UCHAR ucMinTemperature; | ||
6673 | UCHAR ucMaxTemperature; | ||
6674 | UCHAR ucThermalAction; | ||
6675 | }ATOM_PPLIB_THERMAL_STATE, *LPATOM_PPLIB_THERMAL_STATE; | ||
6676 | |||
6630 | // Contained in an array starting at the offset | 6677 | // Contained in an array starting at the offset |
6631 | // in ATOM_PPLIB_POWERPLAYTABLE::usNonClockInfoArrayOffset. | 6678 | // in ATOM_PPLIB_POWERPLAYTABLE::usNonClockInfoArrayOffset. |
6632 | // referenced from ATOM_PPLIB_STATE_INFO::ucNonClockStateIndex | 6679 | // referenced from ATOM_PPLIB_STATE_INFO::ucNonClockStateIndex |
6680 | #define ATOM_PPLIB_NONCLOCKINFO_VER1 12 | ||
6681 | #define ATOM_PPLIB_NONCLOCKINFO_VER2 24 | ||
6633 | typedef struct _ATOM_PPLIB_NONCLOCK_INFO | 6682 | typedef struct _ATOM_PPLIB_NONCLOCK_INFO |
6634 | { | 6683 | { |
6635 | USHORT usClassification; | 6684 | USHORT usClassification; |
@@ -6637,15 +6686,15 @@ typedef struct _ATOM_PPLIB_NONCLOCK_INFO | |||
6637 | UCHAR ucMaxTemperature; | 6686 | UCHAR ucMaxTemperature; |
6638 | ULONG ulCapsAndSettings; | 6687 | ULONG ulCapsAndSettings; |
6639 | UCHAR ucRequiredPower; | 6688 | UCHAR ucRequiredPower; |
6640 | UCHAR ucUnused1[3]; | 6689 | USHORT usClassification2; |
6690 | ULONG ulVCLK; | ||
6691 | ULONG ulDCLK; | ||
6692 | UCHAR ucUnused[5]; | ||
6641 | } ATOM_PPLIB_NONCLOCK_INFO; | 6693 | } ATOM_PPLIB_NONCLOCK_INFO; |
6642 | 6694 | ||
6643 | // Contained in an array starting at the offset | 6695 | // Contained in an array starting at the offset |
6644 | // in ATOM_PPLIB_POWERPLAYTABLE::usClockInfoArrayOffset. | 6696 | // in ATOM_PPLIB_POWERPLAYTABLE::usClockInfoArrayOffset. |
6645 | // referenced from ATOM_PPLIB_STATE::ucClockStateIndices | 6697 | // referenced from ATOM_PPLIB_STATE::ucClockStateIndices |
6646 | #define ATOM_PPLIB_NONCLOCKINFO_VER1 12 | ||
6647 | #define ATOM_PPLIB_NONCLOCKINFO_VER2 24 | ||
6648 | |||
6649 | typedef struct _ATOM_PPLIB_R600_CLOCK_INFO | 6698 | typedef struct _ATOM_PPLIB_R600_CLOCK_INFO |
6650 | { | 6699 | { |
6651 | USHORT usEngineClockLow; | 6700 | USHORT usEngineClockLow; |
@@ -6716,6 +6765,93 @@ typedef struct _ATOM_PPLIB_RS780_CLOCK_INFO | |||
6716 | #define ATOM_PPLIB_RS780_HTLINKFREQ_LOW 1 | 6765 | #define ATOM_PPLIB_RS780_HTLINKFREQ_LOW 1 |
6717 | #define ATOM_PPLIB_RS780_HTLINKFREQ_HIGH 2 | 6766 | #define ATOM_PPLIB_RS780_HTLINKFREQ_HIGH 2 |
6718 | 6767 | ||
6768 | typedef struct _ATOM_PPLIB_SUMO_CLOCK_INFO{ | ||
6769 | USHORT usEngineClockLow; //clockfrequency & 0xFFFF. The unit is in 10khz | ||
6770 | UCHAR ucEngineClockHigh; //clockfrequency >> 16. | ||
6771 | UCHAR vddcIndex; //2-bit vddc index; | ||
6772 | UCHAR leakage; //please use 8-bit absolute value, not the 6-bit % value | ||
6773 | //please initalize to 0 | ||
6774 | UCHAR rsv; | ||
6775 | //please initalize to 0 | ||
6776 | USHORT rsv1; | ||
6777 | //please initialize to 0s | ||
6778 | ULONG rsv2[2]; | ||
6779 | }ATOM_PPLIB_SUMO_CLOCK_INFO; | ||
6780 | |||
6781 | |||
6782 | |||
6783 | typedef struct _ATOM_PPLIB_STATE_V2 | ||
6784 | { | ||
6785 | //number of valid dpm levels in this state; Driver uses it to calculate the whole | ||
6786 | //size of the state: sizeof(ATOM_PPLIB_STATE_V2) + (ucNumDPMLevels - 1) * sizeof(UCHAR) | ||
6787 | UCHAR ucNumDPMLevels; | ||
6788 | |||
6789 | //a index to the array of nonClockInfos | ||
6790 | UCHAR nonClockInfoIndex; | ||
6791 | /** | ||
6792 | * Driver will read the first ucNumDPMLevels in this array | ||
6793 | */ | ||
6794 | UCHAR clockInfoIndex[1]; | ||
6795 | } ATOM_PPLIB_STATE_V2; | ||
6796 | |||
6797 | typedef struct StateArray{ | ||
6798 | //how many states we have | ||
6799 | UCHAR ucNumEntries; | ||
6800 | |||
6801 | ATOM_PPLIB_STATE_V2 states[1]; | ||
6802 | }StateArray; | ||
6803 | |||
6804 | |||
6805 | typedef struct ClockInfoArray{ | ||
6806 | //how many clock levels we have | ||
6807 | UCHAR ucNumEntries; | ||
6808 | |||
6809 | //sizeof(ATOM_PPLIB_SUMO_CLOCK_INFO) | ||
6810 | UCHAR ucEntrySize; | ||
6811 | |||
6812 | //this is for Sumo | ||
6813 | ATOM_PPLIB_SUMO_CLOCK_INFO clockInfo[1]; | ||
6814 | }ClockInfoArray; | ||
6815 | |||
6816 | typedef struct NonClockInfoArray{ | ||
6817 | |||
6818 | //how many non-clock levels we have. normally should be same as number of states | ||
6819 | UCHAR ucNumEntries; | ||
6820 | //sizeof(ATOM_PPLIB_NONCLOCK_INFO) | ||
6821 | UCHAR ucEntrySize; | ||
6822 | |||
6823 | ATOM_PPLIB_NONCLOCK_INFO nonClockInfo[1]; | ||
6824 | }NonClockInfoArray; | ||
6825 | |||
6826 | typedef struct _ATOM_PPLIB_Clock_Voltage_Dependency_Record | ||
6827 | { | ||
6828 | USHORT usClockLow; | ||
6829 | UCHAR ucClockHigh; | ||
6830 | USHORT usVoltage; | ||
6831 | }ATOM_PPLIB_Clock_Voltage_Dependency_Record; | ||
6832 | |||
6833 | typedef struct _ATOM_PPLIB_Clock_Voltage_Dependency_Table | ||
6834 | { | ||
6835 | UCHAR ucNumEntries; // Number of entries. | ||
6836 | ATOM_PPLIB_Clock_Voltage_Dependency_Record entries[1]; // Dynamically allocate entries. | ||
6837 | }ATOM_PPLIB_Clock_Voltage_Dependency_Table; | ||
6838 | |||
6839 | typedef struct _ATOM_PPLIB_Clock_Voltage_Limit_Record | ||
6840 | { | ||
6841 | USHORT usSclkLow; | ||
6842 | UCHAR ucSclkHigh; | ||
6843 | USHORT usMclkLow; | ||
6844 | UCHAR ucMclkHigh; | ||
6845 | USHORT usVddc; | ||
6846 | USHORT usVddci; | ||
6847 | }ATOM_PPLIB_Clock_Voltage_Limit_Record; | ||
6848 | |||
6849 | typedef struct _ATOM_PPLIB_Clock_Voltage_Limit_Table | ||
6850 | { | ||
6851 | UCHAR ucNumEntries; // Number of entries. | ||
6852 | ATOM_PPLIB_Clock_Voltage_Limit_Record entries[1]; // Dynamically allocate entries. | ||
6853 | }ATOM_PPLIB_Clock_Voltage_Limit_Table; | ||
6854 | |||
6719 | /**************************************************************************/ | 6855 | /**************************************************************************/ |
6720 | 6856 | ||
6721 | 6857 | ||