drm/amdgpu/sriov: Tonga sriov also need load firmware with smu
authorEmily Deng <Emily.Deng@amd.com>
Mon, 16 Dec 2019 09:19:44 +0000 (17:19 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 18 Dec 2019 21:09:06 +0000 (16:09 -0500)
Fix Tonga sriov load driver fail issue.

Signed-off-by: Emily Deng <Emily.Deng@amd.com>
Reviewd-by Yintian Tao <Yintian.tao@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/powerplay/amd_powerplay.c

index f340175..cc4ef4d 100644 (file)
@@ -1810,7 +1810,8 @@ static int amdgpu_device_fw_loading(struct amdgpu_device *adev)
                }
        }
 
-       r = amdgpu_pm_load_smu_firmware(adev, &smu_version);
+       if (!amdgpu_sriov_vf(adev) || adev->asic_type == CHIP_TONGA)
+               r = amdgpu_pm_load_smu_firmware(adev, &smu_version);
 
        return r;
 }
index 322c201..7293763 100644 (file)
@@ -278,9 +278,6 @@ static int pp_dpm_load_fw(void *handle)
        if (!hwmgr || !hwmgr->smumgr_funcs || !hwmgr->smumgr_funcs->start_smu)
                return -EINVAL;
 
-       if (!hwmgr->not_vf)
-               return 0;
-
        if (hwmgr->smumgr_funcs->start_smu(hwmgr)) {
                pr_err("fw load failed\n");
                return -EINVAL;