Commit graph

578653 commits

Author SHA1 Message Date
Linux Build Service Account
894ba12732 Merge "arm64: avoid segfault on el0 cache maintenance" 2016-11-28 23:57:26 -08:00
Linux Build Service Account
2c6ca087da Merge "msm: mdss: Fix potential deferencing of null pointer" 2016-11-28 23:57:25 -08:00
Linux Build Service Account
a471456332 Merge "msm: mdss: hdmi: fix potential null deference errors" 2016-11-28 23:56:42 -08:00
Shankar Ravi
5e13a312f7 ARM: dts: msm: Camera configuration for msmfalcon interposer
1. Voltage regulator changes for rear camera
   and eeprom.
2. Gpio changes for rear camera and eeprom.

Change-Id: Ie59a748d016211d5ddbab2593ec310a313690f9e
Signed-off-by: Shankar Ravi <rshankar@codeaurora.org>
2016-11-29 12:35:09 +05:30
Jordan Crouse
eed663a48b msm: kgsl: Reserve a context ID slot but don't populate immediately
When creating a context allocate an ID but don't populate the slot
with the context pointer until we are done setup up the rest of the
process. This avoids a race if somebody tries to free the same
identifier before the create operation is complete.

Change-Id: Ic0dedbadca5b4cc4ce567afad48a33078b549439
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Dumpeti Sathish Kumar <sathyanov14@codeaurora.org>
2016-11-29 12:32:52 +05:30
Ashay Jaiswal
3b15b86284 ARM: dts: msm: update resource id of SSC regulator of PM2FALCON
RPM expects resource-id of each type of regulator to start from
0. Update the resource-id of SSC regulator accordingly.

Change-Id: Id9721e5b96df08a1090914b968c93436d15169a9
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
2016-11-29 11:07:59 +05:30
Mohit Aggarwal
59045a4916 diag: Set in_busy only after initialization of read buffers
Currently, there is a possibility that read buffers are
not initialized but diag ends up marking buffers busy and
stops reading from peripheral, which leads to port loss.
Also reset the in_busy variable for the buffer that reads
the data from smd channel when diag smd state is closed.

CRs-Fixed: 1093989
Change-Id: I1990d0ded5a212c9185c149ac297a3630d64bc59
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
2016-11-28 19:47:57 -08:00
Maheshwar Ajja
aea54c3cba msm: vidc: avoid repeated calls to handle_sys_error
There is no need to call handle_sys_error if it is
called already. So check the core state to return
if it is not in valid state.

CRs-Fixed: 1072500

Change-Id: Iaa77ea31f29190dcf35b4bfc4913b8eec0d638b0
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2016-11-28 19:25:35 -08:00
Maheshwar Ajja
e4798a5564 msm: vidc: Fail qbuf and prepare_buf incase of error
If either instance state or core state is invalid, then
we should fail and return error from qbuf and prepare_buf.

CRs-Fixed: 1072500

Change-Id: I0efc3125b2c204dafbc90d011a4e9ad3fb1c1ba2
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2016-11-28 19:20:57 -08:00
Pengfei Liu
39c1b136f5 ARM: dts: msm: Add actuator and flash src for msm8998 qrd skuk board
Add actuator src and flash src of camera0 node for
support focus and flash function on msm8998 qrd skuk board.

Change-Id: I92ed864aedfdd38c8670e08fb35a6545e8abb142
Signed-off-by: Pengfei Liu <pengfeiliu@codeaurora.org>
2016-11-28 18:12:51 -08:00
Yuanyuan Liu
aa8243259a ARM: dts: msm: Remove msm_bus bandwidth vote for msm8998
Remove msm_bus bandwidth vote from DT for msm8998
as WLAN FW will take care of it.

