<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Arial;font-size:10pt;color:#0078D7;margin:15pt;" align="Left">
[AMD Official Use Only - Internal Distribution Only]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Series is:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Reviewed-by: Alex Deucher <alexander.deucher@amd.com><br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Felix Kuehling <Felix.Kuehling@amd.com><br>
<b>Sent:</b> Monday, August 24, 2020 10:21 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Lin, Amber <Amber.Lin@amd.com>; Shikre, Divya <DivyaUday.Shikre@amd.com><br>
<b>Subject:</b> [PATCH 1/2] drm/amdkfd: call amdgpu_amdkfd_get_unique_id directly</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">No need to use a function pointer because the implementation is not<br>
ASIC-specific. This fixes missing support due to a missing function<br>
pointer on Arcturus.<br>
<br>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com><br>
---<br>
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c | 1 -<br>
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c  | 1 -<br>
 drivers/gpu/drm/amd/amdkfd/kfd_device.c            | 3 +--<br>
 drivers/gpu/drm/amd/include/kgd_kfd_interface.h    | 4 ----<br>
 4 files changed, 1 insertion(+), 8 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c<br>
index b872cdb0b705..cef2ed767299 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c<br>
@@ -778,5 +778,4 @@ const struct kfd2kgd_calls gfx_v10_kfd2kgd = {<br>
                         get_atc_vmid_pasid_mapping_info,<br>
         .set_vm_context_page_table_base = set_vm_context_page_table_base,<br>
         .get_hive_id = amdgpu_amdkfd_get_hive_id,<br>
-       .get_unique_id = amdgpu_amdkfd_get_unique_id,<br>
 };<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c<br>
index 64fdb6a81c47..e5592548b588 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c<br>
@@ -729,5 +729,4 @@ const struct kfd2kgd_calls gfx_v9_kfd2kgd = {<br>
                         kgd_gfx_v9_get_atc_vmid_pasid_mapping_info,<br>
         .set_vm_context_page_table_base = kgd_gfx_v9_set_vm_context_page_table_base,<br>
         .get_hive_id = amdgpu_amdkfd_get_hive_id,<br>
-       .get_unique_id = amdgpu_amdkfd_get_unique_id,<br>
 };<br>
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c<br>
index b15b620e731b..5ffd03685722 100644<br>
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c<br>
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c<br>
@@ -715,8 +715,7 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd,<br>
         if (kfd->kfd2kgd->get_hive_id)<br>
                 kfd->hive_id = kfd->kfd2kgd->get_hive_id(kfd->kgd);<br>
 <br>
-       if (kfd->kfd2kgd->get_unique_id)<br>
-               kfd->unique_id = kfd->kfd2kgd->get_unique_id(kfd->kgd);<br>
+       kfd->unique_id = amdgpu_amdkfd_get_unique_id(kfd->kgd);<br>
 <br>
         if (kfd_interrupt_init(kfd)) {<br>
                 dev_err(kfd_device, "Error initializing interrupts\n");<br>
diff --git a/drivers/gpu/drm/amd/include/kgd_kfd_interface.h b/drivers/gpu/drm/amd/include/kgd_kfd_interface.h<br>
index a3c238c39ef5..017f97394344 100644<br>
--- a/drivers/gpu/drm/amd/include/kgd_kfd_interface.h<br>
+++ b/drivers/gpu/drm/amd/include/kgd_kfd_interface.h<br>
@@ -214,8 +214,6 @@ struct tile_config {<br>
  *<br>
  * @get_hive_id: Returns hive id of current  device,  0 if xgmi is not enabled<br>
  *<br>
- * @get_unique_id: Returns uuid id of current  device<br>
- * <br>
  * This structure contains function pointers to services that the kgd driver<br>
  * provides to amdkfd driver.<br>
  *<br>
@@ -291,8 +289,6 @@ struct kfd2kgd_calls {<br>
                         uint32_t vmid, uint64_t page_table_base);<br>
         uint32_t (*read_vmid_from_vmfault_reg)(struct kgd_dev *kgd);<br>
         uint64_t (*get_hive_id)(struct kgd_dev *kgd);<br>
-       uint64_t (*get_unique_id)(struct kgd_dev *kgd);<br>
-<br>
 };<br>
 <br>
 #endif  /* KGD_KFD_INTERFACE_H_INCLUDED */<br>
-- <br>
2.28.0<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7Calexander.deucher%40amd.com%7Cf72e48fa1b804fd1a9bc08d84839073a%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637338757068577923&amp;sdata=GVcMLE70p%2BNa%2BfGIVokWqYOMCa2R3LXEBfoM0DWVC38%3D&amp;reserved=0">https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7Calexander.deucher%40amd.com%7Cf72e48fa1b804fd1a9bc08d84839073a%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637338757068577923&amp;sdata=GVcMLE70p%2BNa%2BfGIVokWqYOMCa2R3LXEBfoM0DWVC38%3D&amp;reserved=0</a><br>
</div>
</span></font></div>
</div>
</body>
</html>