msm: mdss: Fix check for highest of overlap and prefill bw calc

This check is supposed to be used to get the max between overlap and
prefill bandwidth value. This value is used when calculating the ib
bandwidth value to request when bus bandwidth is updated. Having a value
that is too low results in mdp underrun.

Change-Id: Ie1302737f004d8e030f8d61c75d4301fe99b1069
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
kthread_work: wake up worker only when the worker is idle

If the worker is already executing a work item when another is queued,
we can safely skip wakeup without worrying about stalling queue thus
avoiding waking up the busy worker spuriously.  Spurious wakeups
should be fine but still isn't nice and avoiding it is trivial here.

tj: Updated description.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
msm: thermal: fix init with msm_thermal

 * not using ioctl interface for this in-kernel solution
so prevent msm_thermal-dev to be built
 * use higher frequency points than my N5 driver because
Bacon rarely gets really hot so we don't need to throttle
as heavy
 * re-structure init->register<->exit flow compared to the
N5 code. We don't rely on board init call anymore. Besides
externs are fugly. The rest is on the msm_thermal merge side

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
msm: thermal: add my cleaned up in-kernel driver

 * mostly copy-pasta from the N5
 * thermal-engine daemon is disabled in userspace
 * users can now ajudst the thermal throttle point in sysfs
 * well... it's clean :)
 * stability test responds very well and the device doesn't
heat up too much. On stock thermal solution the device rapidly
reached un-bearable temperature on the back (running stability test)
due to it's weird throttling mechanics (at least from what we can
observe since the code is proprietary) and doesn't cool down easily.
With this solution that doesn't happen.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Version 18