CRs-Fixed: 1094917
Change-Id: Ied5dcb9e3283dc2ec7f5fd6f03465b070f989d8b
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
2016-11-28 17:44:17 -08:00
Tatenda Chipeperekwa
e79745a54e msm: mdss: dp: fix GPIO settings to support flip plug orientation
Fix the GPIO settings by changing output of GPIO78 to 0 to flip
the on board AUX switch, and furthermore, setting the function
of GPIO38 to gpio. These updated GPIO settings enable flip plug
orientation to work by fixing the AUX switch and the PHY lane
configuration.

Change-Id: I0da80a4f524ba84cf6740521f6b1bfe63a85de38
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
CRs-Fixed: 1062508
2016-11-28 17:14:03 -08:00
Tatenda Chipeperekwa
5582e2ae28 clk: msm: mdss: fix PHY programming for flip plug orientation
Fix the PHY programming sequence for flip plug orientation by
ensuring that the correct PHY_MODE and LANE_MODE values are
selected, depending on the orientation and link rate
respectively.

Change-Id: I6e74c20c509b7007a86df9d99894a9a6c0baa946
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
CRs-Fixed: 1062508
2016-11-28 17:11:07 -08:00
Runmin Wang
9b0c12f0c4 ARM: dts: msm: remove msm8998-mtp reference for msm8998 QRD device
Remove redundant inclusion of mtp dtsi in msm8998-qrd.dtsi file.

CRs-Fixed: 1094871
Change-Id: Ibc9e99fd69cbd30e449d0fec728d71a1fa7f162c
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
2016-11-28 16:29:13 -08:00
Ingrid Gallardo
c6576956d1 msm: mdss: add support to set mdp clock rate before enable
Current clock driver requires that before enabling
the core clock after power collapse, the set rate
must be called. Ensure this sequence by always calling
the set rate for the mdp core clock before enable.

Change-Id: I872f18235b0b1685dfdee3de99827d031077a012
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
2016-11-28 15:13:17 -08:00
Linux Build Service Account
04947ea3d8 Merge "qseecom: fix incomplete error handling for several functions" 2016-11-28 14:56:48 -08:00
Linux Build Service Account
edaa2db04b Merge "Revert "scsi: ufs: disable ah8 during suspend and enable it on resume"" 2016-11-28 14:56:47 -08:00
Linux Build Service Account
e8b113ce8c Merge "usb: pd: pdphy: Update Tx Trim setting" 2016-11-28 14:56:45 -08:00
Linux Build Service Account
97f41c5dcb Merge "USB: dwc3-msm: clear in_restart flag always in restart work" 2016-11-28 14:56:44 -08:00
Linux Build Service Account
9935c9406d Merge "USB: dwc3-msm: Fix issue related to error recovery for ERRATIC ERROR" 2016-11-28 14:56:42 -08:00
Linux Build Service Account
19896c0df8 Merge "msm: mdss: Fix disabling destination scalar using 4K panel" 2016-11-28 14:56:41 -08:00
Linux Build Service Account
746f6de6dc Merge "msm: mdss: fix some potential issues in HDMI driver" 2016-11-28 14:56:40 -08:00
Linux Build Service Account
cab5267d39 Merge "msm: mdss: add support to change HDMI PLL PPM" 2016-11-28 14:56:39 -08:00
Linux Build Service Account
d664e19659 Merge "ARM: dts: msm: add UFS_RESET pin ctrl data for msm8998" 2016-11-28 14:56:37 -08:00
Linux Build Service Account
1c699f1930 Merge "pinctrl: qcom: add UFS_RESET pin data for msm8998" 2016-11-28 14:56:36 -08:00
Linux Build Service Account
08c4e0ff9b Merge "smb-lib: fix vbus-error handler" 2016-11-28 14:56:34 -08:00
Linux Build Service Account
e86657b5ad Merge "msm: mdss: add atraces to track switch cmd delays" 2016-11-28 14:56:32 -08:00
Osvaldo Banuelos
164e32f98e ARM: dts: msm: Modify ACD_EXTINT_CFG value for msm8998 v2
Modify ACD_EXTINT_CFG so that ACD calibrates every time OSM toggles
full freq signal. This is recommended by hardware guidelines to
prevent ACD from mitigating when CPU clock frequency is boosted.

