msm: kgsl: Reset the bus_mod value when power is re-enabled

kgsl_pwrctrl_pwrlevel_change() resets the bus_mod level when the
power level is changed but the power level doesn't get changed
on re-init if constraints are enabled with the net effect of
turning on the bus at a lower level than we would expect.  Reset
bus_mod in  kgsl_pwrctrl_enable() to make sure it always comes
up at the expected level.

Change-Id: Ic0dedbad303cc938d91583b3e3309d232590b975
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm: kgsl: Remove io_fraction as it is no longer used

io_fraction was originally used as a way to influence the CPU
frequency governor.  Due to governor updates and timing changes
no targets use io_fraction now and there is no plan to do so in
the future.

Change-Id: Ib2739393d83a197d18d4446e6afcb889196f479b
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>

Conflicts:
	arch/arm/boot/dts/msm8974pro.dtsi
msm: kgsl: Fix nice level for higher priority GPU start thread

Before, we were actually setting the lowest possible priority.

Change-Id: I3a52de949eee0faea8061dd91ed303fa8231f0d4
kgsl: import bacon driver
msm: kgsl: set the correct max_state

Max_state from the driver should be set to the number of power
levels. The devfreq governor then checks the frequencies from
0 to max_state -1.

Change-Id: I79a6da698ff8bcb2840774ccc5d792b7ddbf126b
Signed-off-by: Suman Tatiraju <sumant@codeaurora.org>
Add gboost

Signed-off-by: flar2 <asegaert@gmail.com>
PM / devfreq: Check for GPU busy time before sending the sample

Sometimes GPU busy time is very low during sampling. Accumulate
the statistics and send them with the next sample.

Change-Id: I77e568b48afc3a4922c7c341d9478705b7ae3a30
Signed-off-by: Suman Tatiraju <sumant@codeaurora.org>
PM / devfreq: Make target flags unique

Overlapping target flags cause both to be set
rather than the intended one.  Make sure the flags
have different values.

Change-Id: Ia4fb9566be7284e57e67be78c32de05cbd11d6f8
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
dt: introduce for_each_available_child_of_node, of_get_next_available_child

Macro for_each_child_of_node() makes it easy to iterate over all of the
children for a given device tree node, including those nodes that are
marked as unavailable (i.e. status = "disabled").

Introduce for_each_available_child_of_node(), which is like
for_each_child_of_node(), but it automatically skips unavailable nodes.
This also requires the introduction of helper function
of_get_next_available_child(), which returns the next available child
node.

Change-Id: I811ff03886518989373a69240c35a9d7de23a2c6
Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Conflicts:
	drivers/of/base.c
dt: introduce of_get_child_by_name to get child node by name

This patch introduces of_get_child_by_name function to get a child node
by its name in a given parent node.

Without this patch each driver code has to iterate the parent and do
a string compare, However having of_get_child_by_name libary function would
avoid code duplication, errors and is more convenient.

Change-Id: Id33184bb9f4b494e7121d7dde719d29206dcad52
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>

Conflicts:
	drivers/of/base.c
msm: mdss: Remove unused HTC power hack code

Change-Id: I72399519444e9271040ecf0c2a3acb2afa41dda9
msm: mdss: Remove HTC's I2C backlight control code

Nothing is using it.

Change-Id: I9c5294608760f4b74b16e142501e446fb12382e9
msm: mdss: Remove HTC's unused backlight config hook

Change-Id: I8b74a13b83f98b19136a42883b2c24531dc7ff62
msm: mdss: Remove unused HTC camera backlight code

Change-Id: Iabd3777bf2e4fb3fb95b510dca4f7db0beb5c03d
msm: mdss: Remove unused HTC color correction code

Change-Id: Ieddb62a7b7d73079ba5a1057c5d8ace63541485f
msm: mdss: Max brightness is constant, remove HTC code

Change-Id: I86ff1c453ef11c3e18361f4fe13870b538354b23
msm: mdss: Remove HTC's PWM control type code

Nothing uses this stuff.

Change-Id: Ib3d36aa3cadc5b4eebea18e38e448ba33b3cc4ad
msm: mdss: Add back comments

Change-Id: Idf27305a863ae592113ab2c03e48219fea03c558
mdss: Fix writeback

Fix retire fence threshold for writeback.
Notify when writeback buf is not available.

Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
mdss: Validate sync timeline object before inc

An earlier commit - 4b7db574f061e13857e3780ceddd24ab0681628b
removed this by mistake. Restore this check.

Bug: 10953656
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>