Commit dd1d82c0 authored by Alex Deucher's avatar Alex Deucher

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: default avatarLijo Lazar <lijo.lazar@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Cc: Lee Jones <lee.jones@linaro.org>
Reviewed-by: default avatarLee Jones <lee.jones@linaro.org>
parent c1b63b4b
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment