OSDN Git Service

sagit-ice-cold/kernel_xiaomi_msm8998.git
8 years agoirqchip: add snapshot of msm_show_resume_irq
Abhimanyu Kapur [Mon, 30 Mar 2015 18:54:54 +0000 (11:54 -0700)]
irqchip: add snapshot of msm_show_resume_irq

This is a snapshot of drivers/irqchip/msm_show_resume_irq.c as of
msm-3.18 commit <e17a72ad7344065> ("Merge "ARM: dts: mdm: Adjust
memory region peripheral1_mem for MDM9640"").

CRs-Fixed: 1033023
Change-Id: Ia928cf5e23eebc7a0f80638f4be81beec7ed2878
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
Signed-off-by: Kyle Yan <kyan@codeaurora.org>
8 years agomsm: camera: isp: Add drop reporting in RESUMING state
Harsh Shah [Thu, 21 Apr 2016 17:56:18 +0000 (10:56 -0700)]
msm: camera: isp: Add drop reporting in RESUMING state

In RESUMING state, WM is stopped causing skip in diverted buffers.
Add drop reporting for these frames, so that modules down stream can
be notified in case of reg_update miss.

CRs-Fixed: 1012335
Change-Id: I67d700c5c844fd6be3bf6ded756fb93e0ebfb537
Signed-off-by: Harsh Shah <harshs@codeaurora.org>
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
8 years agomsm: vidc: Destroy mutexes used by vidc driver
Praneeth Paladugu [Thu, 12 May 2016 18:20:01 +0000 (11:20 -0700)]
msm: vidc: Destroy mutexes used by vidc driver

Currently vidc driver is not destroying the mutexes that it
used. This can cause mutex resources leak. This changes fixes
the same.

Change-Id: I293ad3c4c5ed46c692ae066e7188efe41e5dc482
Signed-off-by: Praneeth Paladugu <ppaladug@codeaurora.org>
8 years agoASoC: msm: qdsp6v2: fix non-gapless transition failure
Satya Krishna Pindiproli [Thu, 23 Jun 2016 08:20:03 +0000 (13:50 +0530)]
ASoC: msm: qdsp6v2: fix non-gapless transition failure

During non-gapless transition, there is an indefinite wait in
drain until either eos_ack or cmd_interrupt is set. This results
in playback getting stuck and occurs because cmd_interrupt is
not set in TRIGGER_STOP as gapless_transition is set to 1 during
partial drain of earlier stream.

Fix the issue by setting gapless_transition to 0 when gapless
fails which ensures that cmd_interrupt is set in TRIGGER_STOP.

CRs-Fixed: 1027991
Change-Id: I47d2d45df8686f25e8170a84fcaf68e143f6e4f6
Signed-off-by: Satya Krishna Pindiproli <satyak@codeaurora.org>
8 years agoARM: dts: msm: Update thermal sensor for GPU in MSMCobalt
Ram Chandrasekar [Fri, 24 Jun 2016 22:46:31 +0000 (16:46 -0600)]
ARM: dts: msm: Update thermal sensor for GPU in MSMCobalt

Temperature sensor 13 tracks the GPU temperature closely. Update the
sensor alias for gpu to point to tsens 13 in MSMCobalt.

CRs-Fixed: 1034178
Change-Id: I8a644440eca0bc8996e777b76670f2aead601732
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
8 years agoARM: dts: msm: add HDMI support for 8996 mtp
Xiaojun Sang [Fri, 24 Jun 2016 05:49:05 +0000 (13:49 +0800)]
ARM: dts: msm: add HDMI support for 8996 mtp

add HDMI node for 8996 mtp to enable audio over HDMI.

CRs-Fixed: 1028336
Change-Id: I1aade4b197b1705ac116db66168f73253b6ea04d
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
8 years agoASoC: msm: add support for packed 24 bit
Manish Dewangan [Thu, 5 May 2016 06:57:40 +0000 (12:27 +0530)]
ASoC: msm: add support for packed 24 bit

Changes to support packed 24 bit (SNDRV_PCM_FORMAT_S24_3LE).

CRs-Fixed: 1011048
Change-Id: I5c49091d6bbff98ed8665446fffdba08446073cd
Signed-off-by: Manish Dewangan <manish@codeaurora.org>
8 years agoASoC: wcd9335: add support for packed 24 bit
Manish Dewangan [Thu, 5 May 2016 06:56:15 +0000 (12:26 +0530)]
ASoC: wcd9335: add support for packed 24 bit

Changes to support packed 24 bit (SNDRV_PCM_FORMAT_S24_3LE).

CRs-Fixed: 1011048
Change-Id: If81f3053629dc4f80a08392f392c7be735ad33c2
Signed-off-by: Manish Dewangan <manish@codeaurora.org>
8 years agoASoC: msm: qdspv2: add support for MULTI_CHANNEL_PCM_V3 command
Manish Dewangan [Fri, 22 Apr 2016 07:14:39 +0000 (12:44 +0530)]
ASoC: msm: qdspv2: add support for MULTI_CHANNEL_PCM_V3 command

Driver changes to use ASM_MEDIA_FMT_MULTI_CHANNEL_PCM_V3 command.
This command supports playback/record of both 32 bit
(24 bit data in 32 bit word) and 24 bit packed. Update platform
drivers to use this for SNDRV_PCM_FORMAT_S24_LE record and playback.

CRs-Fixed: 1011048
Change-Id: I6f98bf3402a737bc21daff33b13b137850a690ea
Signed-off-by: Manish Dewangan <manish@codeaurora.org>
8 years agomsm: ipa3: Do not use APPS pipes for IPA kernel-test
Ghanim Fodi [Sun, 26 Jun 2016 12:23:48 +0000 (15:23 +0300)]
msm: ipa3: Do not use APPS pipes for IPA kernel-test

IPA Endpoint 16 is the one assigned to APPS for WAN data.
This pipe is connected when modem is up. Kernel-tests
framework should not use it for testing purposes as this
pipe is already allocated for APPS. Update the code
to use another IPA Endpoint.

Change-Id: Ia0ed2ad9041353def1b3055d394281bca2893f88
CRs-fixed: 1034319
Signed-off-by: Ghanim Fodi <gfodi@codeaurora.org>
8 years agoARM: dts: msm: Change LAB precharge time to 500us for PMI8994
Fenglin Wu [Mon, 20 Jun 2016 02:55:12 +0000 (10:55 +0800)]
ARM: dts: msm: Change LAB precharge time to 500us for PMI8994

Set LAB's precharge time to max 500us to optimize the precharge
behavior.

CRs-Fixed: 1028321
Change-Id: I13eaca8f50080457b95f4c88f9987df6ba0f05c5
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
8 years agomsm: ipa: change default low watermark for rx buffers
Skylar Chang [Mon, 27 Jun 2016 21:10:12 +0000 (14:10 -0700)]
msm: ipa: change default low watermark for rx buffers

Change the threshold for resubmitting RX buffers to IPA in case
of allocation errors to a bigger number than 0.
In some corner cases a packet from IPA to AP might be larger than
the side of 1 buffer, which can result in IPA stall if threshold
is 0.

CRs-Fixed: 1027726
Change-Id: Ic841de25597c2cd4ce007823f9b9727e858a73cb
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
8 years agoarm: dma-mapping: return NULL on remap error
Vinayak Menon [Fri, 24 Jun 2016 09:16:49 +0000 (14:46 +0530)]
arm: dma-mapping: return NULL on remap error

Currently arm_dma_remap returns the offset value when it fails
because of reasons like unavailability of vmalloc space. This
is wrong as the caller expects NULL on failure, and can result
in kernel panic on dereferencing the returned pointer.

