diff options
Diffstat (limited to 'drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c')
| -rw-r--r-- | drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c b/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c index b8d0c70ff668..5de7da75d14a 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c @@ -356,9 +356,11 @@ int smu_cmn_wait_for_response(struct smu_context *smu) * completion of the command, and return back a value from the SMU in * @read_arg pointer. * - * Return 0 on success, -errno on error, if we weren't able to send - * the message or if the message completed with some kind of - * error. See __smu_cmn_reg2errno() for details of the -errno. + * Return 0 on success, -errno when a problem is encountered sending + * message or receiving reply. If there is a PCI bus recovery or + * the destination is a virtual GPU which does not allow this message + * type, the message is simply dropped and success is also returned. + * See __smu_cmn_reg2errno() for details of the -errno. * * If we weren't able to send the message to the SMU, we also print * the error to the standard log. @@ -495,7 +497,7 @@ int smu_cmn_to_asic_specific_index(struct smu_context *smu, return mapping.map_to; case CMN2ASIC_MAPPING_WORKLOAD: - if (index > PP_SMC_POWER_PROFILE_CUSTOM || + if (index > PP_SMC_POWER_PROFILE_WINDOW3D || !smu->workload_map) return -EINVAL; @@ -579,6 +581,17 @@ bool smu_cmn_clk_dpm_is_enabled(struct smu_context *smu, case SMU_SOCCLK: feature_id = SMU_FEATURE_DPM_SOCCLK_BIT; break; + case SMU_VCLK: + case SMU_VCLK1: + feature_id = SMU_FEATURE_DPM_VCLK_BIT; + break; + case SMU_DCLK: + case SMU_DCLK1: + feature_id = SMU_FEATURE_DPM_DCLK_BIT; + break; + case SMU_FCLK: + feature_id = SMU_FEATURE_DPM_FCLK_BIT; + break; default: return true; } @@ -969,6 +982,17 @@ int smu_cmn_get_metrics_table(struct smu_context *smu, return 0; } +int smu_cmn_get_combo_pptable(struct smu_context *smu) +{ + void *pptable = smu->smu_table.combo_pptable; + + return smu_cmn_update_table(smu, + SMU_TABLE_COMBO_PPTABLE, + 0, + pptable, + false); +} + void smu_cmn_init_soft_gpu_metrics(void *table, uint8_t frev, uint8_t crev) { struct metrics_table_header *header = (struct metrics_table_header *)table; |
