Commit graph

583272 commits

Author SHA1 Message Date
Linux Build Service Account
f328953528 Merge "ARM: dts: msm: enable LRA drive correction for haptics on pmi8998 and pm660" 2017-02-15 06:11:11 -08:00
Linux Build Service Account
6da12d6d62 Merge "ARM: dts: msm: Enable pil_modem for apq8998 mediabox" 2017-02-15 06:11:10 -08:00
Linux Build Service Account
b4f0ed3750 Merge "power: qpnp-fg-gen3: add support to configure batt_therm coefficients" 2017-02-15 06:11:09 -08:00
Linux Build Service Account
c0b489b27e Merge "icnss: Remove unused IPC logging mechanism" 2017-02-15 06:11:08 -08:00
Linux Build Service Account
0a39d9efce Merge "msm: ADSPRPC: Set the device node in the session context" 2017-02-15 06:11:07 -08:00
Linux Build Service Account
8244c0df9c Merge "defconfig: arm64: msm: enable CONFIG_FORCE_ALLOC_FROM_DMA_ZONE" 2017-02-15 06:11:06 -08:00
Linux Build Service Account
942e3aaf81 Merge "net: support __netdev_alloc_skb to always use GFP_DMA" 2017-02-15 06:11:06 -08:00
Linux Build Service Account
bebd369197 Merge "usb: pd: Update uevent parameters during hard reset" 2017-02-15 06:11:05 -08:00
Linux Build Service Account
4ddd471716 Merge "usb: pd: Make select_pdo_store() wait until request goes through" 2017-02-15 06:11:04 -08:00
Linux Build Service Account
d98999459a Merge "ARM: dts: msm: Fix dwc3 device node property name typo on msm8998" 2017-02-15 06:11:03 -08:00
Linux Build Service Account
cafff2d71f Merge "usb: dwc3: Fix LPM NYET Threshold value" 2017-02-15 06:11:02 -08:00
Linux Build Service Account
2c441278bd Merge "ath10k: Return failure if fw ready is not arrived" 2017-02-15 06:11:02 -08:00
Linux Build Service Account
d9717f8c9a Merge "ice: Sent proper storage type for ICE configuration during reset" 2017-02-15 06:11:01 -08:00
Hareesh Gundu
5967ecda8f msm: kgsl: Fix false timeout gpu faults
Sometimes ringbuffer timer is not getting updated due to
race with the preemption. This can cause  dispatcher to
detect false timeout gpu faults. Remove preempt state
check in adreno_dispatch_process_drawqueue(), which will
allow to update ringbuffer timeout value irrespective of
the preemption state.

If the preemption completes successfully, preemption logic
updates timer for new_rb. We don’t need to care if it is
not updated for prev_rb. If preemption in-progress timer
will be updated for cur_rb in adreno_dispatch_process_drawqueue().
In both cases we are taking care to update ringbuffer timer.
Hence we don’t need to check preemption state.

CRs-Fixed: 1095344
Change-Id: I0e0ec655e2262c4f499748ce35a8d710ed15b5e3
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
2017-02-15 19:19:27 +05:30
Uma Mehta
3e64849848 ARM: dts: msm: Add max secure video sessions for sdm660
Limit max secure concurrent instances to 5 due to
system wide limitations like memory, performance etc.

CRs-Fixed: 2005913
Change-Id: I430183633833986d6e70f78c2294f7fc221aa48c
Signed-off-by: Uma Mehta <umamehta@codeaurora.org>
2017-02-15 04:12:15 -08:00
Udaya Bhaskara Reddy Mallavarapu
5f5763f36b defconfig: msm: new flag for mediabox specific demux changes
For Mediabox project demux requires raise video frame events
only for MPEG-2 B frames and H264 non idr frames instead of all
frames. These changes are required for clock recovery & AV sync
for mediabox project.

