Skip to content

Commit

Permalink
drm/amdgpu/smu: skip pptable init under sriov
Browse files Browse the repository at this point in the history
sriov does not need to init pptable from amdgpu driver
we finish it from PF

Signed-off-by: Jane Jian <Jane.Jian@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org # 6.1.x
  • Loading branch information
Jane Jian authored and Alex Deucher committed Feb 9, 2023
1 parent 6c1a6d0 commit c6ac406
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit c6ac406

Please sign in to comment.