Commit graph

575622 commits

Author SHA1 Message Date
Venkat Gopalakrishnan
48ecffa1a0 Revert "scsi: ufs: gate ref_clk during aggressive clk gating"
This reverts commit ca91fa16a7 ("scsi: ufs: gate ref_clk during
aggressive clk gating").

Reverting this change as its causing stability issues.

Change-Id: Ia04d33d84b5622179f7a496daee5584d4e2dde91
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-10-05 14:27:33 -07:00
Harry Yang
e6cc001a18 qpnp-smb2: smb-lib: expose step charging via battery psy properties
Allow for easy track of step charging. Show step charging
status (enable/disable) and phases.

CRs-Fixed: 1052854
Change-Id: I525fcedda71c4928c61825faeea519355675457a
Signed-off-by: Harry Yang <harryy@codeaurora.org>
2016-10-05 13:20:27 -07:00
Nicholas Troast
b95cf59a0f qcom-charger: add storm watch to qpnp-smb2 and smb138x-charger
Interrupts are subject to storming in bad or unexpected circumstances.
Add the necessary structures to detect interrupt storms using storm watch.

Change-Id: Id3491b6f8927cb1ae7cbc8260defa697ca555765
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2016-10-05 13:11:53 -07:00
Nicholas Troast
ada01758dc qcom-charger: add support to watch storm of events
Storm watch provides a simple API for tracking the occurrence of event
storms.

An event storm is defined as a cluster of events where there are
X events with no more than Y milliseconds between them, where X and Y
are configurable per event.

Querying whether a storm has occurred marks a new event.

Change-Id: Idf4bb1421d0dbec295f92f84174cd4bbc6130250
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2016-10-05 13:11:52 -07:00
Harry Yang
b44b90ad4c qcom-charger: Fix CC settings for PD session
CC_OUT is the signal/status to the PD that indicates which of
the CC line is active. When its low CC1 is active and when
high CC2 is active.

During Source -> Sink Power Role Swap, CC_OUT is reset default
low (CC1 = CC) when SW sets the UFP/SNK_EN_CMD bit, losing the
plug orientation info and causing USB PD message error if CC2
was the CC pin.

Fix this by ensuring that s/w overrides the CC_OUT signal to
reflect the actual one, in preparation for a possible upcoming
power

CRs-Fixed: 1050738
Change-Id: I5877666c39ac9cad713a5802521527dd8552440c
Signed-off-by: Harry Yang <harryy@codeaurora.org>
2016-10-05 13:11:51 -07:00
Ashwanth Goli
5da00923b1 rmnet_data: Changing format specifier to %pK
Using %pK instead of %p to hide kernel pointers
based on kptr_restrict.

Change-Id: I065cff2a9e092d74d0e8c35da6551fab3805e83e
Signed-off-by: Ashwanth Goli <ashwanth@codeaurora.org>
2016-10-05 02:19:05 -07:00
Charan Teja Reddy
b2fbe92ea8 defconfig: add the iommu options on msmfalcon
Add the IOMMU config options that are used for the correct operation of
IOMMU driver on msmfalcon.

Change-Id: Ia6c446eca8a42800e781dfdaf46eab7bd44c126f
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
2016-10-05 01:34:57 -07:00
Charan Teja Reddy
0d36c86113 coresight: hwtracing: fix dangling pointer issues
Fix the dangling pointer issues on CoreSight that can cause the kernel
panic.

Change-Id: Ic20405cf2f64c6bc38e994780577b7da42cf6aba
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
2016-10-05 01:34:45 -07:00
Deepak Kumar
77f0fde9a3 msm: kgsl: Reschedule idle work in case transition to idle state fails
Reschedule the idle work in case transition to idle state is rejected
because the GPU is busy. This change avoids the condition where
transition to NAP state gets rejected due to a pending IRQ which is
currently getting served by IRQ handler because of which GPU remains
in active state even when GPU is idle.

Change-Id: I472a30b6a0e83cdd6957ed12eaa39d0c7731fcb5
Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
2016-10-05 13:37:52 +05:30
Rohit Gupta
383a31e3e7 ARM: dts: msm: Configure bimc-bwmon4 only for msmcobaltv2
The bimc-bwmon4 hardware module is only available on msmcobalt-v2.
Therefore move the bimc-bwmon4 setting to msmcobalt-v2 DT so
that msmcobalt-v1 can continue to use bimc-bwmon3 to measure DDR
bandwidth.

Change-Id: If6a44d83a4088e34eda3604ffa770b46653989f5
Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
2016-10-04 18:06:33 -07:00
Rohit Gupta
de738372bc ARM: dts: msm: Vote for 681 MHz DDR for Fmax of all CPU speed bins
Change the mapping table of mincpubw to vote for 681MHz at the Fmax
of the lower speed bins of the CPUs.

Change-Id: Ie8b9abaceaa8585ab5b132076772b9c7ca71cbfe
Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
2016-10-04 17:30:37 -07:00
Deepak Katragadda
ad09c8ea85 clk: msm: clock-osm: Fix for programming the APM threshold on MSMCOBALT
The clock driver does not currently use the secure API to write the
APM threshold value. This leads to the value being always left as 0.
Fix the write.

CRs-Fixed: 1074198
Change-Id: I61d8f930f7fe8c3539803a1e9b942095df0b0f86
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
2016-10-04 14:00:01 -07:00
Ram Chandrasekar
9de049bd7a power: bcl: Listen to battery power supply notification for soc
BCL gets the state of charge(soc) from the BMS power supply, which will
not capture the HLOS overidden soc value. This can create a scenario
where the mitigation will not be released if the soc value is
overridden in HLOS.

Use the battery supply notification, which can get the state of charge
value from the BMS or the HLOS overridden soc value if present.

Change-Id: I66d1ba1c6c3a942a80d3cee24746b00541fde3bc
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
2016-10-04 14:30:39 -06:00
Harry Yang
0ceb2fcb8f qpnp-smb2: introduce workaround bit mask
Add a bit mask to enable workarounds only if they are needed for a
particular hardware revision.

Change-Id: Ibd9a896ff6746a48ddab249d7c8ab762ed3c2fbe
Signed-off-by: Harry Yang <harryy@codeaurora.org>
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-10-04 12:52:16 -07:00
Deepak Katragadda
c2fd04161e clk: msm: clock-osm: Fix check to write to the LLM OVERRIDE register
On MSMCOBALT v2, the qcom,llm-sw-overr flag is no longer needed.
This causes an issue where the corresponding array in code is not
filled up but the check to make the writes to the llm register
still succeeds. This leads to us writing 0 to the register
erroneously multiple times. Fix this check.

CRs-Fixed: 1074141
Change-Id: I2dd529a78d06ac08a34546df39cb01ad4c6cb3d5
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
2016-10-04 12:10:10 -07:00
Taniya Das
d3d0687504 clk: qcom: Add support for gfx clock to ping pong PLLs
GFX3D clock source might require to ping pong between the available PLL
sources, so add support to check the current source and switch the next PLL
source for different frequency.

Change-Id: Iaf98e4d18fc0c3deb75ccce53e1c09cfc9dde550
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2016-10-03 23:05:42 -07:00
Taniya Das
8e451433c0 clk: qcom: Add support for RPM clocks for MSMfalcon
RPM controlled clocks are required by clients to be able to enable/disable.
Also add support for the PMIC XO clocks and QDSS clocks.

Change-Id: I210432d27f433f3160db53a842e503c83fd14891
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2016-10-04 11:25:54 +05:30
Pavankumar Kondeti
f20772adf3 sched: Fix integer overflow in sched_update_nr_prod()
"int" type is used to hold the time difference between the successive
updates to nr_run in sched_update_nr_prod(). This can result in
overflow, if the function is called ~2.15 sec after it was called
before. The most probable scenarios are when CPU is idle and
hotplugged. But as we update the last_time of all possible CPUs in
sched_get_nr_running_avg() periodically from a deferrable timer context
(core_ctl module), this overflow is observed only when the system is
completely idle for long time. When this overflow happens we hit
a BUG_ON() in sched_get_nr_running_avg().

Use "u64" type instead of "int" for holding the time difference and
add additional BUG_ON() to catch the instances where sched_clock()
returns a backward value.

Change-Id: I284abb5889ceb8cf9cc689c79ed69422a0e74986
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2016-10-04 08:47:48 +05:30
Linux Build Service Account
057bdafd97 Merge "clk: msm: clock-gpu-cobalt: Update the graphics core clock frequency" 2016-10-03 10:35:02 -07:00
Linux Build Service Account
f02700dfc6 Merge "sched: Fix CPU selection when all online CPUs are isolated" 2016-10-03 10:35:02 -07:00
Linux Build Service Account
73bc67e1ea Merge "ARM: dts: msm: enable mi2s and aux pcm on msmcobalt" 2016-10-03 10:35:01 -07:00
Linux Build Service Account
839e644e4e Merge "ARM: dts: msm: add support for TDM" 2016-10-03 10:35:00 -07:00
Linux Build Service Account
125777bed4 Merge "ARM: dts: msm: Remove clocks listed under GPU, PCIE, USB & MDSS GDSC nodes" 2016-10-03 10:34:59 -07:00
Linux Build Service Account
ae0165688c Merge "sched: Add a stub function for init_clusters()" 2016-10-03 10:34:59 -07:00
Linux Build Service Account
a6e4924acb Merge "sched: add a knob to prefer the waker CPU for sync wakeups" 2016-10-03 10:34:58 -07:00
Linux Build Service Account
5a313c5e74 Merge "ASoC: msm: qdsp6v2: Fix improper channel config for aac" 2016-10-03 10:34:57 -07:00
Linux Build Service Account
7a81402490 Merge "ASoC: msm: Update the error handling when APR sends packet failed" 2016-10-03 10:34:57 -07:00
Linux Build Service Account
08d58a723b Merge "hrtimer: Ensure timer is not running before migrating" 2016-10-03 10:34:56 -07:00
Linux Build Service Account
d1ba2d0b97 Merge "ARM: dts: msm: add TSPP support for msmcobalt" 2016-10-03 10:34:54 -07:00
Linux Build Service Account
ebe0e1b44c Merge "input: synaptics_dsx_core: make clocks as optional for secure touch" 2016-10-03 10:34:54 -07:00
Linux Build Service Account
abc3610d33 Merge "blk-mq: use static mapping" 2016-10-03 10:34:53 -07:00
Linux Build Service Account
a9849c7d7f Merge "defconfig: msmcortex: disable RMI4 dev module" 2016-10-03 10:34:51 -07:00
Abinaya P
a0bc19daec defconfig: enable secure touch option for Synaptics 2.0 for msmcobalt
msmcobalt CDP/MTP uses Secure touch on Synaptics controller. Hence, enable
Secure touch for Synaptics 2.0 touch driver.

Change-Id: I8b89e71428f566d72e6c2e0026bda207ec53e71c
Signed-off-by: Abinaya P <abinayap@codeaurora.org>
2016-10-03 21:38:51 +05:30
Linux Build Service Account
0b3886773c Merge "msm: vidc: Disable power collapse for HFR" 2016-10-03 05:54:41 -07:00
Linux Build Service Account
1221a4694b Merge "ASoC: msm: qdsp6v2: add routing map for multimedia6" 2016-10-03 05:54:41 -07:00
Linux Build Service Account
a79c822905 Merge "clk: qcom: Add support to force enable/disable the RCG" 2016-10-03 05:54:40 -07:00
Linux Build Service Account
45235de032 Merge "ARM: dts: msm: Add the pmfalcon and pm2falcon dtsi files" 2016-10-03 05:54:38 -07:00
Linux Build Service Account
7fb2ad9105 Merge "Bluetooth: HID: Add Bus type for specific HID Keyboard" 2016-10-03 05:54:37 -07:00
Ravi Kumar Siddojigari
dab813eaa5 input: synaptics_dsx: allocate heap memory for temp buf
There is a possible stack overflow vulnerability in the rmidev_write
function because the stack array size is from user space.
changes to allocate heap memory for the temporary buffer instead of
stack memory to prevent the stack overflow vulnerability.
As discussed under  CVE-2016-3865 and ANDROID-28799389.

Change-Id: I20f639e09aaf3c533c98a12a2413570feae3d6d0
Signed-off-by: Ravi Kumar Siddojigari <rsiddoji@codeaurora.org>
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2016-10-03 17:27:52 +05:30
Naresh Tanniru
058d9ab161 ASoC: msm: qdsp6v2: Fix improper channel config for aac
AAC encode is failing in ADSP due to mismatch
in channel config datatype.
Update channel config data type for aac encoder.

Change-Id: I844d6e1ac1b2b171cd74a2601ae09280a22589c9
Signed-off-by: Naresh Tanniru <ntanniru@codeaurora.org>
2016-10-03 03:15:36 -07:00
Chandana Kishori Chiluveru
a6fb576c5b usb: gadget: f_qc_rndis: Add support for configfs
Add APIs to allocate and instanciate f_qc_rndis function
driver using configFS.

Change-Id: I24f3dcb14c6467ab4c2d2eda464dfacda2c5b426
Signed-off-by: Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
2016-10-03 14:31:00 +05:30
Chandana Kishori Chiluveru
5f7a2a2a57 usb: gadget: f_qc_rndis: Add RNDIS support using IPA over BAM2BAM
On some targets RNDIS function uses BAM to BAM transport, and is
handled by the f_qc_rndis driver. This change adds RNDIS support
using IPA over BAM2BAM. Also removes all different supported control
and data transports and assume BAM2BAM_IPA as default mode. RNDIS UL
changes using software path also removed as IPA supports both UL
and DL on latest products.

DPL support will be added in subsequent patches.

Change-Id: I8f7bf069523a8f3ea37e0a32a2e32830944a5c97
Signed-off-by: Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
2016-10-03 12:17:32 +05:30
Shantanu Jain
08c47ca822 defconfig: msm: disable RMI4 dev module
Synaptics driver supports an RMI4 dev module to
interact with userspace. Disable the module due to
security concerns.

CRs-Fixed: 1073043
Change-Id: I24e3f888167b7ff593373bfc4a55ce81cfc9e5c7
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2016-10-03 12:01:20 +05:30
Kuirong Wang
3a0f71b590 ARM: dts: msm: enable mi2s and aux pcm on msmcobalt
Add device tree changes to enable mi2s and aux pcm so audio
can be playback and capture via mi2s and aux pcm interfaces.

CRs-Fixed: 1047362 1047365
Change-Id: I6d8f31cf841cb977bd1d7af3441b9d2c1da9b85c
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
2016-10-02 09:59:53 -07:00
Pavankumar Kondeti
a86b380f35 sched: Add a device tree property to specify the sched boost type
The HMP scheduler has two types of task placement boost policies.

(1) boost-on-big policy make use of all big CPUs up to their full capacity
before using the little CPUs. This improves performance on true b.L systems
where the big CPUs have higher efficiency compared to the little CPUs.

(2) boost-on-all policy place the tasks on the CPU having the highest
spare capacity. This policy is optimal for SMP like systems.

The scheduler sets the boost policy to boost-on-big on systems which has
CPUs of different efficiencies. However it is possible that CPUs of the
same micro architecture to have slight difference in efficiency due to
other factors like cache size. Selecting the boost-on-big policy based
on relative difference in efficiency is not optimal on such systems.
The boost-policy device tree property is introduced to specify the
required boost type and it overrides the default selection of boost
type in the scheduler. The possible values for this property are
"boost-on-big" and "boost-on-all".

Change-Id: Iac19183fa7d4bfd9e5746b02a02b2b19cf64b78d
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2016-10-02 10:54:45 +05:30
Pavankumar Kondeti
c7e3dde08c sched: Add a stub function for init_clusters()
Add a stub function for init_cluster() and remove a ifdefry
for SCHED_HMP in sched_init()

Change-Id: I6745485152d735436d8398818f7fb5e70ce5ee65
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2016-10-02 10:52:15 +05:30
Pavankumar Kondeti
f1e9995fe4 sched: add a knob to prefer the waker CPU for sync wakeups
The current policy has a preference to select an idle CPU in the waker
cluster compared to the waker CPU running only 1 task. By selecting
an idle CPU, it eliminates the chance of waker migrating to a
different CPU after the wakee preempts it. This policy is also not
susceptible to the incorrect "sync" usage i.e the waker does not
goto sleep after waking up the wakee.

However LPM exit latency associated with an idle CPU outweigh the
above benefits on some targets. So add a knob to prefer the waker
CPU having only 1 runnable task over idle CPUs in the waker cluster.

Change-Id: Id974748c07625c1b19112235f426a5d204dfdb33
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2016-10-02 10:52:06 +05:30
Linux Build Service Account
e4e58248ef Merge "usb: gadget: f_cdev: Fix memory leak with func_name" 2016-10-01 10:41:53 -07:00
Linux Build Service Account
2c2e30e5f3 Merge "usb: gadget: f_cdev: Remove func_name and port_num attributes" 2016-10-01 10:41:52 -07:00
Pavankumar Kondeti
7c3461a6ac sched: Fix a division by zero bug in scale_exec_time()
When cycle_counter is used to estimate the frequency, calling
update_task_ravg() twice on the same task without refreshing
the wallclock results in a division by zero bug. Add a safety
check in update_task_ravg() to prevent this.

The above bug is hit from __schedule() when next == prev. There
is no need to call update_task_ravg() twice for PUT_PREV_TASK
and PICK_NEXT_TASK events for the same task. Calling
update_task_ravg() with TASK_UPDATE event is sufficient.

Change-Id: Ib3af9004f2462618c535b8195377bedb584d0261
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2016-10-01 10:05:08 +05:30