CR's-Fixed: 2005724
Change-Id: I0c87d98b382c37381b9810b6de23267933e51c20
Signed-off-by: Udaya Bhaskara Reddy Mallavarapu <udaym@codeaurora.org>
2017-02-15 03:45:34 -08:00
Abir Ghosh
e8f2ea8146 soc: qcom: fingerprint: keep QSEE handle in kernel space
Move the QSEE handle from user space to kernel space.
In addition, fix possible overflow, when checking that
the command and response buffers fit in the shared buffer.

CRs-Fixed: 1086530
Change-Id: I21b1866546a2825fe348a260c60e341bbe9600ea
Signed-off-by: Abir Ghosh <abirg@codeaurora.org>
2017-02-15 01:28:06 -08:00
Sahitya Tummala
ce56ee0236 fuse: fix use after free issue in fuse_dev_do_read()
There is a potential race between fuse_dev_do_write()
and request_wait_answer() contexts as shown below:

TASK 1:
__fuse_request_send():
  |--spin_lock(&fiq->waitq.lock);
  |--queue_request();
  |--spin_unlock(&fiq->waitq.lock);
  |--request_wait_answer():
       |--if (test_bit(FR_SENT, &req->flags))
       <gets pre-empted after it is validated true>  TASK 2:
       						     fuse_dev_do_write():
						       |--clears bit FR_SENT,
						       |--request_end():
						          |--sets bit FR_FINISHED
							  |--spin_lock(&fiq->waitq.lock);
							  |--list_del_init(&req->intr_entry);
							  |--spin_unlock(&fiq->waitq.lock);
							  |--fuse_put_request();
       |--queue_interrupt();
       <request gets queued to interrupts list>
            |--wake_up_locked(&fiq->waitq);
       |--wait_event_freezable();
       <as FR_FINISHED is set, it returns and then
       the caller frees this request>

Now, the next fuse_dev_do_read(), see interrupts list is not empty
and then calls fuse_read_interrupt() which tries to access the request
which is already free'd and gets the below crash:

[11432.401266] Unable to handle kernel paging request at virtual address
6b6b6b6b6b6b6b6b
...
[11432.456168] PC is at __list_del_entry+0x6c/0xc4
[11432.463573] LR is at fuse_dev_do_read+0x1ac/0x474
...
[11432.679999] __list_del_entry+0x6c/0xc4
[11432.687794] fuse_dev_do_read+0x1ac/0x474
[11432.693180] fuse_dev_read+0x6c/0x78
[11432.699082] __vfs_read+0xc0/0xe8
[11432.704459] vfs_read+0x90/0x108

As FR_FINISHED bit is set before deleting the intr_entry with input
queue lock in request completion path, do the testing of this flag and
queueing atomically with the same lock in queue_interrupt().

Change-Id: I84232771cf09a809806568144441fd356b87d46c
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
2017-02-15 14:30:35 +05:30
Vikash Garodia
f29f324d06 ARM: dts: msm: Update bus bandwidth for msm8998
During certain usecases like UHD 10 bit playback,
the bus bandwidth required for Venus is more than
the bandwidth currently voted by video driver.
Though the bandwidth is calculated properly, it
gets clamped to an upper range.
Fix the upper range to accommodate bandwidth for
all Venus usecases.

Change-Id: Ic9dd3d0cb0bde89a7f6e42b3197c22fbb5192fab
CRs-Fixed: 2004597
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
2017-02-15 14:25:49 +05:30
Tirupathi Reddy
cf855b2c65 ARM: dts: msm: Config sdm660 CPR controllers to use default step_quot
There is a chance for a CPR controller to use the run-time calibrated
step_quot of lower modes for higher modes. This can sometimes lead
to closed-loop voltage getting stuck at open-loop voltage. To avoid
this, configure APC0/1 and GFX CPR controllers in sdm660 to first use
the default step_quot and then later switch to the run-time calibrated
step_quot.

