<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Alternatively, you could also just return 0 in
<font size="2"><span style="font-size:11pt;">amdgpu_atomfirmware_get_vram_width</span></font>() if emu == 1.  Either way:<br>
</p>
<p style="margin-top:0;margin-bottom:0">Reviewed-by: Alex Deucher <alexander.deucher@amd.com><br>
</p>
<br>
<div style="color: rgb(0, 0, 0);">
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Shaoyun Liu <Shaoyun.Liu@amd.com><br>
<b>Sent:</b> Tuesday, February 6, 2018 5:31 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org<br>
<b>Cc:</b> Liu, Shaoyun<br>
<b>Subject:</b> [PATCH] drm/amdgpu: Avoid get vram info from atom bios on emulation mode</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Change-Id: I10030e83d63b2c27bfd16b64178e4f07c13addfa<br>
Signed-off-by: Shaoyun Liu <Shaoyun.Liu@amd.com><br>
---<br>
 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 3 ++-<br>
 1 file changed, 2 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c<br>
index 0a1868b..785fb78 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c<br>
@@ -707,7 +707,8 @@ static int gmc_v9_0_mc_init(struct amdgpu_device *adev)<br>
         int chansize, numchan;<br>
         int r;<br>
 <br>
-       adev->gmc.vram_width = amdgpu_atomfirmware_get_vram_width(adev);<br>
+       if (amdgpu_emu_mode != 1)<br>
+               adev->gmc.vram_width = amdgpu_atomfirmware_get_vram_width(adev);<br>
         if (!adev->gmc.vram_width) {<br>
                 /* hbm memory channel size */<br>
                 chansize = 128;<br>
-- <br>
1.9.1<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx" id="LPlnk737873" previewremoved="true">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
</div>
</span></font></div>
</div>
</div>
</body>
</html>