Commit graph

575826 commits

Author SHA1 Message Date
Ashish Jain
c88c6f97ce ASoC: msmcobalt: Update machine driver to support 32 bit format
Update msmcobalt machine driver to support S32LE format.
Also add support of 384Khz for USB_AUDIO_RX.

Change-Id: I576bd9c3c776ad5c24a15adf1447a9206dc61b89
Signed-off-by: Ashish Jain <ashishj@codeaurora.org>
2016-10-05 08:33:01 -07:00
Ashish Jain
eb6adca118 ASoc: msm: Enable support for 32 bit format and 384Khz
Add support for 32 bit data format (SNDRV_PCM_FORMAT_S32_LE)
and sampling rate of 384Khz. Also update platform drivers
to use latest version of pcm media format command
ASM_MEDIA_FMT_MULTI_CHANNEL_PCM_V4.

Change-Id: I6b7ea860a398a7e4dd5f7e23ac3906ff0c6f2b3e
Signed-off-by: Ashish Jain <ashishj@codeaurora.org>
2016-10-05 08:32:45 -07:00
Ashish Jain
5a60bc56b0 ASoC: msm: qdsp6v2: add support for latest version of media format command
Add support for ASM_MEDIA_FMT_MULTI_CHANNEL_PCM_V4
command. This command adds support to playback/record 32 bit data
in 32 bit word and also provides a way to inform DSP about the
endianness of the data.

Change-Id: I3b013bedde8ccfa97a02e255e237df0cf2de13b8
Signed-off-by: Ashish Jain <ashishj@codeaurora.org>
2016-10-05 08:32:02 -07:00
Naresh Tanniru
ce3c3a600a ASoC: msm: qdsp6v2: support for configurable bit format for AFE encoder
Add support for configurable bit width for AFE encoder.
Add new mixer ctl to set for usecases which enables
configuring different input/output bit format
on AFE for usecases such as APTXHD encoder for 24bit input
and 16bit output.

Change-Id: I62326a097cbd71a3ec2b93a0120284d8f71f5d57
Signed-off-by: Naresh Tanniru <ntanniru@codeaurora.org>
2016-10-05 06:27:08 -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
Charan Teja Reddy
64ef73a9e9 ARM: dts: msm: add ion heaps for msmtriton
Add device tree configuration corresponding to all supported ion heaps
for msmtriton.

Change-Id: Ia4709c8be580f9a2de9e3e80819097144c2413ee
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
2016-10-05 01:34:22 -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
Bhalchandra Gajare
f37c2edcc6 ASoC: wcd-dsp-mgr: set status before broadcasting post events
During image download, the status is set after post download events
are broadcasted. This could possibly lead to race condition if other
drivers requested to boot the dsp before the status was set. Change
makes sure the wdsp status is set prior to broadcasting post download
events to avoid possible race conditions.

CRs-fixed: 1071949
Change-Id: If3ec6202b4729b24ee839c3a8aa4edf2482d6e59
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-10-04 18:04:46 -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
Yuanyuan Liu
8f276a71c0 icnss: Remove unused suspend/resume functions
Remove unused suspend/resume functions as pm_suspend/pm_resume
are the functions that being called during system suspend/resume.

CRs-Fixed: 1074250
Change-Id: Ifd1d90402d6f79dc96246c4825d46d41296b0ba5
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
2016-10-04 15:49:56 -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
Bhalchandra Gajare
eee490259b ASoC: wcd934x-dsp-cntl: add support for subsystem restart
When the codec DSP is crashed / unresponsive, in order to recover
from the crash, it is required to shutdown and restart the DSP.
Add support for subsystem restart feature to recover from crashes.

CRs-fixed: 1071949
Change-Id: Ibe1918cbf525c41d8fa82fc772b3afe20cac6eb7
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-10-04 12:43:12 -07:00
Bhalchandra Gajare
acaf2a7f79 ASoC: wcd-spi: fix clock disable
Currently, the clock request is performed during init and the clock
is kept on assuming that there will be code download event followed
by init. This assumption may not always be true and might cause the
clock to be enabled when it is really not needed. Change fixes clock
disable such that clock is disabled right after init and re-enabled
again if code download event is raised.

CRs-fixed: 1071949
Change-Id: Icc415e911653012726e5b81b4fc09199560d5691
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-10-04 12:43:02 -07:00
Bhalchandra Gajare
d728aa9031 ASoC: wcd-dsp-mgr: add support for subsystem restart
It is possible that wcd codec DSP can crash or become unresponsive.
During such case, an error interrupt is generated by the codec. Add
support in manager driver to handle this interrupt and perform
subsystem restart to shutdown and reboot the DSP so that the DSP
can be recovered from the crash.

CRs-fixed: 1071949
Change-Id: I4662b5120bf7f731e399a27d8a613e2f3b648b00
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-10-04 12:42:44 -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
Bhalchandra Gajare
67436f2353 ASoC: wcd934x-dsp-cntl: add ramdump support
Add support to collect the codec memory dumps when any fatal
interrupt is raised from the DSP indicating the DSP is either
unresponsive/crashed. The memory dumps are only collected if
the debugfs node 'ramdump_enable' is set to true since ramdump
collection is debug only support.

