Commit graph

1512 commits

Author SHA1 Message Date
Linux Build Service Account
3c78eaa812 Merge "soc: msm: add size check to fix out of bounds on ANC" 2018-06-03 19:10:45 -07:00
Timothy Sham
49662914af soc: msm: add size check to fix out of bounds on ANC
Before calling audio ANC ioctl functions, compare the
allocated buffer size to the size of the header and ANC cmd header
to ensure the buffer is big enough.

Change-Id: I8fcd0a830853d802bbb11fc243a4d392fbe384f3
Signed-off-by: Timothy Sham <tsham@codeaurora.org>
2018-06-01 13:35:21 -04:00
Zhiqiang Tu
7c7109f9b9 soc: qcom: boot_marker: add mpm timer interface
Provide a debugfs interface to get count of mpm timer.

Change-Id: I24e927b6219b8bd4c2f4ddecb8f51518f0db663a
Signed-off-by: Zhiqiang Tu <ztu@codeaurora.org>
2018-06-01 14:34:56 +08:00
Linux Build Service Account
cbeccf228a Merge "soc: qcom: scm_qcpe: Close hab socket on error" 2018-05-31 05:11:44 -07:00
Amit Blay
9d0080999d soc: qcom: scm_qcpe: Close hab socket on error
Close the open hab socket after receiving an error status from
the hab.

Change-Id: Ia56c7ce49d0e61661c9f133d35540e48f3707e01
Signed-off-by: Amit Blay <ablay@codeaurora.org>
2018-05-30 18:08:45 +03:00
Linux Build Service Account
2115d78a54 Merge "ARM: dts: msm: add lpass resource mgr on automotive msm8996" 2018-05-27 09:11:14 -07:00
Chao Bi
5b3e1f74fe soc: qcom: hab: add performance test mechanism for HAB
Develop a mechanism to faciliate the performance test for hab
and share memory.
Use "echo 0 > /sys/module/msm_hab/parameters/perf_test" to
start share memory throughput test, and use
"cat /sys/module/msm_hab/parameters/perf_test" to get the
result.

Change-Id: Ic9e27ace5332bd022e444747ab58152bb3dfd584
Signed-off-by: Chao Bi <chaobi@codeaurora.org>
2018-05-24 18:31:45 +08:00
Arun KS
58a8e73988 soc: qcom: pasr: Add MSM PASR driver
Partial Array Self-Refresh driver is used to interface
with rpm to vote/unvote on memory self-refresh from HLOS.

Driver listens to memory hotplug notifications and decides
to vote or unvote depending on memory online and offline.
This vote is considered by RPM to avoid self-refresh on
offlined DDR segments. And hence a reduce in power consumption.

Change-Id: Ida2b36d671c6379dc3c07258a95cf15ae07a4bc0
Signed-off-by: Arun KS <arunks@codeaurora.org>
2018-05-24 11:42:15 +05:30
Linux Build Service Account
d0d5319fd6 Merge "soc: qcom: scm_qcpe: Fix unused variable warning" 2018-05-21 21:44:22 -07:00
Amit Blay
d78d7b5863 soc: qcom: scm_qcpe: Fix unused variable warning
Fix an unused variable warning when GHS flag is not defined.

Change-Id: Icd5b8bbb0e1bd7bedbaa6c806889d21213cb23f2
Signed-off-by: Amit Blay <ablay@codeaurora.org>
2018-05-21 08:54:27 +03:00
Derek Chen
cdbb6fba72 ASoC: msm: qdsp6v2: add early audio interface support
Add early audio interface support to allow
synchronization between ADSP loading and early
audio playback.

Execute the command
'echo 0 > /sys/kernel/lpass_resource_mgr/check_early_audio'
to check if early audio playback is ongoing.
Output will be "Online" if early audio playback is ongoing.

