drm/amd/pm: Set no fan control flag as needed.

For GPUs that don't support fan control, set the no fan control flag so
that they don't appear in hwmon sensors.

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Lijo Lazar 2020-12-09 21:06:16 +08:00 committed by Alex Deucher
parent d02692ae0d
commit 73ab8efc7f
1 changed files with 4 additions and 0 deletions

View File

@ -1028,6 +1028,10 @@ static int smu_sw_init(void *handle)
return ret; return ret;
} }
/* If there is no way to query fan control mode, fan control is not supported */
if (!smu->ppt_funcs->get_fan_control_mode)
smu->adev->pm.no_fan = true;
return 0; return 0;
} }