ARM: dts: msm: Update device tree with memory map information for 8974 pro

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

Change-Id: I553e57412ef6868eac97874f3300982a029fe971
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
msm : camera: Implement Video HDR on IMX134.

Add videoHDR support for kernel and also change number of
write master from 4 to 5 inorder to accomodate stats for
video HDR.

Change-Id: I5314a8972fc17aebc640c4de76c4ce3722cfe27f
Signed-off-by: Aditya Jonnalagadda <ajonnala@codeaurora.org>
ASoC: msm: qdsp6v2: Initialize local variable output_meta_data

The local variable output_meta_data is not initialized if
prtd->meta_data_mode is false. It can lead unexpected behavior.

Change-Id: I1801af9bc9c8bf31a9902388e01f4ae5c165be28
CRs-fixed: 539805
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
ARM: dts: msm: Add KTM hotplug feature for msm8610

Add entry for hotplug threshold. Set hotplug threshold and threshold
hysteresis to 110degC and 90degC respectively.
Add cpu sensors mapping.

Change-Id: I279f9826d1f76b6795ae6a5867d78faab490f79f
Signed-off-by: Jennifer Liu <chihning@codeaurora.org>
ARM: dts: msm: Add NFC device for msm8610

Add nfc device for 8610 based msm. currently sensor and nfc share
same i2c.

Change-Id: Ib696fbcd122583c241fb195fb83a36c892c92799
Acked-by: Umesh Jagga <ujagga@qti.qualcomm.com>
Signed-off-by: Bansidhar Gopalachari <bansid@codeaurora.org>
msm: 8610: gpiomux: Configure nfc gpio clock source

Add gpio clock source and remove ethernet interrupt which is used
by NFC as clock

Change-Id: I50e9e4b5c1602019667a69b04244e03fb3bbf7a2
Acked-by: Umesh Jagga <ujagga@qti.qualcomm.com>
Signed-off-by: Bansidhar Gopalachari <bansid@codeaurora.org>
msm: clock-8610: Update lookup table for NFC clocks

i2c gpio clock configuration needed to support qca199x NFCC
on msm8610.

Change-Id: Ieef2c54ce1d3c4ff022f9ffa211d0d8ff480db2f
Acked-by: Umesh Jagga <ujagga@qti.qualcomm.com>
Signed-off-by: Bansidhar Gopalachari <bansid@codeaurora.org>
defconfig: msm8610: enable Qualcomm NFC NCI driver

Add the config parameters to enable the NFC QCA1990
NCI driver for msm8610

Change-Id: Ie5e54c767fffe900c007e934a6b4cd7cd2e44290
Acked-by: Umesh Jagga <ujagga@qti.qualcomm.com>
Signed-off-by: Bansidhar Gopalachari <bansid@codeaurora.org>
ARM: dts: msm: Add KTM hotplug feature for msm8226

Add entry for hotplug threshold. Set hotplug threshold and threshold
hysteresis to 110degC and 90degC respectively.

Add cpu sensors mapping.

Change-Id: Ic833c00a42dbcbec71e730eccd2d52b4bdabf92e
Signed-off-by: Jennifer Liu <chihning@codeaurora.org>
msm: kgsl: Use the right set of flags for issuing user commands

KGSL_CMD_FLAGS_EOF is both a valid command flag from the user and
a valid internal flag for the ringbuffer submit code.  This is
the only flag that can do this - the other internal flags either
have different meanings or aren't valid user flags.  Use an internal
register to store the command flags in adreno_ringbuffer_issueibcmds
so we don't accidently end up sending in the wrong control flags to the
ringbuffer code.

CRs-fixed: 546449
Change-Id: Ic0dedbadb9245002a60aa54cb51d35d98b9cb531
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm: kgsl: Don't use uninitialized values in hang detection

