drm/amdkfd: call amdgpu_amdkfd_get_hive_id directly
authorFelix Kuehling <Felix.Kuehling@amd.com>
Mon, 24 Aug 2020 14:18:37 +0000 (10:18 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 26 Aug 2020 20:40:18 +0000 (16:40 -0400)
No need to use a function pointer because the implementation is not
ASIC-specific.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10_3.c
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c
drivers/gpu/drm/amd/amdkfd/kfd_device.c
drivers/gpu/drm/amd/include/kgd_kfd_interface.h

index a2cb317..1afa8f1 100644 (file)
@@ -304,5 +304,4 @@ const struct kfd2kgd_calls arcturus_kfd2kgd = {
                                kgd_gfx_v9_get_atc_vmid_pasid_mapping_info,
        .set_vm_context_page_table_base =
                                kgd_gfx_v9_set_vm_context_page_table_base,
-       .get_hive_id = amdgpu_amdkfd_get_hive_id,
 };
index e9aee50..df0aab0 100644 (file)
@@ -776,5 +776,4 @@ const struct kfd2kgd_calls gfx_v10_kfd2kgd = {
        .get_atc_vmid_pasid_mapping_info =
                        get_atc_vmid_pasid_mapping_info,
        .set_vm_context_page_table_base = set_vm_context_page_table_base,
-       .get_hive_id = amdgpu_amdkfd_get_hive_id,
 };
index 7e59e47..e12623a 100644 (file)
@@ -822,7 +822,6 @@ const struct kfd2kgd_calls gfx_v10_3_kfd2kgd = {
        .address_watch_get_offset = address_watch_get_offset_v10_3,
        .get_atc_vmid_pasid_mapping_info = NULL,
        .set_vm_context_page_table_base = set_vm_context_page_table_base_v10_3,
-       .get_hive_id = amdgpu_amdkfd_get_hive_id,
 #if 0
        .enable_debug_trap = enable_debug_trap_v10_3,
        .disable_debug_trap = disable_debug_trap_v10_3,
index 1769cd4..e6aede7 100644 (file)
@@ -726,5 +726,4 @@ const struct kfd2kgd_calls gfx_v9_kfd2kgd = {
        .get_atc_vmid_pasid_mapping_info =
                        kgd_gfx_v9_get_atc_vmid_pasid_mapping_info,
        .set_vm_context_page_table_base = kgd_gfx_v9_set_vm_context_page_table_base,
-       .get_hive_id = amdgpu_amdkfd_get_hive_id,
 };
index 5ffd036..e1cd659 100644 (file)
@@ -712,8 +712,7 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd,
                goto kfd_doorbell_error;
        }
 
-       if (kfd->kfd2kgd->get_hive_id)
-               kfd->hive_id = kfd->kfd2kgd->get_hive_id(kfd->kgd);
+       kfd->hive_id = amdgpu_amdkfd_get_hive_id(kfd->kgd);
 
        kfd->unique_id = amdgpu_amdkfd_get_unique_id(kfd->kgd);
 
index 017f973..fc592f6 100644 (file)
@@ -212,8 +212,6 @@ struct tile_config {
  * IH ring entry. This function allows the KFD ISR to get the VMID
  * from the fault status register as early as possible.
  *
- * @get_hive_id: Returns hive id of current  device,  0 if xgmi is not enabled
- *
  * This structure contains function pointers to services that the kgd driver
  * provides to amdkfd driver.
  *
@@ -288,7 +286,6 @@ struct kfd2kgd_calls {
        void (*set_vm_context_page_table_base)(struct kgd_dev *kgd,
                        uint32_t vmid, uint64_t page_table_base);
        uint32_t (*read_vmid_from_vmfault_reg)(struct kgd_dev *kgd);
-       uint64_t (*get_hive_id)(struct kgd_dev *kgd);
 };
 
 #endif /* KGD_KFD_INTERFACE_H_INCLUDED */