diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2017-07-24 23:18:44 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-07-25 16:37:25 -0400 |
commit | edca2d052997fcbd62a9d255fb6c7c25a0fc9f0f (patch) | |
tree | 4944aabad074247eb254bcf87138c029391a77ed | |
parent | 2e2bfd90fa2b1be480a655337b2d25410323f43e (diff) |
drm/amdgpu/gmc9: disable legacy vga features in gmc init
Needs to be done when the MC is set up.
Acked-by: Christian König <christian.koenig@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-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; |