From: Shaoyun Liu <Shaoyun.Liu@amd.com>
Date: Tue, 6 Feb 2018 17:29:35 -0500
Subject: drm/amdgpu: Avoid get vram info from atom bios on emulation mode
Git-commit: 3d918c0ed26091beb767a8d23c4226706b0e8e88
Patch-mainline: v4.17-rc1
References: FATE#326289 FATE#326079 FATE#326049 FATE#322398 FATE#326166
Signed-off-by: Shaoyun Liu <Shaoyun.Liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Petr Tesarik <ptesarik@suse.com>
---
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -712,7 +712,8 @@ static int gmc_v9_0_mc_init(struct amdgp
int chansize, numchan;
int r;
- adev->gmc.vram_width = amdgpu_atomfirmware_get_vram_width(adev);
+ if (amdgpu_emu_mode != 1)
+ adev->gmc.vram_width = amdgpu_atomfirmware_get_vram_width(adev);
if (!adev->gmc.vram_width) {
/* hbm memory channel size */
if (adev->flags & AMD_IS_APU)