From: Trigger Huang Date: Tue, 11 Jun 2019 10:32:14 +0000 (+0800) Subject: drm/amdgpu: fix pm_load_smu_firmware for SR-IOV X-Git-Tag: v5.3-rc1~22^2~13^2~514 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=4a39ec6ac5f36ff6df7e1f603ea445bd858047fa;p=linux-block.git 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 Reviewed-by: Prike Liang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher --- 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) {