<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>RB as well<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月9日 13:06:07<br>
<b>收件人:</b> amd-gfx@lists.freedesktop.org<br>
<b>抄送:</b> Yu, Xiangliang<br>
<b>主题:</b> [V2 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">Call detection function driectly, so remove the interface.<br>
<br>
V2: ci and si also need to call the detec function.<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 | 3 ++-<br>
drivers/gpu/drm/amd/amdgpu/si.c | 3 ++-<br>
3 files changed, 4 insertions(+), 4 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..da255e5 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/cik.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/cik.c<br>
@@ -1635,7 +1635,6 @@ 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>
@@ -1891,6 +1890,8 @@ static const struct amdgpu_ip_block_version cik_common_ip_block =<br>
<br>
int cik_set_ip_blocks(struct amdgpu_device *adev)<br>
{<br>
+ cik_detect_hw_virtualization(adev);<br>
+<br>
switch (adev->asic_type) {<br>
case CHIP_BONAIRE:<br>
amdgpu_ip_block_add(adev, &cik_common_ip_block);<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/si.c b/drivers/gpu/drm/amd/amdgpu/si.c<br>
index 6a85daa..413a516 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/si.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/si.c<br>
@@ -1144,7 +1144,6 @@ static void si_detect_hw_virtualization(struct amdgpu_device *adev)<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>
@@ -1861,6 +1860,8 @@ static const struct amdgpu_ip_block_version si_common_ip_block =<br>
<br>
int si_set_ip_blocks(struct amdgpu_device *adev)<br>
{<br>
+ si_detect_hw_virtualization(adev);<br>
+<br>
switch (adev->asic_type) {<br>
case CHIP_VERDE:<br>
case CHIP_TAHITI:<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>