CRs-Fixed: 1088429
Change-Id: I07856ea8b332dbf12654fdd0b5d5518355f1c350
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
2016-11-28 14:54:39 -08:00
Osvaldo Banuelos
854e4572f4 ARM: dts: msm: add mem-acc thresholds for msm8998 v2
Add mem-acc threshold and crossover voltage properties to the
VDD_APC0/1 CPR devices and a matching mem-acc crossover voltage
to the OSM device. Update the APM threshold voltage
to 800 mV for both clusters.

CRs-Fixed: 1088429
Change-Id: I747fd7665401803998b2824ace6dedbc5797b17f
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
2016-11-28 14:54:34 -08:00
David Collins
466d6afc2d clk: msm: clock-osm: add support for MEM ACC threshold voltage
Add support for configuring the highest memory accelerator
(MEM ACC) threshold voltage.  This threshold voltage is used at
runtime to determine which CPRh virtual corner to program into
the OSM sequencer registers in place of the fixed MEM ACC
configuration specified in the OSM LUT.

CRs-Fixed: 1088429
Change-Id: Ida29eaca139c1ddd6439d11a8bd51526366f2a34
Signed-off-by: David Collins <collinsd@codeaurora.org>
2016-11-28 14:54:29 -08:00
David Collins
1a9d62db8e regulator: cprh-regulator: add support for MEM ACC threshold voltage
Add support for configuring the memory accelerator (MEM ACC)
threshold voltage and the MEM ACC crossover voltage.
The threshold voltage is used to restrict the floor to ceiling
voltage range of all corners so that they cannot cross the
the MEM ACC threshold voltage due to CPR operation.  The
crossover voltage is set when switching the MEM ACC
configuration.

If specified, the APM and MEM ACC crossover voltages are added
to the array of corners after all true corners.  If both are
specified, then the APM crossover corner is added before the MEM
ACC crossover corner (i.e. last corner = MEM ACC crossover and
second to last corner = APM crossover).

CRs-Fixed: 1088429
Change-Id: I2b9b746071579ba9d4bcdcfb6cb755ca08a73182
Signed-off-by: David Collins <collinsd@codeaurora.org>
2016-11-28 14:51:18 -08:00
Eric Dumazet
9cce01579c Crash due to mutex genl_lock called from RCU context
Grabbing the mutex should not be done from netlink_sock_destruct() but
from netlink_release()

CRs-Fixed: 1094434
Change-Id: I69ae0d8589a0878b9758619893848afc272179c5
Signed-off-by: Eric Dumazet <edumazet@google.com>
Patch-mainline: linux-netdev @ 11/26/16, 04:54
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2016-11-28 15:03:48 -07:00
Shubhraprakash Das
9598a2896a msm: camera: ispif: Ratelimit message
Ratelimit the overflow message to prevent WD bark.

Change-Id: Icb098d6f3bf7ff309a315b05c571df8c870f27a2
CRs-Fixed: 1086892
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
2016-11-28 13:49:50 -08:00
Eric Dumazet
68610ce9d9 net: add SOCK_RCU_FREE socket flag
We want a generic way to insert an RCU grace period before socket
freeing for cases where RCU_SLAB_DESTROY_BY_RCU is adding too
much overhead.

SLAB_DESTROY_BY_RCU strict rules force us to take a reference
on the socket sk_refcnt, and it is a performance problem for UDP
encapsulation, or TCP synflood behavior, as many CPUs might
attempt the atomic operations on a shared sk_refcnt

UDP sockets and TCP listeners can set SOCK_RCU_FREE so that their
lookup can use traditional RCU rules, without refcount changes.
They can set the flag only once hashed and visible by other cpus.

CRs-Fixed: 1094434
Change-Id: Ib4967b801cc5b48c8ac4793b7a03fbfafba2234a
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Tom Herbert <tom@herbertland.com>
Tested-by: Tom Herbert <tom@herbertland.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Git-commit: a4298e4522d687a79af8f8fbb7eca68399ab2d81
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[subashab@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2016-11-28 14:42:09 -07:00
Osvaldo Banuelos
fcb69346a4 ARM: dts: msm: support perf cluster speed bins 2 and 3 for msm8998 v2
Add support for addtional performance cluster speed bins. Speed bin
fuse 2 and 3 devices can run with a quad core CPU fmax of 2.361 GHz and
single core CPU fmax of 2.457 GHz.

CRs-Fixed: 1086294
Change-Id: I08c3b8bc7e4d40c80be588f05b9439b339f46afc
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
2016-11-28 13:27:19 -08:00
Osvaldo Banuelos
10159460f8 ARM: dts: msm: add support for VDD_APC CPR speed bins 2/3 for msm8998v2
Update the VDD_APC0 and VDD_APC1 CPR devices to support two additional
speed bins. This allows CPR operation on bin 2 and 3 parts which have
different performance cluster frequency configurations compared to bin
0 and 1.

CRs-Fixed: 1086294
Change-Id: Id0854f1094ee3e4d4b1961f98a77003f7bcca1da
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
2016-11-28 13:27:18 -08:00
Osvaldo Banuelos
58f0a95267 clk: msm: osm: refactor logic to handle multiple boost frequencies
The OSM LUT may have duplicate frequencies between one
and four core count compatible frequencies. If the selected
frequency exists for both single and quad core, select the quad
core frequency by default. Also, expose only 4-core frequencies
and the absolute maximum frequency to clock consumers.

CRs-Fixed: 1086294
Change-Id: I2424bfdfd381241d307862113451082a9727a903
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
2016-11-28 13:27:17 -08:00
David Collins
b3051d25db clk: msm: clock-osm: correct OSM sequencer register virtual corner writes
The values written into OSM sequencer registers #55 to #58
correspond to indexes into the CPRh virtual corner table not
indexes into the OSM table.  Correct this.

Change-Id: I02baca9a410f08c82c34fe82925c0ead22111e5b
CRs-Fixed: 1086294
Signed-off-by: David Collins <collinsd@codeaurora.org>
2016-11-28 13:27:17 -08:00
Osvaldo Banuelos
5827fcea56 ARM: dts: msm: update L2 SAW configuration for msm8998 v2
The maximum VDD_APC1 voltage has been increased to 1.136 V
for msm8998 v2. Update the AVS limits of L2 SAW and the
CPR aging reference voltage to reflect this.

CRs-Fixed: 1086294
Change-Id: I863bee32e1e66d9656fc70748628b25606b59e47
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
2016-11-28 13:27:16 -08:00
Osvaldo Banuelos
6b7a5fd9d2 regulator: cprh-kbss-regulator: increase supported fuse combo count
Support a total of 32 fuse combos to cater to MSM8998
parts blown with speed-bins 2 and 3.

CRs-Fixed: 1086294
Change-Id: Id03a418f66c9cbb51c2be6904f682d15e82f78c8
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
2016-11-28 13:27:15 -08:00
Osvaldo Banuelos
86034c25bb ARM: dts: msm: Update VDD_APC CPR voltages for msm8998 v2
Update the VDD_APC0/1 max floor to ceiling range as well
as the open-loop and closed-loop Nominal fuse corner
adjustments to match the latest hardware characterization.

CRs-Fixed: 1086294
Change-Id: I920175ab16d5a3fc5cd3f117bba3fd1d37db3c5d
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
2016-11-28 13:27:15 -08:00
Osvaldo Banuelos
d1a702ef2b ARM: dts: msm: Enable ACD on msm8998 v2
Add the necessary configuration to the OSM clock device in
msm8998 v2 to initialize ACD.

Change-Id: Ibdb861a50ad654be34e14e2bcc012fdf5063acaf
CRs-Fixed: 1053383
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
2016-11-28 13:27:10 -08:00
Zhen Kong
ca828152be qseecom: fix incomplete error handling for several functions
Perform a complete or adequate check of return codes for several
functions, including __qseecom_enable_clk, ion_do_cache_op and
ion_sg_table(), used by qseecom.

Change-Id: Ib1682bdc6d3034a22586af62a3d8986c54d369d5
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
2016-11-28 12:32:06 -08:00
Subbaraman Narayanamurthy
c95c3c8a08 leds: qpnp-wled: Fix the APIs to read/write WLED registers
Fix the order of parameters passed into read/write APIs of WLED
driver to make it more readable. Fix the masked_write API to
directly use regmap API so that it can be protected properly to
avoid racing with secure writes.

While at it, remove the comments for variables that were removed
a while ago.

Change-Id: Ib372d3272550973fd98992f28b3b9bf7e5eb7f0f
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-11-28 12:22:51 -08:00
Subbaraman Narayanamurthy
5ae6a0eb67 ARM: dts: msm: add demo battery profile to msm8998 MTP
Add the demo battery profile to support 6A charging with pmi8998
on msm8998 MTP.

Change-Id: Id76ebe4a2591664d44d8003730f70defcb2899bc
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-11-28 11:06:41 -08:00
Subbaraman Narayanamurthy
17c14cb36b ARM: dts: msm: add a demo battery profile for pmi8998 FG
Clone the ascent battery profile to create a demo battery
profile to support 6A charging with pmi8998.

Change-Id: I57d33cadbe26d5298ef7149a004d14102d62f365
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-11-28 11:06:05 -08:00
Subbaraman Narayanamurthy
3089ab690e qpnp-fg-gen3: Add support to configure auto recharge voltage
Auto recharge happens when the charging is complete and the
battery SOC or voltage had dropped below certain threshold.
Along with having an option to configure recharge SOC threshold,
a way to configure recharge voltage threshold is required. Add
it. By default, charger is configured to resume charging only
based on the signal from FG based on battery voltage.

Change-Id: I0cd6ca6679c19bbdf4ad980a22d9976396028316
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-11-28 11:04:43 -08:00
Olav Haugan
e5c095a2c7 sched/core: Do not free task while holding rq lock
Clearing the hmp request can cause a task to be freed. When a task is
freed the free call might wake up a kworker which will cause a
spinlock lockup (rq lock). Fix this by avoiding calling put_task_struct
when holding the rq lock.

In addition move call to clear_hmp_request out of stopper thread context
since it is not necessary to do this on the cpu being isolated.

Change-Id: Ie577db4701a88849560df385869ff7cf73695a05
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2016-11-28 11:00:29 -08:00
Pavankumar Kondeti
d0ff1c04e8 sched: Disable interrupts while holding related_thread_group_lock
There is a potential deadlock condition if interrupts are enabled
while holding the related_thread_group_lock. Prevent this.

----------------                              --------------------
    CPU 0                                          CPU 1
---------------                               --------------------

check_for_migration()                         cgroup_file_write(p)

check_for_freq_change()                       cgroup_attach_task(p)

send_notification()                           schedtune_attach(p)

read_lock(&related_thread_group_lock)         sched_set_group_id(p)

                                              raw_spin_lock_irqsave(
					       &p->pi_lock, flags)

					      write_lock_irqsave(
					       &related_thread_group_lock)

					       waiting on CPU#0

raw_spin_lock_irqsave(&rq->lock, flags)

raw_spin_unlock_irqrestore(&rq->lock, flags)

--> interrupt()

----> ttwu(p)

-------> waiting for p's pi_lock on CPU#1

Change-Id: I6f0f8f742d6e1b3ff735dcbeabd54ef101329cdf
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2016-11-28 22:15:56 +05:30
Dhoat Harpal
6bf0e69ea6 soc: qcom: glink: add NULL check for edge_ctx
In function edge_name_to_ctx_create, NULL check is missing after
kzalloc for edge_ctx variable.

NULL check validation is added.

CRs-Fixed: 1086686
Change-Id: Icbffbd9d02df97bda531353c41a7025b95a53991
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
2016-11-28 18:12:44 +05:30