Commit graph

589788 commits

Author SHA1 Message Date
Linux Build Service Account
696b2e8fbe Merge "qpnp-smb2: Add software based glitch filter for OTG detection" 2017-05-15 03:51:19 -07:00
Linux Build Service Account
da60dd7190 Merge "dma-mapping: Always remap on dma buffer free" 2017-05-15 03:51:18 -07:00
Linux Build Service Account
c8b9cb715e Merge "ARM: dts: msm: Update the virtual corner for SDM630" 2017-05-15 03:51:17 -07:00
Linux Build Service Account
fee8893548 Merge "clk: Move vdd voting before set rate and parent" 2017-05-15 03:51:16 -07:00
Linux Build Service Account
fc2f0e6d95 Merge "usb: gadget: f_cdev: Increase number of driver instances to 3" 2017-05-15 03:51:15 -07:00
Linux Build Service Account
286d3aa674 Merge "msm: camera: isp: Fix excessive logging in w+t" 2017-05-15 03:51:14 -07:00
Depeng Shao
4f19bb77fe msm: camera: sensor: Validate sensor related name length
Variable "slave_info->sensor_name", "slave_info->eeprom_name",
"slave_info->actuator_name" and "slave_info->ois_name" are
from user input, which may be not NULL terminated.
OOB will be possible when accessing these variable.

Add a validation for these name length.

Change-Id: I9a570372707b7f8365a625d6b0662e87d1b4926e
Signed-off-by: Depeng Shao <dshao@codeaurora.org>
2017-05-15 03:25:54 -07:00
Amir Samuelov
646bb3157b spcom: avoid user commands via /dev/spcom
The pseudo-file char-device-nodes /dev/spcom and /dev/sp_ssr are not
associated with a logical channel for data transfer with the Secure
Processor (SP).
Avoid sending user command by file write() over those device nodes.
The command "create channel" should be done over /dev/sp_kernel rather
than over /dev/spcom.
Verify that glink pass valid channel pointer to spcom callbacks.
Use size_t for channel "actual_rx_size" parameter that is provided by
glink to spcom callback.
Remove "fake SSR" command, since real SSR is supported by SP.

Change-Id: Id9113389d94ab4aed01d3ac1e370c4e8f3c8965b
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
2017-05-15 00:55:31 -07:00
Neeraj Upadhyay
1ef28deec0 timer: Clear deferrable_pending while handling timer softirq
Clear deferrable_pending everytime timer softirq is run.
This handles a potential race condition, where one CPU
handles all deferrable timers, before the other CPU gets
a change to run timer softirq. Due to the deferrable_pending
not getting cleared, subsequently, CPUs do not raise
the softirq for handling expired deferrable timers,
in nohz idle enter path.

Change-Id: Ie5fd78f9b27e7553ba43101b86ad939c289827e0
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
2017-05-15 00:06:22 -07:00
Maulik Shah
a9cab2670f soc: qcom: rpm_master_stat: Fix buffer overflow
Buffer overflow can happen when finding next set bit
due to type casting of uint32_t to unsigned long.

Fix this to correctly print number of active cores in
rpm_master_stat.

Change-Id: Ibeacc5ac66535e373965d8f8e4919829367cc257
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
2017-05-15 12:17:27 +05:30
Depeng Shao
1b8eb9f5c9 msm: camera: sensor: Validate sensor name during probe
Some cameras have same sensor id in one device,
but camera sensor driver just validate sensor
id now which may result in wrong probe when camera
daemon is killed and camera re-probe sensor again.

Also validate the sensor name if sensor has probed.

Change-Id: I641bf8c346bada9e6cc619389077e25e666c743f
Signed-off-by: Depeng Shao <dshao@codeaurora.org>
2017-05-14 23:33:14 -07:00
Deepak Kushwah
0387bfaacf ARM: dts: msm: Add entry for video throttle clock on sdm660 and sdm630
Throttle clocks are always on, add entries in device node so that
driver can enable during session is running and disable it when
session is closed to save power.

Change-Id: I818d0c9121b0830cbaeb3bc0b89ea3c421f6028d
CRs-Fixed: 2036215
Signed-off-by: Deepak Kushwah <dkushwah@codeaurora.org>
2017-05-14 23:31:47 -07:00
Anirudh Ghayal
01cb0bde1c ARM: dts: msm: Update charging ESR timer value to 96 for PM660 FG
Use the same FG ESR timer value (96) for charging and
discharging. This is to avoid the frequent periodic spur
seen in the RF performance with charger connected.

