diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2009-12-19 12:45:12 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-12-22 20:14:05 -0500 |
commit | 0786201d8cd0730e72b0e087484dd47cc5f58409 (patch) | |
tree | fa117b7d24b2f3624f4fb7a7aa689ec17c0dabee /drivers/gpu/drm/radeon/atombios.h | |
parent | f56cd64f5f713a3013c4d980a5695c198d839671 (diff) |
drm/radeon/kms: add definitions for v4 power tables
[airlied: just adding this for completeness to avoid drift between
public atombios.h files]
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 | 199 |
1 files changed, 199 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/atombios.h b/drivers/gpu/drm/radeon/atombios.h index e83927644de4..8e28842080df 100644 --- a/drivers/gpu/drm/radeon/atombios.h +++ b/drivers/gpu/drm/radeon/atombios.h | |||
@@ -4690,6 +4690,205 @@ typedef struct _ATOM_POWERPLAY_INFO_V3 { | |||
4690 | ATOM_POWERMODE_INFO_V3 asPowerPlayInfo[ATOM_MAX_NUMBEROF_POWER_BLOCK]; | 4690 | ATOM_POWERMODE_INFO_V3 asPowerPlayInfo[ATOM_MAX_NUMBEROF_POWER_BLOCK]; |
4691 | } ATOM_POWERPLAY_INFO_V3; | 4691 | } ATOM_POWERPLAY_INFO_V3; |
4692 | 4692 | ||
4693 | /* New PPlib */ | ||
4694 | /**************************************************************************/ | ||
4695 | typedef struct _ATOM_PPLIB_THERMALCONTROLLER | ||
4696 | |||
4697 | { | ||
4698 | UCHAR ucType; // one of ATOM_PP_THERMALCONTROLLER_* | ||
4699 | UCHAR ucI2cLine; // as interpreted by DAL I2C | ||
4700 | UCHAR ucI2cAddress; | ||
4701 | UCHAR ucFanParameters; // Fan Control Parameters. | ||
4702 | UCHAR ucFanMinRPM; // Fan Minimum RPM (hundreds) -- for display purposes only. | ||
4703 | UCHAR ucFanMaxRPM; // Fan Maximum RPM (hundreds) -- for display purposes only. | ||
4704 | UCHAR ucReserved; // ---- | ||
4705 | UCHAR ucFlags; // to be defined | ||
4706 | } ATOM_PPLIB_THERMALCONTROLLER; | ||
4707 | |||
4708 | #define ATOM_PP_FANPARAMETERS_TACHOMETER_PULSES_PER_REVOLUTION_MASK 0x0f | ||
4709 | #define ATOM_PP_FANPARAMETERS_NOFAN 0x80 // No fan is connected to this controller. | ||
4710 | |||
4711 | #define ATOM_PP_THERMALCONTROLLER_NONE 0 | ||
4712 | #define ATOM_PP_THERMALCONTROLLER_LM63 1 // Not used by PPLib | ||
4713 | #define ATOM_PP_THERMALCONTROLLER_ADM1032 2 // Not used by PPLib | ||
4714 | #define ATOM_PP_THERMALCONTROLLER_ADM1030 3 // Not used by PPLib | ||
4715 | #define ATOM_PP_THERMALCONTROLLER_MUA6649 4 // Not used by PPLib | ||
4716 | #define ATOM_PP_THERMALCONTROLLER_LM64 5 | ||
4717 | #define ATOM_PP_THERMALCONTROLLER_F75375 6 // Not used by PPLib | ||
4718 | #define ATOM_PP_THERMALCONTROLLER_RV6xx 7 | ||
4719 | #define ATOM_PP_THERMALCONTROLLER_RV770 8 | ||
4720 | #define ATOM_PP_THERMALCONTROLLER_ADT7473 9 | ||
4721 | |||
4722 | typedef struct _ATOM_PPLIB_STATE | ||
4723 | { | ||
4724 | UCHAR ucNonClockStateIndex; | ||
4725 | UCHAR ucClockStateIndices[1]; // variable-sized | ||
4726 | } ATOM_PPLIB_STATE; | ||
4727 | |||
4728 | //// ATOM_PPLIB_POWERPLAYTABLE::ulPlatformCaps | ||
4729 | #define ATOM_PP_PLATFORM_CAP_BACKBIAS 1 | ||
4730 | #define ATOM_PP_PLATFORM_CAP_POWERPLAY 2 | ||
4731 | #define ATOM_PP_PLATFORM_CAP_SBIOSPOWERSOURCE 4 | ||
4732 | #define ATOM_PP_PLATFORM_CAP_ASPM_L0s 8 | ||
4733 | #define ATOM_PP_PLATFORM_CAP_ASPM_L1 16 | ||
4734 | #define ATOM_PP_PLATFORM_CAP_HARDWAREDC 32 | ||
4735 | #define ATOM_PP_PLATFORM_CAP_GEMINIPRIMARY 64 | ||
4736 | #define ATOM_PP_PLATFORM_CAP_STEPVDDC 128 | ||
4737 | #define ATOM_PP_PLATFORM_CAP_VOLTAGECONTROL 256 | ||
4738 | #define ATOM_PP_PLATFORM_CAP_SIDEPORTCONTROL 512 | ||
4739 | #define ATOM_PP_PLATFORM_CAP_TURNOFFPLL_ASPML1 1024 | ||
4740 | #define ATOM_PP_PLATFORM_CAP_HTLINKCONTROL 2048 | ||
4741 | |||
4742 | typedef struct _ATOM_PPLIB_POWERPLAYTABLE | ||
4743 | { | ||
4744 | ATOM_COMMON_TABLE_HEADER sHeader; | ||
4745 | |||
4746 | UCHAR ucDataRevision; | ||
4747 | |||
4748 | UCHAR ucNumStates; | ||
4749 | UCHAR ucStateEntrySize; | ||
4750 | UCHAR ucClockInfoSize; | ||
4751 | UCHAR ucNonClockSize; | ||
4752 | |||
4753 | // offset from start of this table to array of ucNumStates ATOM_PPLIB_STATE structures | ||
4754 | USHORT usStateArrayOffset; | ||
4755 | |||
4756 | // offset from start of this table to array of ASIC-specific structures, | ||
4757 | // currently ATOM_PPLIB_CLOCK_INFO. | ||
4758 | USHORT usClockInfoArrayOffset; | ||
4759 | |||
4760 | // offset from start of this table to array of ATOM_PPLIB_NONCLOCK_INFO | ||
4761 | USHORT usNonClockInfoArrayOffset; | ||
4762 | |||
4763 | USHORT usBackbiasTime; // in microseconds | ||
4764 | USHORT usVoltageTime; // in microseconds | ||
4765 | USHORT usTableSize; //the size of this structure, or the extended structure | ||
4766 | |||
4767 | ULONG ulPlatformCaps; // See ATOM_PPLIB_CAPS_* | ||
4768 | |||
4769 | ATOM_PPLIB_THERMALCONTROLLER sThermalController; | ||
4770 | |||
4771 | USHORT usBootClockInfoOffset; | ||
4772 | USHORT usBootNonClockInfoOffset; | ||
4773 | |||
4774 | } ATOM_PPLIB_POWERPLAYTABLE; | ||
4775 | |||
4776 | //// ATOM_PPLIB_NONCLOCK_INFO::usClassification | ||
4777 | #define ATOM_PPLIB_CLASSIFICATION_UI_MASK 0x0007 | ||
4778 | #define ATOM_PPLIB_CLASSIFICATION_UI_SHIFT 0 | ||
4779 | #define ATOM_PPLIB_CLASSIFICATION_UI_NONE 0 | ||
4780 | #define ATOM_PPLIB_CLASSIFICATION_UI_BATTERY 1 | ||
4781 | #define ATOM_PPLIB_CLASSIFICATION_UI_BALANCED 3 | ||
4782 | #define ATOM_PPLIB_CLASSIFICATION_UI_PERFORMANCE 5 | ||
4783 | // 2, 4, 6, 7 are reserved | ||
4784 | |||
4785 | #define ATOM_PPLIB_CLASSIFICATION_BOOT 0x0008 | ||
4786 | #define ATOM_PPLIB_CLASSIFICATION_THERMAL 0x0010 | ||
4787 | #define ATOM_PPLIB_CLASSIFICATION_LIMITEDPOWERSOURCE 0x0020 | ||
4788 | #define ATOM_PPLIB_CLASSIFICATION_REST 0x0040 | ||
4789 | #define ATOM_PPLIB_CLASSIFICATION_FORCED 0x0080 | ||
4790 | #define ATOM_PPLIB_CLASSIFICATION_3DPERFORMANCE 0x0100 | ||
4791 | #define ATOM_PPLIB_CLASSIFICATION_OVERDRIVETEMPLATE 0x0200 | ||
4792 | #define ATOM_PPLIB_CLASSIFICATION_UVDSTATE 0x0400 | ||
4793 | #define ATOM_PPLIB_CLASSIFICATION_3DLOW 0x0800 | ||
4794 | #define ATOM_PPLIB_CLASSIFICATION_ACPI 0x1000 | ||
4795 | // remaining 3 bits are reserved | ||
4796 | |||
4797 | //// ATOM_PPLIB_NONCLOCK_INFO::ulCapsAndSettings | ||
4798 | #define ATOM_PPLIB_SINGLE_DISPLAY_ONLY 0x00000001 | ||
4799 | #define ATOM_PPLIB_SUPPORTS_VIDEO_PLAYBACK 0x00000002 | ||
4800 | |||
4801 | // 0 is 2.5Gb/s, 1 is 5Gb/s | ||
4802 | #define ATOM_PPLIB_PCIE_LINK_SPEED_MASK 0x00000004 | ||
4803 | #define ATOM_PPLIB_PCIE_LINK_SPEED_SHIFT 2 | ||
4804 | |||
4805 | // lanes - 1: 1, 2, 4, 8, 12, 16 permitted by PCIE spec | ||
4806 | #define ATOM_PPLIB_PCIE_LINK_WIDTH_MASK 0x000000F8 | ||
4807 | #define ATOM_PPLIB_PCIE_LINK_WIDTH_SHIFT 3 | ||
4808 | |||
4809 | // lookup into reduced refresh-rate table | ||
4810 | #define ATOM_PPLIB_LIMITED_REFRESHRATE_VALUE_MASK 0x00000F00 | ||
4811 | #define ATOM_PPLIB_LIMITED_REFRESHRATE_VALUE_SHIFT 8 | ||
4812 | |||
4813 | #define ATOM_PPLIB_LIMITED_REFRESHRATE_UNLIMITED 0 | ||
4814 | #define ATOM_PPLIB_LIMITED_REFRESHRATE_50HZ 1 | ||
4815 | // 2-15 TBD as needed. | ||
4816 | |||
4817 | #define ATOM_PPLIB_SOFTWARE_DISABLE_LOADBALANCING 0x00001000 | ||
4818 | #define ATOM_PPLIB_SOFTWARE_ENABLE_SLEEP_FOR_TIMESTAMPS 0x00002000 | ||
4819 | #define ATOM_PPLIB_ENABLE_VARIBRIGHT 0x00008000 | ||
4820 | |||
4821 | #define ATOM_PPLIB_DISALLOW_ON_DC 0x00004000 | ||
4822 | |||
4823 | // Contained in an array starting at the offset | ||
4824 | // in ATOM_PPLIB_POWERPLAYTABLE::usNonClockInfoArrayOffset. | ||
4825 | // referenced from ATOM_PPLIB_STATE_INFO::ucNonClockStateIndex | ||
4826 | typedef struct _ATOM_PPLIB_NONCLOCK_INFO | ||
4827 | { | ||
4828 | USHORT usClassification; | ||
4829 | UCHAR ucMinTemperature; | ||
4830 | UCHAR ucMaxTemperature; | ||
4831 | ULONG ulCapsAndSettings; | ||
4832 | UCHAR ucRequiredPower; | ||
4833 | UCHAR ucUnused1[3]; | ||
4834 | } ATOM_PPLIB_NONCLOCK_INFO; | ||
4835 | |||
4836 | // Contained in an array starting at the offset | ||
4837 | // in ATOM_PPLIB_POWERPLAYTABLE::usClockInfoArrayOffset. | ||
4838 | // referenced from ATOM_PPLIB_STATE::ucClockStateIndices | ||
4839 | typedef struct _ATOM_PPLIB_R600_CLOCK_INFO | ||
4840 | { | ||
4841 | USHORT usEngineClockLow; | ||
4842 | UCHAR ucEngineClockHigh; | ||
4843 | |||
4844 | USHORT usMemoryClockLow; | ||
4845 | UCHAR ucMemoryClockHigh; | ||
4846 | |||
4847 | USHORT usVDDC; | ||
4848 | USHORT usUnused1; | ||
4849 | USHORT usUnused2; | ||
4850 | |||
4851 | ULONG ulFlags; // ATOM_PPLIB_R600_FLAGS_* | ||
4852 | |||
4853 | } ATOM_PPLIB_R600_CLOCK_INFO; | ||
4854 | |||
4855 | // ulFlags in ATOM_PPLIB_R600_CLOCK_INFO | ||
4856 | #define ATOM_PPLIB_R600_FLAGS_PCIEGEN2 1 | ||
4857 | #define ATOM_PPLIB_R600_FLAGS_UVDSAFE 2 | ||
4858 | #define ATOM_PPLIB_R600_FLAGS_BACKBIASENABLE 4 | ||
4859 | #define ATOM_PPLIB_R600_FLAGS_MEMORY_ODT_OFF 8 | ||
4860 | #define ATOM_PPLIB_R600_FLAGS_MEMORY_DLL_OFF 16 | ||
4861 | |||
4862 | typedef struct _ATOM_PPLIB_RS780_CLOCK_INFO | ||
4863 | |||
4864 | { | ||
4865 | USHORT usLowEngineClockLow; // Low Engine clock in MHz (the same way as on the R600). | ||
4866 | UCHAR ucLowEngineClockHigh; | ||
4867 | USHORT usHighEngineClockLow; // High Engine clock in MHz. | ||
4868 | UCHAR ucHighEngineClockHigh; | ||
4869 | USHORT usMemoryClockLow; // For now one of the ATOM_PPLIB_RS780_SPMCLK_XXXX constants. | ||
4870 | UCHAR ucMemoryClockHigh; // Currentyl unused. | ||
4871 | UCHAR ucPadding; // For proper alignment and size. | ||
4872 | USHORT usVDDC; // For the 780, use: None, Low, High, Variable | ||
4873 | UCHAR ucMaxHTLinkWidth; // From SBIOS - {2, 4, 8, 16} | ||
4874 | UCHAR ucMinHTLinkWidth; // From SBIOS - {2, 4, 8, 16}. Effective only if CDLW enabled. Minimum down stream width could be bigger as display BW requriement. | ||
4875 | USHORT usHTLinkFreq; // See definition ATOM_PPLIB_RS780_HTLINKFREQ_xxx or in MHz(>=200). | ||
4876 | ULONG ulFlags; | ||
4877 | } ATOM_PPLIB_RS780_CLOCK_INFO; | ||
4878 | |||
4879 | #define ATOM_PPLIB_RS780_VOLTAGE_NONE 0 | ||
4880 | #define ATOM_PPLIB_RS780_VOLTAGE_LOW 1 | ||
4881 | #define ATOM_PPLIB_RS780_VOLTAGE_HIGH 2 | ||
4882 | #define ATOM_PPLIB_RS780_VOLTAGE_VARIABLE 3 | ||
4883 | |||
4884 | #define ATOM_PPLIB_RS780_SPMCLK_NONE 0 // We cannot change the side port memory clock, leave it as it is. | ||
4885 | #define ATOM_PPLIB_RS780_SPMCLK_LOW 1 | ||
4886 | #define ATOM_PPLIB_RS780_SPMCLK_HIGH 2 | ||
4887 | |||
4888 | #define ATOM_PPLIB_RS780_HTLINKFREQ_NONE 0 | ||
4889 | #define ATOM_PPLIB_RS780_HTLINKFREQ_LOW 1 | ||
4890 | #define ATOM_PPLIB_RS780_HTLINKFREQ_HIGH 2 | ||
4891 | |||
4693 | /**************************************************************************/ | 4892 | /**************************************************************************/ |
4694 | 4893 | ||
4695 | /* Following definitions are for compatiblity issue in different SW components. */ | 4894 | /* Following definitions are for compatiblity issue in different SW components. */ |