CRs-fixed: 2126727
Change-Id: I95d07c8f3cd93ded112b551238a973a76fb6b7ed
Signed-off-by: Derek Chen <chenche@codeaurora.org>
2018-05-14 17:42:38 -04:00
Linux Build Service Account
d5b2406b66 Merge "soc: qcom: scm_qcpe: Add support for GHS" 2018-05-10 11:33:47 -07:00
Linux Build Service Account
390f993317 Merge "soc: qcom: hab: hold the message when the read buffer is smaller" 2018-05-10 11:33:45 -07:00
Yong Ding
c7e6dca757 soc: qcom: hab: hold the message when the read buffer is smaller
If the receive buffer in habmm_socket_recv() is smaller
than the message, it should be kept in the queue rather
than dropped.

Change-Id: Iabc1f73e5b443cc7ebdefc3961d5bec9049a265f
Signed-off-by: Yong Ding <yongding@codeaurora.org>
2018-05-09 19:31:48 +08:00
Linux Build Service Account
c18ab0bcb7 Merge "soc: qcom: glink_smem_native_xprt: Move rx_worker in irq handler" 2018-05-08 13:45:53 -07:00
Dhoat Harpal
c3aacf2341 soc: qcom: glink_ssr: Initialize waitqueue in probe function
waitqueue is initialized on every call to notify_for_subsystem.
This leads to stability issue if one thread is waiting for completion
and another thread re-initializes it.

Waitqueue is initialized only in probe function.

CRs-Fixed: 2197181
Change-Id: I3509a7c4a197c727b2025c1aeb6a35690c3c8501
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
2018-05-07 23:35:18 -07:00
Amit Blay
2940947862 soc: qcom: scm_qcpe: Add support for GHS
Add support for GHS

Change-Id: I454ee5e9c643b6521ae5072bb461b7c43bbe9dcc
Signed-off-by: Amit Blay <ablay@codeaurora.org>
2018-05-07 23:28:24 -07:00
Dhoat Harpal
92caad5b2e soc: qcom: glink_smem_native_xprt: Move rx_worker in irq handler
Tx_data cmd is processed in tasklet which is not guranteed to be
scheduled immidiatley. This decreases performance of glink.

Process tx_data command in irq handler.

CRs-Fixed: 2225619
Change-Id: Ida5e51b83fa46c76f72ae886260752baa8b942b9
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
2018-05-08 11:38:18 +05:30
Linux Build Service Account
6830cc910e Merge "ARM: dts: msm: enable sensor node on msm8996 and apq8096" 2018-05-06 02:07:07 -07:00
Linux Build Service Account
bf8090cf06 Merge "hab: import/export between remote buffer and dmafd" 2018-05-02 04:54:40 -07:00
Linux Build Service Account
ff39bce7b8 Merge "soc: qcom: rpm_stats: Fix snprintf string format" 2018-05-02 04:54:32 -07:00
Linux Build Service Account
036d89dd56 Merge "soc: msm: add apr sensor domain support" 2018-05-01 06:26:31 -07:00
Derek Chen
6b9c57b3bc soc: msm: add sensor dsp framework support for anc
Add Sensor DSP framework support for Active
Engine Noise Cancellation (ANC).

CRs-fixed: 2153236
Signed-off-by: Derek Chen <chenche@codeaurora.org>
Change-Id: I4cd28ac1bbfd3fcd21174e0216c70cd664cfa319
2018-04-30 13:38:37 -07:00
Yajun Li
0866bef74d hab: import/export between remote buffer and dmafd
currently hab only supports importing remote buffer
to cpu address, which can't be shared to other process.
Therefore we add dma_buf import/export function in hab

Change-Id: I156c925d7c0cefef5bf146ad8cff38de9c4b3bee
Signed-off-by: Yajun Li <yajunl@codeaurora.org>
2018-04-26 18:36:09 +08:00
Hugh Guan
a5cf01f3c5 audio: qdsp6v2: add retry when EAGAIN for habmm_socket_recv
HAB in the kernel can return -EAGAIN from the habmm_socket_recv() call.
This can happen particularly from a signal handler context.

Change-Id: Ib2885dc49193efb925ed03dc507a2fd2c97ec8c5
Signed-off-by: King Tam <kingt@codeaurora.org>
2018-04-23 10:02:24 -07:00
Derek Chen
6bb3622c73 soc: msm: add apr sensor domain support
Add APR Sensor (DSPS) domain support for
Active Noise Cancellation (ANC) usecase.

