rpm-regulator: unprepare the clock when disabling it

This commit make massive locking changes which cause kernel
panics (scheduling in an atomic context) and a small change
to actually unprepare the tcxo clock.  Manually apply the
small change.

commit d86ca8a2805349c75b84b27f42c4644caf9a8647
Author: David Collins <collinsd@codeaurora.org>
Date:   Wed Oct 17 17:02:11 2012 -0700

    msm: rpm-regulator: Replace spinlocks with mutex locks

    All calls of rpm_vreg_set_voltage() now take place in process
    context.  Clock driver code on all targets has been written so
    that atomic regulator control is no longer needed.

    Refactor the rpm-regulator driver so that a mutex locks are used
    in place of a spinlocks for sleep-selectable regulators which are
    controlled via the rpm_vreg_set_voltage() function.

    At the same time, move clk_prepare() and clk_unprepare calls in
    the TCXO workaround so that these functions are correctly called
    during each workaround invocation.  This is needed so that TCXO
    isn't kept on forever after a single clk_prepare() call.

    Change-Id: I07caed041dac6da073a0644271df2227b6c5a96e
    Signed-off-by: David Collins <collinsd@codeaurora.org>
monarudo-display: panel_power: order of operations based on m7

The M7 display has basically the same set of operations, but they
are performed in a slightly different order with different sleep
values.

Move code around and change the sleeps to match how the M7 turns
the panel power on and off.
monarudo-display: initialize the writeback devices properly

This is taken from the M7 kernel.
monarudo-display: do display_on like the m7 instead of our hacky way

Conflicts:
	arch/arm/mach-msm/board-monarudo-display.c

Conflicts:
	arch/arm/mach-msm/board-monarudo-display.c
msm_fb: remove the monarudo display_on hack

Now that the board-monarudo-display code is turning the display on
correctly, we no longer need these changes to the real fb code.
monarudo-display: change min pwm for backlight

The m7 kernel has some special code for backlights below 21.
To try to fix flickering issues, bump our min up to 21 so that
none of the special code (if it were required) would matter.

I don't think that this is really necessary, so we can try
reverting it later.
monarudo-display: improve the gpio / display handling

* Pull repeated code into a common helper function to make things
  clearer (backlight_gpio_enable)
* Add locking around the display operations.  This shouldn't be
  required but the performance impact is neglible and it can protect
  us if ther are race conditions turning on/off/backlight.
* Add a sleep of 1ms after turning the backlight gpio on/off.
  This matches the gpio on code of the M7

This combination of changes fixes a problem where the backlight
doesn't always get set after moving to the correct display_on
handling (previously it would occasionally end up set to a very
low backlight).

These changes and the related changes based on the M7 kernel may
or may not help improve the flickering issue.  It is too early
to tell.
Merge pull request #27 from crpalmer/flicker

Flicker
video: compilation problem with gcc 4.7

Change-Id: I8089a243e703fa594eb434f5a4c0f12fca9d114c
Fix linaro uninitialized warnings
Linaro -O3 warnings

Conflicts:
	block/bfq-iosched.c

Change-Id: I850b665c6ba3fe4e3c0eaad67fbb2dd4c3ea2c87
Linaro -O3: disable -O3 for kernel/workqueue.c

It reports an array out of bounds warning and if I disable the
warning, I am seeing crashes related to workqueues.  Disable the
optimization as it appears to be incorrectly optimizing it.
Fix linaro -O3 warning (incorrect code hacked to be equivalent)
kernel/workqueue.c: avoid array subscript above array boundaries

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
Re-enable -O3 optimization for kernel/workqueue.c
Merge pull request #28 from crpalmer/cm-10.2-linaro

dlx: update for android 4.3
msm: kgsl: Always resume the GPU regardless of its state

Make sure we resume the GPU regardless of its current
state. If the device is not in suspend state restart the
device and  print an error message.

Change-Id: I9e71cbe27d360dc06513c54f3a734aaea5b10d2b
Signed-off-by: Suman Tatiraju <sumant@codeaurora.org>
msm: kgsl: Don't hold process list global mutex in process private create

Don't hold process list global mutex for long. Instead make
use of process specific spin_lock() to serialize access
to process private structure while creating it. Holding
process list global mutex could lead to deadlocks as other
functions depend on it.

Change-Id: I4f60737393efa2001597f0222aa6fe19fb6a07c5
Signed-off-by: Harsh Vardhan Dwivedi <hdwivedi@codeaurora.org>
Signed-off-by: Ananta Kishore K <akollipa@codeaurora.org>
kgsl: remove error messages to ease merging of M7 changes

These error messages cause merge conflicts when trying to merge
in a large number of commits from the M7 kernel that were added
for CM 10.2.

Change-Id: Ic1b26be714ba4dc2f1c3c2d32b166e9d85f25fad
gpu: remove dummy function kgsl_get_alloc_size left over from HTC

Change-Id: I7bfa1f2c9430c57e8a638809eb209989e21d18b8