]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amdgpu/gmc12: Update connected_to_cpu flag
authorHawking Zhang <Hawking.Zhang@amd.com>
Tue, 27 Jan 2026 08:07:19 +0000 (16:07 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 17 Mar 2026 14:32:51 +0000 (10:32 -0400)
Query the host–GPU interface in gmc early init
phase and set xgmi.connected_to_cpu accordingly

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Likun Gao <Likun.Gao@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c

index 75bff46ca5946590674a6a11ee98d568f7819a51..2b5f01f15fac3b428550e5d2611c3270e76ec2a3 100644 (file)
@@ -638,7 +638,8 @@ static int gmc_v12_0_early_init(struct amdgpu_ip_block *ip_block)
 
        if (adev->smuio.funcs &&
            adev->smuio.funcs->is_host_gpu_xgmi_supported)
-               adev->smuio.funcs->is_host_gpu_xgmi_supported(adev);
+               adev->gmc.xgmi.connected_to_cpu =
+                       adev->smuio.funcs->is_host_gpu_xgmi_supported(adev);
 
        switch (amdgpu_ip_version(adev, GC_HWIP, 0)) {
        case IP_VERSION(12, 1, 0):