Under some circumstances some of the registers used for hang detection
are not defined (usually because the hardware doesn't support them).
The hang detect code properly skips those registers when reading the
hardware but the corresponding offsets in the destination array are
still compared to detect a hang.  Since the array was defined on the
stack and those particular members were never read from the hardware
the values could be non zero a real GPU hang could be missed.

Skip the undefined hang detect registers in all three for() loops
where the list of hang detect registers are used.

CRs-fixed: 540224
Change-Id: Ic0dedbad6e654e3a4e6db5468eac698e91e7f32b
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
ARM: dts: msm: Override KTM hotplug sensors for msm8926

For msm8926, core 2- 3 tsens is mapped to tsens_tz_sensor1. Override
hotplug properties: qcom, cpu-sensors in msm8926 device tree accordingly
when KTM hotplug is enabled in msm8226 device tree.

Change-Id: I8a011ae96592f47a2e383cd720910a5f96a93e48
Signed-off-by: Jennifer Liu <chihning@codeaurora.org>
msm: vidc: Supress non fatal Session errors

FW sends SESSION_ERROR for various reasons. The session error
might not be fatal always. This is conveyed using event_data1.
Driver needs to process this message and supress non fatal
errors and reports only fatal errors to clients.

Change-Id: If9ded26977805e2c2299ef1c4a63212d2679495c
Signed-off-by: Praneeth Paladugu <ppaladug@codeaurora.org>
qseecom: Fix issues with failure to release client handle

There exists scenarios when qseecom_release is called,
the client handle type is incorrect; hence proper cleanup
is not done with regards to unloading app or cleaning up
memory allocated for the device handle.
This change addresses all cleanup issues related to qseecom
client in qseecom_release call by ensuring the handle type is
set correctly and cleanup is done properly based on client type.

Change-Id: I126aa431ce635ae98100b774e3d92b704635d199
Signed-off-by: Hariprasad Dhalinarasimha <hnamgund@codeaurora.org>
ASoC: msm: Route low latency frontend to in-call music backend

Add routing controls to support routing of low latency stream
to in-call music delivery backend.

Change-Id: I5934f32fb4cbfb7f12a09e9bad76f370c3fd7fb7
CRs-fixed: 550396
Signed-off-by: Narsinga Rao Chella <nrchella@codeaurora.org>
ASoC: msm: Add missing backends for Multimedia4

Some backends for the front-end Multimedia4 is missing in the
routing driver. This results tunnel recording failure for
USB headset/BT SCO usecases.

Change-Id: I7998309df4e7da9545bdc75e9b67873cc0417870
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
qdsp6v2: Fix access issues in adsp loader.

Access issues are present in adsp loader. These are introduced
by the changes made for making adsp loader an in-kernel component.

Change-Id: Ife7499685b78b4ee5fb2794368170b52987b0cfb
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
sync: signal pt before sync_timeline object gets destroyed

There is a race condition

Assume we have *one* sync_fence object, with *one* sync_pt
which belongs to *one* sync_timeline, given this condition,
sync_timeline->kref will have two counts, one for sync_timeline
(implicit) and another for sync_pt.

Assume following is the situation on CPU

Theead-1 : (Thread which calls sync_timeline_destroy())
  -> (some function calls)
   -> sync_timeline_destory()
    -> sync_timeline_signal() (CPU is inside this
function after putting reference to sync_timeline)

At this time Thread-2 comes and does following

Thread-2 : (fclose on fence fd)
> sync_fence_release() -> because of fclose() on fence object
 -> sync_fence_free()
  -> sync_pt_free()
   -> kref_put(&pt->parent->kref, sync_timeline_free);
    -> sync_timeline_free() (CPU is inside this because
this time kref will be zero after _put)

Thread-2 will free sync_timeline object before Thread-1
has finished its work inside sync_timeline_signal.

With this change we signals all sync_pt before putting
reference to sync_timeline object.

Change-Id: I66d7359cc5dca0352fda49f81953028e98b95993
Signed-off-by: Prakash Kamliya <pkamliya@codeaurora.org>
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
ARM: dts: msm: tune LPM parameters for 8610v1 and v2

Tune low power mode parameters such as "latency",
"time overhead", "steady state power" and "energy
overhead" for 8610v1 and v2.

CRs-fixed: 506262
Change-Id: I817b4082bfbd30ab9a9fe61bbf11b09367842127
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
mdss: mdp3: Add underrun counter to debugfs stat call

To allow for easier debug we added logs to output current
underrun count

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