CRs-fixed: 2153236
Change-Id: I5a271aac25ac6e538751d742dc0bf1b105221112
Signed-off-by: Derek Chen <chenche@codeaurora.org>
2018-04-20 10:43:14 -07:00
Shashi Shekar Shankar
98d3b2cf3b msm_performance: Add NULL pointer checks
Add NULL pointer checks.

Change-Id: Ia49ed015e8ea13c63296c4491c9d3af99ef0e121
Signed-off-by: Shashi Shekar Shankar <ssbang@codeaurora.org>
2018-04-19 02:54:46 -07:00
Archana Sathyakumar
a64e201b9b soc: qcom: rpm_stats: Fix snprintf string format
Undefined string lengths could lead to buffer overflows. Format the
string correctly to ensure proper usage of snprintf.

Change-Id: Ia85754327d342aefce2a67eb7f5aeca857d8fbcf
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
2018-04-18 22:26:12 -07:00
Linux Build Service Account
315e769672 Merge "voice_svc: Avoid double free in voice_svc driver" 2018-04-18 04:50:55 -07:00
Amit Blay
e51ceb3c2e soc: qcom: scm: Support single HAB id for QCPE
All guest VMs use the same HAB id for communication
with QCPE.

Change-Id: I01ed16376730276f13a734b82d387b1d30d14434
Signed-off-by: Amit Blay <ablay@codeaurora.org>
2018-04-15 07:14:14 -07:00
Aditya Bavanari
2db9527657 voice_svc: Avoid double free in voice_svc driver
voice_svc_dev is allocated as a device managed resource
and need not be freed since it is freed automatically.
Remove the logic to free voice_svc_dev in probe failure
and remove functions to avoid double free.

CRs-Fixed: 2204285
Change-Id: If4f9ca840b00448b987f5ce443f66b0923b01969
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2018-04-11 12:37:00 +05:30
Yong Ding
785f45b603 soc: qcom: hab: add the uninterruptible receive support
In the blocking mode of habmm_socket_recv(), it is an
interruptible wait by default. Here, the uninterruptible
version is added.

Change-Id: Iba9ee10afb3f2529a99a9c90f6fc0cb56fb9cb08
Signed-off-by: Yong Ding <yongding@codeaurora.org>
2018-04-11 13:11:49 +08:00
Sameer Thalappil
9b96f692c0 icnss: Consider recovery as FW down
When WLAN driver encounters FW timeout scenarios, it may check if the
FW is down by calling icnss_is_fw_down() API. Recovery should also be
considered as FW down, as FW has not completely recovered and ready
for WLAN communication.

Change-Id: I4c9e15aacc5605dca823e2cfcbf6f87152aaa78e
CRs-Fixed: 2218795
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
2018-04-04 18:24:29 -07:00
Yong Ding
83681f8f7d soc: qcom: hab: refine hab driver's header files
Stuffs relevant with ioctl are only for hab driver
itself and hab clients in user space. Those hab clients
in kernel dose not need them. So here uapi/linux/habmm.h
is refined into two files as habmmid.h and hab_ioctl.h.

Change-Id: I9344e3e3fec88a042ec1915a9c0d51a28cea6e9a
Signed-off-by: Yong Ding <yongding@codeaurora.org>
2018-03-30 03:16:43 -07:00
Linux Build Service Account
ac5f95a1a7 Merge "soc: qcom: ipc_router_smd_xprt: Set pointer to NULL after free" 2018-03-28 15:28:04 -07:00
Linux Build Service Account
4494f37ab3 Merge "soc: qcom: hab: add habmm_socket_query support" 2018-03-28 15:27:52 -07:00
Arun Kumar Neelakantam
8d26f80ebc soc: qcom: ipc_router_smd_xprt: Set pointer to NULL after free
in_pkt pointer is holding dangling pointer address even after calling
release_pkt() which causing use-after-free.

Set the in_pkt pointer to NULL after free.

