diff options
author | Andrey Grodzovsky <andrey.grodzovsky@amd.com> | 2019-03-05 10:39:08 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-03-19 15:36:48 -0500 |
commit | b1fa8c89556e8d704e9a2e014151c47c64f02e06 (patch) | |
tree | 9b3d8a5aa7696eba5c88adf6cade39b506a36163 /drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.h | |
parent | b5dcec9c90fdb3287cd465ee8d3fb00d33e1133d (diff) | |
download | lwn-b1fa8c89556e8d704e9a2e014151c47c64f02e06.tar.gz lwn-b1fa8c89556e8d704e9a2e014151c47c64f02e06.zip |
drm/amdgpu: Add sysfs entries for xgmi hive v2.
For each device a file xgmi_device_id is created.
On the first device a subdirectory named xgmi_hive_info is created,
It contains a file named hive_id and symlinks named node 1-4 linking
to each device in the hive.
v2: Return error codes instead of '-1' and few misspellings.
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-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.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.h index 14bc60664159..24a3b0362f98 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.h @@ -29,8 +29,10 @@ struct amdgpu_hive_info { struct list_head device_list; struct psp_xgmi_topology_info topology_info; int number_devices; - struct mutex hive_lock, - reset_lock; + struct mutex hive_lock, reset_lock; + struct kobject *kobj; + struct device_attribute dev_attr; + struct amdgpu_device *adev; }; struct amdgpu_hive_info *amdgpu_get_xgmi_hive(struct amdgpu_device *adev, int lock); |