Commit graph

594405 commits

Author SHA1 Message Date
Linux Build Service Account
2bd9b02756 Merge "ASoC: msm: Support Secondary TDM RX interface" 2017-10-21 02:30:37 -07:00
Linux Build Service Account
c8463db8f4 Merge "ARM: dts: msm: Support Secondary TDM RX Interface for msm8996" 2017-10-21 02:30:37 -07:00
Linux Build Service Account
1fa2e9357b Merge "soc: qcom: add SMMU support for virtualized audio ION driver" 2017-10-21 02:30:26 -07:00
Linux Build Service Account
044b983514 Merge "ASoC: msm: add soc audio snd virtualization support" 2017-10-21 02:30:25 -07:00
Linux Build Service Account
164f8dcb96 Merge "ARM: dts: msm: add audio ion vm dev on msm8996 vplatform" 2017-10-21 02:30:24 -07:00
Linux Build Service Account
949c55567d Merge "Revert "leds: remove unused driver leds-qpnp-flash.c"" 2017-10-20 16:49:29 -07:00
Linux Build Service Account
e7e32d875f Merge "Revert "power: supply: qcom: remove unused drivers"" 2017-10-20 16:49:28 -07:00
Linux Build Service Account
8fb8de73fa Merge "ARM: dts: msm: Enable MPP06 for graphics support in MSM8996 CV2X" 2017-10-20 16:49:27 -07:00
Linux Build Service Account
9cf08e811e Merge "power: qpnp_smb2: configure to extend DRP.DFP time in try.SNK" 2017-10-20 16:49:18 -07:00
Linux Build Service Account
bd398385b3 Merge "power: smblib: extend wait time after force sink in try.SNK" 2017-10-20 16:49:17 -07:00
Linux Build Service Account
15bfd17433 Merge "power: smblib: SW implementation of typeC try.SNK" 2017-10-20 16:49:16 -07:00
Hugh Guan
0ad4818702 ASoC: msm: Support Secondary TDM RX interface
Support Secondary TDM RX interface dai link and export kcontrols to
update Secondary TDM RX interface Channels and Bit Format configuration.

CRs-fixed: 2112052
Change-Id: Idb1d06cd6c0af385a46c775205bb3f6e45d411d7
Signed-off-by: Hugh Guan <hhguan@codeaurora.org>
2017-10-19 22:11:04 -07:00
Hugh Guan
d2ca82a2bc ARM: dts: msm: Support Secondary TDM RX Interface for msm8996
Support Secondary TDM RX Interface for automotive.

CRs-fixed: 2112052
Change-Id: Iae7bde93e8af851e470fb4f81b37d513ce3dfd02
Signed-off-by: Hugh Guan <hhguan@codeaurora.org>
2017-10-19 22:10:31 -07:00
Linux Build Service Account
b99844d8a3 Merge "ALSA: usb-audio: Add length check after string desc copy" 2017-10-18 21:38:46 -07:00
Harry Yang
50f363d768 power: qpnp_smb2: configure to extend DRP.DFP time in try.SNK
When both sides are doing DRP and the other side applies Rd near the end
of PMIC DFP cycle, sometimes, PMIC does not lock on into AttachedWait.SRC
and transitions back into Unattached.SNK.

If a resistance ranging (5.1k,300k) pulldown is applied and then 5.1kohms
pulldown is applied, then it takes 10-20ms to detect 5.1kohms.
Before this, if DRP.DFP time expires, then PMI transitions to UFP mode to
avoid extending DRP cycle time.

Fix it by extending DFP time. Note the total DRP time should still be
within max limit (100ms).

Change-Id: I1dd180229bc771542b4f6ca7850aa457478ae5cd
Signed-off-by: Harry Yang <harryy@codeaurora.org>
2017-10-18 18:20:53 -07:00
Harry Yang
f45c23db73 power: smblib: extend wait time after force sink in try.SNK
In Try.SNK software implementation, after forcing sink, there
is a delay of tDRPTRY + Tccdebounce time, giviing opportunity
to the other side to be a SRC.

