mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-07 22:08:33 -04:00
drm/amd/pm: unified smu feature cap for vcn reset
unified vcn reset smu feature cap Signed-off-by: Yang Wang <kevinyang.wang@amd.com> Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -4144,12 +4144,7 @@ int smu_reset_sdma(struct smu_context *smu, uint32_t inst_mask)
|
||||
|
||||
bool smu_reset_vcn_is_supported(struct smu_context *smu)
|
||||
{
|
||||
bool ret = false;
|
||||
|
||||
if (smu->ppt_funcs && smu->ppt_funcs->reset_vcn_is_supported)
|
||||
ret = smu->ppt_funcs->reset_vcn_is_supported(smu);
|
||||
|
||||
return ret;
|
||||
return smu_feature_cap_test(smu, SMU_FEATURE_CAP_ID__VCN_RESET);
|
||||
}
|
||||
|
||||
int smu_reset_vcn(struct smu_context *smu, uint32_t inst_mask)
|
||||
|
||||
@@ -531,6 +531,7 @@ enum smu_fw_status {
|
||||
enum smu_feature_cap_id {
|
||||
SMU_FEATURE_CAP_ID__LINK_RESET = 0,
|
||||
SMU_FEATURE_CAP_ID__SDMA_RESET,
|
||||
SMU_FEATURE_CAP_ID__VCN_RESET,
|
||||
SMU_FEATURE_CAP_ID__COUNT,
|
||||
};
|
||||
|
||||
@@ -1438,10 +1439,6 @@ struct pptable_funcs {
|
||||
* @reset_vcn: message SMU to soft reset vcn instance.
|
||||
*/
|
||||
int (*dpm_reset_vcn)(struct smu_context *smu, uint32_t inst_mask);
|
||||
/**
|
||||
* @reset_vcn_is_supported: Check if support resets vcn.
|
||||
*/
|
||||
bool (*reset_vcn_is_supported)(struct smu_context *smu);
|
||||
|
||||
/**
|
||||
* @get_ecc_table: message SMU to get ECC INFO table.
|
||||
|
||||
@@ -3235,6 +3235,9 @@ static int smu_v13_0_6_post_init(struct smu_context *smu)
|
||||
if (smu_v13_0_6_reset_sdma_is_supported(smu))
|
||||
smu_feature_cap_set(smu, SMU_FEATURE_CAP_ID__SDMA_RESET);
|
||||
|
||||
if (smu_v13_0_6_reset_vcn_is_supported(smu))
|
||||
smu_feature_cap_set(smu, SMU_FEATURE_CAP_ID__VCN_RESET);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -3917,7 +3920,6 @@ static const struct pptable_funcs smu_v13_0_6_ppt_funcs = {
|
||||
.send_rma_reason = smu_v13_0_6_send_rma_reason,
|
||||
.reset_sdma = smu_v13_0_6_reset_sdma,
|
||||
.dpm_reset_vcn = smu_v13_0_6_reset_vcn,
|
||||
.reset_vcn_is_supported = smu_v13_0_6_reset_vcn_is_supported,
|
||||
.post_init = smu_v13_0_6_post_init,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user