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

Deucher, Alexander Alexander.Deucher at amd.com
Tue Feb 6 22:42:05 UTC 2018


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

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

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

Change-Id: I10030e83d63b2c27bfd16b64178e4f07c13addfa
Signed-off-by: Shaoyun Liu <Shaoyun.Liu at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
index 0a1868b..785fb78 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -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
amd-gfx at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20180206/a9d30ec8/attachment.html>


More information about the amd-gfx mailing list