Change-Id: Ic851efecd1b5ff1c5e3105f28f392307857e63e3
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
8 years agolpm-levels: Fix cpu idle trace and stats event
Archana Sathyakumar [Fri, 24 Jun 2016 22:19:37 +0000 (16:19 -0600)]
lpm-levels: Fix cpu idle trace and stats event

In the event that the cpu needs to be rescheduled for another task
before it enters psci sleep, the stats and trace exit events are
considered without the enter events. Fix this issue by moving enter
events before the cpu gets scheduled.

Change-Id: I8e477c434d218960b48aab4e61cacf99476b607f
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
8 years agoBluetooth: Replace %p with %pK
Dibyendu Roy [Tue, 21 Jun 2016 08:04:28 +0000 (13:34 +0530)]
Bluetooth: Replace %p with %pK

The %pK restrictions are used to eliminate exposing kernel addresses.
When kptr_restrict is set to "0" there are no restrictions. When
kptr_restrict is set to "1", kernel pointers printed using the %pK
format specifier will be replaced with 0's unless the user has
CAP_SYSLOG. When kptr_restrict is set to "2", kernel pointers printed
using %pK will be replaced with 0's regardless of privileges.

Change-Id: Iacd8f7b7cdafed3a111507d3da899be9261ff09f
Signed-off-by: Dibyendu Roy <dibyen@codeaurora.org>
8 years agoqcom-charger: qpnp-smb2: Remove unnecessary watchdog interrupts
Harry Yang [Fri, 24 Jun 2016 00:37:21 +0000 (17:37 -0700)]
qcom-charger: qpnp-smb2: Remove unnecessary watchdog interrupts

Watchdog interrupts bark and snarl get triggered frequently, causing
flood messages when enabled in debug_mask. However, neither irq is
essentially being used in charger driver.

Remove both interrupts by setting their irq handlers to NULL, and
skipping irq registration in case of NULL handlers.

CRs-Fixed: 1033724
Change-Id: I9414f3238d1568ec29973a7ec74054c779a7a196
Signed-off-by: Harry Yang <harryy@codeaurora.org>
8 years agoregulator: rpm-smd-regulator: implement set_load
Nicholas Troast [Fri, 3 Jun 2016 00:39:48 +0000 (17:39 -0700)]
regulator: rpm-smd-regulator: implement set_load

A recent change to regulator framework replaced the
regulator_set_optimum_mode API with regulator_set_load.

The regulator_set_load API does the following for regulators which have
not implemented set_load().

- determines the most optimal mode for the given load by calling
  get_optimum_mode()
- gets the current mode by calling get_mode()
- calls set_mode() if the modes are different and expects the mode to be
  committed to the hardware

The rpm-smd-regulator's get_optimum_mode() remembers the load and uses that
for the upcoming get_mode() call. This causes the framework to never call
the set_mode API, thereby causing rpm-smd-regulator to never send the load
to the RPM.

The set_load op was introduced for hardware which does not support the
set_mode op. This is convenient since the RPM sets the mode according to
the aggregated load requirements. In addition the RPM also supports forcing
certain modes which fits well with the set_mode op.

Implement the set_load op to send the aggregated load vote to RPM, and
repurpose the set_mode op to send the aggregated mode vote to RPM.
Remove the get_optimum_mode op since it is no longer required with this
change.

Repurposing of set_mode should not impact consumers since it has the same
effect as before. Instead of sending a load vote which would cause the RPM
to select the desired mode the mode will be sent directly.

Furthermore, the hpm-min-load device tree property is no longer required
since the mode is no longer set based on the hpm-min-load threshold.
Remove it.

Change-Id: I75cf0b4cfc7a6aec3e6d79da9172ce37ec9d91c1
CRs-Fixed: 1023326
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
8 years agodefconfig: arm64: msmcortex: Enable RPM stats/logs
Mahesh Sivasubramanian [Thu, 26 May 2016 20:46:34 +0000 (14:46 -0600)]
defconfig: arm64: msmcortex: Enable RPM stats/logs

RPM stat/logs provide stats about system sleep modes.

Change-Id: I10dc1bdb2fcfe216cdcf147eab936c2f92b5217a
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
8 years agodefconfig: arm64: msm: Enable RPM stats/logs
Mahesh Sivasubramanian [Thu, 26 May 2016 20:46:34 +0000 (14:46 -0600)]
defconfig: arm64: msm: Enable RPM stats/logs

RPM stat/logs provide stats about system sleep modes.

Change-Id: Idf7b30586d5e3c34929b348628f90e5d88f2a9ff
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
8 years agolpm_levels: Avoid race by preventing hotplug during lpm probe
Anil Kumar Mamidala [Tue, 19 Apr 2016 07:46:38 +0000 (13:16 +0530)]
lpm_levels: Avoid race by preventing hotplug during lpm probe

When cluster enters a low power mode, the mode entered is stored
in last_level. During LPM driver probe last_level is initialized
to default level, if a core in that cluster is online.

If all the cores in the cluster are hotplugged after initializing
the last_level and before the per cluster data structures are
initialized, cluster enters low power mode but does not update
last_level as the data structures are not available. In this case
when a core in this cluster is coming online and last_level indicates
default level, assumes cluster did not enter any low power mode,
the update of flags to reflect the cores as active for this cluster
does not happen. This makes driver to select system level low power
mode as if this cluster is in low power mode eventhough it is out
of low power mode.

To avoid this race, prevent cores hotplug during lpm probe.

Change-Id: I1d0c51c52e54ab30239b2fca11040f134315fe61
Signed-off-by: Anil Kumar Mamidala <amami@codeaurora.org>
8 years agomsm: vidc: Add missing qmenu entries for MPEG ctrls
Arun Menon [Sat, 9 May 2015 23:09:05 +0000 (16:09 -0700)]
msm: vidc: Add missing qmenu entries for MPEG ctrls

V4l2 control framework mandates a qmenu entry for each control item.
Validate_new() function accesses the qmenu entry for control item,
and any missing qmenu entries causes a crash within this function.
This patch fixes those crashes.

CRs-Fixed: 1031156
Change-Id: Ie507b1de9ce08221678a730146164d6e970aac8a
Signed-off-by: Arun Menon <avmenon@codeaurora.org>
Signed-off-by: Amit Shekhar <ashekhar@codeaurora.org>
8 years agomisc: qcom: qdsp6v2: Return flush errors to user space
Ben Romberger [Tue, 26 Jan 2016 01:05:14 +0000 (17:05 -0800)]
misc: qcom: qdsp6v2: Return flush errors to user space

Return errors from the flush function including
the caller of the flush ioctl.

CRs-fixed: 1027784
Change-Id: I7ec578b42f50b6ce2f2738193c622c8a2f01ecd8
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
8 years agoASoC: msm: qdsp6v2: Support host pcm feature based on new VSIDs
Helen Zeng [Thu, 16 Jul 2015 22:52:13 +0000 (15:52 -0700)]
ASoC: msm: qdsp6v2: Support host pcm feature based on new VSIDs

With single voice architecture, two new VSIDs are created to
support multimode voice call. Update host pcm driver to support
new VSIDs.

Change-Id: I42e33db7f3dca47c30b7dc5af59848eb6beef330
Signed-off-by: Helen Zeng <xiaoyunz@codeaurora.org>
8 years agomsm: kgsl: Create sysfs entry to control GPU clock throttling.
Oleg Perelet [Wed, 18 May 2016 22:38:55 +0000 (15:38 -0700)]
msm: kgsl: Create sysfs entry to control GPU clock throttling.

Create sysfs entry to control GPU clock throttling. When 0 is
written - all sources of clock throlling - ie LM, BCL, IDLE
are disabled.

