drm/amdgpu: fix pm_load_smu_firmware for SR-IOV

For SR-IOV VF, powerplay may not be supported, in this case,
error '-EINVAL' should not be returned.

Signed-off-by: Trigger Huang <Trigger.Huang@amd.com>
Reviewed-by: Prike Liang <Prike.Liang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Trigger Huang 2019-06-11 18:32:14 +08:00 committed by Alex Deucher
parent 233d87a579
commit 4a39ec6ac5
1 changed files with 3 additions and 0 deletions

View File

@ -2702,6 +2702,9 @@ int amdgpu_pm_load_smu_firmware(struct amdgpu_device *adev, uint32_t *smu_versio
{
int r = -EINVAL;
if (amdgpu_sriov_vf(adev))
return 0;
if (adev->powerplay.pp_funcs && adev->powerplay.pp_funcs->load_firmware) {
r = adev->powerplay.pp_funcs->load_firmware(adev->powerplay.pp_handle);
if (r) {