CRs-Fixed: 2003482
Change-Id: Ic355a3a533ab65d9e2b28c67b7fca7df1dd49d48
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
2017-02-15 14:05:17 +05:30
Ankit Sharma
98d408f654 leds: qpnp-flash: Fix possible race condition in debugfs
There is a possible race condition when debugfs files are concurrently
accessed by multiple threads. Fix this.

CRs-Fixed: 1109420, 1109326
Change-Id: I19e9107079ac8d039b12a37ae612727f824552d4
Signed-off-by: Ankit Sharma <ansharma@codeaurora.org>
2017-02-15 13:58:42 +05:30
Hamad Kadmany
c6f596e758 ARM: dts: msm: Enable wil6210 device for 8998 qrd-vr
wil6210 is required for 11ad card that is present
in qrd-qvr. Hence update the device node status
to reflect this.

Change-Id: I43eb45fcb00449fd7b714c6407d9aa8cc9c518a9
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
2017-02-15 09:26:26 +02:00
Ankit Sharma
de7eaac512 power: qpnp-fg: Fix possible race condition in FG debugfs
There is a possible race condition when FG debugfs files are concurrently
accessed by multiple threads. Fix this.

CRs-Fixed: 1105481
Change-Id: I154e7f3cdd8d51cf67ef1dfd9d78f423f183cb64
Signed-off-by: Ankit Sharma <ansharma@codeaurora.org>
2017-02-15 11:36:56 +05:30
Santosh Mardi
6862793081 ARM: dts: msm: add support of devfreq and cpufreq on SDM630
Add support for devfreq and cpufreq nodes on SDM630 target
which are needed to scale cpu and DDR frequency.

Change-Id: Ic1051e712a3a6578eb6448538e15be9acb85dc89
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
2017-02-15 11:22:32 +05:30
Pavankumar Kondeti
ab05391aa6 sched: don't assume higher capacity means higher power in tick migration
When an upmigrate ineligible task running on the maximum capacity CPU,
we check if it can be migrated to a lower capacity CPU in tick path.
Add a power cost based check there to prevent the task migration
from a power efficient CPU.

Change-Id: I291c62d7dbf169d5123faba5f5246ad44a7a40dd
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2017-02-15 08:48:17 +05:30
Pavankumar Kondeti
b1c40e1868 sched: optimize cpumask operations during task placement
Compute the CPU search mask once by taking task affinity,
cpu_active_mask and cpu_isolated_mask into account and cache
it in cpu_selection_env. This prevents doing the same cpumask
operations multiple times.

Change-Id: I78f35c59e6ee9437b3a522ac7ad856c0251f81ec
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2017-02-15 08:21:29 +05:30
Udaya Bhaskara Reddy Mallavarapu
999ccca3bc ARM: dts: msm: Enable LPASS timestamps in TSPP driver for APQ8998
Set the TSPP configuration to enable LPASS time stamps in TSIF HW.
The TSIF adds LPASS timestamps to Transport Stream packets instead
of TSIF internal clock timestamps. This change is required for clock
recovery & AV sync for mediabox project based on LE platform.

CR's-Fixed: 2005724
Change-Id: I43f0e8c2593b12e65e603f23a6c1acb663ef439e
Signed-off-by: Udaya Bhaskara Reddy Mallavarapu <udaym@codeaurora.org>
Signed-off-by: Arun Menon <avmenon@codeaurora.org>
2017-02-14 16:44:17 -08:00
Udaya Bhaskara Reddy Mallavarapu
79db7c3476 media: platform: msm: Add demux support for mediabox
Add audio stream buffer interface to write the Audio demux data
to audio decoder buffers. Add support in TSIF driver to append
LPASS subsystem time stamps to Transport Stream packets in TSIF HW.
This is required for AV sync & clock recovery handling
for mediabox project based on LE platform.

