drm/amdgpu: Packed socket_id to ras feature mask
authorHawking Zhang <Hawking.Zhang@amd.com>
Fri, 29 Dec 2023 06:54:35 +0000 (14:54 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 9 Jan 2024 20:44:13 +0000 (15:44 -0500)
Initialize RAS feature mask bit[31:29] with socket_id.

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c

index 3f7f5c12961d33402833e5ce25d0ec315a35bde3..31823a30dea217b5af3a8a36624a01fab70b48a5 100644 (file)
@@ -2919,6 +2919,11 @@ int amdgpu_ras_init(struct amdgpu_device *adev)
 
        amdgpu_ras_query_poison_mode(adev);
 
+       /* Packed socket_id to ras feature mask bits[31:29] */
+       if (adev->smuio.funcs &&
+           adev->smuio.funcs->get_socket_id)
+               con->features |= ((adev->smuio.funcs->get_socket_id(adev)) << 29);
+
        /* Get RAS schema for particular SOC */
        con->schema = amdgpu_get_ras_schema(adev);