diff options
| author | Alex Deucher <[email protected]> | 2021-05-27 03:47:02 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2021-05-27 16:33:52 +0000 |
| commit | dd1d82c04e111b5a864638ede8965db2fe6d8653 (patch) | |
| tree | 8802e0cf9925d69a010f032783ddc625003af3a5 | |
| parent | drm/amd/display/modules/hdcp/hdcp_psp: Remove unused function 'mod_hdcp_hdcp1... (diff) | |
| download | kernel-dd1d82c04e111b5a864638ede8965db2fe6d8653.tar.gz kernel-dd1d82c04e111b5a864638ede8965db2fe6d8653.zip | |
drm/amdgpu/swsmu/aldebaran: fix check in is_dpm_running
If smu_cmn_get_enabled_mask() fails, return false to be
consistent with other asics.
Reviewed-by: Lijo Lazar <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Cc: Lee Jones <[email protected]>
Reviewed-by: Lee Jones <[email protected]>
| -rw-r--r-- | drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c index d6ce665baaf3..7a1abb3d6a7a 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c @@ -1368,10 +1368,13 @@ static int aldebaran_usr_edit_dpm_table(struct smu_context *smu, enum PP_OD_DPM_ static bool aldebaran_is_dpm_running(struct smu_context *smu) { - int ret = 0; + int ret; uint32_t feature_mask[2]; unsigned long feature_enabled; + ret = smu_cmn_get_enabled_mask(smu, feature_mask, 2); + if (ret) + return false; feature_enabled = (unsigned long)((uint64_t)feature_mask[0] | ((uint64_t)feature_mask[1] << 32)); return !!(feature_enabled & SMC_DPM_FEATURE); |