CRs-Fixed: 2210859
Change-Id: If5e01c0109c947e52f3ff269c9b2b50ac0dc2bdf
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
2018-03-28 10:30:26 +05:30
Chris Lew
f497bfd257 soc: qcom: glink: smem: Add wmb between data and write index
Make sure data is flushed before updating write index by adding a wmb.

Change-Id: I3d17ed56b64ac9ca399a0ef11a638027c1ba36ae
Signed-off-by: Chris Lew <clew@codeaurora.org>
2018-03-23 16:01:25 +05:30
Linux Build Service Account
cbae14bbfc Merge "ASoC: msm: Fix KW issues for audio drivers" 2018-03-21 10:10:17 -07:00
Linux Build Service Account
01b4773f29 Merge "soc: qcom: ipc_router_mhi_xprt: Initialize variable at start" 2018-03-20 23:18:29 -07:00
Linux Build Service Account
0d536697bf Merge "soc: qcom: tracer_pkt: Fix buffer length check" 2018-03-20 23:18:26 -07:00
Yong Ding
4fc0ee9d99 soc: qcom: hab: add habmm_socket_query support
This query API can be used by hab clients to get
their virtual channels' info if necessary, eg, the
local and remote vmids.

Change-Id: I1293b51a1127997f493f07c0c2181423bf45d79e
Signed-off-by: Yong Ding <yongding@codeaurora.org>
2018-03-20 19:01:52 -07:00
Dhoat Harpal
ce38d58009 soc: qcom: ipc_router_mhi_xprt: Initialize variable at start
variable rc is not initialized in the beginning of function
ipc_router_mhi_write and ipc_router_mhi_xprt_probe. This leads
possible use without initialization issue.

Initialize variable in the beginning of both functions.

CRs-Fixed: 2209246
Change-Id: Ida0bdad2336be928d6e440d4143350bbf9f253d5
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
2018-03-20 18:00:41 +05:30
Chris Lew
1c8d205e09 soc: qcom: tracer_pkt: Fix buffer length check
The logic to truncate packets if the size is too long was off by one.
Fix the conditional logic for checking lengths.

CRs-Fixed: 2121368
Change-Id: I908bd0a1ab78dea439056dbcd12eb158b2789e4a
Signed-off-by: Chris Lew <clew@codeaurora.org>
2018-03-20 16:25:45 +05:30
Anant Goel
4219e54c49 soc: qcom: subsystem_notif_virt: Fix owner for the driver
The owner for the driver is not a string. Fix the owner
accordingly.

Change-Id: I5f29cc0ae65714756868a0076f8a8adc6c3d45c2
Signed-off-by: Anant Goel <anantg@codeaurora.org>
2018-03-19 10:48:06 -07:00
Yong Ding
6e8ff43c0d soc: qcom: hab: add some pchans for BufferQ and FDE
This is adding pchans based on the legacy header files.

Change-Id: I0abf6b7617f4e1e057891c1312a20538bc65d2ea
Signed-off-by: Yong Ding <yongding@codeaurora.org>
2018-03-15 20:40:24 -07:00
Tony Han
0152bff079 ASoC: msm: Fix KW issues for audio drivers
The fixed issues include variable initialization missing and improper NULL
pointer checking.

Change-Id: I5302cf84f7f0414fe0cf69ccc0cafc8225142c5f
Signed-off-by: Tony Han <xiahan@codeaurora.org>
2018-03-15 13:52:52 +08:00
Linux Build Service Account
b83a3d1c47 Merge "soc: qcom: subsystem_notif_virt: Add virtual subsystem notification driver" 2018-03-09 02:47:49 -08:00
Anant Goel
f64af1ec50 soc: qcom: subsystem_notif_virt: Add virtual subsystem notification driver
The guest VM uses this driver to communicate subsystem state related
notifications to a backend driver via the virtual device's registers.

Change-Id: I612fcb641c4d531c1d2c0fd18f44f7ebff040f2c
Signed-off-by: Anant Goel <anantg@codeaurora.org>
2018-03-07 12:05:28 -08:00
Linux Build Service Account
99b73ed59a Merge "soc: qcom: scm_qcpe: Derive HAB id from HAB vmid dt node" 2018-03-05 14:12:24 -08:00