CRs-Fixed: 973565
Change-Id: Iad588eb94861bd6b223715cc05354e3c39db9b24
Signed-off-by: Oleg Perelet <operelet@codeaurora.org>
8 years agohwmon: qpnp-adc-voltage: Add optional VADC property
Siddartha Mohanadoss [Fri, 17 Jun 2016 00:22:48 +0000 (17:22 -0700)]
hwmon: qpnp-adc-voltage: Add optional VADC property

Add option to select whether a fresh calibration
needs to be performed when performing the channel measurement.
If the property is not present the default value of
using calibration measurement collected from a timer
will be used. For most cases using a measurement collected
from a timer interval should suffice and the default value
can be used.

Change-Id: I632a9466f04d5d0712de436fc3e1251f7e2e7ad2
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
8 years agomsm: mdss: Add memory retention support for MDP LUT clock
Ping Li [Tue, 14 Jun 2016 22:39:02 +0000 (15:39 -0700)]
msm: mdss: Add memory retention support for MDP LUT clock

A new MDP LUT clock is added to msmcobalt, add code to set
the corresponding mdss_mdp_lut_cbcr register to support MDP
memory retention on msmcobalt.

Change-Id: Icf0890a6f2d3c44e426bd834b3c7943cc6766bae
Signed-off-by: Ping Li <pingli@codeaurora.org>
8 years agoARM: dts: msm: Add MDP LUT clock to msmcobalt
Ping Li [Thu, 16 Jun 2016 23:57:00 +0000 (16:57 -0700)]
ARM: dts: msm: Add MDP LUT clock to msmcobalt

A new clock mdss_mdp_lut_clk has been added to mdss on msmcobalt,
this change adds this clock to the list of clocks for mdss mdp.

Change-Id: I94d0965c5e431613e37e2369d0f0572e083d0acd
Signed-off-by: Ping Li <pingli@codeaurora.org>
8 years agoARM: dts: msm: remove OSM cluster PLL setup sequence for msmcobalt
Osvaldo Banuelos [Fri, 24 Jun 2016 01:01:10 +0000 (18:01 -0700)]
ARM: dts: msm: remove OSM cluster PLL setup sequence for msmcobalt

The OSM driver need not execute the Agera PLL setup sequences
now that the bootloaders are handling such requirement. Thus,
remove the qcom,osm-pll-setup flag from the OSM device node.

CRs-Fixed: 1033726
Change-Id: Icffa6b8e29c1a13c08c11980b9bfd70b25efd56c
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
8 years agoarm64: defconfig: msm: enable MODULE_SIG for msm chipsets
Satya Durga Srinivasu Prabhala [Wed, 22 Jun 2016 17:28:54 +0000 (10:28 -0700)]
arm64: defconfig: msm: enable MODULE_SIG for msm chipsets

MODULE_SIG is needed to check modules for valid signatures upon load.

CRs-Fixed: 1018761
Change-Id: I2d35c6d47221d5b043c7cbe6ad8bee178d14ef8d
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
8 years agoarm64: defconfig: msm: sync up with Kbuild defaults
Satya Durga Srinivasu Prabhala [Thu, 23 Jun 2016 18:16:24 +0000 (11:16 -0700)]
arm64: defconfig: msm: sync up with Kbuild defaults

defconfigs got out of sync, sync them up.

CRs-Fixed: 1033538
Change-Id: I73e43ad042ab0dc2e148d149d09652d37297514b
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
8 years agoARM: dts: msm: Remove voting on vdd_pll regulator for MSMCOBALT
Puja Gupta [Tue, 7 Jun 2016 18:24:44 +0000 (11:24 -0700)]
ARM: dts: msm: Remove voting on vdd_pll regulator for MSMCOBALT

Remove voting on PLL regualtor for modem pil since it is not
required for MSMCOBALT. We already vote on XO.

CRs-Fixed: 1025447
Change-Id: I9f478194a1a6147a8312e232c6ca3fd1eeb01682
Signed-off-by: Puja Gupta <pujag@codeaurora.org>
8 years agosoc: qcom: pil: Make vdd_pll optional property for modem
Puja Gupta [Fri, 17 Jun 2016 23:27:23 +0000 (16:27 -0700)]
soc: qcom: pil: Make vdd_pll optional property for modem

Since 'qcom,vdd_pll' is optional property, change the flow so that pil
doesn't return if it is not present.

CRs-Fixed: 1025447
Change-Id: I530bbeb89f769afb188f28bcdc0230d32feed3dd
Signed-off-by: Puja Gupta <pujag@codeaurora.org>
8 years agoARM: dts: msm: update pinctrl for gpio89 on msmcobalt
Mohan Pallaka [Mon, 20 Jun 2016 23:49:38 +0000 (16:49 -0700)]
ARM: dts: msm: update pinctrl for gpio89 on msmcobalt

Update msm gpio 89 pin control settings to pull down
in suspend to save power.

Change-Id: Ibd46ae4d6bebd40637a78a551984b4c16a693d79
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
8 years agocfg80211: Bypass checkin the CHAN_RADAR if DFS_OFFLOAD is enabled
Ryan Hsu [Tue, 7 Jul 2015 01:20:22 +0000 (18:20 -0700)]
cfg80211: Bypass checkin the CHAN_RADAR if DFS_OFFLOAD is enabled

When WIPHY_FLAG_DFS_OFFLOAD is defined, driver would take care the
DFS related operation, hence the Kernel needs to ignore the DFS
states checking.

CRs-fixed:1032889
Change-Id: I02fa5e3e25427c0ca474455fa2d2be9eb6ea4bd9
Signed-off-by: Ryan Hsu <ryanhsu@codeaurora.org>
8 years agoclk: msm: osm: add panic handler to dump status registers
Osvaldo Banuelos [Mon, 18 Apr 2016 23:28:08 +0000 (16:28 -0700)]
clk: msm: osm: add panic handler to dump status registers

Add a panic handler to dump the OS performance state,
program counter OSM watchdog registers, and the APM status
register when the device crashes due to a kernel panic.
These are critical registers that are useful for debug.

CRs-Fixed: 1033031
Change-Id: I2bbf6884cf83457bfb7e5369bb97614bd4beb150
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
8 years agoarm: mm: consider only lowmem regions while remap
Shiraz Hashim [Tue, 30 Jun 2015 03:44:46 +0000 (09:14 +0530)]
arm: mm: consider only lowmem regions while remap

Consider only those memory blocks with lowmem while
remapping into 4KB regions using CONFIG_FORCE_PAGES
feature.

Change-Id: Ie209fce6c310f911d8cf02d977e226660684a6ab
Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
8 years agoarm: mm: fix pte allocation with CONFIG_FORCE_PAGES feature
Shiraz Hashim [Wed, 21 May 2014 04:05:08 +0000 (09:35 +0530)]
arm: mm: fix pte allocation with CONFIG_FORCE_PAGES feature

CONFIG_FORCE_PAGES introduces a debug option to mark free
pages as read only in order to trigger a fault if any code
attempts to write to a page on the buddy list.

In order to achieve this it splits all section mappings in
to PAGE_SIZE pages during boot. While doing this split, it
wrongly allocates a pte (of page size) for each pmd. Linux
however in armv7 short descriptor format, uses same second
level pte for 2 consecutive pmds offset by the actual second
level table size. Refer comments in kernel file
arch/arm/include/asm/pgtable-2level.h for details.

Fix this by allocating pte for a section mapped pmd while
providing required offset if pte already exists.

Change-Id: Iadbaa5e71e4b220208a7275bf039a2a413349e42
Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
8 years agoKconfig: Add menu choice option to reclaim virtual memory
Susheel Khiani [Fri, 4 Sep 2015 09:54:58 +0000 (15:24 +0530)]
Kconfig: Add menu choice option to reclaim virtual memory