Change-Id: I805ec63d125770b869cac892db8cf56f45510d6d
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-10-04 11:07:16 -07:00
Bhalchandra Gajare
4e3222f33a ASoC: wcd-spi: add support to read requested section of memory
It is possible that the manager driver may try to read codec memory
section through the wcd-spi driver. Add support in the wcd-spi driver
to handle the WDSP_EVENT_READ_SECTION event and perform reading of
the requested memory section.

Change-Id: If7fb228dc15cb47079c8a791443c4d12c29eeb9c
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-10-04 11:06:59 -07:00
Bhalchandra Gajare
aaa95b0cb5 ASoC: wcd-dsp-mgr: add support for collecting memory dumps
The codec driver is notified through interrupt whenever the
DSP in codec is unresponsive/crashed. In such cases, collecting
dumps of the codec memory is useful in debugging the issues.
Change adds support in the wcd dsp manager driver to collect
the memory dumps upon notification of error interrupt.

Change-Id: Ib91cd4fc1476ee1a9ec448cde1a083070443f726
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-10-04 11:06:42 -07:00
Bhalchandra Gajare
1e2d8b2132 ASoC: wcd-dsp-mgr: add argument to the interrupt handler callback
Currently, when manager driver interrupt handler callback is called,
there is no way for the caller to provide any data information along
with the type of interrupt. Change adds argument to the interrupt
handler so that callers can use this to pass agreed data when an
interrupt occurs.

Change-Id: I1c049227875a802491e21998c13c0bcd8eab7de6
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-10-04 10:49:57 -07:00
Prasad Sodagudi
1498330abf power: reset: Skip emmc_dload sysfs entry creation
Do not create /sys/kernel/dload/emmc_dload sysfs entry
when imem-dload-type is not defined and also fix error
paths of sysfs entry creation.

Change-Id: I354e1f7635c5163516e256ed71b8510d1665877d
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
2016-10-04 12:38:29 +05:30
Prasad Sodagudi
6c1af3c519 power: reset: Disable SDI when dload mode is not supported
Based on the kernel parameter download_mode, disable the SDI
execution. Also disable SDI execution for kernel panic/crash
scenarios. Currently SDI is getting executed for kernel crash/panic
scenarios, but it does not required in these scenarios.

Change-Id: I5a64107e2bf210f82d94ab03c4f86f27f9a330c8
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
2016-10-04 12:36:57 +05:30
Prasad Sodagudi
c6727963e1 power: reset: Add support for EMMC dload
Add sysfs entry to support emmc dload mode.
Adds /sys/kernel/reset/emmc_dload entry to enable or disable
emmc dload mode support.

Change-Id: If38135427304316b03d3193ad16d335605e9c143
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
2016-10-04 12:32:29 +05:30
Lijuan Gao
0f58275616 power: reset: Disable SDI when dload mode is disabled
Add function to auto disable the SDI when the ramdump is disabled.
And make the device do hard reset at the same time.

Change-Id: I14e2d13792ef535364a082cdaed0b79c262ecfe5
Signed-off-by: Lijuan Gao <lijuang@codeaurora.org>
2016-10-04 12:29:20 +05:30
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
Saurabh Kothawade
bd60e570fe msm: vidc: Keep v4l2 plane count instance-specific
Existing video driver maintains a static array of
video formats. Video instances have a pointer to this
common array. In multi-instance scenario, different
instances read/write to common structure, resulting
into invalid plane count for other instances. To
avoid such situation, keep plane count structure
specific to the instance.

CRs-Fixed: 1051541
Change-Id: I9bd487459277e509cf64c0124a2d2e3f5fdc443b
Signed-off-by: Saurabh Kothawade <skothawa@codeaurora.org>
2016-10-03 19:01:45 -07:00
Patrick Daly
295721b363 ion: ion_system_heap: SetPagePrivate when splitting secure pages
The kgsl driver relies on checking the PagePrivate flag for secure memory.
Commit 471a5dd237 ("ion: system_heap:
Add a new allocation method") did not properly set this flag in all cases.
Fix this.

Change-Id: I4f29ee151158cd70a1617d365decc7d3fd8fe6ac
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2016-10-03 18:42:01 -07:00
Sunil Paidimarri
5334ff493a msm: ipa: Fix ipa ready cb return value
Ethernet driver can be loaded before IPA. IPA
ready callback not returning correct value.

Change-Id: I4cd08a8ab8a5de6c46643eaff9b61779858887e3
CRs-Fixed: 1070644
Signed-off-by: Sunil Paidimarri <hisunil@codeaurora.org>
2016-10-03 12:51:25 -07:00
Satyajit Desai
0f327e4ccc ion: use %pK instead of %p which respects kptr_restrict sysctl
Hide kernel pointers from unprivileged users by using %pk format-specifier
instead of %p. This respects the kptr_restrict sysctl setting which is by
default on. So by default %pk will print zeroes as address. echo 1 to
kptr_restrict to print proper kernel address.

Change-Id: Ia300e3e38b8662afac15edda28959564b05c9367
Signed-off-by: Satyajit Desai <sadesai@codeaurora.org>
2016-10-03 11:42:20 -07:00
Venkat Gopalakrishnan
0365116c48 scsi: ufs_test: fix use after free issue
Make sure test_rq is not accessed after its freed.
Also take care of initializing num_bios_per_request before use.

Change-Id: Ief9e4ff118691d74782f4f405dc195cb9bdb7c32
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-10-03 10:57:19 -07:00
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