<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>after you removed this interface, don't forget to call thos "xx_detect_hw_virtualization" in head of xx_set_ip_blocks() routine</p>
<p><br>
</p>
<p>e.g. CI also need its "adev->virt.caps" with flag of "<font size="2"><span style="font-size:10pt">AMDGPU_PASSTHROUGH_MODE</span></font>"<br>
</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:49<br>
<b>收件人:</b> amd-gfx@lists.freedesktop.org<br>
<b>抄送:</b> Yu, Xiangliang<br>
<b>主题:</b> [PATCH 2/2] drm/amdgpu: remove detect_hw_virtualization interface</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Don't use the interface anymore, remove it.<br>
<br>
Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com><br>
---<br>
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 --<br>
drivers/gpu/drm/amd/amdgpu/cik.c | 7 -------<br>
drivers/gpu/drm/amd/amdgpu/si.c | 7 -------<br>
3 files changed, 16 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h<br>
index b7d520fc..13c30ab 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h<br>
@@ -1192,7 +1192,6 @@ struct amdgpu_asic_funcs {<br>
bool (*read_disabled_bios)(struct amdgpu_device *adev);<br>
bool (*read_bios_from_rom)(struct amdgpu_device *adev,<br>
u8 *bios, u32 length_bytes);<br>
- void (*detect_hw_virtualization) (struct amdgpu_device *adev);<br>
int (*read_register)(struct amdgpu_device *adev, u32 se_num,<br>
u32 sh_num, u32 reg_offset, u32 *value);<br>
void (*set_vga_state)(struct amdgpu_device *adev, bool state);<br>
@@ -1626,7 +1625,6 @@ amdgpu_get_sdma_instance(struct amdgpu_ring *ring)<br>
#define amdgpu_asic_get_gpu_clock_counter(adev) (adev)->asic_funcs->get_gpu_clock_counter((adev))<br>
#define amdgpu_asic_read_disabled_bios(adev) (adev)->asic_funcs->read_disabled_bios((adev))<br>
#define amdgpu_asic_read_bios_from_rom(adev, b, l) (adev)->asic_funcs->read_bios_from_rom((adev), (b), (l))<br>
-#define amdgpu_asic_detect_hw_virtualization(adev) (adev)->asic_funcs->detect_hw_virtualization((adev))<br>
#define amdgpu_asic_read_register(adev, se, sh, offset, v)((adev)->asic_funcs->read_register((adev), (se), (sh), (offset), (v)))<br>
#define amdgpu_gart_flush_gpu_tlb(adev, vmid) (adev)->gart.gart_funcs->flush_gpu_tlb((adev), (vmid))<br>
#define amdgpu_gart_set_pte_pde(adev, pt, idx, addr, flags) (adev)->gart.gart_funcs->set_pte_pde((adev), (pt), (idx), (addr), (flags))<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/cik.c b/drivers/gpu/drm/amd/amdgpu/cik.c<br>
index 3793a04..d615d64 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/cik.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/cik.c<br>
@@ -1625,17 +1625,10 @@ static uint32_t cik_get_rev_id(struct amdgpu_device *adev)<br>
>> CC_DRM_ID_STRAPS__ATI_REV_ID__SHIFT;<br>
}<br>
<br>
-static void cik_detect_hw_virtualization(struct amdgpu_device *adev)<br>
-{<br>
- if (is_virtual_machine()) /* passthrough mode */<br>
- adev->virt.caps |= AMDGPU_PASSTHROUGH_MODE;<br>
-}<br>
-<br>
static const struct amdgpu_asic_funcs cik_asic_funcs =<br>
{<br>
.read_disabled_bios = &cik_read_disabled_bios,<br>
.read_bios_from_rom = &cik_read_bios_from_rom,<br>
- .detect_hw_virtualization = cik_detect_hw_virtualization,<br>
.read_register = &cik_read_register,<br>
.reset = &cik_asic_reset,<br>
.set_vga_state = &cik_vga_set_state,<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/si.c b/drivers/gpu/drm/amd/amdgpu/si.c<br>
index 6a85daa..bde82fa 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/si.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/si.c<br>
@@ -1135,16 +1135,9 @@ static int si_set_uvd_clocks(struct amdgpu_device *adev, u32 vclk, u32 dclk)<br>
return 0;<br>
}<br>
<br>
-static void si_detect_hw_virtualization(struct amdgpu_device *adev)<br>
-{<br>
- if (is_virtual_machine()) /* passthrough mode */<br>
- adev->virt.caps |= AMDGPU_PASSTHROUGH_MODE;<br>
-}<br>
-<br>
static const struct amdgpu_asic_funcs si_asic_funcs =<br>
{<br>
.read_disabled_bios = &si_read_disabled_bios,<br>
- .detect_hw_virtualization = si_detect_hw_virtualization,<br>
.read_register = &si_read_register,<br>
.reset = &si_asic_reset,<br>
.set_vga_state = &si_vga_set_state,<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>