drm/amd/powerplay: use hardware fan control if no powerplay fan table
authorEvan Quan <evan.quan@amd.com>
Thu, 27 Jun 2019 03:01:04 +0000 (11:01 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Jul 2019 07:53:43 +0000 (09:53 +0200)
commitec6d8c9e6687868dfd58994b2ea1758fe60f2733
treeb06361cc90a76af5f109ae584b9a1f9b637646d6
parentb6d56f4f6a491d80169c666b64953d8395b47b4b
drm/amd/powerplay: use hardware fan control if no powerplay fan table

commit f78c581e22d4b33359ac3462e8d0504735df01f4 upstream.

Otherwise, you may get divided-by-zero error or corrput the SMU fan
control feature.

Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Tested-by: Slava Abramov <slava.abramov@amd.com>
Acked-by: Slava Abramov <slava.abramov@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c
drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c