aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/include
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2015-10-15 00:43:41 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-05-04 20:23:49 -0400
commit6e14e92b3d419a00be6cafa53b0939c7b347c46a (patch)
tree7e6db0e1270fd8b0abfdd11cac9d8ff606090234 /drivers/gpu/drm/amd/include
parent2238445925467024de1306500de00b3c0eb1ac1f (diff)
drm/amdgpu: update atombios.h (v2)
update to internal version 893 v2: Pull in gfx_info changes from 898 Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/include')
-rw-r--r--drivers/gpu/drm/amd/include/atombios.h663
1 files changed, 619 insertions, 44 deletions
diff --git a/drivers/gpu/drm/amd/include/atombios.h b/drivers/gpu/drm/amd/include/atombios.h
index eaf451e26643..296def32e45d 100644
--- a/drivers/gpu/drm/amd/include/atombios.h
+++ b/drivers/gpu/drm/amd/include/atombios.h
@@ -79,9 +79,23 @@
79#define ATOM_PPLL0 2 79#define ATOM_PPLL0 2
80#define ATOM_PPLL3 3 80#define ATOM_PPLL3 3
81 81
82#define ATOM_PHY_PLL0 4
83#define ATOM_PHY_PLL1 5
84
82#define ATOM_EXT_PLL1 8 85#define ATOM_EXT_PLL1 8
86#define ATOM_GCK_DFS 8
83#define ATOM_EXT_PLL2 9 87#define ATOM_EXT_PLL2 9
88#define ATOM_FCH_CLK 9
84#define ATOM_EXT_CLOCK 10 89#define ATOM_EXT_CLOCK 10
90#define ATOM_DP_DTO 11
91
92#define ATOM_COMBOPHY_PLL0 20
93#define ATOM_COMBOPHY_PLL1 21
94#define ATOM_COMBOPHY_PLL2 22
95#define ATOM_COMBOPHY_PLL3 23
96#define ATOM_COMBOPHY_PLL4 24
97#define ATOM_COMBOPHY_PLL5 25
98
85#define ATOM_PPLL_INVALID 0xFF 99#define ATOM_PPLL_INVALID 0xFF
86 100
87#define ENCODER_REFCLK_SRC_P1PLL 0 101#define ENCODER_REFCLK_SRC_P1PLL 0
@@ -224,6 +238,31 @@ typedef struct _ATOM_ROM_HEADER
224 UCHAR ucReserved; 238 UCHAR ucReserved;
225}ATOM_ROM_HEADER; 239}ATOM_ROM_HEADER;
226 240
241
242typedef struct _ATOM_ROM_HEADER_V2_1
243{
244 ATOM_COMMON_TABLE_HEADER sHeader;
245 UCHAR uaFirmWareSignature[4]; //Signature to distinguish between Atombios and non-atombios,
246 //atombios should init it as "ATOM", don't change the position
247 USHORT usBiosRuntimeSegmentAddress;
248 USHORT usProtectedModeInfoOffset;
249 USHORT usConfigFilenameOffset;
250 USHORT usCRC_BlockOffset;
251 USHORT usBIOS_BootupMessageOffset;
252 USHORT usInt10Offset;
253 USHORT usPciBusDevInitCode;
254 USHORT usIoBaseAddress;
255 USHORT usSubsystemVendorID;
256 USHORT usSubsystemID;
257 USHORT usPCI_InfoOffset;
258 USHORT usMasterCommandTableOffset;//Offest for SW to get all command table offsets, Don't change the position
259 USHORT usMasterDataTableOffset; //Offest for SW to get all data table offsets, Don't change the position
260 UCHAR ucExtendedFunctionCode;
261 UCHAR ucReserved;
262 ULONG ulPSPDirTableOffset;
263}ATOM_ROM_HEADER_V2_1;
264
265
227//==============================Command Table Portion==================================== 266//==============================Command Table Portion====================================
228 267
229 268
@@ -272,12 +311,12 @@ typedef struct _ATOM_MASTER_LIST_OF_COMMAND_TABLES{
272 USHORT GetSCLKOverMCLKRatio; //Atomic Table, only used by Bios 311 USHORT GetSCLKOverMCLKRatio; //Atomic Table, only used by Bios
273 USHORT SetCRTC_Timing; //Atomic Table, directly used by various SW components,latest version 1.1 312 USHORT SetCRTC_Timing; //Atomic Table, directly used by various SW components,latest version 1.1
274 USHORT SetCRTC_OverScan; //Atomic Table, used by various SW components,latest version 1.1 313 USHORT SetCRTC_OverScan; //Atomic Table, used by various SW components,latest version 1.1
275 USHORT SetCRTC_Replication; //Atomic Table, used only by Bios 314 USHORT GetSMUClockInfo; //Atomic Table, used only by Bios
276 USHORT SelectCRTC_Source; //Atomic Table, directly used by various SW components,latest version 1.1 315 USHORT SelectCRTC_Source; //Atomic Table, directly used by various SW components,latest version 1.1
277 USHORT EnableGraphSurfaces; //Atomic Table, used only by Bios 316 USHORT EnableGraphSurfaces; //Atomic Table, used only by Bios
278 USHORT UpdateCRTC_DoubleBufferRegisters; //Atomic Table, used only by Bios 317 USHORT UpdateCRTC_DoubleBufferRegisters; //Atomic Table, used only by Bios
279 USHORT LUT_AutoFill; //Atomic Table, only used by Bios 318 USHORT LUT_AutoFill; //Atomic Table, only used by Bios
280 USHORT EnableHW_IconCursor; //Atomic Table, only used by Bios 319 USHORT SetDCEClock; //Atomic Table, start from DCE11.1, shared by driver and VBIOS, change DISPCLK and DPREFCLK
281 USHORT GetMemoryClock; //Atomic Table, directly used by various SW components,latest version 1.1 320 USHORT GetMemoryClock; //Atomic Table, directly used by various SW components,latest version 1.1
282 USHORT GetEngineClock; //Atomic Table, directly used by various SW components,latest version 1.1 321 USHORT GetEngineClock; //Atomic Table, directly used by various SW components,latest version 1.1
283 USHORT SetCRTC_UsingDTDTiming; //Atomic Table, directly used by various SW components,latest version 1.1 322 USHORT SetCRTC_UsingDTDTiming; //Atomic Table, directly used by various SW components,latest version 1.1
@@ -292,7 +331,7 @@ typedef struct _ATOM_MASTER_LIST_OF_COMMAND_TABLES{
292 USHORT PowerConnectorDetection; //Atomic Table, directly used by various SW components,latest version 1.1 331 USHORT PowerConnectorDetection; //Atomic Table, directly used by various SW components,latest version 1.1
293 USHORT MC_Synchronization; //Atomic Table, indirectly used by various SW components,called from SetMemoryClock 332 USHORT MC_Synchronization; //Atomic Table, indirectly used by various SW components,called from SetMemoryClock
294 USHORT ComputeMemoryEnginePLL; //Atomic Table, indirectly used by various SW components,called from SetMemory/EngineClock 333 USHORT ComputeMemoryEnginePLL; //Atomic Table, indirectly used by various SW components,called from SetMemory/EngineClock
295 USHORT MemoryRefreshConversion; //Atomic Table, indirectly used by various SW components,called from SetMemory or SetEngineClock 334 USHORT Gfx_Init; //Atomic Table, indirectly used by various SW components,called from SetMemory or SetEngineClock
296 USHORT VRAM_GetCurrentInfoBlock; //Atomic Table, used only by Bios 335 USHORT VRAM_GetCurrentInfoBlock; //Atomic Table, used only by Bios
297 USHORT DynamicMemorySettings; //Atomic Table, indirectly used by various SW components,called from SetMemoryClock 336 USHORT DynamicMemorySettings; //Atomic Table, indirectly used by various SW components,called from SetMemoryClock
298 USHORT MemoryTraining; //Atomic Table, used only by Bios 337 USHORT MemoryTraining; //Atomic Table, used only by Bios
@@ -333,6 +372,10 @@ typedef struct _ATOM_MASTER_LIST_OF_COMMAND_TABLES{
333#define LCD1OutputControl HW_Misc_Operation 372#define LCD1OutputControl HW_Misc_Operation
334#define TV1OutputControl Gfx_Harvesting 373#define TV1OutputControl Gfx_Harvesting
335#define TVEncoderControl SMC_Init 374#define TVEncoderControl SMC_Init
375#define EnableHW_IconCursor SetDCEClock
376#define SetCRTC_Replication GetSMUClockInfo
377
378#define MemoryRefreshConversion Gfx_Init
336 379
337typedef struct _ATOM_MASTER_COMMAND_TABLE 380typedef struct _ATOM_MASTER_COMMAND_TABLE
338{ 381{
@@ -425,6 +468,9 @@ typedef struct _COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V2
425#define b3FIRST_TIME_CHANGE_CLOCK 0x08 //Applicable to both memory and engine clock change,when set, it means this is 1st time to change clock after ASIC bootup 468#define b3FIRST_TIME_CHANGE_CLOCK 0x08 //Applicable to both memory and engine clock change,when set, it means this is 1st time to change clock after ASIC bootup
426#define b3SKIP_SW_PROGRAM_PLL 0x10 //Applicable to both memory and engine clock change, when set, it means the table will not program SPLL/MPLL 469#define b3SKIP_SW_PROGRAM_PLL 0x10 //Applicable to both memory and engine clock change, when set, it means the table will not program SPLL/MPLL
427#define b3DRAM_SELF_REFRESH_EXIT 0x20 //Applicable to DRAM self refresh exit only. when set, it means it will go to program DRAM self refresh exit path 470#define b3DRAM_SELF_REFRESH_EXIT 0x20 //Applicable to DRAM self refresh exit only. when set, it means it will go to program DRAM self refresh exit path
471#define b3SRIOV_INIT_BOOT 0x40 //Use by HV GPU driver only, to load uCode. for ASIC_InitTable SCLK parameter only
472#define b3SRIOV_LOAD_UCODE 0x40 //Use by HV GPU driver only, to load uCode. for ASIC_InitTable SCLK parameter only
473#define b3SRIOV_SKIP_ASIC_INIT 0x02 //Use by HV GPU driver only, skip ASIC_Init for primary adapter boot. for ASIC_InitTable SCLK parameter only
428 474
429typedef struct _ATOM_COMPUTE_CLOCK_FREQ 475typedef struct _ATOM_COMPUTE_CLOCK_FREQ
430{ 476{
@@ -518,6 +564,33 @@ typedef struct _COMPUTE_GPU_CLOCK_OUTPUT_PARAMETERS_V1_6
518//ucPllCntlFlag 564//ucPllCntlFlag
519#define SPLL_CNTL_FLAG_VCO_MODE_MASK 0x03 565#define SPLL_CNTL_FLAG_VCO_MODE_MASK 0x03
520 566
567typedef struct _COMPUTE_GPU_CLOCK_INPUT_PARAMETERS_V1_7
568{
569 ATOM_COMPUTE_CLOCK_FREQ ulClock; //Input Parameter
570 ULONG ulReserved[5];
571}COMPUTE_GPU_CLOCK_INPUT_PARAMETERS_V1_7;
572
573//ATOM_COMPUTE_CLOCK_FREQ.ulComputeClockFlag
574#define COMPUTE_GPUCLK_INPUT_FLAG_CLK_TYPE_MASK 0x0f
575#define COMPUTE_GPUCLK_INPUT_FLAG_DEFAULT_GPUCLK 0x00
576#define COMPUTE_GPUCLK_INPUT_FLAG_SCLK 0x01
577
578typedef struct _COMPUTE_GPU_CLOCK_OUTPUT_PARAMETERS_V1_7
579{
580 COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V4 ulClock; //Output Parameter: ucPostDiv=DFS divider
581 USHORT usSclk_fcw_frac; //fractional divider of fcw = usSclk_fcw_frac/65536
582 USHORT usSclk_fcw_int; //integer divider of fcwc
583 UCHAR ucSclkPostDiv; //PLL post divider = 2^ucSclkPostDiv
584 UCHAR ucSclkVcoMode; //0: 4G~8Ghz, 1:3G~6Ghz,3: 2G~4Ghz, 2:Reserved
585 UCHAR ucSclkPllRange; //GreenTable SCLK PLL range entry index ( 0~7 )
586 UCHAR ucSscEnable;
587 USHORT usSsc_fcw1_frac; //fcw1_frac when SSC enable
588 USHORT usSsc_fcw1_int; //fcw1_int when SSC enable
589 USHORT usReserved;
590 USHORT usPcc_fcw_int;
591 USHORT usSsc_fcw_slew_frac; //fcw_slew_frac when SSC enable
592 USHORT usPcc_fcw_slew_frac;
593}COMPUTE_GPU_CLOCK_OUTPUT_PARAMETERS_V1_7;
521 594
522// ucInputFlag 595// ucInputFlag
523#define ATOM_PLL_INPUT_FLAG_PLL_STROBE_MODE_EN 1 // 1-StrobeMode, 0-PerformanceMode 596#define ATOM_PLL_INPUT_FLAG_PLL_STROBE_MODE_EN 1 // 1-StrobeMode, 0-PerformanceMode
@@ -557,12 +630,16 @@ typedef struct _COMPUTE_MEMORY_CLOCK_PARAM_PARAMETERS_V2_2
557 ULONG ulReserved; 630 ULONG ulReserved;
558}COMPUTE_MEMORY_CLOCK_PARAM_PARAMETERS_V2_2; 631}COMPUTE_MEMORY_CLOCK_PARAM_PARAMETERS_V2_2;
559 632
633//Input parameter of DynamicMemorySettingsTable
634//when ATOM_COMPUTE_CLOCK_FREQ.ulComputeClockFlag = COMPUTE_MEMORY_PLL_PARAM
560typedef struct _DYNAMICE_MEMORY_SETTINGS_PARAMETER 635typedef struct _DYNAMICE_MEMORY_SETTINGS_PARAMETER
561{ 636{
562 ATOM_COMPUTE_CLOCK_FREQ ulClock; 637 ATOM_COMPUTE_CLOCK_FREQ ulClock;
563 ULONG ulReserved[2]; 638 ULONG ulReserved[2];
564}DYNAMICE_MEMORY_SETTINGS_PARAMETER; 639}DYNAMICE_MEMORY_SETTINGS_PARAMETER;
565 640
641//Input parameter of DynamicMemorySettingsTable
642//when ATOM_COMPUTE_CLOCK_FREQ.ulComputeClockFlag == COMPUTE_ENGINE_PLL_PARAM
566typedef struct _DYNAMICE_ENGINE_SETTINGS_PARAMETER 643typedef struct _DYNAMICE_ENGINE_SETTINGS_PARAMETER
567{ 644{
568 ATOM_COMPUTE_CLOCK_FREQ ulClock; 645 ATOM_COMPUTE_CLOCK_FREQ ulClock;
@@ -570,6 +647,29 @@ typedef struct _DYNAMICE_ENGINE_SETTINGS_PARAMETER
570 ULONG ulReserved; 647