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 <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Lee Jones <lee.jones@linaro.org>
This commit is contained in:
Alex Deucher 2021-05-26 23:47:02 -04:00
parent c1b63b4bb4
commit dd1d82c04e
1 changed files with 4 additions and 1 deletions

View File

@ -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);