[PATCH] drm/amd/pm: Skip smu_post_init in SRIOV

Jingwen Chen Jingwen.Chen2 at amd.com
Thu Sep 17 08:10:35 UTC 2020


smu_post_init needs to enable SMU feature, while this require
virtualization off. Skip it since this feature is not used in SRIOV.

Signed-off-by: Jingwen Chen <Jingwen.Chen2 at amd.com>
---
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
index 5c4b74f964fc..79163d0ff762 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
@@ -469,10 +469,12 @@ static int smu_late_init(void *handle)
 	if (!smu->pm_enabled)
 		return 0;
 
-	ret = smu_post_init(smu);
-	if (ret) {
-		dev_err(adev->dev, "Failed to post smu init!\n");
-		return ret;
+	if (!amdgpu_sriov_vf(adev)) {
+		ret = smu_post_init(smu);
+		if (ret) {
+			dev_err(adev->dev, "Failed to post smu init!\n");
+			return ret;
+		}
 	}
 
 	ret = smu_set_default_od_settings(smu);
-- 
2.25.1



More information about the amd-gfx mailing list