CRs-Fixed: 2046553
Change-Id: I9d1ad61f75f553bf527906715699817236f44b01
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2017-05-15 11:44:55 +05:30
Rob Clark
e2135a7627 drm/msm: drop return from gpu->submit()
At this point, there is nothing left to fail.  And submit already has a
fence assigned and is added to the submit_list.  Any problems from here
on out are asynchronous (ie. hangcheck/recovery).

Change-Id: Ib6b6bf00099137972649c97cc6cd8c4fe25ce7c3
Signed-off-by: Rob Clark <robdclark@gmail.com>
Git-commit: 1193c3bcb581807d58dd7df90528ec744af387a9
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[smasetty@codeaurora.org: fixed merge conflict issues; made corresponding
changes to A5XX submit function.]
Signed-off-by: Sharat Masetty <smasetty@codeaurora.org>
2017-05-15 11:16:11 +05:30
Udaya Bhaskara Reddy Mallavarapu
9603f4f5cd media: dvb-core: Fix coding errors in broadcast drivers
Added Check to verify TSPP channel input source is valid.
Initialize return variables to return correct values in fail conditions.
Move deferencing of input pointer arguments after NULL checking.

CR's-Fixed: 2043689
Change-Id: I7febdb0e0f499846cfcf8836ea35c8547a5074fb
Signed-off-by: Udaya Bhaskara Reddy Mallavarapu <udaym@codeaurora.org>
2017-05-14 21:12:44 +05:30
Linux Build Service Account
c6d1c1699e Merge "drm/msm: make msm_drm.h uapi header safe for C++" 2017-05-13 16:25:54 -07:00
Stephen Boyd
c3ed5ae37c ARM64: Make KERNEL_TEXT_RDONLY depend on !DEBUG_RODATA
KERNEL_TEXT_RDONLY is similar to DEBUG_RODATA, but it relies on
4k pages to be made, whereas DEBUG_RODATA can work with or
without 4k pages. Let's move the depends on statement from
FORCE_PAGES to KERNEL_TEXT_RDONLY to accurately reflect the real
dependency here. This fixes a warning where we have FORCE_PAGES
enabled but DEBUG_RODATA is also enabled at the same time because
the latter is "default y" now and the depends on for FORCE_PAGES
can't be satisfied. In fact, it's OK for FORCE_PAGES to be
enabled at the same time as DEBUG_RODATA, it's really there to
prevent KERNEL_TEXT_RDONLY being enabled at the same time as
DEBUG_RODATA. Move the depends on to make things clearer.

Change-Id: Ie73b768ed4540cdb4d752a9b5f1a049bf644bc7e
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2017-05-12 08:47:47 -07:00
Olav Haugan
092564d2a8 defconfig: msmcortex: Cleanup
Sync defconfig with make menuconfig output.

Change-Id: Ieefef23fe14676007580c524268ef2a228d38059
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2017-05-12 08:44:35 -07:00
Stephen Boyd
0ed5a46cc0 ASoC: wcd: Depend on right config option
Kconfig doesn't have the CONFIG_ part of the option, so don't use
it here. This fixes a kconfig warning about missing a dependency
for "CONFIG_SPI" which doesn't exist because it's supposed to be
"SPI".

Change-Id: Ie449ff250dd87b0a445d34ee079082c6e91f147c
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2017-05-12 08:37:11 -07:00
Ashay Jaiswal
0038058ab4 qpnp-smb2: Add software based glitch filter for OTG detection
When the USB_ID line is pulled low for a very short time there is a
possibility that the SW misses rising edge(removal) event. This may
lead to the state where charger is stuck in the boost-mode forever.

Fix this my adding a SW based glitch logic which checks for the
USB_ID after a SW debounce time and then notifies its presence/removal to
the USB driver.

CRs-Fixed: 2044958
Change-Id: I31974f7d68b435bbef329278cedbd726ada02e3f
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
2017-05-12 16:45:10 +05:30
Saranya Chidura
24bba179ae defconfig: msm: remove dcc config for perf on sdm660
remove the DCC_CONFIG option in perf defconfig for SDM660
target.