The current delay is 100ms < tDRPTRY (90ms) + Tccdebounce (20ms),
too short, which sometimes results in checking Tccdebounce_done
status too early.

Change the delay to 120ms.

Change-Id: If9fe9aa7c405a5ae6416e9373449c4a76295e4d8
Signed-off-by: Harry Yang <harryy@codeaurora.org>
2017-10-18 18:19:35 -07:00
Harry Yang
7e41812c03 power: smblib: SW implementation of typeC try.SNK
Try.SNK allows a DRP that has a policy based preference to be a Sink
when connecting to another DRP to effect a transition from a destined
Source role to the Sink role.

This is a Software implementation for PMI8998.

Exiting from AttachWait.SRC State, a DRP that strongly prefers the
Sink role may optionally transition to Try.SNK instead of Attached.SRC.

When in the Try.SNK state, the port is querying to determine if the
port partner supports the Source role.

The port shall then transition to Attached.SNK when the SNK.Rp state
is detected for at least tTryCCDebounce and VBUS is detected

Alternatively, the port shall transition to TryWait.SRC if SNK.Rp state
is not detected tTryCCDebounce.

The port shall transition to Attached.SRC when SRC.Rd state is detected
on exactly one of the CC pins.

The port shall transition to Unattached.SNK after tDRPTry if neither of
the CC1 or CC2 pins is in the SRC.Rd state.

CRs-Fixed: 1114313
Change-Id: I777332e87df65082333f4e24a61c5ea834784d09
Signed-off-by: Harry Yang <harryy@codeaurora.org>
2017-10-18 18:17:53 -07:00
Honghao Liu
a71c664a97 soc: qcom: add SMMU support for virtualized audio ION driver
Update the virtualized audio ION driver to add SMMU support.
The virtualized audio ION driver will provide the ION memory
allocated from the guest VM to the physical VM to perform SMMU
mapping.

The virtualized audio ION driver will receive SMMU mapped
device address from physical VM and provide the device address
to its clients. Upon its client frees the memory, the virtualized
audio ION driver will request the physical VM to perform SMMU
un-mapping.

CRs-fixed: 2099245
Change-Id: Idca4ecda65910308d7f7af288381866ab4ce4a7a
Signed-off-by: Honghao Liu <honghaol@codeaurora.org>
2017-10-18 12:10:55 -07:00
Derek Chen
7dfae0526f ARM: dts: msm: add audio ion vm dev on msm8996 vplatform
Add msm audio ion vm device node to be compatible with
virtualized audio ion platform driver on MSM8996 vplatform.

CRs-fixed: 2047379
Signed-off-by: Derek Chen <chenche@codeaurora.org>
Change-Id: Ibd6b5cfa7e8539a56b6d1650ea0d2ae15ce82073
2017-10-18 12:10:47 -07:00
Derek Chen
80417e5578 ASoC: msm: add soc audio snd virtualization support
Add soc audio sound card SND_SOC_MSM8996_VM for
virtualization support.
The virtualized audio snd soc is based on legacy
soc msm8996, removing dependency on ARCH_MSM8996
and various soc codec/slimbus and hwdep driver as
well as DTS/SRS PP features.

CRs-fixed: 2047379
Change-Id: I930bf78c2ebf2c605331b50a598b5a43ceed0e0f
Signed-off-by: Derek Chen <chenche@codeaurora.org>
2017-10-18 11:43:46 -07:00
Derek Chen
1bc3c0f656 soc: qcom: add audio apr and ion virtualization support
Add support for virtualized APR and ION frontend driver
for audio.
Virtualized APR frontend driver resides in guest VM and
supports all legacy APR APIs. It will rely on MSM_HAB
to communicate with APR backend driver, which resides in
physical VM, where legacy SMD is utilized for communication
between APPS and ADSP.
Virtualized ION driver currently is designed to extract
physical memory through hypervisor abstracted ion layer,
which can be shared between APPS and ADSP directly.

