<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
{margin-top:0;
margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi Xiangliang<br>
</p>
<p><br>
</p>
<p>please change as below accordingly:<br>
</p>
<p>1, call "<font size="2"><span style="font-size:10pt">vi_detect_hw_virtualization</span></font>" in vi_set_ip_blocks directly
<br>
</p>
<p>2, drop below changes:</p>
<p><font size="2"><span style="font-size:10pt">+ if (amdgpu_sriov_vf(adev)) {<br>
+ amdgpu_ip_block_add(adev, &vi_common_ip_block);<br>
+ amdgpu_ip_block_add(adev, &gmc_v8_5_ip_block);<br>
+ amdgpu_ip_block_add(adev, &tonga_ih_ip_block);<br>
+ amdgpu_ip_block_add(adev, &amdgpu_pp_ip_block);<br>
+ amdgpu_ip_block_add(adev, &dce_virtual_ip_block);<br>
+ amdgpu_ip_block_add(adev, &gfx_v8_0_ip_block);<br>
+ amdgpu_ip_block_add(adev, &sdma_v3_0_ip_block);<br>
+ }</span></font></p>
<p><br>
</p>
<p>since some ip version is different between VI (e.g. FIJI use gmc_v8_5 and tonga use v8_0, so your change at last increase more lines, we'll finally support TONGA/FIJI/Ellesmere for SRIOV)</p>
<p><br>
</p>
<p>BR Monk<br>
</p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>发件人:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> 代表 Xiangliang Yu <Xiangliang.Yu@amd.com><br>
<b>发送时间:</b> 2017年1月8日 11:12:35<br>
<b>收件人:</b> amd-gfx@lists.freedesktop.org<br>
<b>抄送:</b> Yu, Xiangliang<br>
<b>主题:</b> [PATCH 1/2] drm/amdgpu/vi: move virtualization detection forward</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Move the detection forward into vi_set_ip_blocks function, then<br>
add ip blocks virtualization need if device is VF.<br>
<br>
Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com><br>
---<br>
drivers/gpu/drm/amd/amdgpu/vi.c | 17 ++++++++++++-----<br>
1 file changed, 12 insertions(+), 5 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c<br>
index b2ce7da..580b392 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/vi.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/vi.c<br>
@@ -857,7 +857,6 @@ static const struct amdgpu_asic_funcs vi_asic_funcs =<br>
{<br>
.read_disabled_bios = &vi_read_disabled_bios,<br>
.read_bios_from_rom = &vi_read_bios_from_rom,<br>
- .detect_hw_virtualization = vi_detect_hw_virtualization,<br>
.read_register = &vi_read_register,<br>
.reset = &vi_asic_reset,<br>
.set_vga_state = &vi_vga_set_state,<br>
@@ -1049,10 +1048,6 @@ static int vi_common_early_init(void *handle)<br>
return -EINVAL;<br>
}<br>
<br>
- /* in early init stage, vbios code won't work */<br>
- if (adev->asic_funcs->detect_hw_virtualization)<br>
- amdgpu_asic_detect_hw_virtualization(adev);<br>
-<br>
if (amdgpu_smc_load_fw && smc_enabled)<br>
adev->firmware.smu_load = true;<br>
<br>
@@ -1403,6 +1398,18 @@ static const struct amdgpu_ip_block_version vi_common_ip_block =<br>
<br>
int vi_set_ip_blocks(struct amdgpu_device *adev)<br>
{<br>
+ /* in early init stage, vbios code won't work */<br>
+ vi_detect_hw_virtualization(adev);<br>
+ if (amdgpu_sriov_vf(adev)) {<br>
+ amdgpu_ip_block_add(adev, &vi_common_ip_block);<br>
+ amdgpu_ip_block_add(adev, &gmc_v8_5_ip_block);<br>
+ amdgpu_ip_block_add(adev, &tonga_ih_ip_block);<br>
+ amdgpu_ip_block_add(adev, &amdgpu_pp_ip_block);<br>
+ amdgpu_ip_block_add(adev, &dce_virtual_ip_block);<br>
+ amdgpu_ip_block_add(adev, &gfx_v8_0_ip_block);<br>
+ amdgpu_ip_block_add(adev, &sdma_v3_0_ip_block);<br>
+ }<br>
+<br>
switch (adev->asic_type) {<br>
case CHIP_TOPAZ:<br>
/* topaz has no DCE, UVD, VCE */<br>
-- <br>
2.7.4<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
</div>
</span></font>
</body>
</html>