提交 edca2d05 编写于 作者: A Alex Deucher

drm/amdgpu/gmc9: disable legacy vga features in gmc init

Needs to be done when the MC is set up.
Acked-by: NChristian König <christian.koenig@amd.com>
Acked-by: NHarry Wentland <harry.wentland@amd.com>
Reviewed-by: NJunwei Zhang <Jerry.Zhang@amd.com>
Reviewed-by: NMichel Dänzer <michel.daenzer@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 2e2bfd90
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
#include "vega10/HDP/hdp_4_0_offset.h" #include "vega10/HDP/hdp_4_0_offset.h"
#include "vega10/HDP/hdp_4_0_sh_mask.h" #include "vega10/HDP/hdp_4_0_sh_mask.h"
#include "vega10/GC/gc_9_0_sh_mask.h" #include "vega10/GC/gc_9_0_sh_mask.h"
#include "vega10/DC/dce_12_0_offset.h"
#include "vega10/DC/dce_12_0_sh_mask.h"
#include "vega10/vega10_enum.h" #include "vega10/vega10_enum.h"
#include "soc15_common.h" #include "soc15_common.h"
...@@ -750,6 +752,20 @@ static int gmc_v9_0_hw_init(void *handle) ...@@ -750,6 +752,20 @@ static int gmc_v9_0_hw_init(void *handle)
/* The sequence of these two function calls matters.*/ /* The sequence of these two function calls matters.*/
gmc_v9_0_init_golden_registers(adev); gmc_v9_0_init_golden_registers(adev);
if (adev->mode_info.num_crtc) {
u32 tmp;
/* Lockout access through VGA aperture*/
tmp = RREG32_SOC15(DCE, 0, mmVGA_HDP_CONTROL);
tmp = REG_SET_FIELD(tmp, VGA_HDP_CONTROL, VGA_MEMORY_DISABLE, 1);
WREG32_SOC15(DCE, 0, mmVGA_HDP_CONTROL, tmp);
/* disable VGA render */
tmp = RREG32_SOC15(DCE, 0, mmVGA_RENDER_CONTROL);
tmp = REG_SET_FIELD(tmp, VGA_RENDER_CONTROL, VGA_VSTATUS_CNTL, 0);
WREG32_SOC15(DCE, 0, mmVGA_RENDER_CONTROL, tmp);
}
r = gmc_v9_0_gart_enable(adev); r = gmc_v9_0_gart_enable(adev);
return r; return r;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册