CR's-Fixed: 2005724
Change-Id: I39d2544e958c31ff1abdd2ad77412a87bc2a189b
Signed-off-by: Udaya Bhaskara Reddy Mallavarapu <udaym@codeaurora.org>
Signed-off-by: Arun Menon <avmenon@codeaurora.org>
2017-02-14 16:44:11 -08:00
Harry Yang
367d29c80e qcom: smb-lib: expose fcc value change in batt psy
Add CONSTANT_CHARGE_CURRENT_MAX, to set and get fcc.

CRs-Fixed: 2004173
Change-Id: I3dfed0ca7b2a477e1c106955fa112ba5206e3fa4
Signed-off-by: Harry Yang <harryy@codeaurora.org>
2017-02-14 16:24:11 -08:00
Zhen Kong
3f3f20e347 qseecom: add new SCM ID to register listener when smcinvoke is supported
Add new SCM ID to register listener when smcinvoke is supported. Then
TZ, depending on how the listener has been registered, will either
behave in the old way (i.e. rsp[1]=QSEE_LISTENER_ID), or the new way
(rsp[1]=app_id) when smcinvoke is supported. And qseecom will first
to register listener with new SCM ID, if failed, then fallback to
use old ID.

Change-Id: Ia27055db6ec8f26705669ee913919b29461121ca
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
2017-02-14 15:32:19 -08:00
Prashanth Bhatta
0270440dc2 defconfig: msmcortex: Disable CONFIG_ICNSS_DEBUG
Disable CONFIG_ICNSS_DEBUG now that solution is stable.

CRs-fixed: 2006760
Change-Id: Ic2cd7a02f3486ab81739e8b2fe2259087e3539d6
Signed-off-by: Prashanth Bhatta <bhattap@codeaurora.org>
2017-02-14 13:35:20 -08:00
Harry Yang
a486d41bf8 smb138x-charger: Fix max conn temp config
The value of device tree property qcom,connector-temp-max-mdegc is
passed to a wrong variable. Fix it.

CRs-Fixed: 1077217
Change-Id: I705467d91dd8e5e9ea4aa0ab231e29c512608f36
Signed-off-by: Harry Yang <harryy@codeaurora.org>
2017-02-14 12:43:25 -08:00
Abhijeet Dharmapurikar
12b313359e smb-lib: fix icl changed interrupt storm
Current driver has two votables for controlling the usb current
and the usb suspend bit. This could lead to a situation where
the icl votable changes current setting while its suspended.
Changing current setting while suspended causes icl changed
interrupt storm.

Fix it by removing usb_suspend_votable and make all the suspend
voters call usb_icl_votable with 0mA to cause suspend.
Update usb_icl_votable to update current settings only when
not suspended. Moreover disable the interrupt while changing
the current settings and enable the interrupt only after the
unsuspend.

Change-Id: Iafc8ee3c934952b8131d374d0529e865424016d5
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-02-14 12:15:48 -08:00
Venkat Gopalakrishnan
a32405cd87 scsi: ufs: handle LINERESET error only during hibern8 enter
If LINERESET was detected during hibern8 exit, HW recovers
link back to original speed automatically by PA_INIT sequence,
hence remove the full reset.

Change-Id: I181adf4580c0febed817047a40c1d0621d9c9824
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2017-02-14 10:59:02 -08:00
Venkat Gopalakrishnan
cb7145f652 scsi: ufs: renable AH8 timer on reset
Auto hibern8 timer will get reset as part of ufshcd_vops_full_reset(),
so reenable the timer in ufshcd_probe_hba().

Change-Id: I8ff85a9fd02f4a6b527666654728c4146cb61f5e
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2017-02-14 10:52:04 -08:00
Girish Mahadevan
f61d2a9a02 spi: spi_qsd: Set DMA mask for SPI device
Set the DMA mask for the SPI device appropriately.

This will alleviate usage of bounce buffers by the dma kernel library and
prevent some of the crashes due to the kernel running out of bounce
buffers.

