]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/commit
thermal: pid_gov: check for trip hyst
authorSrikar Srimath Tirumala <srikars@nvidia.com>
Wed, 14 Dec 2016 02:45:17 +0000 (18:45 -0800)
committermobile promotions <svcmobile_promotions@nvidia.com>
Thu, 2 Feb 2017 00:18:22 +0000 (16:18 -0800)
commit6ff799b3d2ca37f5879319c03b44f07111e2e8da
tree2a9904df1b92c73fffcae6d8580da179b0668178
parent26ed0c813b89f122bc9ce243b2454d3d69dd76bb
thermal: pid_gov: check for trip hyst

When a trip point has hysteresis defined the governor stops polling
as soon as temperature is < trip_temp. The sensor however accounts for
hysteresis while programming the trip points and hence triggers the
high temp trip only when temperature goes < (trip_temp - hysteresis).
Since the governor has stopped polling at this point, throttling
doesn't kick in when temperature becomes > trip_temp unless it first
goes < (trip_temp - hysteresis).

Fix this by accounting for trip temp hysteresis while calculating when
to stop the polling.

Bug 200261601
Bug 1803579
Bug 200262610

Change-Id: Ibaa72e334852f71af3cce17ee1b60f9bb7a618d6
Signed-off-by: Srikar Srimath Tirumala <srikars@nvidia.com>
Reviewed-on: http://git-master/r/1283037
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: Navneet Kumar <navneetk@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Longnecker <mlongnecker@nvidia.com>
drivers/thermal/pid_thermal_gov.c