drm/amdgpu: fix pm_load_smu_firmware for SR-IOV
Subsystems (2)
PATCH 1/1 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.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +3 -0
@@ -2709,7 +2709,10 @@ int amdgpu_pm_load_smu_firmware(struct amdgpu_device *adev, uint32_t *smu_versioreturn r; } *smu_version = adev->pm.fw_version; + }else if (amdgpu_sriov_vf (adev)) { + r =0 ; } +return r; }
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1560226110-10201-1-git-send-email-Trigger.Huang-5C7GfCeVMHo@public.gmane.org
Liang, Prike
Reviewed-by Prike LiangThanks,
Prike
Quoted 34 lines
-----Original Message-----
From: Trigger Huang <[email protected]>
Sent: Tuesday, June 11, 2019 12:09 PM
To: [email protected]
Cc: Huang, Trigger <[email protected]>; Liang, Prike <[email protected]>
Subject: [PATCH] drm/amdgpu: fixpm_load_smu_firmwarefor SR-IOVFor SR-IOV VF, powerplay may not be supported, in this case, error '
-EINVAL' should not be returned.Signed-off-by Trigger Huang <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +0
-0@@ -2709,7 +2709,10 @@ int amdgpu_pm_load_smu_firmware(struct
amdgpu_device*adev,uint32_t*smu_versiodrivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +3
-1return r; } *smu_version = adev->pm.fw_version; + }else if (amdgpu_sriov_vf (adev)) { + r =0 ; } +return r; } --
Quoted 1 line
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Huang, Ray
Reviewed-by Huang RuiQuoted 24 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Trigger Huang
Sent: Tuesday, June 11, 2019 12:09 PM
To: [email protected]
Cc: Liang, Prike <[email protected]>; Huang, Trigger <[email protected]>
Subject: [PATCH] drm/amdgpu: fixpm_load_smu_firmwarefor SR-IOVFor SR-IOV VF, powerplay may not be supported, in this case, error '
-EINVAL' should not be returned.Signed-off-by Trigger Huang <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +0
-0@@ -2709,7 +2709,10 @@ int amdgpu_pm_load_smu_firmware(struct
amdgpu_device*adev,uint32_t*smu_versio
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c int amdgpu_pm_load_smu_firmware(struct amdgpu_device *adev, uint32_t *smu_versio · line 2713
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +2
-0return r; } *smu_version = adev->pm.fw_version; + }else if (amdgpu_sriov_vf (adev)) { + r =0 ;
Could you please add the checking at the start of this function:
if (amdgpu_sriov_vf(adev))
return 0;
The code looks better than adding a "else" here.
With that fixed, please add
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +1
-1} +return r; } --2.7.4
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx