]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amdgpu: Add xgmi API to set max speed/width
authorLijo Lazar <lijo.lazar@amd.com>
Fri, 13 Jun 2025 12:31:29 +0000 (18:01 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 18 Jun 2025 16:19:21 +0000 (12:19 -0400)
Add an API to set the max possible xgmi speed/width.

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Asad Kamal <asad.kamal@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.h

index 6f9997198518b551db63f64e631d59a3393a15ba..1ede308a7c677396888677e3a90eed372a4d1352 100644 (file)
@@ -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;
+}
index 433d94f52ac3ade976441012b7da446078421f5f..bba0b26fee8f10c9cc126d6176cb7b58d7fb14e7 100644 (file)
@@ -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