]> www.infradead.org Git - users/hch/misc.git/commitdiff
drm/amdgpu: skip mgpu fan boost for multi-vf
authorYunxiang Li <Yunxiang.Li@amd.com>
Fri, 25 Jul 2025 16:56:35 +0000 (12:56 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 4 Aug 2025 18:37:27 +0000 (14:37 -0400)
On multi-vf setup if the VM have two vf assigned, perhaps from two
different gpus, mgpu fan boost will fail.

Signed-off-by: Yunxiang Li <Yunxiang.Li@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index 8a9488a986467acd22f70b02d55f721f19387930..5949cc747c9fb85b3773046588bd288af6ea499d 100644 (file)
@@ -3389,7 +3389,7 @@ static int amdgpu_device_enable_mgpu_fan_boost(void)
        for (i = 0; i < mgpu_info.num_dgpu; i++) {
                gpu_ins = &(mgpu_info.gpu_ins[i]);
                adev = gpu_ins->adev;
-               if (!(adev->flags & AMD_IS_APU) &&
+               if (!(adev->flags & AMD_IS_APU || amdgpu_sriov_multi_vf_mode(adev)) &&
                    !gpu_ins->mgpu_fan_enabled) {
                        ret = amdgpu_dpm_enable_mgpu_fan_boost(adev);
                        if (ret)