Skip to content

Commit 1356bfc

Browse files
Kenneth Fengalexdeucher
authored andcommitted
drm/amd/pm: always pick the pptable from IFWI
always pick the pptable from IFWI on smu v14.0.2/3 Signed-off-by: Kenneth Feng <[email protected]> Reviewed-by: Yang Wang <[email protected]> Signed-off-by: Alex Deucher <[email protected]> (cherry picked from commit 136ce12) Cc: [email protected] # 6.11.x
1 parent a6dd159 commit 1356bfc

File tree

1 file changed

+1
-64
lines changed

1 file changed

+1
-64
lines changed

drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c

Lines changed: 1 addition & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -367,54 +367,6 @@ static int smu_v14_0_2_store_powerplay_table(struct smu_context *smu)
367367
return 0;
368368
}
369369

370-
#ifndef atom_smc_dpm_info_table_14_0_0
371-
struct atom_smc_dpm_info_table_14_0_0 {
372-
struct atom_common_table_header table_header;
373-
BoardTable_t BoardTable;
374-
};
375-
#endif
376-
377-
static int smu_v14_0_2_append_powerplay_table(struct smu_context *smu)
378-
{
379-
struct smu_table_context *table_context = &smu->smu_table;
380-
PPTable_t *smc_pptable = table_context->driver_pptable;
381-
struct atom_smc_dpm_info_table_14_0_0 *smc_dpm_table;
382-
BoardTable_t *BoardTable = &smc_pptable->BoardTable;
383-
int index, ret;
384-
385-
index = get_index_into_master_table(atom_master_list_of_data_tables_v2_1,
386-
smc_dpm_info);
387-
388-
ret = amdgpu_atombios_get_data_table(smu->adev, index, NULL, NULL, NULL,
389-
(uint8_t **)&smc_dpm_table);
390-
if (ret)
391-
return ret;
392-
393-
memcpy(BoardTable, &smc_dpm_table->BoardTable, sizeof(BoardTable_t));
394-
395-
return 0;
396-
}
397-
398-
#if 0
399-
static int smu_v14_0_2_get_pptable_from_pmfw(struct smu_context *smu,
400-
void **table,
401-
uint32_t *size)
402-
{
403-
struct smu_table_context *smu_table = &smu->smu_table;
404-
void *combo_pptable = smu_table->combo_pptable;
405-
int ret = 0;
406-
407-
ret = smu_cmn_get_combo_pptable(smu);
408-
if (ret)
409-
return ret;
410-
411-
*table = combo_pptable;
412-
*size = sizeof(struct smu_14_0_powerplay_table);
413-
414-
return 0;
415-
}
416-
#endif
417-
418370
static int smu_v14_0_2_get_pptable_from_pmfw(struct smu_context *smu,
419371
void **table,
420372
uint32_t *size)
@@ -436,16 +388,12 @@ static int smu_v14_0_2_get_pptable_from_pmfw(struct smu_context *smu,
436388
static int smu_v14_0_2_setup_pptable(struct smu_context *smu)
437389
{
438390
struct smu_table_context *smu_table = &smu->smu_table;
439-
struct amdgpu_device *adev = smu->adev;
440391
int ret = 0;
441392

442393
if (amdgpu_sriov_vf(smu->adev))
443394
return 0;
444395

445-
if (!adev->scpm_enabled)
446-
ret = smu_v14_0_setup_pptable(smu);
447-
else
448-
ret = smu_v14_0_2_get_pptable_from_pmfw(smu,
396+
ret = smu_v14_0_2_get_pptable_from_pmfw(smu,
449397
&smu_table->power_play_table,
450398
&smu_table->power_play_table_size);
451399
if (ret)
@@ -455,16 +403,6 @@ static int smu_v14_0_2_setup_pptable(struct smu_context *smu)
455403
if (ret)
456404
return ret;
457405

458-
/*
459-
* With SCPM enabled, the operation below will be handled
460-
* by PSP. Driver involvment is unnecessary and useless.
461-
*/
462-
if (!adev->scpm_enabled) {
463-
ret = smu_v14_0_2_append_powerplay_table(smu);
464-
if (ret)
465-
return ret;
466-
}
467-
468406
ret = smu_v14_0_2_check_powerplay_table(smu);
469407
if (ret)
470408
return ret;
@@ -2799,7 +2737,6 @@ static const struct pptable_funcs smu_v14_0_2_ppt_funcs = {
27992737
.check_fw_status = smu_v14_0_check_fw_status,
28002738
.setup_pptable = smu_v14_0_2_setup_pptable,
28012739
.check_fw_version = smu_v14_0_check_fw_version,
2802-
.write_pptable = smu_cmn_write_pptable,
28032740
.set_driver_table_location = smu_v14_0_set_driver_table_location,
28042741
.system_features_control = smu_v14_0_system_features_control,
28052742
.set_allowed_mask = smu_v14_0_set_allowed_mask,

0 commit comments

Comments
 (0)