Commit graph

591735 commits

Author SHA1 Message Date
Ajay Agarwal
04282fcc79 sound: usb: Add quirk to issue SET_CUR volume on 2nd channel
Some audio devices with two channels require the host
to issue SET_CUR command on the Volume control on
both the channels in order to function (playback or
record). Currently, the Linux Host driver issues SET_CUR
only for the 1st channel. Hence, add the quirk for
concerned devices for SET_CUR on 2nd channel.

Change-Id: I6f0bbcdfd3a8b3ccb33a1d56c252c701849a442f
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2017-06-23 10:45:22 +05:30
Meng Wang
e0085c2429 ASoC: wcd-mbhc: Disconnect ANC from RX chain during plug removal
Disconnect ANC from RX when headphone plug is removed from the jack
to prevent any audible pop.

Change-Id: I7a3f6e876f8560580965762c7393c83833ef3b47
Signed-off-by: Meng Wang <mwang@codeaurora.org>
2017-06-23 10:14:33 +08:00
Ramakrishnan Ganesh
4fb87c366b soc: qcom: sleepstate: Enable/Disable IPCRTR wakelocks
The acquiring of wakelock prevents the system from entering
suspend for high frequency non-wakeup sensor requests. With
the change IPCRTR now does not acquire a wakelock while cpu
is out of suspend. This allows the cpu to enter suspend.
The wakelocks are enabled in the suspend path so that future
wakeup capable sensor events gets handled without issues.
The wakelocks are disabled post resume from suspend.
This change affects only the data on the SLPI edge.

Change-Id: Iae3dafb735bfb0d3000487f2fa2216d68e9a026f
Signed-off-by: Ramakrishnan Ganesh <ramakris@codeaurora.org>
2017-06-22 17:57:53 -07:00
Tatenda Chipeperekwa
0aedc43f0b drm: msm: add support for a custom hotplug event
Add support for a custom hotplug event that is triggered when the
status of the connector has changed. The event string of the
custom event will be in the following format:
	"name=<connector name> status=<connector status>"
For example, when the DisplayPort connector has its status
updated to connected then the event string that is used as part
of the hotplug event will be as follows:
	"name=DP-1 status=connected"
If the connector name is not known or is invalid at the time that
the event is triggered then the name will be reported as "unknown".

Change-Id: I5d6164d1e8e651cb05527733d68fa86fefb9e6ce
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
2017-06-22 17:11:45 -07:00
Krupal Divvela
c206173965 msm: camera: Use mutex lock to avoid race condition
Use mutex lock before using queuing ioctls like
queuing, dequeing buffers to avoid race condition.

Change-Id: Ia9fdfd5a766add2f8d99003b0c2bfe7d34d57a09
Signed-off-by: Krupal Divvela <kdivvela@codeaurora.org>
2017-06-22 16:16:18 -07:00
Linux Build Service Account
db478ca29d Merge "Revert "msm: kgsl: Offload mementry destroy work to separate thread"" 2017-06-22 14:00:22 -07:00
Linux Build Service Account
af39cfe11e Merge "sched: avoid migrating when softint on tgt cpu should be short" 2017-06-22 14:00:20 -07:00
Linux Build Service Account
47f3f67114 Merge "arm64: dma-mapping: fix aliasing issues with non-CMA alloc" 2017-06-22 14:00:19 -07:00
Linux Build Service Account
146cbfce78 Merge "mmc: sdhci-msm: Don't turnoff Vcc during initialization" 2017-06-22 14:00:18 -07:00
Linux Build Service Account
1cbfeeaf0d Merge "power: smb-lib: Add support to detect weak charger" 2017-06-22 14:00:17 -07:00
Linux Build Service Account
01cff86d50 Merge "soc: qcom: glink: Move tx_wakeup_worker to rx tasklet" 2017-06-22 14:00:16 -07:00
Linux Build Service Account
356730a45b Merge "diag: Update msg mask tables for new SSID" 2017-06-22 14:00:14 -07:00
Linux Build Service Account
9419a8a284 Merge "drm/msm: Move memptrs to msm_gpu and reorganize" 2017-06-22 14:00:12 -07:00
Dustin Brown
86922e8007 arm/arm64: Export save_stack_trace_tsk()
The kernel watchdog is a great debugging tool for finding tasks that
consume a disproportionate amount of CPU time in contiguous chunks. One
can imagine building a similar watchdog for arbitrary driver threads
using save_stack_trace_tsk() and print_stack_trace(). However, this is
not viable for dynamically loaded driver modules on ARM platforms
because save_stack_trace_tsk() is not exported for those architectures.
Export save_stack_trace_tsk() for the ARM64 architecture to align with
x86 and support various debugging use cases such as arbitrary driver
thread watchdog timers.