CRs-fixed: 2047379
Change-Id: I7dad5aebfd1db00cd32807dc1219818a7a4e62c5
Signed-off-by: Derek Chen <chenche@codeaurora.org>
2017-10-18 11:28:36 -07:00
Linux Build Service Account
22b27b16d8 Merge "block: Initialize bd_bdi on inode initialization" 2017-10-18 11:08:22 -07:00
Linux Build Service Account
c24ca7f957 Merge "drm/msm/sde: synchronize mdp clk with frame update" 2017-10-18 11:08:20 -07:00
Linux Build Service Account
66a8b75dd2 Merge "drm/msm/sde: align bandwidth/clock updates with frame done" 2017-10-18 11:08:20 -07:00
Linux Build Service Account
0b90776440 Merge "diag: Add mutex protection while reading dci debug statistics" 2017-10-18 11:08:19 -07:00
Linux Build Service Account
20caa06084 Merge "cnss2: Support multiple recoveries when using CORE only firmware" 2017-10-18 02:00:40 -07:00
Linux Build Service Account
8fa49f2cb1 Merge "cnss2: Request runtime PM resume when shutdown happens" 2017-10-18 02:00:39 -07:00
Linux Build Service Account
1682bdfd75 Merge "msm: ipa: Fix use after free issue" 2017-10-18 02:00:38 -07:00
Ajay Agarwal
d7a59889eb ALSA: usb-audio: Add length check after string desc copy
It might be possible that negative error code is returned
in 'len', when we try to copy USB string desc into the ID
name buf of snd_kcontrol instance. But even in that case,
we are terminating buf with 0 at the 'len' index, which
leads to memory corruption. And for good case where 'len'
is non-negative, usb_string func is terminating the buf
with 0.

Fix this by removing the termination of buf with '0'
in the caller function.

Change-Id: Ie32d395b0fc91d6c3e1cfdbafb76304e21e40577
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2017-10-18 13:50:46 +05:30
Jan Kara
16d289189c block: Initialize bd_bdi on inode initialization
So far we initialized bd_bdi only in bdget(). That is fine for normal
bdev inodes however for the special case of the root inode of
blockdev_superblock that function is never called and thus bd_bdi is
left uninitialized. As a result bdev_evict_inode() may oops doing
bdi_put(root->bd_bdi) on that inode as can be seen when doing:

mount -t bdev none /mnt

Fix the problem by initializing bd_bdi when first allocating the inode
and then reinitializing bd_bdi in bdev_evict_inode().

Thanks to syzkaller team for finding the problem.

Reported-by: Dmitry Vyukov <dvyukov@google.com>
Fixes: b1d2dc5659b4 ("block: Make blk_get_backing_dev_info() safe without open bdev")
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@fb.com>
Change-Id: I9c34ca321ab311936946187ed21e25d67caf5ba5
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
Git-commit: 7ee143f46cb1f58ee07194076b9a3e6ea3f27ad3
[riteshh@codeaurora.org: resolved merge conflicts]
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
2017-10-18 12:05:44 +05:30
Jan Kara
9c197e78d2 block: Make blk_get_backing_dev_info() safe without open bdev
Currenly blk_get_backing_dev_info() is not safe to be called when the
block device is not open as bdev->bd_disk is NULL in that case. However
inode_to_bdi() uses this function and may be call called from flusher
worker or other writeback related functions without bdev being open
which leads to crashes such as:

[113031.075540] Unable to handle kernel paging request for data at address 0x00000000
[113031.075614] Faulting instruction address: 0xc0000000003692e0
0:mon> t
[c0000000fb65f900] c00000000036cb6c writeback_sb_inodes+0x30c/0x590
[c0000000fb65fa10] c00000000036ced4 __writeback_inodes_wb+0xe4/0x150
[c0000000fb65fa70] c00000000036d33c wb_writeback+0x30c/0x450
[c0000000fb65fb40] c00000000036e198 wb_workfn+0x268/0x580
[c0000000fb65fc50] c0000000000f3470 process_one_work+0x1e0/0x590
[c0000000fb65fce0] c0000000000f38c8 worker_thread+0xa8/0x660
[c0000000fb65fd80] c0000000000fc4b0 kthread+0x110/0x130
[c0000000fb65fe30] c0000000000098f0 ret_from_kernel_thread+0x5c/0x6c

