aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd
diff options
context:
space:
mode:
authorLijo Lazar <[email protected]>2025-06-13 12:31:29 +0000
committerAlex Deucher <[email protected]>2025-06-18 16:19:21 +0000
commit9750ad5aee4cf24b03dbd3baf475a0840bc0bcea (patch)
tree5c7f9364b840f1095460d3f3db755bc85a648865 /drivers/gpu/drm/amd
parentdrm/amdgpu: Deprecate xgmi_link_speed enum (diff)
downloadkernel-9750ad5aee4cf24b03dbd3baf475a0840bc0bcea.tar.gz
kernel-9750ad5aee4cf24b03dbd3baf475a0840bc0bcea.zip
drm/amdgpu: Add xgmi API to set max speed/width
Add an API to set the max possible xgmi speed/width. Signed-off-by: Lijo Lazar <[email protected]> Reviewed-by: Asad Kamal <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c7
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
index 6f9997198518..1ede308a7c67 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
@@ -1786,3 +1786,10 @@ void amdgpu_xgmi_early_init(struct amdgpu_device *adev)
break;
}
}
+
+void amgpu_xgmi_set_max_speed_width(struct amdgpu_device *adev,
+ uint16_t max_speed, uint8_t max_width)
+{
+ adev->gmc.xgmi.max_speed = max_speed;
+ adev->gmc.xgmi.max_width = max_width;
+}
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.h
index 433d94f52ac3..bba0b26fee8f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.h
@@ -124,4 +124,6 @@ int amdgpu_xgmi_get_ext_link(struct amdgpu_device *adev, int link_num);
void amdgpu_xgmi_early_init(struct amdgpu_device *adev);
uint32_t amdgpu_xgmi_get_max_bandwidth(struct amdgpu_device *adev);
+void amgpu_xgmi_set_max_speed_width(struct amdgpu_device *adev,
+ uint16_t max_speed, uint8_t max_width);
#endif