diff options
| author | Lijo Lazar <[email protected]> | 2025-02-06 11:54:51 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2025-02-27 21:50:04 +0000 |
| commit | 485993e2f1a6bf3d1e8fb5a38c82edd3ae697ad9 (patch) | |
| tree | e9d815afb47bc64233201a5c82a856aefad78e71 /drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.h | |
| parent | drm/amdgpu: Move xgmi definitions to xgmi header (diff) | |
| download | kernel-485993e2f1a6bf3d1e8fb5a38c82edd3ae697ad9.tar.gz kernel-485993e2f1a6bf3d1e8fb5a38c82edd3ae697ad9.zip | |
drm/amdgpu: Add xgmi speed/width related info
Add APIs to initialize XGMI speed, width details and get to max
bandwidth supported. It is assumed that a device only supports same
generation of XGMI links with uniform width.
Signed-off-by: Lijo Lazar <[email protected]>
Reviewed-by: Hawking Zhang <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.h')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.h index 1d4e822652a1..32dabba4062f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.h @@ -25,6 +25,12 @@ #include <drm/task_barrier.h> #include "amdgpu_ras.h" +enum amdgpu_xgmi_link_speed { + XGMI_SPEED_16GT = 16, + XGMI_SPEED_25GT = 25, + XGMI_SPEED_32GT = 32 +}; + struct amdgpu_hive_info { struct kobject kobj; uint64_t hive_id; @@ -91,6 +97,8 @@ struct amdgpu_xgmi { struct ras_common_if *ras_if; bool connected_to_cpu; struct amdgpu_xgmi_ras *ras; + enum amdgpu_xgmi_link_speed max_speed; + uint8_t max_width; }; struct amdgpu_hive_info *amdgpu_get_xgmi_hive(struct amdgpu_device *adev); @@ -118,4 +126,7 @@ int amdgpu_xgmi_request_nps_change(struct amdgpu_device *adev, int amdgpu_get_xgmi_link_status(struct amdgpu_device *adev, int global_link_num); +void amdgpu_xgmi_early_init(struct amdgpu_device *adev); +uint32_t amdgpu_xgmi_get_max_bandwidth(struct amdgpu_device *adev); + #endif |