Change-Id: I61e9d2afc4703a786fa6dcaf82fe46c0ed250045
CRs-Fixed: 2061326
Signed-off-by: Dustin Brown <dustinb@codeaurora.org>
2017-06-22 12:40:54 -07:00
Linux Build Service Account
17ca958bf3 Merge "icnss: fix the memory and kernel info leak due to the race condition" 2017-06-22 07:40:35 -07:00
Linux Build Service Account
fb2390c8b1 Merge "msm: kgsl: convert some workqueues to use kthreads." 2017-06-22 07:40:34 -07:00
Linux Build Service Account
e26d095a21 Merge "power: smb-lib: Rearrange BOOST_BACK voting logic" 2017-06-22 07:40:33 -07:00
Linux Build Service Account
4f317411a4 Merge "msm: vidc: Recompute extradata address of buffers with ref 2" 2017-06-22 07:40:31 -07:00
Linux Build Service Account
d9cc5d555c Merge "msm: vidc: Renaming the AU-Delimiter params/extens" 2017-06-22 07:40:30 -07:00
Linux Build Service Account
c515c98cc0 Merge "msm: camera: validate num_streams in stream_cfg_cmd before using it" 2017-06-22 07:40:29 -07:00
Linux Build Service Account
86d96e09c2 Merge "ARM: dts: msm: Update sensor device node for SDM660 QRD" 2017-06-22 07:40:28 -07:00
Linux Build Service Account
4bdee99442 Merge "ath10k: Increase peer delete response wait to 500msec" 2017-06-22 07:40:27 -07:00
Linux Build Service Account
0ae9c77a8c Merge "msm📷 correct stats query out of boundary" 2017-06-22 07:40:26 -07:00
Linux Build Service Account
d519bfb9c1 Merge "clk: qcom: osm: Initialize ACD when the cluster is online" 2017-06-22 07:40:25 -07:00
Linux Build Service Account
f8499f2b5e Merge "ais: refine some code style issues" 2017-06-22 07:40:24 -07:00
Linux Build Service Account
3b2de2e798 Merge "ARM: dts: msm: override initial pwrlevel for MSM8996ProAU" 2017-06-22 07:40:23 -07:00
Linux Build Service Account
4dcf7a50c5 Merge "Merge branch 'android-4.4@6fc0573' into branch 'msm-4.4'" 2017-06-22 07:40:22 -07:00
Linux Build Service Account
a367cb43e4 Merge "wil6210: protect against invalid length of tx management frame" 2017-06-22 07:40:21 -07:00
Linux Build Service Account
b944e8d1e6 Merge "msm: camera: Add error check for cmd in IOCTL." 2017-06-22 07:40:20 -07:00
Linux Build Service Account
7c14b62c88 Merge "drivers: soc: qcom: rpm_stats: Add mutex lock for shared data" 2017-06-22 07:40:19 -07:00
Linux Build Service Account
77a019931a Merge "msm: camera: fix untrusted pointer for power down setting" 2017-06-22 07:40:18 -07:00
Linux Build Service Account
46e4ca524d Merge "msm: ipa3: fix compatibility with ipa_nat driver" 2017-06-22 07:40:17 -07:00
Linux Build Service Account
1184e3d0c4 Merge "msm: sps: Fix race condition in SPS debugfs APIs" 2017-06-22 07:40:16 -07:00
Linux Build Service Account
dcb27d45f0 Merge "msm: camera: fix untrusted pointer for power down setting" 2017-06-22 07:40:15 -07:00
Linux Build Service Account
870d3e21b3 Merge "msm: camera: Use mutex lock to avoid race condition" 2017-06-22 07:40:15 -07:00
Vinayak Menon
1c6a9c9721 arm64: dma-mapping: fix aliasing issues with non-CMA alloc
Cache flush and clearing of logical mapping is done right now
only when the allocation is from CMA, for allocation requests
with DMA_ATTR_STRONGLY_ORDERED or DMA_ATTR_NO_KERNEL_MAPPING
set. Extend this to non-CMA allocations too, to avoid cache
aliasing issues.