Change-Id: Id1b019a5eb1c6a71d4b5e6e854e642411714a900
Signed-off-by: Saranya Chidura <schidura@codeaurora.org>
2017-05-12 15:26:51 +05:30
Ritesh Harjani
45eadbbce3 mmc: mmc: Fix mmc_partial_init for HS400 mode
In case of emmc5.0 cards where HS400 mode and CMD5(awake) partial
init is enabled -> mmc_partial_init is broken and gives below errors.
Fix this by adding calibration logic in case of HS400 mode.

NOTE: In HS400 mode tuning is only performed once during bootup (in
HS200 mode).
Post to that it is always DLL calibration which is performed (in
system/runtime resume).
So even for below issue since timing is already changed using
cached_ios, then do the calibration using ->execute_tuning.

<dmesg errors w/o patch>
root@msm8996:/ # [   76.011036] mmc0: mmc_runtime_suspend:
[   77.315903] mmc0: mmc_runtime_resume:
[   77.367866] mmc0: mmc_partial_init: starting partial init
[   77.376225] mmc0: mmc_test_awake_ext_csd: mmc_get_ext_csd failed
(-110)
[   77.382190] mmc0: mmc_partial_init: done partial init (-110)
[   77.387536] mmc0: _mmc_resume: awake failed (-110), fallback to full
init
[   77.394405] mmc0: mmc_init_card:
[   77.402762] mmc0: mmc_init_card: mmc_send_op_cond() fails -110
[   77.407573] mmc0: MMC card re-init failed rc = -110 (retries = 3)
[   77.507261] mmc0: _mmc_resume: awake failed (-110), fallback to full
init
[   77.513293] mmc0: mmc_init_card:

<dmesg with patch>
[   74.002624] mmc0: mmc_runtime_resume:
[   74.056089] mmc0: mmc_partial_init: starting partial init
[   74.067143] mmc0: mmc_partial_init: done partial init (0)

Change-Id: I0e55efb7863b75bd584843c3fc920c845996eb5c
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
2017-05-12 02:08:27 -07:00
Ajay Agarwal
2ecf8c9fd2 sound: usb: Add default branches for BADD 3.0 devices
For a BADD 3.0 device, the Data Endpoint wMaxPacketSize
of an Alt Setting must be one of the values mentioned in
the specifications. Similarly, the unit IDs of the source
units of any entity is prescribed by the specs. Add
support for checking the error(default) branches in the
relevant switch cases and accordingly handle them.

Change-Id: Ib88eee21df012089d41c4e78a161ddc6767e1bd4
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2017-05-12 12:33:15 +05:30
Tharun Kumar Merugu
94e69df401 msm: ADSPRPC: verify and initialize some variables
Verify cid variable before accessing it and
initialize invoket variable before bailing out.

Change-Id: Idec133bf8ba1a000b83f92bb567f0b75bbdab340
Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org>
2017-05-11 23:40:29 -07:00
Manoj Prabhu B
b57f957da3 memshare: Update the free memory count after allocation
The patch updates the client's free memory
count variable after the successful allocation.

CRs-Fixed: 2046258
Change-Id: Ibae317596557e23d2b2278daf433bd293a8bd0be
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
2017-05-12 10:42:41 +05:30
Santosh Mardi
28aab0311c PM/devfreq: bw_hwmon: add mutex lock in polling interval case
Protect polling interval update event in the governor
with mutex lock.
This will avoid parallel execution of update interval event
on different cores, resulting in memory poison overwritten.

CRs-Fixed: 2035633
Change-Id: Ib919d9774317bc01e3cf581c169c5d18555f484f
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
2017-05-12 10:22:31 +05:30
Taniya Das
1098fcc4b9 clk: Move vdd voting before set rate and parent
There could be clocks where the clock operations of set_rate_and_parent
would be defined to take care of setting rate and updating parent.
Move the vdd voting logic to ensure the vdd levels are voted prior to
updating rate and parent.