Change-Id: I7b0b123be6e7bb1e30d0755ca8b1b72ea4e2b5f6
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
2017-02-14 10:34:47 -07:00
Ashay Jaiswal
13a6aeb3a9 qcom: smb-lib: enable parallel charging for SDP/CDP/OCP/FLOAT adapter
Parallel charging is enabled only for DCP and HVDCP adapters, add
support to enable parallel charging for SDP/CDP/OCP and FLOAT chargers.
While at it, rename PL_DISABLE_HVDCP_VOTER to PL_DELAY_HVDCP_VOTER.

Change-Id: I79b28ee6fd91739fa9895959d9ca3d399506d388
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
2017-02-14 21:45:00 +05:30
AnilKumar Chimata
fee158d588 ice: Sent proper storage type for ICE configuration during reset
Read instance type from device tree node to know the storage type
for ICE configuration, which is used to program the corresponding
ICE register during ICE reset.

Change-Id: I0eb423fb84dc89115227abc7c5688df7ae9a4a3c
Signed-off-by: AnilKumar Chimata <anilc@codeaurora.org>
2017-02-14 20:50:16 +05:30
Amir Samuelov
4cb10a6af9 soc: qcom: spcom: fix error handling
- Verify spcom_dev is not NULL when exported API or callbacks are called.
- Use IS_ERR() when calling a function that returns a pointer.
- Unregister glink client if probe fails.
- Verify number of predefined channels in device tree is valid.

Change-Id: I4255fe651c4088848da1d31bb448394e2d8ce4b5
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
2017-02-14 05:56:01 -08:00
Amir Samuelov
3c6f9a99c0 soc: qcom: spss_utils: fix error handling
On error, do the necessary cleanup and propagate the error.

Change-Id: Ief048ecfdba3aff77f62e5da5b8207f4e8e606b2
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
2017-02-14 15:24:56 +02:00
Brahmaji K
ae4aca0324 ARM: dts: msm: Move sdcc and ufs ice nodes
As sdcc and ufs ice nodes are common between sdm660
and sdm630, move sdcc and ufs ice nodes to common
device tree file to avoid duplication of nodes.

Change-Id: I1e018ef44759e8cc3ce201e19a1e99ba6bb601bd
Signed-off-by: Brahmaji K <bkomma@codeaurora.org>
2017-02-14 18:37:16 +05:30
Vijayavardhan Vennapusa
040d3c988c USB: phy-msm-qusb: Fix race conditions during fast PI/PO
During fast cable connect/disconnect, there is chance that
set_suspend() called as part of USB entering low power mode
and PMIC driver asking to remove pulldowns race each other.
This could cause unclocked access and results in crash. Fix this
issue by using mutex to avoid crash due to the race mentioned.

Change-Id: I1babb545d40b8761774cbdd3a57258ed6bc77398
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2017-02-14 17:30:39 +05:30
Vijayavardhan Vennapusa
273dcf1abb USB: u_data_ipa: Fix NULL pointer dereference before starting RX/TX
If disconnect happens before connect_work done, there is a chance that
port_usb might be NULL before calling ipa_data_start_rx_tx(). This could
cause crash if it happens. Fix it by taking to local variable under
spin lock protection and check later before calling ipa_data_start_rx_tx()
for queuing RX/TX requests to USB HW.

Change-Id: I82d74e34bb4d29eac225d31dac67bf5d5bc39a79
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2017-02-14 16:54:01 +05:30
Karthik Parsha
70e9765c93 rpm-rail-stats: Add support to read RPM rail stats
Shared rails such as CX, MX are controlled by the RPM. RPM aggregates
the votes to these rails and sets the rails at a corner voltage to
satisfy the needs of all the masters.

Add support to read and print the CX, MX rail-stats from shared memory.

cat /d/rpm_rail_stats

