drm/amd/powerplay: Tidy up smu7_fan_ctrl_get_fan_speed_info()
authorTom St Denis <tom.stdenis@amd.com>
Tue, 12 Sep 2017 13:46:40 +0000 (09:46 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 13 Sep 2017 16:10:07 +0000 (12:10 -0400)
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c

index baddb569a8b8283881f8dc8f6d5d87e00927c8b2..a491f1201fdad5cc884916f9fc1c0c9ba1c04f28 100644 (file)
@@ -37,9 +37,8 @@ int smu7_fan_ctrl_get_fan_speed_info(struct pp_hwmgr *hwmgr,
        fan_speed_info->min_percent = 0;
        fan_speed_info->max_percent = 100;
 
-       if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
-                       PHM_PlatformCaps_FanSpeedInTableIsRPM) &&
-               hwmgr->thermal_controller.fanInfo.ucTachometerPulsesPerRevolution) {
+       if (PP_CAP(PHM_PlatformCaps_FanSpeedInTableIsRPM) &&
+           hwmgr->thermal_controller.fanInfo.ucTachometerPulsesPerRevolution) {
                fan_speed_info->supports_rpm_read = true;
                fan_speed_info->supports_rpm_write = true;
                fan_speed_info->min_rpm = hwmgr->thermal_controller.fanInfo.ulMinRPM;
@@ -581,4 +580,4 @@ void pp_smu7_thermal_fini(struct pp_hwmgr *hwmgr)
        phm_destroy_table(hwmgr, &(hwmgr->set_temperature_range));
        phm_destroy_table(hwmgr, &(hwmgr->start_thermal_controller));
        return;
-}
\ No newline at end of file
+}