Change-Id: I133d34d79665ee7159fe384121e933d7768748c2
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
2017-06-22 16:51:33 +05:30
Liangliang Lu
5ccb8c59b5 ARM: dts: msm: Update USB PHY0 parameters for SDA660/630 HDK platform
Update USB PHY0 parameters for SDA660/630 HDK platform.

Change-Id: I2780afcd99e1bb22f4dd6dc977382d379afb1393
Signed-off-by: Liangliang Lu <luliang@codeaurora.org>
2017-06-22 17:35:23 +08:00
Hareesh Gundu
f304b0a865 ARM: dts: msm: Defer regulator disable for msm8998 GPU SMMU
IOMMU driver takes vote on regulator for every unmap, attach or
detach call and removes it once done.

This is an overhead if GPU is in power collapse mode and huge
number of unmap calls are pending from a given context. It would
end up in turning ON/OFF the regulator those many times.

To optimize this, do a deferred regulator disable about 80ms so that
all subsequent requests to regulator enable will be just refcounted.

Change-Id: I07709f5a0ce55298a5fe46ffd95bb8bc472e7069
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
2017-06-22 14:55:25 +05:30
Krishna Manikandan
151c1e441a fbdev: msm: Add check for ioctl calls
A check is added to ensure that only the supported
ioctl calls are allowed to proceed further and
all other ioctl calls are returned early.

Change-Id: I30f69bc9c60384d01f990bd1830ddc1d8aa9241e
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
2017-06-22 14:37:04 +05:30
Hareesh Gundu
e98fd46014 Revert "msm: kgsl: Offload mementry destroy work to separate thread"
This reverts commit 281fcb5e18.

To address the issue with the OOMkiller causing to kill the
foreground application.

Change-Id: Ie4c078d706fdf1c13ad45840f72b414ddc37c1d0
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
Signed-off-by: Venkateswara Rao Tadikonda <vtadik@codeaurora.org>
2017-06-22 14:29:10 +05:30
Siddartha Mohanadoss
cb0e0c2a5e thermal: qpnp-adc-tm: Fix shutdown path for ADC_TM
Update ADC_TM shutdown path for VADC HC peripheral.

Change-Id: I3d524c6189402e39bf1911288ab4691f5df84066
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
2017-06-22 14:17:24 +05:30
Sarada Prasanna Garnayak
470cbd2aea icnss: fix the memory and kernel info leak due to the race condition
The icnss register read/write debugfs entry can be  accessed by
multiple user space thread. Memory allocation and deallocation
in the register read/write file operation leads to potential memory
leak during concurrency access of debugfs device file.

Add protection to avoid the memory leak and kernel information
leak due to the race condition in the register read/write ops.

CRs-Fixed: 2012572
Change-Id: I22c6af9a396c0df4e68f75702fc68a5dff5af032
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
2017-06-22 00:35:59 -07:00
mohamed sunfeer
34d8f74832 compat_qcedev: Fix accessing userspace memory in kernel space
Use put_user API to write the data to userspace from kernel
space to avoid accessing userspace memory directly in
kernel space.

Change-Id: I4dd73872ab8c374793268cef2b9a2dfccf3454c9
Signed-off-by: mohamed sunfeer <msunfeer@codeaurora.org>
2017-06-21 23:47:06 -07:00
Jayant Shekhar
ec3a993112 msm: mdss: Increase fbmem buf ref count before use
The reference count for fbmem buf is not increased before use,
which means it can be get freed unintentionally when the reference
count is decreased to "0". In this case, there is possibility of
use after free. Ensure that fbmem buf refcount is incremented
before use.

