Revert "acpuclock: fix frequency plan selection for exhilarate"

This reverts commit d601ce54bc375e53e04854a9b7584decf099c435.
Revert "msm8660-common: use MAX_FREQ_LIMIT from cpufreq.h"

This reverts commit d656e8146aebb5af4c43cd9e50923c50bf7f2486.
Revert "msm8660-common: Update frequency tables for I577"

This reverts commit e0c8eeeaa77ddc205d7ede7c9e4283e2d733c144.
msm: rotator: Add proper checks for enabling Fast YUV

For rotator version 2.0 and above, there is support for fast
YUV which gives better rotator performance. However, there are
few constraints related to height under which fast YUV cannot be
enabled when 90 degree rotation is enabled. Make sure
to add proper checks before enabling fast YUV.

Change-Id: Iafd204a6e4ef09e1151d01d8fde35359b7c3b7a5
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
msm: rotator: Enable support for 2-pass fast YUV mode

Add support for 2-pass rotator operation for downscaling
and 90 degree rotation when rotator operates in fast YUV
mode. 2-pass is supported for 420 H2V2 formats.

Change-Id: Ib8ce802a5a8aabe10c88422e3b8d82708c5b05d4
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
msm: rotator: Pass ION flags correctly for 2-pass buffer allocation

With updated ION interface, ION_SECURE needs to be passed as a
separate flag. Also, 2-pass buffer for secure session needs to be
allocated from CP heap instead of non-secure heap.

CRs-fixed: 502038
Change-Id: I8c5f945dc4d90ce640872e2cd0505ac32e82011d
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
msm: rotator: Extend fast YUV invalid checker for 2-pass

For 2-pass mode, we need to check for the fast YUV constraints
separately for both the 1st and 2nd pass. Make change to extend
the fast YUV invalid checker to 2-pass mode.

CRs-fixed: 504007
Change-Id: I7ef96ff29423fbd5cc454e8fd125b4bb1a9d59e1
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Rotator getting stuck leading to fence timeout

Even though cancel_delayed_work should cancel the worker thread
in some race condition it can fail and get scheduled.
To avoid this situation use cancel_delayed_work_sync.
Also rotator_lock mutex need not be unlocked while waiting for isr
as isr does not aquire this mutex for doing its operations.
It is after this unlock of mutex sometimes in race condition rotator
clock is getting disabled via the msm_rotator_rot_clk_work_f

Change-Id: I574aec489fe51ec0e5f7c215c9aba9bb0ec66ffa
Signed-off-by: Justin Philip <jphili@codeaurora.org>
msm: acpuclock-8x60: Add support for 1.7 GHz devices

Add the frequency and voltage data for these new devices and
select it at runtime based on the PTE and PVS eFuse data.

CRs-Fixed: 348555
Change-Id: Id04dd37def56cbbf251a0eb603656805362ee489
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
msm: acpuclock-8x60: Drop "slowest" frequency table

The voltage data in this table is not used. It applied only to
a handful of internal part samples that were never distributed.
Remove it, since it is neither maintained nor useful.

Change-Id: I2a08bd0287a400cfb65666dc3445fd5441d784d1
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
msm: acpuclock-8x60: Optimize CPU voltages on 1.7GHz parts

Hardware characterization shows that these parts can operate reliably
at lower voltages than were previously used. Update the tables to
take advantage of the power savings.

Change-Id: I6aca2da89e343c1588579e7183a0ce375cb9a821
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
msm: acpuclock: Fix error path in multicore targets

Several acpuclock drivers have inherited the same error path bug in
acpuclk_set_rate(). If an invalid cpu is passed as an argument to
these functions, they should return immediately instead of jumping to
the 'out' label, which attempts to unlock a mutex which has never
been acquired.

Change-Id: I47b9709605673a5200caf73a2f2a5086fde63efe
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
samsung: msm: acpuclock-8x60: Add support for 1.7 GHz devices

Change-Id: Ib41fc4472fd9542cd087661019a7139bf722ad1b
power: don't wait for timeout if sys_sync completes early

In some cases the suspend thread is waiting for timer to expire
even if the sync workqueue is empty. So the suspend is taking extra
time.
To avoid this waiting, sending the completion event from
last sync item in workqueue.

CRs-Fixed: 583016

Change-Id: Ia3219e90762ec7f6ad3e7096126832acfd03ed69
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>