drm/amdgpu/smu: skip pptable init under sriov
Subsystems (3)
PATCH 1/1 drm/amdgpu/smu: skip pptable init under sriov
sriov does not need to init pptable from amdgpu driver we finish it from PF
Signed-off-by Jane Jian <[email protected]>
--- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +6 -0
@@ -407,6 +407,9 @@ static int smu_v13_0_0_setup_pptable(struct smu_context *smu)struct amdgpu_device *adev = smu->adev;int ret =0 ; +if (amdgpu_sriov_vf (smu->adev)) +return 0 ; + ret =smu_v13_0_0_get_pptable_from_pmfw (smu, &smu_table->power_play_table, &smu_table->power_play_table_size);
@@ -1257,6 +1260,9 @@ static int smu_v13_0_0_get_thermal_temperature_range(struct smu_context *smu, table_context->power_play_table;PPTable_t *pptable = smu->smu_table.driver_pptable; +if (amdgpu_sriov_vf (smu->adev)) +return 0 ; +if (!range)return -EINVAL ;
Signature · 1 line
2.17.1
Quoted 14 lines · Jane Jian
sriov does not need to init pptable from amdgpu driver we finish it from PF
Signed-off-by Jane Jian <[email protected]>--- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 6 ++++++ 1 file changed, 6 insertions(+)drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +0
-0
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c static int smu_v13_0_0_setup_pptable(struct smu_context *smu) · line 410
Quoted 4 lines
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +1
-0@@ -407,6 +407,9 @@ static int smu_v13_0_0_setup_pptable(struct smu_context *smu)struct amdgpu_device *adev = smu->adev;int ret =0 ; +if (amdgpu_sriov_vf (smu->adev))
Space between if and (.
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c static int smu_v13_0_0_get_thermal_temperature_range(struct smu_context *smu, · line 1263
Quoted 10 lines
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +3
-0+return 0 ; + ret =smu_v13_0_0_get_pptable_from_pmfw (smu, &smu_table->power_play_table, &smu_table->power_play_table_size);@@ -1257,6 +1260,9 @@ static int smu_v13_0_0_get_thermal_temperature_range(struct smu_context *smu, table_context->power_play_table;PPTable_t *pptable = smu->smu_table.driver_pptable; +if (amdgpu_sriov_vf (smu->adev))
Space between if and (.
with those fixed:
Reviewed-by Alex Deucher <[email protected]>
Quoted 8 lines
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +2
-1+return 0 ; +if (!range)return -EINVAL ; --2.17.1