Add menu choice options for reclaiming virtual
memory belonging to any subsystem expected to have
a lifetime of the entire system. By default virtual
memory is not reclaimed.

Change-Id: I1b8a1492062bb9532700122878618989e5148647
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
Signed-off-by: Susheel Khiani <skhiani@codeaurora.org>
8 years agoarm: Allow remapping lowmem as 4K pages
Laura Abbott [Tue, 15 Apr 2014 02:42:04 +0000 (19:42 -0700)]
arm: Allow remapping lowmem as 4K pages

Lowmem is currently mapped with sections (1MB/2MB) whenever
possible due to TLB performance boosts. Sections cannot easily
be changed at runtime however which makes implementing certain
features annoying. Add an option to map lowmem with 4K patches.
This is intended to be used as a debugging feature and should
NOT be used for performance testing.

Change-Id: I9612a99b8e05a022f5ba7e568f21307cf66b5667
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Susheel Khiani <skhiani@codeaurora.org>
8 years agodiag: Add support for multi connection logging
Chris Lew [Wed, 20 Apr 2016 15:34:16 +0000 (08:34 -0700)]
diag: Add support for multi connection logging

This change adds support to route On-Device logging and
USB logging traffic per peripheral. A peripherals'
traffic can go to either endpoint but not both. The
mux layer has a peripheral state and the mode switching
logic has multi mode support.

CRs-Fixed: 1004236
Change-Id: I54fef744bdf08a346e4aef22c1280e928cdaf5d2
Signed-off-by: Chris Lew <clew@codeaurora.org>
8 years agousb: gadget: mtp: Increase RX transfer length to 1M
Hemant Kumar [Mon, 2 May 2016 18:27:21 +0000 (11:27 -0700)]
usb: gadget: mtp: Increase RX transfer length to 1M

The test results indicate that larger transfers improve write speeds.
The Rx request transfer length is now 16K bytes. Increase the Rx
transfer length from 16K to 1MB to get good throughputs.

Change-Id: I3c64e6b96d569b4dc61805a53a0835db9142d55e
Signed-off-by: ChandanaKishori Chiluveru <cchilu@codeaurora.org>
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
8 years agoregulator: Add snapshot of DT documentation for rpm-smd-regulator driver
Nicholas Troast [Fri, 3 Jun 2016 00:38:53 +0000 (17:38 -0700)]
regulator: Add snapshot of DT documentation for rpm-smd-regulator driver

This DT bindings documentation snapshot is taken as of msm-3.18
'commit 00df358f2e6a8 ("regulator: rpm-smd-regulator: introduce BoB
regulator type")'.

CRs-Fixed: 1023326
Change-Id: Icc20967019996616a4eb2ebba6df47e7bc7188d7
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
8 years agomsm: mdss: fix multi-rect validation properties
Abhijit Kulkarni [Mon, 20 Jun 2016 16:43:03 +0000 (09:43 -0700)]
msm: mdss: fix multi-rect validation properties

Fix issues with multi-rect to allow the multi-rects on the same
z-order. In multi-rect use cases the rect 0 of the pipes have higher
priority than rect 1. The change checks the priority of rect on the
right mixer with the priority of rect on the pipe staged on left mixer.

CRs-Fixed: 1023723
Change-Id: Ifd1df8ee04238db0338a7dd70eb5097af2d0eb62
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
8 years agoARM: dts: msm: Enable v4l2 rotator node on msm8996
Alan Kwong [Fri, 17 Jun 2016 01:08:57 +0000 (21:08 -0400)]
ARM: dts: msm: Enable v4l2 rotator node on msm8996

Enable sde v4l2 rotator node on 8996.

This replaces mdss rotator node.

Reserve dma 0/1, writeback mixers, writeback 0/1, and control 5
for rotator driver.

Disable WFD as it shares context bank with rotator.

CRs-Fixed: 1030443
Change-Id: Ie3970f29c7f1800c4457dc71a3f36a54e1cbdb91
Signed-off-by: Alan Kwong <akwong@codeaurora.org>
8 years agomsm: mdss: Add dereference check for xlog vbif dump
Alan Kwong [Fri, 17 Jun 2016 14:11:29 +0000 (10:11 -0400)]
msm: mdss: Add dereference check for xlog vbif dump

Bypass vbif dump for ununsed vbif by checking for
null pointer dereference of io base.

Change-Id: Ic7204921fc82d5aea31c58fcbb668b296794b1c1
CRs-Fixed: 1030443
Signed-off-by: Alan Kwong <akwong@codeaurora.org>
8 years agoASoC: msm: qdsp6v2: DAP: Add check to validate data length
Ashish Jain [Mon, 20 Jun 2016 12:39:07 +0000 (18:09 +0530)]
ASoC: msm: qdsp6v2: DAP: Add check to validate data length

Validate input data length to ensure only relevant data
is copied.

CRs-Fixed: 1027585
Change-Id: I67eb4f162f944bbf4d9e55fb8fe93759e6b8ff91
Signed-off-by: Ashish Jain <ashishj@codeaurora.org>
8 years agomm, sl[au]b: add __GFP_ATOMIC to the GFP reclaim mask
Mel Gorman [Wed, 15 Jun 2016 23:44:14 +0000 (09:44 +1000)]
mm, sl[au]b: add __GFP_ATOMIC to the GFP reclaim mask

