Commit graph

568527 commits

Author SHA1 Message Date
Dhaval Patel
7c1a00bcd3 msm: mdss: remove clk off scheduling when commit pending
There can be race condition possible between Early touch
event thread and kickoff thread. For ex:
 -> Eary touch event: Turns on clock and schedule the off
    after 4 vsync cycle.
 -> Kickoff thread: Leaves the clock on
 -> Second touch event: Reschedule the clock off workque

The second touch event call scheduling the clock off
after 4 vsync cycle. On loaded system, kickoff thread
might get intruppted and get chance to rerun after
4 vysnc cycle. The clocks will be turned off for such
use cases before PP done ISR.

Change-Id: I85923146645379be1e3ccc578fc795306cd987ad
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2016-03-23 21:17:34 -07:00
Dhaval Patel
526b0d9c33 msm: mdss: fix overflow while copying config id
Fix possible overflow while copying config id
in DSI driver.

Change-Id: I0432ddc43c62f5b25a8197f2fc06ea45e4c2738a
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2016-03-23 21:17:34 -07:00
Ingrid Gallardo
10ce327b29 msm: mdss: add early wake up for dfps update
During early wake up notification, add the request
to update the fps to the default value, so we can
avoid this latency during the first frame update
after Idle.

Change-Id: I796a6ecba19f451e0f5e202c29e4de0d62a8cd5a
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
2016-03-23 21:17:33 -07:00
Archana Sathyakumar
9cb1717550 ARM: dts: msm: Add support for FPC without psci for 8996
Add support for FPC without psci for cpus in DT. This mode helps reduce the
latency associated with entering Fast Power collapse by not incurring the
latency of terminating in the PSCI driver in Secure EL1.

Change-Id: I1209b62d45d10b74bd36756c4ddefa137fb571a5
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
2016-03-23 21:17:32 -07:00
Archana Sathyakumar
bda3760199 lpm: Allow cpu to enter FPC from hypervisor
FPC using PSCI is entered from PSCI layer that is in Secure EL1.
Switching of EL layers incur additional latency, making FPC slower.
Issue wfi within hypervisor for cpu only sleep. This makes FPC much
faster than entering from PSCI layer.

Change-Id: Icf4c5f2484fdda79c991b842cb3a3185b638bfdb
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
2016-03-23 21:17:31 -07:00
Archana Sathyakumar
82d7fa326e ARM: dts: msm: Update power attributes for 8996
The attributes are updated to generate non-negative residency values. The
numbers do not affect the residency values.

Mode	| Time Overhead	| Energy OverHead	| SS Power
WFI(C1)	| 60		| 15000			| 200.0000
FPC(C4)	| 180		| 39740			| 198.0000

Best Mode below 60 us is Active
Best Mode below 550 us in WFI
Best Mode above 550 us is FPC

Mode		| Total Time Overhead	| Energy OverHead	| SS Power
L2 CG(D1)	| 85			| 65000			| 195.0000
L2 GDHS(D3)	| 180 			| 89070			| 180.0000
L2 FPC(D4)	| 1000			| 441000		| 160.0000

Best Mode below 85us is Active
Best Mode below 550us is WFI
Best Mode below 11500us is GDHS
Best Mode above 11500us is FPC

Mode	| Total Time Overhead	| Energy OverHead	| SS Power
E1-M1	| 120			| 60000			| 192.0000
E3-M2	| 150			| 69000			| 160.0000
E4-M3	| 1200			| 1380000		| 72.0000

Best mode below 120 us is Active
Best mode above 11500us is FPC

Change-Id: I4ba5d1361d7a9ff72531c4921e2941c56e935484
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
2016-03-23 21:17:30 -07:00
Reut Zysman
f3a88b7433 qseecom: Fix MDTP cipher DIP
Enable CE clocks before calling SCM. This is required to
check if MDTP is activated during recovery and to update the DIP
as required in case it is.

Change-Id: I01907d7cebae007c7f6a33d4bf29b3e4fc6e493c
Signed-off-by: Reut Zysman <rzysman@codeaurora.org>
Signed-off-by: Amit Blay <ablay@codeaurora.org>
2016-03-23 21:17:29 -07:00
Arun KS
d738f0ed15 soc: qcom: flush persistent kmaps and fixmap mappings for MBA
on 32 bit architecture xpu violations are happening because of mappings
in PK map regions. Flush the PKMAP and fixmap mappings to make sure that
there are no duplicate mappings for MBA regions. On 64 bit architecture
these functions turn out to be do while 0;

Change-Id: I9f5dc20c292688bf09d137ae7722820ae51a7d60
Signed-off-by: Arun KS <arunks@codeaurora.org>
2016-03-23 21:17:28 -07:00
Tirupathi Reddy
223bce035c regulator: cpr3: Fix 32-bit compilation
Fix errors reported in 32-bit compilation.

Change-Id: Ic2c03bd396e3f6668aa4d0c7b6ae9b99fa896367
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
2016-03-23 21:17:28 -07:00
Anirudh Ghayal
3b6a8823f2 regulator: msm-gfx-ldo: Update the LDO handling sequence
Fix the LDO configuration and voltage update sequence.
While at it, add additional debug logging.

Change-Id: I15dbbfdf18e8694920f1344cfcd3176ffa0f7c3e
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2016-03-23 21:17:27 -07:00
Phani Kumar Uppalapati
58456af54d ASoC: wcd9335: Reset spline resampler after playback
Reset spline resampler after audio playback is completed
to clear the FIFO and avoid any noise being generated.

Change-Id: I30ed6a337c3bb08f6197f7ee575b323f0b0acfac
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2016-03-23 21:17:26 -07:00
Phani Kumar Uppalapati
905abbddb5 ASoC: wcd9335: Update impedance detection parameters
Update mbhc impedance detection parameters namely, LDO control
and Nshift, to get better accuracy for headphone left and right
impedance values.

Change-Id: I8b3271ee9af91b9e921957998e0fb074ffdebe86
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2016-03-23 21:17:25 -07:00
Phani Kumar Uppalapati
10d7cdb07d ASoC: wcd-mbhc: Reduce delay in detection for threshold headsets
Certain headsets have threshold on microphone for detection.
Currently mbhc driver takes about 3 to 4 seconds to detect those
headsets. Reduce delay in detection for threshold headsets by
increasing micbias to 2.7v.

Change-Id: I744bafb78560f39806d656c98582d8162fa10dfd
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2016-03-23 21:17:24 -07:00
Naseer Ahmed
2badc91e22 ARM: dts: msm: remove gpio output settings in dsi pinctrl
The generic pin control configuration for mdss should not
have gpio output settings. This change removes them so that
gpio output can be controlled in the driver.

Change-Id: I84c69571256ae5f1a11cdfe05d0ac90c49ec3d55
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2016-03-23 21:17:23 -07:00
Naseer Ahmed
488f3d81d0 video: fbdev: Additional param checks on user space cmap
Additional bound checks for parameters that are used
to calculate target buffer address.

Change-Id: Ib4a00a51c761dc7751a19e6ee7f55cacac97860f
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2016-03-23 21:17:23 -07:00
Sagar Dharia
df0d2be28a slimbus: Reset data channels for a controller when framer reboots
Framer is responsible for clocking slimbus, and when it reboots, state
of all associated data channels is reset to be consistent with HW
state.

Change-Id: Ie74ace2b20ad6c255440ff6ce593f7d5503bf388
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
2016-03-23 21:17:22 -07:00
Karthikeyan Ramasubramanian
f1308d5f84 soc: qcom: glink_smd_xprt: Resume RX operation during intent re-use
G-Link SMD Transitional XPRT resumes RX operation only when a receive
intent is queued. This leads to a communication stall if the receive
intents get re-used and is not queued.

Resume the RX operation in G-Link SMD Transitional XPRT if a receive intent
is re-used. Also access the intent_req flag exclusively to avoid any race
condition.

CRs-Fixed: 938394
Change-Id: I5a1fdc7ee35070a42659c8e701d73ee2de8d6d05
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2016-03-23 21:17:21 -07:00
Sagar Dharia
8957b9e33d slim: msm: Improve bulk message timeout error handling
If a bulk message times out due to interrupt starvation, a late
coming interrupt may access structures that are not valid.
Improve timeout error handling by resetting variables, and changing
relevant logging.

Change-Id: Ie0ee2fd9c2ce1628c69e1975fe713a2a26d9e716
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
2016-03-23 21:17:20 -07:00
Carter Cooper
30e849fa8b msm: kgsl: Avoid an interrupt storm from the GPU
CP_CACHE_FLUSH interrupts can storm on very rare occasions.
Check for this interrupt storm and do nothing when it occurs
rather than thrashing the CPU which can occasionally bring the
system down.

Change-Id: I0528ad4fec43abfaeeba1499d0b0e51e14b09f0d
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
2016-03-23 21:17:19 -07:00
Phani Kumar Uppalapati
e45a913e1e ASoC: wcd-mbhc: Fix plug removal detection from extension cable
Fix plug removal detection by enabling electrical removal
irq when headset/headphone accessory is removed from the
other end of extension cable.

Change-Id: I585a81e6c01b4ddd249f76614fb933beea3755fc
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2016-03-23 21:17:18 -07:00
Venkatesh Yadav Abbarapu
491b50336d msm: platsmp: snapshot of the smp ops
Add smp related files like platsmp, headsmp and
hotplug. Copied from the below caf link
https://www.codeaurora.org/cgit/quic/la/kernel/msm-3.18/
tree/arch/arm/mach-msm?h=caf/3.10/msm-3.10
&id=5724b421fc2db7413048fe5b18135d481d68597a

Change-Id: I2b0be05f939dd97efa6bd187f65f6805d73cb64e
Signed-off-by: Venkatesh Yadav Abbarapu <vabbar@codeaurora.org>
2016-03-23 21:17:17 -07:00
Sanrio Alvares
63b89ec01e ARM: dts: msm: Add support for MSM8996pro
Add device tree support for MSM8996pro along with different PMIC
configurations it supports.

Change-Id: I9d386b79f2324180c2001d382f89c4163fd1af62
Signed-off-by: Sanrio Alvares <salvares@codeaurora.org>
2016-03-23 21:17:17 -07:00
Rohit Vaswani
e74ab64475 drivers: qcom: secure_buffer: Optimize by re-using the same buffer
Re-use the same buffer for the hyp assign calls rather than allocating
a new one for every single call.

Change-Id: Ia76f9743c7eb83d3432ac19cc98be243434c2aa8
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
2016-03-23 21:17:16 -07:00
Terence Ho
fd9c7c7b8d msm: camera: add slave write array support
Add support for slave_write_array and to pass addr_type with
slave_read.

Change-Id: Ia530dcf684739f43e36fc67fec83bc0be0c8cf78
Signed-off-by: Terence Ho <terenceh@codeaurora.org>
2016-03-23 21:17:15 -07:00
Lakshmi Narayana Kalavala
bbadb94caf msm: camera: Cleanup all the command queues upon close node
When the backend camera daemon is crashed for some reason,
camera application waits for the completion of the command
processing till the timeout is reached which is unnecessary.

Hence clean all the command queues when the config node is
closed and immediately wake up all the command queues so
that camera application is notified immediately.

Change-Id: Iff5c331e8c5bb39305087fd4defe332690653b10
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
2016-03-23 21:17:14 -07:00
Bhalchandra Gajare
ded1ecfaa7 ARM: dts: msm: Add dmic clock drive strength for tasha codec on 8996
DMIC clock drive strength for tasha codec on 8996 is required to be set
to 2MA as per hardware specification. Add this to tasha codec device
settings.

Change-Id: Idecc9caa484c26a431ea3f2410bd72d441eda550
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-03-23 21:17:13 -07:00
Srinivas Rao L
cf52f9b467 qos: Disable irq notifier when qos request is removed
When a qos request is added with IRQ affinity, irq notifier
for that irq is added and with out disabling the irq
notifier if the irq is free it is through a warning.
So disable irq notifier when the qos request is removed.

Change-Id: I50faa4ecbe1b632c0f0f203ca52faf18753c33d4
Signed-off-by: Srinivas Rao L <lsrao@codeaurora.org>
2016-03-23 21:17:12 -07:00
Kiran Gunda
7df8669291 platform: msm: msm_bus: Fix the NULL pointer dereference
Do not access the node_info pointer when it is null to
avoid the crash.

Change-Id: I8ca1a26fab847469bd205cbfb4adf63b9194a1d0
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
2016-03-23 21:17:12 -07:00
Liangwei Dong
6a42808462 Net: CNSS_SDIO: Add cnss_get_restart_level CNSS API
export cnss_get_restart_level cnss API for wlan driver
to get current subsystem restart level.

Change-Id: I7e5d9b0055707bbad06b6cd1496723da6c28d4d5
CRs-Fixed: 961579
Signed-off-by: Liangwei Dong <liangwei@codeaurora.org>
2016-03-23 21:17:11 -07:00
Mohit Aggarwal
57296d9eaf diag: Release wake source properly
Currently, diag driver is not releasing wake
source on receiving 0 length packet from SMD.
This patch ensures that the wake sources
hold are released properly.

Change-Id: I4eefc0d361a130c7f313b8ba215f51ecf32e0923
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
2016-03-23 21:17:10 -07:00
Shilpa Mamidi
5d4f42608e msm: cpp: Adding null check for regulator disable
Adding null check before regulator enable and also
resetting regulator variable to NULL after regulator disable.
This will avoid using previously disabled regulator in next
session.

Change-Id: I0e8f2f71152064972128f707653e3a2295e1d408
Signed-off-by: Shilpa Mamidi <shilpam@codeaurora.org>
2016-03-23 21:17:09 -07:00
Amir Vajid
1cad27b269 soc: qcom: add API for matching voltages across CPUs
Create an API to match voltages across asymmetric CPUs as
this can be useful in systems with a shared rail across CPUs.
The API takes in one input argument which is the frequency of
a big cluster CPU for which a voltage-equivalent little cluster
CPU frequency is desired. The return value is this little
cluster CPU frequency. All frequencies are in units of kHz.

Change-Id: I821819a0761566984dd7f92014599ff0fcb85e90
Signed-off-by: Amir Vajid <avajid@codeaurora.org>
2016-03-23 21:17:08 -07:00
Jing Zhou
b5bfca8bf5 ARM: dts: msm: correct camera clock setting for 8996
Update camera clock setting to match latest 8996 clock plan.

Change-Id: Ib08ad55b53454196d72370fede075e9447fe7af0
Signed-off-by: Jing Zhou <jzhou70@codeaurora.org>
2016-03-23 21:17:07 -07:00
Mathew Joseph Karimpanal
0058a7fa56 ARM: dts: msm: Enable HDMI hot-plug on Automotive DragonBoard 820
Automotive DragonBoard 820 is a development kit and has an HDMI type A
receptacle. So enable HDMI hot-plug feature.

Change-Id: I2be85cf91f6532110b125050bce0cca441e42960
Signed-off-by: Mathew Joseph Karimpanal <mkarim@codeaurora.org>
2016-03-23 21:17:06 -07:00
Dhananjay Kumar
e22b97da06 ASoC: msm: fix indefinite wait in compress drain
In compressed driver streams might get stopped while
ioctl drain is started but not completed, since buffers
are drained in multiple stages when gapless mode is
enabled.
Check stream state before issuing wait commands to
prevent waiting for drain ack on stopped streams.

Change-Id: I606639c103a7aed90dd9a4561fa6dffc3d4c3822
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
2016-03-23 21:17:06 -07:00
Lakshmi Narayana Kalavala
4f71751318 msm: camera: Enhancements to soc layer
Define camera bus clients to identify the multiple camera clients.
Add API to support devices consisting of multiple clock rates
in the device tree node and register threaded irq.

Change-Id: Icdaae68b82c441baf988e90fb6d5cc83c2402a93
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
2016-03-23 21:17:05 -07:00
Zhen Kong
c3a112da96 qseecom: fix an error related to app name comparision
Make changes to use strcmp to compare app name, and
avoid the memcpy comparision error if the first
several chars of an app name is exactly equal to
another app name. Besides, on some targets, keymaster
app may be first loaded as "keymaste" by qseecomd,
and then used as "keymaster". To avoid checking app
name error, register "keymaster" into app_list and
thread private data.

Change-Id: I468b4e5cb1d5d77ac5d687d0bddc8614b972785f
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
2016-03-23 21:17:04 -07:00
Deepak Katragadda
2740b9fcaa clk: msm: clock: Add GPUCC clock driver support for MSMCOBALT
Add support to model the graphics clocks on MSMCOBALT.

Change-Id: I31c3dda59a0bb7e9b6b6cee8176fb46f46767629
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
2016-03-23 21:17:03 -07:00
Bhalchandra Gajare
f5e6ba4333 ASoC: wcd9335: Configure DMIC clock drive stength from pdata
It is possible that differnt platforms could configure to DMIC clock
drive strength differently. Allow this configuration by setting the DMIC
clock drive strength through pdata.

CRs-fixed: 938006
Change-Id: I6f9f8a947e0efca31d0c50dec9a5973079bb48c4
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-03-23 21:17:02 -07:00
Ashwini Rao
7c59712b2f msm: fd: Do buffer done on all buffers in vb2 queue on streamoff
On v4l2 stop_streaming, a vb2_buffer_done needs to be done to
ensure that the driver gives back all the buffers it got from
the buf_queue() callback.

Change-Id: I1ba8776381efb41820ed44a8bdf70c99574b09ac
Signed-off-by: Ashwini Rao <ashwinik@codeaurora.org>
2016-03-23 21:17:01 -07:00
Yan He
043d337047 msm: sps: update SPS logging
Update the logging in SPS driver to catch additional info for
the interaction between SPS driver and BAM client drivers.

Change-Id: Icd5955d2d4dd83124f47e60e052ec3b3a2611025
Signed-off-by: Yan He <yanhe@codeaurora.org>
2016-03-23 21:17:01 -07:00
Phani Kumar Uppalapati
6fd817114c ASoC: wcd9335: Give more headroom for headphone PA ramp
Give more headroom for headphone PA ramp up and down during
impedance detection to avoid any click and pop or ramp error.

Change-Id: I3e3980e48ce19955b4230876887adfde5b44e8ea
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2016-03-23 21:17:00 -07:00
Harshdeep Dhatt
b0d56ee1cb msm: kgsl: Make snapshot resilient to a non-existent ib1base
During snapshot, we may encounter an invalid IB1 base which
is not found in the current rb. In that case, dump the entire
ringbuffer from start to end and all the IBs in it to get a
more complete picture of the failure.

Change-Id: I4393c7de6f8f4890870fa6e2b5e69073dce922b7
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
2016-03-23 21:16:59 -07:00
Harshdeep Dhatt
55946b6985 msm: kgsl: Add accounting for memory mapped in userspace
For proper memory accounting, a key metric is to know how much
memory kgsl allocated for a process and how much of it the process
is actually using. This is done by keeping track of memory in our
vmfault routines. This information is provided via the process
mem file.

Change-Id: I7e3371a708ea5fdade3840b2384b3bc4012ad004
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
2016-03-23 21:16:58 -07:00
Xu Han
0117f1ce83 Revert "ARM: dts: msm: Increase CSIPHY clock rate on 8996"
This reverts commit b6db8cdda733821b9d21cc66a5f8c2ce62238065
("ARM: dts: msm: Increase CSIPHY clock rate on 8996") to meet
power test requirement.

Change-Id: I1a1667782dc211c5061ddd5642868d0e2d066631
Signed-off-by: Xu Han <hanxu@codeaurora.org>
2016-03-23 21:16:57 -07:00
Shilpa Mamidi
a48cadfb8f msm: cpp: Adding mutex unlock before returning
Adding mutex unlock before returning in error cases
and also ensured that return value is not over written
in error cases.

Change-Id: I5aceffd2dbf2b456ca421892b691f86c6b1032c3
Signed-off-by: Shilpa Mamidi <shilpam@codeaurora.org>
2016-03-23 21:16:56 -07:00
Shilpa Mamidi
be0afb13c5 msm: cpp: Checking for validity of regulator pointers
Not all targets have fs regulators, for such devices
crash is seen when firmware load fails. To fix this issue
validity check is made before disabling fs regulators.

Change-Id: Ib1b365bcdda724580e69d35dcf8dbeb25abc2b99
Signed-off-by: Shilpa Mamidi <shilpam@codeaurora.org>
2016-03-23 21:16:55 -07:00
Shilpa Mamidi
c63abb5d90 msm: cpp: Changing order of setting GDSRC register
If GDSRC is set after FW load this is causing FW timeout.
Setting this before Jump instruction to avoid timeout.

Change-Id: I8b20ae1d8ae627288f1615a6ae6480dd8105ddcb
Signed-off-by: Shilpa Mamidi <shilpam@codeaurora.org>
2016-03-23 21:16:55 -07:00
Trishansh Bhardwaj
183516d967 msm: camera: Retelimit log in msm_vb2_buf_cleanup.
Ratelimit log in msm_vb2_buf_cleanup to prevent excessive logging when
stream is NULL.

Change-Id: Ia687375c8e2a2683a4d32cd0eb984f731b2288e7
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
2016-03-23 21:16:54 -07:00
Sagar Dharia
1389ff19f5 slim: msm: Fix the instance number being sent to ADSP
Every bus instance can have 2 NGD devices. Fix the instance number
determination based on NGD device-id.

Change-Id: I515f4f09d58a7abc0c0322ca714b88fb847a0909
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
2016-03-23 21:16:53 -07:00