Skip to contentSkip to conversation

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

PATCH In review Shaoyun Liu 2 participants 2 messages Feb 6, 2018 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

Change-Id I10030e83d63b2c27bfd16b64178e4f07c13addfa
---
 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +2 -1
index 0a1868b..785fb78 100644
@@ -707,7 +707,8 @@ static int gmc_v9_0_mc_init(struct amdgpu_device *adev)
 	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 */
 		chansize = 128;
Signature · 6 lines
1.9.1

_______________________________________________
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): 1517956286-29399-1-git-send-email-Shaoyun.Liu-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw

Alternatively, you could also just return 0 in amdgpu_atomfirmware_get_vram_width() if emu == 1. Either way:

________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Shaoyun Liu <[email protected]>
Sent: Tuesday, February 6, 2018 5:31 PM
To: [email protected]
Cc: Liu, Shaoyun
Subject: [PATCH] drm/amdgpu: Avoid get vram info from atom bios on emulation mode

Change-Id I10030e83d63b2c27bfd16b64178e4f07c13addfa
---
 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +2 -1
index 0a1868b..785fb78 100644
@@ -707,7 +707,8 @@ static int gmc_v9_0_mc_init(struct amdgpu_device *adev)
         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 */
                 chansize = 128;

--
1.9.1

_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx