diff options
author | Trigger Huang <Trigger.Huang@amd.com> | 2019-06-11 18:32:14 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-06-11 12:51:38 -0500 |
commit | 4a39ec6ac5f36ff6df7e1f603ea445bd858047fa (patch) | |
tree | fb4e7fee25b9aab174d36db341e479f827a7e6a4 /drivers/gpu/drm/amd/amdgpu | |
parent | 233d87a579b8adcc6da5823fa507ecb6675e7562 (diff) |
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c index 21b5be1ac8ef..d8828a37e43a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c @@ -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) { |