Browse Source

drm/amdgpu: Avoid get vram info from atom bios on emulation mode

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>
Shaoyun Liu 7 years ago
parent
commit
3d918c0ed2
1 changed files with 2 additions and 1 deletions
  1. 2 1
      drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c

+ 2 - 1
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c

@@ -712,7 +712,8 @@ static int gmc_v9_0_mc_init(struct amdgpu_device *adev)
 	int chansize, numchan;
 	int chansize, numchan;
 	int r;
 	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) {
 	if (!adev->gmc.vram_width) {
 		/* hbm memory channel size */
 		/* hbm memory channel size */
 		chansize = 128;
 		chansize = 128;