summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.h
diff options
context:
space:
mode:
authorAndrey Grodzovsky <andrey.grodzovsky@amd.com>2018-11-14 15:50:05 -0500
committerAlex Deucher <alexander.deucher@amd.com>2018-11-28 15:55:36 -0500
commited2bf5229c53f20cfbca7a34fcbafa91c3168e1e (patch)
tree7af9e39d1847570e71d23a053b7bf1389a8ce9ac /drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.h
parent5183411b56bde159e5c3172fcb8904f8421c2c38 (diff)
drm/amdgpu: Expose hive adev list and xgmi_mutex
It's needed for device reset of entire hive. v3: Add per hive lock to allow avoiding duplicate resets triggered by multiple members of same hive. Expose amdgpu_hive_info instead of adding getter functions. Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.h
index 85a7263f1f18..6335bfdcc51d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.h
@@ -22,12 +22,15 @@
#ifndef __AMDGPU_XGMI_H__
#define __AMDGPU_XGMI_H__
-/*
- * functions used by amdgpu_xgmi.c
- */
+#include "amdgpu_psp.h"
-struct amdgpu_device;
-struct amdgpu_hive_info;
+struct amdgpu_hive_info {
+ uint64_t hive_id;
+ struct list_head device_list;
+ struct psp_xgmi_topology_info topology_info;
+ int number_devices;
+ struct mutex hive_lock;
+};
struct amdgpu_hive_info *amdgpu_get_xgmi_hive(struct amdgpu_device *adev);
int amdgpu_xgmi_update_topology(struct amdgpu_hive_info *hive, struct amdgpu_device *adev);