diff options
author | Evan Quan <evan.quan@amd.com> | 2017-09-20 04:25:40 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-09-26 15:14:18 -0400 |
commit | 5c58301856e69223b85546fac319363eef1ac1b9 (patch) | |
tree | 2f9c68965b817dd426fa6dc1c2a0f5c113630ad8 | |
parent | fafa3598401469c22910cf74df6de6c5b318a482 (diff) |
drm/amd/amdgpu: add vega10/raven mmhub/athub golden settings
Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c index 99147f576e76..621699331e09 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | |||
@@ -32,6 +32,8 @@ | |||
32 | #include "vega10/DC/dce_12_0_offset.h" | 32 | #include "vega10/DC/dce_12_0_offset.h" |
33 | #include "vega10/DC/dce_12_0_sh_mask.h" | 33 | #include "vega10/DC/dce_12_0_sh_mask.h" |
34 | #include "vega10/vega10_enum.h" | 34 | #include "vega10/vega10_enum.h" |
35 | #include "vega10/MMHUB/mmhub_1_0_offset.h" | ||
36 | #include "vega10/ATHUB/athub_1_0_offset.h" | ||
35 | 37 | ||
36 | #include "soc15_common.h" | 38 | #include "soc15_common.h" |
37 | 39 | ||
@@ -71,6 +73,18 @@ static const u32 golden_settings_vega10_hdp[] = | |||
71 | 0xf6e, 0x0fffffff, 0x00000000, | 73 | 0xf6e, 0x0fffffff, 0x00000000, |
72 | }; | 74 | }; |
73 | 75 | ||
76 | static const u32 golden_settings_mmhub_1_0_0[] = | ||
77 | { | ||
78 | SOC15_REG_OFFSET(MMHUB, 0, mmDAGB1_WRCLI2), 0x00000007, 0xfe5fe0fa, | ||
79 | SOC15_REG_OFFSET(MMHUB, 0, mmMMEA1_DRAM_WR_CLI2GRP_MAP0), 0x00000030, 0x55555565 | ||
80 | }; | ||
81 | |||
82 | static const u32 golden_settings_athub_1_0_0[] = | ||
83 | { | ||
84 | SOC15_REG_OFFSET(ATHUB, 0, mmRPB_ARB_CNTL), 0x0000ff00, 0x00000800, | ||
85 | SOC15_REG_OFFSET(ATHUB, 0, mmRPB_ARB_CNTL2), 0x00ff00ff, 0x00080008 | ||
86 | }; | ||
87 | |||
74 | static int gmc_v9_0_vm_fault_interrupt_state(struct amdgpu_device *adev, | 88 | static int gmc_v9_0_vm_fault_interrupt_state(struct amdgpu_device *adev, |
75 | struct amdgpu_irq_src *src, | 89 | struct amdgpu_irq_src *src, |
76 | unsigned type, | 90 | unsigned type, |
@@ -665,8 +679,17 @@ static void gmc_v9_0_init_golden_registers(struct amdgpu_device *adev) | |||
665 | { | 679 | { |
666 | switch (adev->asic_type) { | 680 | switch (adev->asic_type) { |
667 | case CHIP_VEGA10: | 681 | case CHIP_VEGA10: |
682 | amdgpu_program_register_sequence(adev, | ||
683 | golden_settings_mmhub_1_0_0, | ||
684 | (const u32)ARRAY_SIZE(golden_settings_mmhub_1_0_0)); | ||
685 | amdgpu_program_register_sequence(adev, | ||
686 | golden_settings_athub_1_0_0, | ||
687 | (const u32)ARRAY_SIZE(golden_settings_athub_1_0_0)); | ||
668 | break; | 688 | break; |
669 | case CHIP_RAVEN: | 689 | case CHIP_RAVEN: |
690 | amdgpu_program_register_sequence(adev, | ||
691 | golden_settings_athub_1_0_0, | ||
692 | (const u32)ARRAY_SIZE(golden_settings_athub_1_0_0)); | ||
670 | break; | 693 | break; |
671 | default: | 694 | default: |
672 | break; | 695 | break; |