Signed-off-by: Jens Axboe <axboe@fb.com>
Change-Id: I26955b919bd05fe34dc60aab1797ea2739ad5fd7
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
Git-commit: b1d2dc5659b41741f5a29b2ade76ffb4e5bb13d8
[riteshh@codeaurora.org: resolved merge conflicts]
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
2017-10-18 12:05:44 +05:30
Jan Kara
b56ec58cde block: Dynamically allocate and refcount backing_dev_info
Instead of storing backing_dev_info inside struct request_queue,
allocate it dynamically, reference count it, and free it when the last
reference is dropped. Currently only request_queue holds the reference
but in the following patch we add other users referencing
backing_dev_info.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@fb.com>
Change-Id: Ibcee7b4c014018f9243cd3edbfd9c4a8877c3862
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
Git-commit: d03f6cdc1fc422accb734c7c07a661a0018d8631
[riteshh@codeaurora.org: resolved merge conflicts]
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
2017-10-18 12:05:44 +05:30
Jan Kara
1c6dd64534 block: Use pointer to backing_dev_info from request_queue
We will want to have struct backing_dev_info allocated separately from
struct request_queue. As the first step add pointer to backing_dev_info
to request_queue and convert all users touching it. No functional
changes in this patch.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@fb.com>
Change-Id: I77fbb181de7e39c83fbfba8cfb128d6ace161f31
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
Git-commit: 97419acd22a0bacc52dbc34d5bbc96d315e48acb
[riteshh@codeaurora.org: resolved merge conflicts]
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
2017-10-18 12:05:43 +05:30
Jan Kara
393737a28b block: Unhash block device inodes on gendisk destruction
Currently, block device inodes stay around after corresponding gendisk
hash died until memory reclaim finds them and frees them. Since we will
make block device inode pin the bdi, we want to free the block device
inode as soon as the device goes away so that bdi does not stay around
unnecessarily. Furthermore we need to avoid issues when new device with
the same major,minor pair gets created since reusing the bdi structure
would be rather difficult in this case.

Unhashing block device inode on gendisk destruction nicely deals with
these problems. Once last block device inode reference is dropped (which
may be directly in del_gendisk()), the inode gets evicted. Furthermore if
the major,minor pair gets reallocated, we are guaranteed to get new
block device inode even if old block device inode is not yet evicted and
thus we avoid issues with possible reuse of bdi.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@fb.com>
Change-Id: I41087d3bc818c4e58e0b4e20876e136ec1cbb07b
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
Git-commit: f44f1ab5a2dcd4e16eab850fd08e40ff2d0c28d4
[riteshh@codeaurora.org: resolved merge conflicts]
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
2017-10-18 12:05:43 +05:30
Abhinav Kumar
0fc4f878b3 drm/msm/sde: synchronize mdp clk with frame update
There is a race condition between the commit and
the validate, where the mdp clock or the bandwidth
can be updated for voting before the actual configuration
is taking place.

Fix this issue by caching the performance values in the crtc
till the current hw configuration is on-going.

Change-Id: Icc71c4f58cbc305529d308335f44b8c05702ebee
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
2017-10-17 19:20:50 -07:00
Alan Kwong
931577c626 drm/msm/sde: move current performance setting to crtc object
Current performance setting is maintained in crtc state, and its
update is synchronized to commit cycle. However, the setting may be
committed to clock and bandwidth driver out of sync with respect to
commit cycle, e.g. update at end of frame while another commit is
validating. As a result, requested settings may be missed and result
in older settings being used. Move current performance setting
to crtc object, from crtc state, so it can be updated at the
same time as the setting is committed to clock and bandwidth
driver.

CRs-Fixed: 2048612
Change-Id: I0c3047e8e806460105eaba5d46145798bd98d721
Signed-off-by: Alan Kwong <akwong@codeaurora.org>
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
2017-10-17 19:20:33 -07:00
Abhinav Kumar
cf2cb1c388 drm/msm/sde: align bandwidth/clock updates with frame done
Align clock and bandwidth updates witf frame done event for
video mode panels.