Change-Id: I57f903f95f290627d676afd567a6e6d21decf4a3
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2017-05-12 10:13:32 +05:30
Can Guo
6a4c4fcfe2 scsi: ufs: Initialize cmd_id and check lrbp->cmd NULL
In commit d70b0a18f6 ("scsi: ufs: add command
logging infrastructure"), cmd_id is not initialized
and lrbp->cmd is explicitly dereferenced without
checking NULL. Fix them by initializing cmd_id with
an initial value 0 and checking NULL for lrbp->cmd.

Change-Id: I6f66066adc8d53e3615df50ac49dd313f6d7ea8e
Signed-off-by: Can Guo <cang@codeaurora.org>
2017-05-12 08:20:54 +08:00
Amar Singhal
cb704257ac msm: wlan: Update regulatory database
Update regulatory database for countries KR, KP and NA.

CRs-Fixed: 2046148
Change-Id: Ic040c209be10af63006bb53c19efab97c0587cb5
Signed-off-by: Amar Singhal <asinghal@codeaurora.org>
2017-05-11 15:00:33 -07:00
Zhen Kong
c5d33082ab qseecom: add bus scaling support for GP operations
When a GP application is loaded and the crypto engine is accessed,
a NOC error will happen if CE clock is not enabled. Thus, add bus
scaling support for GP operations.

Change-Id: I59d63be9e08b2c135edc6ec224ec1a355434e1ec
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
2017-05-11 14:54:54 -07:00
Linux Build Service Account
ae4d972f07 Merge "Merge branch 'android-4.4@9796ea8' into branch 'msm-4.4'" 2017-05-11 11:48:48 -07:00
Linux Build Service Account
24638027f1 Merge "drm/msm: add extern C guard for the UAPI header" 2017-05-11 11:48:47 -07:00
Linux Build Service Account
8691dbd00f Merge "input: misc: fix error path for hbtp touch driver" 2017-05-11 11:48:46 -07:00
Linux Build Service Account
9ad03b1fbd Merge "ARM: dts: msm: Add SMB1381 device node for QRD SDM660" 2017-05-11 11:48:45 -07:00
Linux Build Service Account
166f9cc74b Merge "diag: Validate proper mdlog session for a PD" 2017-05-11 11:48:44 -07:00
Linux Build Service Account
aa86283c28 Merge "ota_crypto: Add NULL pointer check for new_req variable" 2017-05-11 11:48:43 -07:00
Linux Build Service Account
8de2594b01 Merge "USB: f_qdss: Fix crash issue during connect_work" 2017-05-11 11:48:41 -07:00
Linux Build Service Account
e6f467a16d Merge "soc: qcom: qpnp-haptic: add support for auto mode" 2017-05-11 11:48:40 -07:00
Linux Build Service Account
4f71440325 Merge "scsi: ufs: ufs-qcom-ice: Initialize local variable in ice_cfg_start()" 2017-05-11 11:48:39 -07:00
Linux Build Service Account
b044376188 Merge "mmc: core: Replacing sprintf() with snprintf()" 2017-05-11 11:48:38 -07:00
Linux Build Service Account
c454ad4e3e Merge "sound: usb: Fix format desc usage for BADD 3.0 devices" 2017-05-11 11:48:37 -07:00
Linux Build Service Account
a55a52a8a2 Merge "drm/msm: Allocate secure buffer objects" 2017-05-11 11:48:34 -07:00
Hemant Kumar
cbec952d17 usb: gadget: f_cdev: Increase number of driver instances to 3
This allows to instantiate two dial up network interfaces and
one NMEA interface.

Change-Id: I59f5d93a5e9360628d8004508162dcdb42f6520d
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2017-05-11 11:12:50 -07:00
Shiraz Hashim
504b0bb784 dma-mapping: Always remap on dma buffer free
DMA clients may opt to clear cpu virtual address mapping
on alloc. On free when dma buffer is given back to cpu,
ensure that it is always remapped in cpu address space.

Change-Id: I67f9616d9bee8cf07cbe81468ebf174d2599f4c5
Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
2017-05-11 10:45:31 -07:00
Linux Build Service Account
c4a48b7ed2 Merge "mmc: host: sdhci-msm-ice: Initialize local variable in ice_cmdq_cfg()" 2017-05-11 06:48:13 -07:00
Linux Build Service Account
33a48f3f45 Merge "ath10k: cancel the event work in wlan snoc driver module remove" 2017-05-11 06:48:12 -07:00
Linux Build Service Account
f87cdfa943 Merge "qseecom: Initialize the hlos_ce_hw_instance array" 2017-05-11 06:48:11 -07:00
Linux Build Service Account
d2c35f47e8 Merge "btfm: Fix coding error with uninitialized variables" 2017-05-11 06:48:09 -07:00
Linux Build Service Account
9a95bce25c Merge "input: stm: Fix NULL dereference in laser driver" 2017-05-11 06:48:08 -07:00
Linux Build Service Account
590cfee905 Merge "msm: camera: Fixing NULL dereference in sensor code" 2017-05-11 06:48:06 -07:00