aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu
diff options
context:
space:
mode:
authorTianci.Yin <tianci.yin@amd.com>2020-01-20 17:20:10 +0800
committerAlex Deucher <alexander.deucher@amd.com>2020-01-22 16:55:27 -0500
commit7db1d560a4fab1e4668b1964e77f52cefce9e9c7 (patch)
tree5ffe9b418763b732ae6c8faa895f87c6a47c8b21 /drivers/gpu/drm/amd/amdgpu
parentdrm/amdgpu: fix VRAM partially encroached issue in GDDR6 memory training(V2) (diff)
downloadlinux-dev-7db1d560a4fab1e4668b1964e77f52cefce9e9c7.tar.xz
linux-dev-7db1d560a4fab1e4668b1964e77f52cefce9e9c7.zip
Revert "drm/amdgpu: fix modprobe failure of the secondary GPU when GDDR6 training enabled(V5)"
This reverts commit 9e441478623fd913d4340654682b19f0c24e629d. The patch will be replaced with a better solution, revert it. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Tianci.Yin <tianci.yin@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h5
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c27
2 files changed, 1 insertions, 31 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
index 86267baca07c..d3c27a3c43f6 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
@@ -60,11 +60,6 @@
*/
#define AMDGPU_GMC_FAULT_TIMEOUT 5000ULL
-/*
- * Default stolen memory size, 1024 * 768 * 4
- */
-#define AMDGPU_STOLEN_BIST_TRAINING_DEFAULT_SIZE 0x300000ULL
-
struct firmware;
/*
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
index 86f4ffe408e7..0c5bf3bd640f 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
@@ -641,12 +641,7 @@ static int gmc_v10_0_late_init(void *handle)
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
int r;
- /*
- * Can't free the stolen VGA memory when it might be used for memory
- * training again.
- */
- if (!adev->fw_vram_usage.mem_train_support)
- amdgpu_bo_late_init(adev);
+ amdgpu_bo_late_init(adev);
r = amdgpu_gmc_allocate_vm_inv_eng(adev);
if (r)
@@ -830,19 +825,6 @@ static int gmc_v10_0_sw_init(void *handle)
adev->gmc.stolen_size = gmc_v10_0_get_vbios_fb_size(adev);
- /*
- * In dual GPUs scenario, stolen_size is assigned to zero on the
- * secondary GPU, since there is no pre-OS console using that memory.
- * Then the bottom region of VRAM was allocated as GTT, unfortunately a
- * small region of bottom VRAM was encroached by UMC firmware during
- * GDDR6 BIST training, this cause page fault.
- * The page fault can be fixed by forcing stolen_size to 3MB, then the
- * bottom region of VRAM was allocated as stolen memory, GTT corruption
- * avoid.
- */
- adev->gmc.stolen_size = max(adev->gmc.stolen_size,
- AMDGPU_STOLEN_BIST_TRAINING_DEFAULT_SIZE);
-
/* Memory manager */
r = amdgpu_bo_init(adev);
if (r)
@@ -882,13 +864,6 @@ static void gmc_v10_0_gart_fini(struct amdgpu_device *adev)
static int gmc_v10_0_sw_fini(void *handle)
{
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
- void *stolen_vga_buf;
-
- /*
- * Free the stolen memory if it wasn't already freed in late_init
- * because of memory training.
- */
- amdgpu_bo_free_kernel(&adev->stolen_vga_memory, NULL, &stolen_vga_buf);
amdgpu_vm_manager_fini(adev);
gmc_v10_0_gart_fini(adev);