Commit d0164adc89f6 ("mm, page_alloc: distinguish between being unable to
sleep, unwilling to sleep and avoiding waking kswapd") modified __GFP_WAIT
to explicitly identify the difference between atomic callers and those
that were unwilling to sleep.  Later the definition was removed entirely.

The GFP_RECLAIM_MASK is the set of flags that affect watermark checking
and reclaim behaviour but __GFP_ATOMIC was never added. Without it, atomic
users of the slab allocator strip the __GFP_ATOMIC flag and cannot access
the page allocator atomic reserves.  This patch addresses the problem.

The user-visible impact depends on the workload but potentially atomic
allocations unnecessarily fail without this path.

Change-Id: Ieac0932d146f7fd992db9fd834b0e9aa3822f891
Link: http://lkml.kernel.org/r/20160610093832.GK2527@techsingularity.net
Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
Reported-by: Marcin Wojtas <mw@semihalf.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: <stable@vger.kernel.org> [4.4+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Git-Commit: 843f65ccbb2273430b57ae135ccd26dddee05be7
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
8 years agoscsi: ufs-debugfs: add error state
Subhash Jadavani [Fri, 10 Jun 2016 19:33:18 +0000 (12:33 -0700)]
scsi: ufs-debugfs: add error state

This change adds support to allow user space query if low level UFS driver
has encountered any error or not, this state can be read/cleared via
debugfs.

Change-Id: I867a4621315108aff17be852cfaadcfa945566a7
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
8 years agoARM: dts: msm: add CPR panic register configuration for msmcobalt
Osvaldo Banuelos [Wed, 22 Jun 2016 21:33:29 +0000 (14:33 -0700)]
ARM: dts: msm: add CPR panic register configuration for msmcobalt

Specify the panic register configuration in the VDD_APC0
and VDD_APC1 CPR device nodes. This enables the CPR panic
handler to dump the values of the specified registers during
a kernel panic.

CRs-Fixed: 1033060
Change-Id: Ifdd03f27ed1135acd4470d891e1b5aca4a11dd65
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
8 years agoregulator: cpr3-util: init panic notifier for CPRh controllers
Osvaldo Banuelos [Wed, 22 Jun 2016 21:51:47 +0000 (14:51 -0700)]
regulator: cpr3-util: init panic notifier for CPRh controllers

Call cpr3_panic_notifier_init() when cpr3_parse_common_ctrl_data()
is called for CPRh controllers. This allows dumping registers during
a kernel panic when CPRh controller devices specify panic register
configuration.

CRs-Fixed: 1033060
Change-Id: I437fe28725d5c1ed06fe8b9735b04bbd84e92db1
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
8 years agoregulator: cpr3: Add panic handler to dump register contents
Tirupathi Reddy [Wed, 23 Mar 2016 11:33:05 +0000 (17:03 +0530)]
regulator: cpr3: Add panic handler to dump register contents

Add panic handler to dump a few critical CPR registers when device
crashes due to kernel panic errors.

CRs-Fixed: 1004533
Change-Id: Id01b4f959c134af48c509ade61c7ec46401b4e70
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
8 years agosoc: qcom: smem: Renaming smem item SMEM_SMEM_STATIC_LOG_EVENTS
Dhoat Harpal [Tue, 21 Jun 2016 09:05:50 +0000 (14:35 +0530)]
soc: qcom: smem: Renaming smem item SMEM_SMEM_STATIC_LOG_EVENTS

SMEM_SMEM_STATIC_LOG_EVENTS is currently unused as its usecase has
been deprecated for a long time. Reallocate the ID to
SMEM_CHARGER_BATTERY_INFO.

CRs-Fixed: 1032131
Change-Id: I35a8307001ac14e3ade733d5f41d6231fe63ebd0
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
8 years agoclk: msm: Set the GMEM GX clamp before disabling the GPU_GX GDSC
Deepak Katragadda [Thu, 16 Jun 2016 21:11:10 +0000 (14:11 -0700)]
clk: msm: Set the GMEM GX clamp before disabling the GPU_GX GDSC

The GMEM GX clamp should be set to the active state before
turning off the gdsc_gpu_gx.

CRs-Fixed: 1027772
Change-Id: I5bb97734a2402e763836250c3ce6f7fc308c20a6
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
8 years agoclk: qcom: alpha-pll: Add support for hwfsm ops
Rajendra Nayak [Mon, 18 Apr 2016 06:10:43 +0000 (11:40 +0530)]
clk: qcom: alpha-pll: Add support for hwfsm ops

Add support to enable/disable the alpha pll using hwfsm
Also add support for initial configuration (needs to be split)

Change-Id: Ifc2fe0539b943e850681143da76da27274203ed2
Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
Signed-off-by: Taniya Das <tdas@codeaurora.org>
8 years agoclk: qcom: Add Alpha PLL support
Stephen Boyd [Tue, 1 Dec 2015 01:31:39 +0000 (17:31 -0800)]
clk: qcom: Add Alpha PLL support

Add support for configuring rates of, enabling, and disabling
Alpha PLLs. This is sufficient for the types of PLLs found in
the global and multimedia clock controllers.

Change-Id: I0d26e8f6d225cc3669f3a9e3c37b45e49e139879
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Taniya Das <tdas@codeaurora.org>
8 years agofixup rpm clks on 8996
Srini Kandagatla [Mon, 16 May 2016 14:05:00 +0000 (15:05 +0100)]
fixup rpm clks on 8996

Change-Id: Ia19aa0ebc209322955da1d22f5eb73c9cd7af908
(cherry picked from commit 6c72267db866b9841312defdf81b100db77a0e71)
Git-commit: 6c72267db866b9841312defdf81b100db77a0e71
Git-repo: https://git.linaro.org/landing-teams/working/qualcomm/kernel.git
Signed-off-by: Srini Kandagatla <srinivas.kandagatla@hackbox.linaro.org>
Signed-off-by: Taniya Das <tdas@codeaurora.org>
8 years agoclk: qcom: rpmcc: Add rpm clock data for msm8996
Rajendra Nayak [Mon, 14 Dec 2015 06:17:10 +0000 (11:47 +0530)]
clk: qcom: rpmcc: Add rpm clock data for msm8996

Add all RPM clock data for msm8996 family of devices

ToDo: Adapt to changes needed for RPM over GLINK against
RPM over SMD that the driver currently supports

Change-Id: Ib095af601a4f03d866cf94c8e277d04630abb42b
Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
Signed-off-by: Taniya Das <tdas@codeaurora.org>
8 years agoclk: qcom: Add support for RPM Clocks
Georgi Djakov [Thu, 14 Apr 2016 14:34:48 +0000 (17:34 +0300)]
clk: qcom: Add support for RPM Clocks

This adds initial support for clocks controlled by the Resource
Power Manager (RPM) processor on some Qualcomm SoCs, which use
the qcom_rpm driver to communicate with RPM.
Such platforms are apq8064 and msm8960.

Change-Id: I1a73355bc9117c34589a25cf58446cad13ceb6e3
(cherry picked from commit 06d998a24c68be94685af38e8becfda3c8bf757b)
Git-commit: 06d998a24c68be94685af38e8becfda3c8bf757b
Git-repo: https://git.linaro.org/landing-teams/working/qualcomm/kernel.git
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Signed-off-by: Taniya Das <tdas@codeaurora.org>
8 years agoclk: qcom: Add support for SMD-RPM Clocks
Georgi Djakov [Thu, 14 Apr 2016 14:34:47 +0000 (17:34 +0300)]
clk: qcom: Add support for SMD-RPM Clocks

This adds initial support for clocks controlled by the Resource
Power Manager (RPM) processor on some Qualcomm SoCs, which use
the qcom_smd_rpm driver to communicate with RPM.
Such platforms are msm8916, apq8084 and msm8974.

The RPM is a dedicated hardware engine for managing the shared
SoC resources in order to keep the lowest power profile. It
communicates with other hardware subsystems via shared memory
and accepts clock requests, aggregates the requests and turns
the clocks on/off or scales them on demand.

This driver is based on the codeaurora.org driver:
https://www.codeaurora.org/cgit/quic/la/kernel/msm-3.10/tree/drivers/clk/qcom/clock-rpm.c

Change-Id: I8d2882de9410a992a8045caedc7ab71e3c3e45b2
(cherry picked from commit 69edeaf51c07c24e06b433762b3ada7b3d786315)
Git-commit: 69edeaf51c07c24e06b433762b3ada7b3d786315
Git-repo: https://git.linaro.org/landing-teams/working/qualcomm/kernel.git
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Signed-off-by: Taniya Das <tdas@codeaurora.org>
8 years agoclk: qcom: Add A53 clock driver
Georgi Djakov [Thu, 19 Mar 2015 07:28:37 +0000 (09:28 +0200)]
clk: qcom: Add A53 clock driver

Add a driver for the A53 subsystem PLL, so that we can provide higher
frequency clocks for use by the system.

Change-Id: I69b4c363c8b656bcd9481b6310a972b8140311a9
(cherry picked from commit 60e4f862c16dfc995a71ec0f50524e020dbfde2f)
Git-commit: 60e4f862c16dfc995a71ec0f50524e020dbfde2f
Git-repo: https://git.linaro.org/landing-teams/working/qualcomm/kernel.git
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Signed-off-by: Taniya Das <tdas@codeaurora.org>
8 years agoclk: qcom: Add Krait clock controller driver
Stephen Boyd [Sat, 21 Mar 2015 06:45:30 +0000 (23:45 -0700)]
clk: qcom: Add Krait clock controller driver

The Krait CPU clocks are made up of a primary mux and secondary
mux for each CPU and the L2, controlled via cp15 accessors. For
Kraits within KPSSv1 each secondary mux accepts a different aux
source, but on KPSSv2 each secondary mux accepts the same aux
source.

Change-Id: I871de8d291f5c1b848b215766c61b8bd0ed98f77
Cc: <devicetree@vger.kernel.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Taniya Das <tdas@codeaurora.org>
8 years agomsm: misc: hdcp: support tz hdcp2p2 app interface change
Shivaprasad Hongal [Fri, 13 May 2016 01:18:53 +0000 (18:18 -0700)]
msm: misc: hdcp: support tz hdcp2p2 app interface change

TZ hdcp2p2 app interface has changed to include device,
session commands and version control. Update hdcp driver
to align.

CRs-Fixed: 1027108
Change-Id: I4acdad2f243ea32f6ce10b6c0064ef2a5262fab2
Signed-off-by: Shivaprasad Hongal <shongal@codeaurora.org>
8 years agoARM: dts: msm: Update VADC channels decimation on msmcobalt
Siddartha Mohanadoss [Thu, 16 Jun 2016 00:22:50 +0000 (17:22 -0700)]
ARM: dts: msm: Update VADC channels decimation on msmcobalt

Update using the default value of 1024 for decimation ratio
on VADC channels for msmcobalt. A smaller value may reduce
the time it takes for measurement but may include noise.

Change-Id: Id8952c4565dd95b154165c9f8e307e74bdbd443e
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
8 years agocoresight-tpdm: fix dsb edge ctrl mask interface
Shashank Mittal [Fri, 10 Jun 2016 15:28:20 +0000 (08:28 -0700)]
coresight-tpdm: fix dsb edge ctrl mask interface

Fix edge ctrl mask interface for DSB subunit to accept DSB event ranges
in both hexadecimal and decimal format.

Change-Id: Ibe650067fc30a65defa2c0e76ef5526235980f72
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
8 years agoARM: dts: msm: enable flush on reset for TMC devices on msmcobalt
Shashank Mittal [Mon, 6 Jun 2016 20:57:19 +0000 (13:57 -0700)]
ARM: dts: msm: enable flush on reset for TMC devices on msmcobalt

Add CTI nodes to configure TMC flush on reset for TMC devices.

Change-Id: I0505326b91558ce052d136cfb456ca0841a26f28
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
8 years agoARM: dts: msm: add apss ctis on msmcobalt
Shashank Mittal [Tue, 7 Jun 2016 00:48:36 +0000 (17:48 -0700)]
ARM: dts: msm: add apss ctis on msmcobalt

Add APSS CTIs on msmcobalt. These devices can be used to configure CTIs
for LMH and OLC blocks.

Change-Id: I76de8cd4c1d26015b26524e445d6a5ba00ce2a43
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
8 years agocoresight-tmc: configure ETR_DBAHI register
Shashank Mittal [Wed, 8 Jun 2016 01:30:20 +0000 (18:30 -0700)]
coresight-tmc: configure ETR_DBAHI register

On an ARM64 arch this register is used by ETR to find correct location
of buffer in memory.

Change-Id: Ie0aa7932e46f63969ba85cb0dc4855b3b267f2d6
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
8 years agocoresight-tmc: avoid reading TMC buffer before enabling
Shashank Mittal [Wed, 15 Jun 2016 20:49:19 +0000 (13:49 -0700)]
coresight-tmc: avoid reading TMC buffer before enabling

Add stricky enable flag to avoid reading TMC buffer before enabling TMC
at least once.

Change-Id: Iccb6338ef4fce25830f27541f5f22cfcad7264ae
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
8 years agocoresight-tmc: fix read_count for tmc_open
Shashank Mittal [Wed, 15 Jun 2016 20:44:34 +0000 (13:44 -0700)]
coresight-tmc: fix read_count for tmc_open

'read_count' is used to reference count simultaneous TMC read requests.

This count should reset to zero in case tmc_read_preapare fails.

Change-Id: Iaded781ee76ec3b079ac9cd9d551bdfb42834fd9
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
8 years agoclk: msm: clock-gcc-cobalt: Enable support to scale the aggre clocks
Deepak Katragadda [Fri, 17 Jun 2016 22:34:54 +0000 (15:34 -0700)]
clk: msm: clock-gcc-cobalt: Enable support to scale the aggre clocks

The aggre NoC clocks are controlled by RPM and until now,
HLOS has only had to enable/disable the resource when
required. Due to a new requirement, enable support to
scale these resources as well.

Change-Id: I3b141d62f6c3b479d8d61ae7829e9f5ca72a3886
CRs-Fixed: 1030966
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
8 years agoASoC: msm: qdsp6v2: Fix timeout error in ADM_CMD_SET_PP_PARAMS_V5
Karthik Reddy Katta [Fri, 17 Jun 2016 11:21:33 +0000 (16:51 +0530)]
ASoC: msm: qdsp6v2: Fix timeout error in ADM_CMD_SET_PP_PARAMS_V5

Timeout error is observed  while waiting for
ADM_CMD_SET_PP_PARAMS_V5 command's response.
Fix the condition logic in wait_event_timeout()
to match the value set in adm_callback() when
response to ADM_CMD_SET_PP_PARAMS_V5 is received.

CRs-Fixed: 1030674
Change-Id: I711c860dc3de479eec0d22369d19615aef572ea1
Signed-off-by: Karthik Reddy Katta <a_katta@codeaurora.org>
8 years agocoresight-tmc: add support to save TMC registers
Shashank Mittal [Wed, 15 Jun 2016 20:39:57 +0000 (13:39 -0700)]
coresight-tmc: add support to save TMC registers

On some devices TMC registers are not preserved across reset. Add
support to save TMC registers to read TMC buffer after a crash.

Change-Id: I5fb7e870ddece35159d1fe465d4b70d2a4c1ec35
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
8 years agoAsoc: msm: qdsp6v2: Track compress stream open properly
Ben Romberger [Wed, 18 May 2016 21:13:19 +0000 (14:13 -0700)]
Asoc: msm: qdsp6v2: Track compress stream open properly

Set the stream open flag immediately after the
stream is opened to ensure correct closure of
the stream if there is an error condition.

Change-Id: I61faf6ddf99ab504e492a4e37d577b67acf99f09
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
8 years agoASoC: msm: Enable use of noirq playback and capture
Haynes Mathew George [Mon, 16 May 2016 23:49:03 +0000 (16:49 -0700)]
ASoC: msm: Enable use of noirq playback and capture

Enable use of noirq (i.e pull mode and push mode)
playback and capture.

CRs-Fixed: 992798
Change-Id: I98e68c2a485783be3c2b3eaa62577759d7e21d82
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
8 years agoASoC: msm: qdsp6v2: Add capture support to a frontend
Haynes Mathew George [Wed, 30 Mar 2016 05:32:08 +0000 (22:32 -0700)]
ASoC: msm: qdsp6v2: Add capture support to a frontend

Add capture support to MultiMedia3 frontend.

CRs-Fixed: 992798
Change-Id: Ie21a1c4a73c354a6dc1e733e6d2ac653f85f7647
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
8 years agoadd documentation about reclaim knob on proc.txt
Minchan Kim [Thu, 9 May 2013 07:21:29 +0000 (16:21 +0900)]
add documentation about reclaim knob on proc.txt

This patch adds stuff about new reclaim field in proc.txt

Change-Id: I1718fad12ec078e204e7a59769ce70fad7708756
Acked-by: Rob Landley <rob@landley.net>
Signed-off-by: Minchan Kim <minchan@kernel.org>
Patch-mainline: linux-mm @ 9 May 2013 16:21:29
[vinmenon@codeaurora.org: trivial merge conflict fixes]
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
8 years agoARM: dts: msm: Add new pcm device node for msm8996
Haynes Mathew George [Wed, 27 Apr 2016 22:31:56 +0000 (15:31 -0700)]
ARM: dts: msm: Add new pcm device node for msm8996

Add new pcm device node to use in the ultra low latency
path in noirq mode.

Change-Id: I8a7bd938fc8eeeec5cd943e7445784559f13e05e
CRs-Fixed: 992798
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
8 years agoASoC: msm: qdsp6v2: pull mode playback and push mode record
Haynes Mathew George [Wed, 13 Apr 2016 22:45:13 +0000 (15:45 -0700)]
ASoC: msm: qdsp6v2: pull mode playback and push mode record

Implement platform drivers to support shared memory based
pcm playback and capture.

Change-Id: I882c67ae1c3d950b98bd002ac384cc3a7e77874a
CRs-Fixed: 992798
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
8 years agosched: core: Fix possible hotplug race in set_cpus_allowed_ptr
Vikram Mulukutla [Thu, 7 Jan 2016 00:18:02 +0000 (16:18 -0800)]
sched: core: Fix possible hotplug race in set_cpus_allowed_ptr

Since a CPU may go offline after cpu_active_mask is used
to query active CPUs, set_cpus_allowed_ptr might inadverntently
pass an invalid cpu number to move_queued_task.

Fix this by ensuring that the cpumask op that uses cpu_active_mask
checks the return value.

CRs-Fixed: 1029014
Change-Id: Id43a629b40b72cc47773e4027d30953b3a94058d
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
8 years agomsm: ipa: fix delete dependency race condition
Skylar Chang [Wed, 15 Jun 2016 01:49:20 +0000 (18:49 -0700)]
msm: ipa: fix delete dependency race condition

IPA RM dependencies are added both by kernel drivers and by
userspace application (IPACM), depending on the use case.
On rare condition, a race is possible between adding the dependency
and deleting it, which results in a bad state of the dependency graph.
This change makes sure that dependency is deleted only if it was added
by the same entity.

CRs-Fixed: 1027773
Change-Id: I9253469887b8913f6f2c513a6c7043ed60400b8a
Acked-by Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
8 years agoqcom-cpufreq: Use cpufreq_table_validate_and_show to fill freq_table
Junjie Wu [Sat, 21 Nov 2015 00:10:58 +0000 (16:10 -0800)]
qcom-cpufreq: Use cpufreq_table_validate_and_show to fill freq_table

cpufreq_table_validate_and_show() is created as a standard way to
initialize frequency for a policy and assign freq_table. Use this new
API to assign freq_table.

CRs-Fixed: 1024229
Change-Id: Iac3a9394790e140492c5c0c0ad6d068840bfffa4
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
8 years agomm: Support address range reclaim
Minchan Kim [Thu, 9 May 2013 07:21:28 +0000 (16:21 +0900)]
mm: Support address range reclaim

This patch adds address range reclaim of a process.
The requirement is following as,

Like webkit1, it uses a address space for handling multi tabs.
IOW, it uses *one* process model so all tabs shares address space
of the process. In such scenario, per-process reclaim is rather
coarse-grained so this patch supports more fine-grained reclaim
for being able to reclaim target address range of the process.
For reclaim target range, you should use following format.

echo [addr] [size-byte] > /proc/pid/reclaim
The addr should be page-aligned.

So now reclaim konb's interface is following as.

echo file > /proc/pid/reclaim
reclaim file-backed pages only
echo anon > /proc/pid/reclaim
reclaim anonymous pages only
echo all > /proc/pid/reclaim
reclaim all pages
echo 0x100000 8K > /proc/pid/reclaim
reclaim pages in (0x100000 - 0x102000)

Change-Id: I111131d31be1cfcfa246617b634a9a8bc4078098
Signed-off-by: Minchan Kim <minchan@kernel.org>
Patch-mainline: linux-mm @ 9 May 2013 08:39:01
[vinmenon@codeaurora.org: trivial merge conflict fixes]
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
8 years agomm: Enhance per process reclaim to consider shared pages
Minchan Kim [Thu, 9 May 2013 07:21:27 +0000 (16:21 +0900)]
mm: Enhance per process reclaim to consider shared pages

Some pages could be shared by several processes. (ex, libc)
In case of that, it's too bad to reclaim them from the beginnig.

This patch causes VM to keep them on memory until last task
try to reclaim them so shared pages will be reclaimed only if
all of task has gone swapping out.

This feature doesn't handle non-linear mapping on ramfs because
it's very time-consuming and doesn't make sure of reclaiming and
not common.

Change-Id: I7e5f34f2e947f5db6d405867fe2ad34863ca40f7
Signed-off-by: Sangseok Lee <sangseok.lee@lge.com>
Signed-off-by: Minchan Kim <minchan@kernel.org>
Patch-mainline: linux-mm @ 9 May 2013 16:21:27
[vinmenon@codeaurora.org: trivial merge conflict fixes + changes
to make the patch work with 3.18 kernel]
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
8 years agomm: Remove shrink_page
Minchan Kim [Thu, 9 May 2013 07:21:26 +0000 (16:21 +0900)]
mm: Remove shrink_page

By previous patch, shrink_page_list can handle pages from
multiple zone so let's remove shrink_page.

Change-Id: I3526377aa6ee6142b8f3ec63396e7ada1e442505
Signed-off-by: Minchan Kim <minchan@kernel.org>
Patch-mainline: linux-mm @ 22 Apr 2013 17:45:03
[vinmenon@codeaurora.org: trivial merge conflict fixes]
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
8 years agomm: make shrink_page_list with pages work from multiple zones
Minchan Kim [Thu, 9 May 2013 07:21:25 +0000 (16:21 +0900)]
mm: make shrink_page_list with pages work from multiple zones

Shrink_page_list expects all pages come from a same zone
but it's too limited to use.

This patch removes the dependency so next patch can use
shrink_page_list with pages from multiple zones.

Change-Id: I34469b7f0a79f2b79e30e40033ba8b3e1dd5f2d0
Signed-off-by: Minchan Kim <minchan@kernel.org>
Patch-mainline: linux-mm @ 9 May 2013 16:21:25
[vinmenon@codeaurora.org: trivial merge conflict fixes]
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
8 years agomm: Per process reclaim
Minchan Kim [Thu, 9 May 2013 07:21:24 +0000 (16:21 +0900)]
mm: Per process reclaim

These day, there are many platforms avaiable in the embedded market
and they are smarter than kernel which has very limited information
about working set so they want to involve memory management more heavily
like android's lowmemory killer and ashmem or recent many lowmemory
notifier.

One of the simple imagine scenario about userspace's intelligence is that
platform can manage tasks as forground and backgroud so it would be
better to reclaim background's task pages for end-user's *responsibility*
although it has frequent referenced pages.

This patch adds new knob "reclaim under proc/<pid>/" so task manager
can reclaim any target process anytime, anywhere. It could give another
method to platform for using memory efficiently.

It can avoid process killing for getting free memory, which was really
terrible experience because I lost my best score of game I had ever
after I switch the phone call while I enjoyed the game.

Reclaim file-backed pages only.
echo file > /proc/PID/reclaim
Reclaim anonymous pages only.
echo anon > /proc/PID/reclaim
Reclaim all pages
echo all > /proc/PID/reclaim

Change-Id: Iabdb7bc2ef3dc4d94e3ea005fbe18f4cd06739ab
Signed-off-by: Minchan Kim <minchan@kernel.org>
Patch-mainline: linux-mm @ 9 May 2013 16:21:24
[vinmenon@codeaurora.org: trivial merge conflict fixes,
and minor tweak of the commit msg]
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
8 years agomm: prevent to write out dirty page in CMA by may_writepage
Minchan Kim [Fri, 9 Jan 2015 13:06:55 +0000 (18:36 +0530)]
mm: prevent to write out dirty page in CMA by may_writepage

Now, local variable references in shrink_page_list is
PAGEREF_RECLAIM_CLEAN as default. It is for preventing to reclaim
dirty pages when CMA try to migrate pages.
Strictly speaking, we don't need it because CMA already didn't allow
to write out by .may_writepage = 0 in reclaim_clean_pages_from_list.

Morever, it has a problem to prevent anonymous pages's swap out when
we use force_reclaim = true in shrink_page_list(ex, per process reclaim
can do it)

So this patch makes references's default value to PAGEREF_RECLAIM
and declare .may_writepage = 0 of scan_control in CMA part to make
code more clear.

Change-Id: I5edc3c955d106ecebc4949ce27daf5b7b7a18089
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Mel Gorman <mgorman@suse.de>
Reported-by: Minkyung Kim <minkyung88@lge.com>
Signed-off-by: Minchan Kim <minchan@kernel.org>
Patch-mainline: linux-mm @ 9 May 2013 16:21:23
[vinmenon@codeaurora.org: trivial merge conflict fixes]
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
8 years agomach-qcom: add support to populate dt nodes for 32-bit platforms
Srinivas Ramana [Tue, 31 May 2016 05:41:52 +0000 (11:11 +0530)]
mach-qcom: add support to populate dt nodes for 32-bit platforms

Add support to populate device tree nodes for the new
32-bit platforms under under mach-qcom.

Change-Id: I5fd747de84917c16f28f3f72d7b34b5db157637c
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
8 years agoarm: fix the compilation error with trigger backtrace call
Srinivas Ramana [Fri, 13 May 2016 12:57:13 +0000 (18:27 +0530)]
arm: fix the compilation error with trigger backtrace call

arch_trigger_all_cpu_backtrace() takes a boolean on arm
platforms. So, the trigger_all_cpu_backtrace() in nmi.h
results in compilation error. Fix it.

Change-Id: I9a1045333115ab1726f85e360ef0e302486341c4
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
8 years agosecurity: pfe: Fix the qualifier used to print size_t
Srinivas Ramana [Fri, 13 May 2016 12:51:00 +0000 (18:21 +0530)]
security: pfe: Fix the qualifier used to print size_t

Use the correct type qualifier to print size_t
and ssize_t. This will fix the compilation errors when
compiling for ARM. While at it, fix the compilation errors
in pfk_kc.c for sched functions by including sched.h.

Change-Id: I4fac4530dd4b31baf62ef3719535fd662dc2ae37
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
8 years agoARM: dts: msm: add SPDM support for msmcobalt
David Dai [Fri, 17 Jun 2016 01:41:14 +0000 (18:41 -0700)]
ARM: dts: msm: add SPDM support for msmcobalt

Add data for dev_freq SPDM support in order to increase BIMC
vote based on bus rejection rate.

CRs-Fixed: 1025515
Change-Id: I93fe93524cca07f9d9efb9f2cd220fb0bfcf8778
Signed-off-by: David Dai <daidavid1@codeaurora.org>
8 years agohwmon: qpnp-adc-voltage: Update VADC settings mask
Siddartha Mohanadoss [Thu, 16 Jun 2016 00:08:48 +0000 (17:08 -0700)]
hwmon: qpnp-adc-voltage: Update VADC settings mask

Update the mask to use default settings to enable fast
average for channel configuration. Setting this allows
low latency for multiple averaged conversions. Also
update the field mask for hardware settling delay.

Change-Id: If50943f86a6d3f54039a0b4ed4f8a71c8aaaa1fa
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
8 years agomsm: isp: Reducing logs in error case
Abhishek Kondaveeti [Fri, 22 Apr 2016 13:30:42 +0000 (19:00 +0530)]
msm: isp: Reducing logs in error case

Reducing logs in error case by
making pr_err as pr_err_limited.

Change-Id: I2ff998fcec7ace9a94ca67a797f008389dc510f2
Signed-off-by: Abhishek Kondaveeti <akondave@codeaurora.org>
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
8 years agomsm: isp: Avoid unaligned register access
Abhishek Kondaveeti [Tue, 12 Apr 2016 10:20:57 +0000 (15:50 +0530)]
msm: isp: Avoid unaligned register access

Unaligned register access will reslut in device
crash. Avoid them by checking the register address
before accessing them.

Change-Id: Ib58efa2a68115ec9929b9270c123c904737196ee
Signed-off-by: Abhishek Kondaveeti <akondave@codeaurora.org>
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
8 years agomsm: camera: isp: Fix framedrop reporting
Jing Zhou [Tue, 24 May 2016 23:37:11 +0000 (16:37 -0700)]
msm: camera: isp: Fix framedrop reporting

This change fixed the framedrop reporting that causes the CTS
test failure. The failure is due to the wrong frame id is used to
report the framedrop. This change will change the framedrop
report logic so that the correct frame id is used.

Change-Id: I5b219ed570b81a7fd6a97be46977cafd3e452492
Signed-off-by: Jing Zhou <jzhou70@codeaurora.org>
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
8 years agoqcom-charger: introduce parallel charging support
Harry Yang [Wed, 15 Jun 2016 19:09:42 +0000 (12:09 -0700)]
qcom-charger: introduce parallel charging support

Parallel charging increases charging capacity and efficiency by
distributing the current between two charging chips.

PMI8998 feeds the parallel charger via its MID input, and handles
input current limiting in its front-porch FET. As master charger,
PMI8998 is responsible for enabling/disabling the parallel
charger, and the FCC distribution.

To enable parallel charging in software, the following conditions
must be met:
- Strong USBIN input
- Battery present
- In fast or taper charging state
- Attached UFP source
While the enabling/disabling is always under the control of software
the disabling can also be done by hardware in case of fault.

Battery current is usually fixed to the battery rating. The FCC
distribution is simple, a split of 50/50 by default, which can
be changed in runtime.

When taper irq kicks in, the algorithm reduces parallel FCC by 25%.
This puts the charging back in constant current phase until the
next one happens where again the algorithm reduces the FCC by
25%. This continues until the parallel FCC drops to 500mA. At that
time parallel charging is disabled and master continues charging
the rest of constant voltage phase.

CRs-Fixed: 1023703 1030934
Change-Id: Ied7c31d5913df94a288d36ecf06d081d32e07396
Signed-off-by: Harry Yang <harryy@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
8 years agocoresight-tmc: add support to configure flush and reset CTIs
Shashank Mittal [Thu, 2 Jun 2016 20:07:32 +0000 (13:07 -0700)]
coresight-tmc: add support to configure flush and reset CTIs

Add support to map/unmap TMC flush and reset CTIs as part of TMC
enable/disable.

Change-Id: I5aae2ce3d2e0dec252139db571d4598d49f3a371
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
8 years agocoresight-etm4x: enable default include address range comparator
Shashank Mittal [Sun, 5 Jun 2016 16:39:09 +0000 (09:39 -0700)]
coresight-etm4x: enable default include address range comparator

ETM driver sets the address comparator in TRCACVR0 and TRCACVR1.
Enable default inclusive range selected by these registers.

Change-Id: I08d798d6fb24571856929f84db572bbd3651cd6c
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
8 years agocoresight: change CoreSight device probe order
Shashank Mittal [Mon, 6 Jun 2016 02:57:58 +0000 (19:57 -0700)]
coresight: change CoreSight device probe order

Change to make sure that CTIs get probed before CoreSight sources and
sinks.

Change-Id: I7e83fe663c32a6d75470bb0cb546b42c9fe04ab1
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
8 years agocoresight: add support to read cti data
Shashank Mittal [Thu, 2 Jun 2016 20:03:39 +0000 (13:03 -0700)]
coresight: add support to read cti data

Add support to read cti data from OF nodes.

Devices can use this data to configure CTIs as part of their
configurations.

Change-Id: I55b0534ab4d81b9ce02378b513e6ae9bc3b6cd1e
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>