summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Zhang <Jack.Zhang1@amd.com>2019-12-02 18:41:36 +0800
committerAlex Deucher <alexander.deucher@amd.com>2019-12-03 11:07:38 -0500
commit96358810c66a35b15303c4c2dd0ee48f223c221e (patch)
treeef5f208f641043f33d964c55ee10a9d83218086f
parenta501e22c8e36934b2d901b039b1c59c948886c90 (diff)
downloadlinux-next-96358810c66a35b15303c4c2dd0ee48f223c221e.tar.gz
linux-next-96358810c66a35b15303c4c2dd0ee48f223c221e.zip
amd/amdgpu/sriov swSMU disable for sriov
For boards greater than ARCTURUS, and under sriov platform, swSMU is not supported because smu ip block is commented at guest driver. Generally for sriov, initialization of smu is moved to host driver. Thus, smu sw_init and hw_init will not be executed at guest driver. Without sw structure being initialized in guest driver, swSMU cannot declare to be supported. Signed-off-by: Jack Zhang <Jack.Zhang1@amd.com> Reviewed-by: Kevin Wang <kevin1.wang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/powerplay/amdgpu_smu.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
index 98691d41a4e7..0cc37cfe6eb0 100644
--- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
@@ -530,9 +530,12 @@ bool is_support_sw_smu(struct amdgpu_device *adev)
{
if (adev->asic_type == CHIP_VEGA20)
return (amdgpu_dpm == 2) ? true : false;
- else if (adev->asic_type >= CHIP_ARCTURUS)
- return true;
- else
+ else if (adev->asic_type >= CHIP_ARCTURUS) {
+ if (amdgpu_sriov_vf(adev))
+ return false;
+ else
+ return true;
+ } else
return false;
}