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>
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>
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 device tree with memory map information for 8974

Update the device tree in order to be aligned with the latest memory
map. As the venus and adsp images are relocatable, reclaim the memory
that was previously occupied by non relocatable images of these
subsystems.

Change-Id: I4c4ff452f01877378247d275a9a86ee88a1948cb
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
ASoC: msm: Correct the EC reference RX port id for 0x1001

The EC reference RX port id that is being used for
PRIMARY_MI2S_TX is not correct and is set to 0 currently.
Set this to proper RX port id of 0x1000.

Change-Id: Id7a88076f06816adcb50e9cee0b83da10393883f
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
defconfig: Enable config to allow vmalloc savings

Enable the config ENABLE_VMALLOC_SAVINGS to reclaim
vmalloc space in low memory for msm8974.

Change-Id: If8bf86338ec19d1659943e2f514d19881fd46d72
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
Kconfig: Enable config to allow vmalloc savings

Enable the config to reclaim the vmalloc space in lowmem
and disable the map around the hole config, as both the
configs cannot be enabled together.

Change-Id: I91adf88f527ddc14f3fde452c6e72bde596ce06d
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
mm: panic on the first bad page table entry access

Sometimes having a number of bad page table entries precipitates in
a crash much later. Because of this, we do not have any context for
the point at which the first bad pte entry was encountered. Hence,
panic on first such instance to help gather context for debug.

Change-Id: Idddf2b977214eb1463d08e16630e98264b9af487
Signed-off-by: Pushkar Joshi <pushkarj@codeaurora.org>
msm: acpuclock-8226: Increase the 8610 max DDR vote to 333MHz

The RPM is now capable of scaling DDR to 333Mhz safely.
Increase the maximum acpuclock vote for DDR to 333MHz.

Change-Id: If75cd51e2af2c004d44cf9463a9f60de97ef6bc7
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
ASoC: wcd9xxx: Do not disable MBHC clock enable signal

MBHC needs clocks enabled which are controlled through
analog enable signal. Do not disable this signal when
adc block is disabled.

CRs-fixed: 540125
Change-Id: Iba1713769fb37b49b7f71596ec0a35b87b0e498c
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
ASoC: wcd9xxx: Enable MBHC TxFE when micbias is enabled

When micbias is turned ON for audio recording with headset
plugged in, there can be possible noise on the recorded
data due to micbias polling for button detection. To
avoid the noise on audio recording, it is required to
enable the MBHC TxFE (Front-End). Add support to enable
MBHC TxFE when micbias is being enabled for audio recording.

CRs-fixed: 522829
Change-Id: I0689982edab9204aa4f833e59f979f38d6d34418
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
ASoC: wcd9xxx: Enable voltage source for micbias for headset detection

Micbias on some codecs can be sourced from external voltage source.
In order to enable micbias for MBHC calibration, headset type detection,
etc, it is required to enable external voltage source for such codecs to
avoid incorrect headset type detection. Add callback per codec to enable
external voltage source if such a source is present for the codec power
rail.

CRs-fixed: 535909
Change-Id: I91995655b8ad8f36fccd34223d1d8a6e9a413fd7
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
ASoC: WCD9XXX: Add configurable micbias option for headset detection

Micbias is required to perform plug type detection on 3.5mm headset
jack. Some platforms can have the microphone pulled up to micbias using
external on-board pull up resistor or using the pull up resistor
internal to the codec. Add support for headset detection logic to
support configurable option for internal or external micbias.

CRs-fixed: 539445
Change-Id: I9438812f0a924c22932dacc56181cf997625e056
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
ASoC: msm8x10: Parse the micbias internal property

Micbias can be either internal to the codec or external onboard pull up
resistor. Parse the property from device tree to setup the micbias
appropriately.

CRs-fixed: 539445
Change-Id: I2281b9b98a00d3d4cbfb98f912eaa41274a6c8ee
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
ARM: dts: msm: Use internal micbias for headset detection on msm8610

Micbias can be pulled up through internal codec resistor or external
on-board pull up. Add micbias as internal for QRD platform.

CRs-fixed: 539445
Change-Id: I630c3487167be3b61bf00d3cc0d65d37ea9880a0
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
ASoC: wcd9xxx: Add codec specific settings to switch micbias to vddio

Micbias to the codec is sourced from LDO (either internal or external to
the codec). Micbias can also be enabled by switching the micbias to
vddio rail in the codec. The register settings changes between codecs.
Add capability to perform this setting specific to codec.

CRs-fixed: 539445
Change-Id: Ie55784ea990df5eba6ca35a97b431bbf93f0c945
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>