drm/amdgpu/gmc6: disable legacy vga features in gmc init
Subsystems (2)
PATCH 1/4 drm/amdgpu/gmc6: disable legacy vga features in gmc init
Needs to be done when the MC is set up.
--- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +5 -1
@@ -249,7 +249,11 @@ static void gmc_v6_0_mc_program(struct amdgpu_device *adev)dev_warn (adev->dev,"Wait for MC idle timedout !\n" ); } -WREG32 (mmVGA_HDP_CONTROL,VGA_HDP_CONTROL__VGA_MEMORY_DISABLE_MASK ); +if (adev->mode_info.num_crtc) { +WREG32 (mmVGA_RENDER_CONTROL, +RREG32 (mmVGA_RENDER_CONTROL) &VGA_VSTATUS_CNTL ); +WREG32 (mmVGA_HDP_CONTROL,VGA_HDP_CONTROL__VGA_MEMORY_DISABLE_MASK ); + }/* Update configuration */ WREG32 (mmMC_VM_SYSTEM_APERTURE_LOW_ADDR, adev->mc.vram_start >>12 );
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1500952777-5006-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org
PATCH 2/4 drm/amdgpu/gmc7: disable legacy vga features in gmc init
Needs to be done when the MC is set up.
--- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c +14 -0
@@ -37,6 +37,9 @@#include "oss/oss_2_0_d.h" #include "oss/oss_2_0_sh_mask.h" +#include "dce/dce_8_0_d.h" +#include "dce/dce_8_0_sh_mask.h" +#include "amdgpu_atombios.h" static void gmc_v7_0_set_gart_funcs (struct amdgpu_device *adev);
@@ -273,6 +276,17 @@ static void gmc_v7_0_mc_program(struct amdgpu_device *adev)if (gmc_v7_0_wait_for_idle ((void *)adev)) {dev_warn (adev->dev,"Wait for MC idle timedout !\n" ); } +if (adev->mode_info.num_crtc) { +/* Lockout access through VGA aperture*/ + tmp =RREG32 (mmVGA_HDP_CONTROL); + tmp =REG_SET_FIELD (tmp,VGA_HDP_CONTROL ,VGA_MEMORY_DISABLE ,1 ); +WREG32 (mmVGA_HDP_CONTROL, tmp); + +/* disable VGA render */ + tmp =RREG32 (mmVGA_RENDER_CONTROL); + tmp =REG_SET_FIELD (tmp,VGA_RENDER_CONTROL ,VGA_VSTATUS_CNTL ,0 ); +WREG32 (mmVGA_RENDER_CONTROL, tmp); + }/* Update configuration */ WREG32 (mmMC_VM_SYSTEM_APERTURE_LOW_ADDR, adev->mc.vram_start >>12 );
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/4 drm/amdgpu/gmc8: disable legacy vga features in gmc init
In reply to a message not in the archiveNeeds to be done when the MC is set up.
--- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c +14 -0
@@ -35,6 +35,9 @@#include "oss/oss_3_0_d.h" #include "oss/oss_3_0_sh_mask.h" +#include "dce/dce_10_0_d.h" +#include "dce/dce_10_0_sh_mask.h" +#include "vid.h" #include "vi.h"
@@ -438,6 +441,17 @@ static void gmc_v8_0_mc_program(struct amdgpu_device *adev)if (gmc_v8_0_wait_for_idle ((void *)adev)) {dev_warn (adev->dev,"Wait for MC idle timedout !\n" ); } +if (adev->mode_info.num_crtc) { +/* Lockout access through VGA aperture*/ + tmp =RREG32 (mmVGA_HDP_CONTROL); + tmp =REG_SET_FIELD (tmp,VGA_HDP_CONTROL ,VGA_MEMORY_DISABLE ,1 ); +WREG32 (mmVGA_HDP_CONTROL, tmp); + +/* disable VGA render */ + tmp =RREG32 (mmVGA_RENDER_CONTROL); + tmp =REG_SET_FIELD (tmp,VGA_RENDER_CONTROL ,VGA_VSTATUS_CNTL ,0 ); +WREG32 (mmVGA_RENDER_CONTROL, tmp); + }/* Update configuration */ WREG32 (mmMC_VM_SYSTEM_APERTURE_LOW_ADDR, adev->mc.vram_start >>12 );
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 4/4 drm/amdgpu/gmc9: disable legacy vga features in gmc init
In reply to a message not in the archiveNeeds to be done when the MC is set up.
--- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +16 -0
@@ -29,6 +29,8 @@#include "vega10/HDP/hdp_4_0_offset.h" #include "vega10/HDP/hdp_4_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 "soc15_common.h"
@@ -750,6 +752,20 @@ static int gmc_v9_0_hw_init(void *handle)/* The sequence of these two function calls matters.*/ 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);return r;
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1500952777-5006-4-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org
Harry Wentland
Acked-byRe: [PATCH 4/4] drm/amdgpu/gmc9: disable legacy vga features in gmc init
Not an expert on GMC but this seems to be the right place to do this in the sequence.
For the series:
Harry
Quoted 32 lines · Alex Deucher
Needs to be done when the MC is set up.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +9
-0@@ -29,6 +29,8 @@#include "vega10/HDP/hdp_4_0_offset.h" #include "vega10/HDP/hdp_4_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 "soc15_common.h" @@ -750,6 +752,20 @@ static int gmc_v9_0_hw_init(void *handle)/* The sequence of these two function calls matters.*/ 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);
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c static int gmc_v9_0_hw_init(void *handle) · line 771
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +7
-0+ +/* 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);return r;
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx