]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/amd/include: Add get_hive_id interface in kfd2kgd
authorShaoyun Liu <Shaoyun.Liu@amd.com>
Fri, 6 Jul 2018 15:26:08 +0000 (11:26 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 11 Sep 2018 03:48:02 +0000 (22:48 -0500)
KFD need to get hive id from amdgpu to build up the XGMI topology

Signed-off-by: Shaoyun Liu <Shaoyun.Liu@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/include/kgd_kfd_interface.h

index 31c52c116e20c8c3666d5b5891ac194345dd1bfb..cb4deb28bb7f3a42af85cb43589ab5e9e85c5fa0 100644 (file)
@@ -313,6 +313,8 @@ struct tile_config {
  * @set_compute_idle: Indicates that compute is idle on a device. This
  * can be used to change power profiles depending on compute activity.
  *
+ * @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.
  *
@@ -438,6 +440,9 @@ struct kfd2kgd_calls {
        void (*gpu_recover)(struct kgd_dev *kgd);
 
        void (*set_compute_idle)(struct kgd_dev *kgd, bool idle);
+
+       uint64_t (*get_hive_id)(struct kgd_dev *kgd);
+
 };
 
 /**