Number of Rails:2
        rail:mx num_corners:4  current_corner:2  last_entered:0
                corner:ret   time:0
                corner:svs   time:0
                corner:nom   time:0
                corner:turb  time:0
        rail:cx num_corners:5  current_corner:1  last_entered:0
                corner:ret   time:0
                corner:svs2  time:0
                corner:svs   time:0
                corner:nom   time:0
                corner:turb  time:0

Change-Id: I730c4accc1bf4c152ef95f9ce9343a58022c2630
Signed-off-by: Karthik Parsha <kparsha@codeaurora.org>
Signed-off-by: Naresh Malladi <namall@codeaurora.org>
2017-02-14 16:33:38 +05:30
Vijayavardhan Vennapusa
1cdcea066d usb: pd: Fix probe failure in case of no sink capablities passed
Commit b76105e359 ("usb: pd: Read sink capabilities from device
tree") added support in usbpd driver to pass sink capablities from
device tree. But it introduced bug in case of no sink capablities
passed from device tree as in this case, device_property_read_u32_array()
returns -EINVAL. Due to this, usbpd driver probe fails as usbpd_create()
returns errors. Fix this issue by checking if return value > 0 and then
only try to read sink capablities from device tree. If not, use default
sink capabliites defined in usbpd driver.

Change-Id: I51beeba282c6e067881c664d38c2657843a1c716
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2017-02-14 15:44:21 +05:30
Yingwei Zhao
5d7f1e0b9c ARM: dts: msm: Disable home key for SDM660 QRD
Home key is designed on the PCB level as a compatible solution, but
there is no mechanical hard key installed. Currently, GPIO11 on PM660
has been assigned the interrupt owership to modem, and this will cause
probe failure on gpio-keys driver and fail other gpio keys detection.
So, remove the home key configuration as a temporary solution.

CRs-Fixed: 2006468
Change-Id: Ib42a79e60c0cdf1489a63ba66ce7cde97c0e3f47
Signed-off-by: Yingwei Zhao <cyizhao@codeaurora.org>
2017-02-14 18:12:52 +08:00
Govind Singh
7ad58448ad ath10k: Remove redundant code from snoc layer
The ath10k snoc bus uses NAPI in rx path and tasklet
is no more used. Remove tasklet references from
bus layer. Refactor driver unload path to have
consistency in API uses.

CRs-Fixed: 2005874
Change-Id: Ib9534286ed45bf1394e109c6ca8063cd89a1d58e
Signed-off-by: Govind Singh <govinds@codeaurora.org>
2017-02-14 15:22:59 +05:30
Gopikrishna Mogasati
92eab34218 diag: dci: Send masks information to only supported peripherals
Currently log and event mask information is sent to all
peripherals. This fix sends log and event mask information
to only dci supported peripherals.

CRs-Fixed: 1117238
Change-Id: Ibcf3762574212e097502b2f36f7ac9284bac3e06
Signed-off-by: Gopikrishna Mogasati <gmogas@codeaurora.org>
2017-02-14 15:10:50 +05:30
Vevek Venkatesan
2881d2bbc2 input: touchscreen: gt9xx: fix memory corruption in Goodix driver
Fix memory corruption in Goodix touchscreen driver, by resetting
the global structure cmd_head to zero (except *data and wr flag)
in goodix_tool_write handler on error case.

Change-Id: I4f7f8f464b93571627b922b10c10a65826228e42
Signed-off-by: Vevek Venkatesan <vevekv@codeaurora.org>
2017-02-14 14:58:12 +05:30
Tirupathi Reddy
0439a99960 ARM: dts: msm: Enable APC0/1 CPR closed-loop operation for sdm660
Configure APC0/1 CPR instances to operate in closed-loop operation
to maintain an optimal voltage set point on the APC0/1 voltage rails.

Also, add static open-loop and closed-loop voltage margins as per
the early voltage characterization results.

CRs-Fixed: 2006437
Change-Id: Iea42d16d2e7c19a2779090d767dd37b0865b24c2
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
2017-02-14 14:41:10 +05:30