Change-Id: I525d41e5496a1123e53a438b5f78d4da8bc046bd
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
2017-06-22 11:46:47 +05:30
Tim Murray
7412403004 msm: kgsl: convert some workqueues to use kthreads.
adreno_dispatch_work and _kgsl_event_worker are both low-latency
low-runtime functions that are in the critical path of GPU
rendering. Moving them out of workqueues and into a dedicated FIFO
kthread avoids significant jitter.

bug 30342017

Git-commit: 1a7a93bd33f48a369de29f6f2b56251127bf6ab4
Git-repo: https://android.googlesource.com/kernel/msm

Change-Id: I83562f488c34c2ab001c8ea79e7f09b633c658bd
Signed-off-by: Tim Murray <timmurray@google.com>
Signed-off-by: Abhilash Kumar <krabhi@codeaurora.org>
2017-06-21 22:56:18 -07:00
Neeraj Upadhyay
98a54eb4ab cgroup: Fix potential race between cgroup_exit and migrate path
There is a potential race between cgroup_exit() and the
migration path. This race happens because cgroup_exit path
reads the css_set and does cg_list empty check outside of
css_set lock. This can potentially race with the migrate path
trying to move the tasks to a different css_set. For instance,
below is the interleaved sequence of events, where race is
observed:

cpuset_hotplug_workfn()
  cgroup_transfer_tasks()
    cgroup_migrate()
      cgroup_taskset_migrate()
          css_set_move_task()
            list_del_init(&task->cg_list);
            <TASK EXIT>
              cgroup_exit()
                cset = task_css_set(tsk);
                if (!list_empty(&tsk->cg_list))
                <TASK NOT DISSOCIATED FROM ITS CSS_SET>
            list_add_tail(&task->cg_list, use_mg_tasks

In above sequence, as cgroup_exit() read the cg_list for
the task as empty, it didn't disassociate it from its
current css_set, and was moved to new css_set instance
css_set_move_task() called from cpuset_hotplug_workfn()
path. This eventually can result in use after free scenarios,
while accessing the same task_struct again, like in following
sequence:

kernfs_seq_start()
  cgroup_seqfile_start()
    cgroup_pidlist_start()
      css_task_iter_next()
        __put_task_struct()
          <NULL pointer dereference>

Fix this problem, by moving the css_set and cg_list fetch in
cgroup_exit() inside css_set lock.

Change-Id: I66060b8faffc06ffb19e2c166013551d4c9cb746
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
2017-06-21 22:36:30 -07:00
Veerabhadrarao Badiganti
7ffd15f63d mmc: sdhci-msm: Don't turnoff Vcc during initialization
As per emmc specification, device should be notified either with
power-off or sleep notification before turning off the Vcc.
Failing to do so might affect the device longevity.

In mmc driver initialization phase even before device probing
gets completed, Vcc is getting turned off without these notifications.
Since it can't send commands at this stage, So just ensure that Vcc
is not turned off till initialization gets completed.

Change-Id: I0bbf0077357d66c888147be40a0c5d312b9ce063
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
2017-06-22 10:55:19 +05:30
Fenglin Wu
dd1a56d034 power: qpnp-smb2: Unset ONLINE for UNKNOWN USB charger type
Currently, USB power_supply POWER_SUPPLY_PROP_ONLINE property will be
set if the charger type is POWER_SUPPLY_TYPE_UNKNOWN which is not
expected. Unset ONLINE for UNKNOWN USB charger type.

CRs-Fixed: 2065139
Change-Id: Ibc40ee62b2d95c319a7fe34b17813c2b57518f67
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2017-06-22 12:41:58 +08:00
Ray Zhang
2178b8d80d drm/msm: add PLL_ENABLE property to support clock recovery
PLL_ENABLE property is used to enable or disable the PLL
update function. With this property PLL update function
only works when PLL_ENABLE is set, and all changes done
to hardware will be discarded once PLL_ENABLE is cleared.

CRs-Fixed: 2042852
Change-Id: Ia321918382b8622101cff566049284810833f63e
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2017-06-22 09:08:28 +08:00
Skylar Chang
b726e73ceb msm: ipa: prevent string buffer overflows
On rmnet_ipa_set_data_quota() API, add the
string terminator to prevent vulnerability
of string buffer overflows on debug prints.

Change-Id: Ie669f6606f76b9006bce4edd0c6d04aef9cfb600
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2017-06-21 17:35:57 -07:00