diff options
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 16 |
1 files changed, 16 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 677181fdfa00..c22899a08106 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | |||
@@ -29,6 +29,8 @@ | |||
29 | #include "vega10/HDP/hdp_4_0_offset.h" | 29 | #include "vega10/HDP/hdp_4_0_offset.h" |
30 | #include "vega10/HDP/hdp_4_0_sh_mask.h" | 30 | #include "vega10/HDP/hdp_4_0_sh_mask.h" |
31 | #include "vega10/GC/gc_9_0_sh_mask.h" | 31 | #include "vega10/GC/gc_9_0_sh_mask.h" |
32 | #include "vega10/DC/dce_12_0_offset.h" | ||
33 | #include "vega10/DC/dce_12_0_sh_mask.h" | ||
32 | #include "vega10/vega10_enum.h" | 34 | #include "vega10/vega10_enum.h" |
33 | 35 | ||
34 | #include "soc15_common.h" | 36 | #include "soc15_common.h" |
@@ -750,6 +752,20 @@ static int gmc_v9_0_hw_init(void *handle) | |||
750 | /* The sequence of these two function calls matters.*/ | 752 | /* The sequence of these two function calls matters.*/ |
751 | gmc_v9_0_init_golden_registers(adev); | 753 | gmc_v9_0_init_golden_registers(adev); |
752 | 754 | ||
755 | if (adev->mode_info.num_crtc) { | ||
756 | u32 tmp; | ||
757 | |||
758 | /* Lockout access through VGA aperture*/ | ||
759 | tmp = RREG32_SOC15(DCE, 0, mmVGA_HDP_CONTROL); | ||
760 | tmp = REG_SET_FIELD(tmp, VGA_HDP_CONTROL, VGA_MEMORY_DISABLE, 1); | ||
761 | WREG32_SOC15(DCE, 0, mmVGA_HDP_CONTROL, tmp); | ||
762 | |||
763 | /* disable VGA render */ | ||
764 | tmp = RREG32_SOC15(DCE, 0, mmVGA_RENDER_CONTROL); | ||
765 | tmp = REG_SET_FIELD(tmp, VGA_RENDER_CONTROL, VGA_VSTATUS_CNTL, 0); | ||
766 | WREG32_SOC15(DCE, 0, mmVGA_RENDER_CONTROL, tmp); | ||
767 | } | ||
768 | |||
753 | r = gmc_v9_0_gart_enable(adev); | 769 | r = gmc_v9_0_gart_enable(adev); |
754 | 770 | ||
755 | return r; | 771 | return r; |