msm: vidc: Return min buffer count in VIDIOC_REQBUFS.

- If stream triggers multiple port reconfigure events, number of
  buffers required for output plane incremented due to actual
  buffer count returned from video driver.
- Minbuffer count should be return when buffer requirement called.

Change-Id: I943f2cfdd595b8278058b5bdcbbcf24c9f320440
Signed-off-by: Srinu Gorle <sgorle@codeaurora.org>
gpu: ion: Secure buffers at allocation time

Currently, buffers allocated as secure must be explicitly secured
with a lock call. Considering all buffers from secured heaps are now
always secured and will never be mapped in the non-secure world,
this extra lock call is redundant. Lock the buffer at allocation
time instead of requiring clients to do so explicitly. Reference
counting will ensure correctness until clients remove the lock/unlock
calls.

Change-Id: I1593b6ec651b13b22171997606c915b8f51a05fd
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
radio-iris: Return hardware capabilities

- Radio iris isn't properly advertising its hardware capabilities to
  userspace which makes it look like radio is unsupported.
  Fix this so that userspace sees that radio is in fact supported
- Upadate the hardware capabilities while returning response to query
  device capabilities.

CRs-fixed: 512171
Change-Id: I52d6479cfc1e974735be5f835a0d564fb6d5c1d4
Signed-off-by: Venkateshwarlu Domakonda <Venkateshwarlu@codeaurora.org>
msm: camera: Change CCI I2C write interface

Every CCI I2C write involves one I2C transaction to CCI core.
Since CCI queue has maximum of 64 words, Write CCI commands
to CCI core and handle it in hardware.

Change-Id: Ic3b03bf70b1a5a23d4bdd42d2cbf8528fa8bd413
Signed-off-by: Sreesudhan Ramakrish Ramkumar <srramku@codeaurora.org>
input: synaptics_i2c_rmi4: Release touch data before suspend.

Release all touch data before touch device switch to suspend
state.

Change-Id: I17d237cce5e6cb7e092a96e6b40524810849b510
Signed-off-by: Sarada Prasanna Garnayak <c_sgarna@codeaurora.org>
Revert "ARM: dts: Disable VFE and Oxili power-collapse modes for 8610"

No stability issues have been attributed to Oxili or VFE power-collapse.
Re-enable this power-saving functionality.

This reverts commit 876638b78737acfe75fe833d16ba7891cd3000cd.

Conflicts:

	arch/arm/boot/dts/msm8610.dtsi

CRs-Fixed: 537500
Change-Id: Ia94822bdf13c40062c9450432d1dbebbcfb6b808
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Kconfig: Add config option to support vmalloc savings

The virtual space belonging to any subsystem which is
expected to have a lifetime of the entire system can be
reclaimed. Adding config option to enable or disable
this feature.

Change-Id: I56faef4b71c948185fdfe336054a5951dfa8d011
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
msm: Allow lowmem to be non contiguous and mixed.

Any image that is expected to have a lifetime of
the entire system can give the virtual address
space back for use in vmalloc.

Change-Id: I81ce848cd37e8573d706fa5d1aa52147b3c8da12
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
msm: Increase the kernel virtual area to include lowmem

Even though lowmem is accounted for in vmalloc space, allocation
comes only from the region bounded by VMALLOC_START and VMALLOC_END.
The kernel virtual area can now allocate from any unmapped region
starting from PAGE_OFFSET.

Change-Id: I291b9eb443d3f7445fd979bd7b09e9241ff22ba3
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
msm: Adjust the low memory boundary

The unused virtual address space in low memory is given to
vmalloc for use. This reduces the low memory space and
increases vmalloc space. Adjust the vmalloc_min in order
to increase the low memory.

Change-Id: I0dbef5b6e5ec3d19f5f93f06ed03a4cf1215dc4d
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
msm: Update the kernel log messages

After reclaiming vmalloc and adjusting lowmem, the two regions
are no longer contiguous. Update the messages printed during
bootup to list all regions corresponding to low memory and vmalloc
respectively

Change-Id: I2aeb25026c068e27860c3df1496fc6f5c420b818
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
ARM: dts: msm: Update flash LED headroom and startup delay

Per PMIC system suggestion, headroom should be set to 500mV and
startup delay should be set to 128us to avoid any potential issue.

Change-Id: Iae8d866adde573ddf775b528896dd9a5e9bcd9dd
Signed-off-by: Chun Zhang <chunz@codeaurora.org>
hwmon: qpnp-adc: Fix panic in ADC workqueue

During warm/soft reset it is seen during qpnp-adc-tm
driver interrupt registration there are pending
interrupts.

Register the ADC interrupt handler after initializing
the workqueue to handle potential cases where interrupt
is pending when an interrupt is requested and causes
panic because the workqueue is called when its not
initialized yet.

Change-Id: Iba88ab3c9f71dc94579ab85980f8cfd726f3c5c1
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
input: synaptics_fw_update: Change permissions on lockdown sysfs entry

Permissions should be set to 0664 instead of 0777 for sysfs
entries.  Change them to pass CTS test.

Change-Id: I50237eaa917303efda0ad049649611bf1b6d9c31
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
power: qpnp-charger: aicl: wait for aicl initialization

If a USB DCP peripheral is connected to the device
at bootup do not allow the maximum input current limit
to be configured for more than 500 mA.

Wait for 10 seconds to allow any userspace binary
to initialize and possibly run adaptive input current
limiting.

Change-Id: Ie37165ab162369c61357679b83340b6fae1d7f0a
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
ARM: dts: msm: Add support for Synaptics touch controller

When 8x10 is equpped with 720p display panel, touch controller that
comes with the panel is from Synaptics. This patch provides support
for Synaptics touch controller to enable touch on 720p panel.

CRs-Fixed: 539071
Change-Id: I12109c39356c1f62ea7a637ea441f743f525d530
Signed-off-by: Chun Zhang <chunz@codeaurora.org>
msm: mdss: disable MDP hw underflow recovery

When MDP underflows, hardware will automatically try to issue a reset to
recover from it. Potential issue has been identified when reset happens
on two video interfaces at the same time which may lead to a hw lockup.
To avoid such situations disable the hardware underflow recovery, MDP
will still automatically recover at the beginning of next frame.

Change-Id: I3473486e229e67f6213db83a0ecb34333a977d4f
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
msm: ADSPRPC: Allocate cached memory for ADSP RPC buffers

Pass ION_FLAG_CACHED flag to allocate cached memory for ADSP
RPC buffers that are flushed before being passed to the remote
processor.

Change-Id: I5faa2c074157efcdc3d859090c046b6a700e52a4
Acked-by: Sathish Ambley <sambley@qti.qualcomm.com>
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
ASoC: msm: qdsp6v2: Add timestamp in voip frame header

Uplink timestamp needs to propagate to userspace for AV sync.
timestamp field is added in voip frame header to
capture the timestamp from LPASS for each uplink packet.

Change-Id: Id701df56e5a3d36bf83771ba9731c61a03dae3ba
Signed-off-by: Helen Zeng <xiaoyunz@codeaurora.org>
arm/dt: msm8974: Add GDSC regulator controlling Venus core

GDSC control is now moved out of PIL to enable power collapse
of Venus core through video driver.

Change-Id: Id8cf5547871434dede63c5a304311c53a9bc78dc
Signed-off-by: Sachin Shah <sachins@codeaurora.org>