ksm: Provide support to use deferred timers for scanner thread

KSM thread to scan pages is getting schedule on definite timeout.
That wakes up CPU from idle state and hence may affect the power
consumption. Provide an optional support to use deferred timer
which suites low-power use-cases.

To enable deferred timers,
$ echo 1 > /sys/kernel/mm/ksm/deferred_timer

Change-Id: I07fe199f97fe1f72f9a9e1b0b757a3ac533719e8
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
msm: mdss: fix race condition between shutdown thread and fb ioctl

Currently all entires into fb driver are synchronized with shutdown
context except fb ioctl context. fb ioctl is an asynchronous entry to
fb driver which can be called simultaneously from two different user
processes. Synchronize these fb ioctls and shutdown context to prevent
race condition.

Change-Id: I81ce48159fce69caabc3336d70df2bd15c4ee44b
CRs-Fixed: 640199
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
Merge "msm: mdp3: underflow color adjust support on 8x10"
ARM: dts: msm: Increase the drive strengths for MSM8926

With the 10mA random CRC issues are seen on SD card.
Raise the drive strength to 16mA address this.

CRs-Fixed: 641618
Change-Id: If73c175ed50bfb220b9a8a3f018e5c71126fca1d
Signed-off-by: Pratibhasagar V <pratibha@codeaurora.org>
mmc: core: Exit clock scaling prior to removing the card

After removing the SD/MMC 'card' from the driver model we
are cancelling the pending clock scaling work which accesses
card->dev. This could cause NULL pointer issue as the card
is already removed.

CRs-Fixed: 640344
Change-Id: I8c5ee817e3f116dedf0bf4fb51eb6b70d52467b7
Signed-off-by: Pratibhasagar V <pratibha@codeaurora.org>
Merge "ARM: dts: msm: Increase the drive strengths for MSM8926"
Merge "mmc: core: Exit clock scaling prior to removing the card"
msm: camera: isp: Use proportional UB slicing and 7 WM

The proportional slicing is used for determining Unified Buffer sizes
for each write master. This allows more efficiend use of UBs and
avoiding overflows.
Also this removes the need to set maximum number of write masters to
less than all available.

Change-Id: I774220268c96275b84d5fe265d68669b9fda4294
Signed-off-by: Petar Sivenov <psiven@codeaurora.org>
msm: camera: Fix long overflow on the pix clk

Using unsigned long to avoid overflow since
pix clk frequencies might cause long overflow.
Fix this by using unsigned long instead of long.

Change-Id: Iaf184de26d8ae689efa297096be9f01db84faded
Signed-off-by: Peter Liu <pingchie@codeaurora.org>
msm: camera: Make ISP and camera kernel not interruptible

Change wait_event_interruptible_timeout to wait_completion_timeout
in camera kernel and change wait_completion_timeout_interruptible
to wait_event_timeout to avoid getting interrupts from kernel.

Change-Id: Ibf17d0f11ed705e68294257a90f7770676e63cbb
Signed-off-by: Yiduo Wang <yiduow@codeaurora.org>
t-base-202: Check if kzalloc() returns a NULL pointer.

Change-Id: Ia510ce52875a2dab45b34b732a3008911d80100a
Signed-off-by: Oana Medvesan <medvesan.oana@gmail.com>
Signed-off-by: Hariprasad Dhalinarasimha <hnamgund@codeaurora.org>
Acked-by: Tony Hamilton <tonyh@qti.qualcomm.com>
msm_serial_hs: Programing the TX FIFO watermark level to 4

As per the Hardware Data Book recommendation the
TX FIFO watermark level should not be zero.
Hence programing the TX FIFO watermark level to
4 to avoid corner cases

CRs-Fixed: 621214
Change-Id: Icee051bd37c389f31a010b51ffaf5d46854306b5
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
Signed-off-by: Dilip Kota <c_dkota@codeaurora.org>
msm: vidc: Update vb2q buffer sizes

Currenttly is updating vb2q buffer size on CAPTURE port.
only.This change will update the buffer size on OUTPORT port
along with CAPTURE port.

Change-Id: Ieb0a898ae5b012f3bf1a1073d2ddf5ce72647252
CRs-Fixed: 621134
Signed-off-by: Prasad Nallani <pnalla@codeaurora.org>
msm: vidc: return EBUSY when hw is overloaded

Component reports hw error to client immediately in
the same thread after stream on failure and blocks
subsequence errors to client. Therefore, the async
v4l2 event "V4L2_EVENT_MSM_VIDC_HW_OVERLOAD" will
be ignored in component.
When loading resource fails because of hw
overload, instead of sending V4l2 event, we are
going to return EBUSY and this return value will
be checked in userspace.

Change-Id: I26b3315afbe4c7cc4be9e740595d1db5153467dc
Signed-off-by: Jia Meng <jmeng@codeaurora.org>
msm: clock: Add parent fields to gcc_ce1_clk and gcc_ce2_clk

The votable CE core clocks should be linked up to their
parents. Add the parent fields to these clocks for
MSM8974, MSM8226, and MSM8610.

CRs-Fixed: 572028
Change-Id: Ia5567b2832cdb97f08052017d314f00dbdd41133
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
Merge "ARM: dts: msm: Add batt-pres-status node to MSM QPNP-BMS devices"
Merge "power: core: add set_voltage_limit API"
Merge "power: qpnp-charger: take into account charge path priority"
Merge "msm: camera: isp: Use proportional UB slicing and 7 WM"
mdss: mdp3: fix logic when verifying if image can be scaled by 1

There was an issue where images that could be scaled by 1 were not
being blit by ppp due to logic error.

Change-Id: I6f8cdf43d5398a7894e5b7f8a867ec59341345b8
Signed-off-by: Terence Hampson <thampson@codeaurora.org>