From 263a370edd94def5514f67977972cfd32c1a28c7 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Tue, 28 Aug 2018 10:02:18 -0500 Subject: [PATCH] drm/amdgpu/gmc9: free stolen memory on non-VEGA10 parts TODO: verify that non-VEGA10 parts pass several S3 cycles. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c index 39bee98155ee..4eac9938d570 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c @@ -710,8 +710,10 @@ static int gmc_v9_0_late_init(void *handle) /* * TODO - Uncomment once GART corruption issue is fixed. + * double check on non-Vega10 gmc9 parts */ - /* amdgpu_bo_late_init(adev); */ + if (adev->asic_type != CHIP_VEGA10) + amdgpu_bo_late_init(adev); for(i = 0; i < adev->num_rings; ++i) { struct amdgpu_ring *ring = adev->rings[i]; @@ -848,9 +850,7 @@ static int gmc_v9_0_gart_init(struct amdgpu_device *adev) static unsigned gmc_v9_0_get_vbios_fb_size(struct amdgpu_device *adev) { -#if 0 u32 d1vga_control = RREG32_SOC15(DCE, 0, mmD1VGA_CONTROL); -#endif unsigned size; /* @@ -859,7 +859,6 @@ static unsigned gmc_v9_0_get_vbios_fb_size(struct amdgpu_device *adev) * */ size = 9 * 1024 * 1024; -#if 0 if (REG_GET_FIELD(d1vga_control, D1VGA_CONTROL, D1VGA_MODE_ENABLE)) { size = 9 * 1024 * 1024; /* reserve 8MB for vga emulator and 1 MB for FB */ } else { @@ -888,7 +887,6 @@ static unsigned gmc_v9_0_get_vbios_fb_size(struct amdgpu_device *adev) if ((adev->gmc.real_vram_size - size) < (8 * 1024 * 1024)) return 0; -#endif return size; } -- 2.13.6