Skip to content

Commit

Permalink
drm/amdkfd: call amdgpu_amdkfd_get_unique_id directly
Browse files Browse the repository at this point in the history
No need to use a function pointer because the implementation is not
ASIC-specific. This fixes missing support due to a missing function
pointer on Arcturus.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Change-Id: Ia48e62404ac0cacc27f0b9da8430d89716ede2c8
  • Loading branch information
Felix Kuehling authored and Yang Xiong committed Aug 27, 2020
1 parent 2040422 commit 4a78879
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 7 deletions.
1 change: 0 additions & 1 deletion drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c
Original file line number Diff line number Diff line change
Expand Up @@ -1095,5 +1095,4 @@ const struct kfd2kgd_calls gfx_v10_kfd2kgd = {
.clear_address_watch = kgd_gfx_v10_clear_address_watch,
.get_iq_wait_times = kgd_gfx_v10_get_iq_wait_times,
.build_grace_period_packet_info = kgd_gfx_v10_build_grace_period_packet_info,
.get_unique_id = amdgpu_amdkfd_get_unique_id,
};
1 change: 0 additions & 1 deletion drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c
Original file line number Diff line number Diff line change
Expand Up @@ -1079,5 +1079,4 @@ const struct kfd2kgd_calls gfx_v9_kfd2kgd = {
.clear_address_watch = kgd_gfx_v9_clear_address_watch,
.get_iq_wait_times = kgd_gfx_v9_get_iq_wait_times,
.build_grace_period_packet_info = kgd_gfx_v9_build_grace_period_packet_info,
.get_unique_id = amdgpu_amdkfd_get_unique_id,
};
3 changes: 1 addition & 2 deletions drivers/gpu/drm/amd/amdkfd/kfd_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -724,8 +724,7 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd,
if (kfd->kfd2kgd->get_hive_id)
kfd->hive_id = kfd->kfd2kgd->get_hive_id(kfd->kgd);

if (kfd->kfd2kgd->get_unique_id)
kfd->unique_id = kfd->kfd2kgd->get_unique_id(kfd->kgd);
kfd->unique_id = amdgpu_amdkfd_get_unique_id(kfd->kgd);

if (kfd_interrupt_init(kfd)) {
dev_err(kfd_device, "Error initializing interrupts\n");
Expand Down
3 changes: 0 additions & 3 deletions drivers/gpu/drm/amd/include/kgd_kfd_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,6 @@ struct tile_config {
* @build_grace_period_packet_info: build a IQ_WAUT_TIME2 reg value with an
* updated grace period value.
*
* @get_unique_id: Returns uuid id of current device
*
* This structure contains function pointers to services that the kgd driver
* provides to amdkfd driver.
*
Expand Down Expand Up @@ -300,7 +298,6 @@ struct kfd2kgd_calls {
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);
uint64_t (*get_unique_id)(struct kgd_dev *kgd);

void (*enable_debug_trap)(struct kgd_dev *kgd,
uint32_t trap_debug_wave_launch_mode,
Expand Down

0 comments on commit 4a78879

Please sign in to comment.