Also move perf state update to atomic check to make perf data
persistent over state duplication.

Change-Id: I5ef02dd78ce6a62cf49f1f105344764fdb3a24da
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
2017-10-17 19:19:44 -07:00
Yue Ma
b8e1d2e9df cnss2: Support multiple recoveries when using CORE only firmware
After MHI power on is completed, CORE component only firmware boot
can be considered as success. Add a debug parameter in order to
support multiple recoveries when using the firmware without WLAN
component.

Change-Id: I1b6a67a578ff7ffa15dff733b8d691910003ac6f
CRs-fixed: 2124999
Signed-off-by: Yue Ma <yuem@codeaurora.org>
2017-10-17 14:41:44 -07:00
Linux Build Service Account
fa53f7f14b Merge "soc: qcom: ipc_router_glink_xprt: Add rx intent timeout for glink" 2017-10-17 14:20:44 -07:00
Linux Build Service Account
a6872b79bc Merge "msm: ipa: add null terminator" 2017-10-17 14:20:43 -07:00
Anirudh Ghayal
040d532f16 Revert "leds: remove unused driver leds-qpnp-flash.c"
This reverts commit 5b289d3a64.

Bring back the flash driver for 8996.

Change-Id: I6232ff004fc790e41f73bdf9d90d5455b5cb8a55
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2017-10-17 20:18:13 +05:30
Anirudh Ghayal
6f7763531f Revert "power: supply: qcom: remove unused drivers"
This reverts commit 941bfaf2dc.

Bring back the charger and fuel gauge drivers supported on
8996.

Change-Id: Ibba07ece69e29a8c7bf26acdc9dda30ac755fb83
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2017-10-17 20:17:45 +05:30
Linux Build Service Account
88f238f177 Merge "rtac: add size check when reading cal data kvaddr buffer" 2017-10-17 05:38:29 -07:00
Linux Build Service Account
ab56a31bcb Merge "scsi: ufs: Fix race condition in ufs qcom debugfs driver" 2017-10-17 05:38:28 -07:00
Linux Build Service Account
f2b5c20a20 Merge "Merge android-4.4@d68ba9f (v4.4.89) into msm-4.4" 2017-10-17 05:38:14 -07:00
Yue Ma
b15e41e072 cnss2: Request runtime PM resume when shutdown happens
Request runtime PM resume in platform driver as soon as shutdown
happens. This can make sure device is resumed while shutdown is
proceeding.

Change-Id: I0aa15b9713347288f4954bd767ec9243d22153ed
CRs-fixed: 2124999
Signed-off-by: Yue Ma <yuem@codeaurora.org>
2017-10-16 16:32:05 -07:00
Linux Build Service Account
6d08baec31 Merge "msm: mdss: dp: fix no display issues during cable plugin/plugouts" 2017-10-16 13:07:08 -07:00
Linux Build Service Account
c083bb83fe Merge "ext4: provide ext4_issue_zeroout()" 2017-10-16 13:07:07 -07:00
Sreelakshmi Gownipalli
8708098342 diag: Add mutex protection while reading dci debug statistics
Unserialized access to diag_dbgfs_dci_data_index can lead to
heap overflow. Add mutex protection while updating the
diag_dbgfs_dci_data_index.

Change-Id: Iee9d0447494e3576e6293afcd4d7611bc429aa8a
Signed-off-by: Sreelakshmi Gownipalli <sgownipa@codeaurora.org>
2017-10-16 06:53:50 -07:00
Dhoat Harpal
c66fd8c4d3 soc: qcom: ipc_router_glink_xprt: Add rx intent timeout for glink
RX intent no timeout value when waiting for response. This can result
in calling function to wait indefinitely.

Set max waiting time to 500 ms.

CRs-Fixed: 2127311
Change-Id: I30475ca49f107e62bed41d3d26287562574d988c
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
2017-10-16 18:45:47 +05:30