Commit Graph

302432 Commits

Author SHA1 Message Date
Sujit Reddy Thumma
abbc58b0aa arm/dt: msm8974: add support for SD/eMMC bus speed modes
SDC1 supports following bus speed modes:
	- HS200 at 1.8V
	- DDR at 1.8V
SDC2 supports following bus speed modes:
	- SDR12, SDR25, SDR50, SDR104, DDR50

Change-Id: I648435fc00f6b11634cb3d0c41106ecb0868143f
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
2013-02-27 18:14:21 -08:00
Ranjhith Kalisamy
e6ebc083ca msm: kgsl: Align busy times with the end times of samples
Make sure that the busy times are calculated at the end of the
current sample and before the next sample starts. This prevents
false alarms of busy timer events being triggered. Applies only
to devices with idlestats power policy.

Change-Id: I1e28fff4128b72c25e8073d845d519867d67a9ca
Signed-off-by: Ranjhith Kalisamy <ranjhith@codeaurora.org>
2013-02-27 18:14:20 -08:00
Gagan Mac
16d64eb27d msm: msm_bus: Fix a warning by correcting mem-clock usage
Till now mem-clocks were supported only in active context.
Due to that a potential out-of-bounds array access was
caught, which would result in a mem-clock access in sleep
context. Fix this by adding support for mem-clock in active
and sleep context.

Change-Id: I8772621cd20821cccf0d187fc1fb688fe8fda76e
Signed-off-by: Gagan Mac <gmac@codeaurora.org>
2013-02-27 18:14:20 -08:00
Joel King
701bd25692 msm: mdm: use mdelay instead of usleep when resetting modem
The function to reset the external modem can be called from
atomic context so we need to use mdelay instead of usleep.

Change-Id: Ia161ced98764ed3772852f4252215452a1928ff7
Signed-off-by: Joel King <joelking@codeaurora.org>
2013-02-27 18:14:19 -08:00
Abhijeet Dharmapurikar
5a0002ab37 power: pm8921-charger: support dc charging while in usb host mode
The current code disables charging when the usb is operating in host
mode. This unnecessarily stops charging from the DC path. The board
layout (the ovp fet and otg path) is assumed to support host mode and
charging from dc path.

Also make the usb driver change the power supply framework's scope
property instead of calling 8921 charger apis directly.

CRs-Fixed: 373365
Change-Id: I2a9fb32de22cbe68e26078b97a7d83c40272a370
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2013-02-27 18:14:19 -08:00
Bhalchandra Gajare
811c5d6e11 ASoC: WCD9310: Perform microphone polling to correct plug type
During slow insertion of headset, it may be possible that the
headset is wrongly detected as a headphone. This results in
the headset mic being non-functional.

Fix by polling the microphone voltage after a plug is detected
as a valid Headphone. In case the microphone voltage settles to
a valid headset voltage, correct the plug type from Headphone to
Headset.

CRs-fixed: 370332
Change-Id: I5280542e857940f8d228c5f0ded1d2fde301168f
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2013-02-27 18:14:18 -08:00
Ashray Kulkarni
919ebb75ba msm_vidc: Fix decoder output order.
Decoder's output order was configured incorrectly, this
change fixes it.

Change-Id: I523260db33f1df5ffb7c30026683b272c9a05488
Signed-off-by: Ashray Kulkarni <ashrayk@codeaurora.org>
2013-02-27 18:14:18 -08:00
Sujit Reddy Thumma
22b0f23be2 arm/dt: msm8974: Add regulator support for SDC controllers
SDC controllers need two types of power supply:
- vdd (SD/eMMC flash core power supply)
- vdd_io (SD/eMMC I/O pad power supply)

Add support for enable, disable, low power mode setting
for these regulators.

Change-Id: Ifd0ef0d4dd9732893f49700fe86b1dad24497f71
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
2013-02-27 18:14:18 -08:00
Srinivas Krovvidi
07d3851ad6 Bluetooth: Update Local COD to bluez userspace on write complete.
Class of device information is required to the bluez userspace
to write to persistant storage and also update upper layers on
request. So update the local CoD info to bluez once the hci write
is successful.

Change-Id: If45910d4b391616592b49d77d87ca0314be1f033
Signed-off-by: Srinivas Krovvidi <skrovvid@codeaurora.org>
2013-02-27 18:14:17 -08:00
Abhijeet Dharmapurikar
501681e442 power: pm8xxx-ccadc: remove support for pm8921 v1.0 and v1.1
This ccadc module is reused in multiple pmics. It is now unnecessary
to check for 8921 versions in the driver. As a result of this change
older 8921 versions are not supported.

CRs-Fixed: 372679
Change-Id: I2114f9428e2ba1a29c2bc9caaaa75106caf1dfc3
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2013-02-27 18:14:17 -08:00
Ravishangar Kalyanam
700b3607ce msm_fb: display: Fix Toshiba WSVGA panel porch and timing settings
Fix the porch and timing settings for DSI Toshiba WSVGA panel
to enable writeback mode switch efficiently.

Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Change-Id: Ib768d13617470f75ae027970c6ca4779d6b5a367
2013-02-27 18:14:16 -08:00
Marek Szyprowski
06ca4a6eb4 X86: integrate CMA with DMA-mapping subsystem
This patch adds support for CMA to dma-mapping subsystem for x86
architecture that uses common pci-dma/pci-nommu implementation. This
allows to test CMA on KVM/QEMU and a lot of common x86 boxes.

Change-Id: I8c826faaef1ae6c558db9deb9f693e551fc89ec4
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Michal Nazarewicz <mina86@mina86.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2013-02-27 18:14:16 -08:00
Marek Szyprowski
c5334fd415 drivers: add Contiguous Memory Allocator
The Contiguous Memory Allocator is a set of helper functions for DMA
mapping framework that improves allocations of contiguous memory chunks.

CMA grabs memory on system boot, marks it with MIGRATE_CMA migrate type
and gives back to the system. Kernel is allowed to allocate only movable
pages within CMA's managed memory so that it can be used for example for
page cache when DMA mapping do not use it. On
dma_alloc_from_contiguous() request such pages are migrated out of CMA
area to free required contiguous block and fulfill the request. This
allows to allocate large contiguous chunks of memory at any time
assuming that there is enough free memory available in the system.

This code is heavily based on earlier works by Michal Nazarewicz.

Change-Id: I8a04c58b0d39ee7343ac0b58b6dad9d57912c91d
[lauraa: fixed Kconfig conflict]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Rob Clark <rob.clark@linaro.org>
Tested-by: Ohad Ben-Cohen <ohad@wizery.com>
Tested-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Tested-by: Robert Nelson <robertcnelson@gmail.com>
Tested-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2013-02-27 18:14:15 -08:00
Marek Szyprowski
3d46ca5672 mm: trigger page reclaim in alloc_contig_range() to stabilise watermarks
alloc_contig_range() performs memory allocation so it also should keep
track on keeping the correct level of memory watermarks. This commit adds
a call to *_slowpath style reclaim to grab enough pages to make sure that
the final collection of contiguous pages from freelists will not starve
the system.

Change-Id: I2d68d9ac2cfcd32ca6f515fc7e44e8d9d850dff1
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Michal Nazarewicz <mina86@mina86.com>
Tested-by: Rob Clark <rob.clark@linaro.org>
Tested-by: Ohad Ben-Cohen <ohad@wizery.com>
Tested-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Tested-by: Robert Nelson <robertcnelson@gmail.com>
Tested-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2013-02-27 18:14:15 -08:00
Ravishangar Kalyanam
239a5c28be msm_fb: display: Set HDMI PLL footswitch regulator to 1.8V after get()
After regulator_get call for HDMI PLL footswitch purpose, set
output voltage to 1.8 V to ensure proper state while enabling and
disabling regulator.

Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Change-Id: Ifdd0cdbf614524b53038074b943cca65b71bbd24
2013-02-27 18:14:14 -08:00
Brian Gix
cdcf81ac5b Bluetooth: Fix ATT Indicate/Confirm handling
If due to timing issues out of our control, an outbound ATT Indicate
is delayed to the point that user space code does not receive
confirmation within it time-out period, both Client and Server
sockets must be torn down. We also must always respond to incoming
ATT Indicate pkt with a Confirmation, as the Error Response is an
illegal response for Indicate.

CRs-Fixed: 363355
Change-Id: I4003a59e1a731a08818f18d5b79db537e2aa2619
Signed-off-by: Brian Gix <bgix@codeaurora.org>
2013-02-27 18:14:14 -08:00
Praveen Chavan
1a9efd2c10 mm-video:vidc: Set max performance level for high framerate content
Performance issue is observed with 60fps content as the vcodec clock
set based on number of macroblocks and framerate is not sufficient.
This fix checks for the framerate and sets max performance level if
fps is more than 60 (59 to be more precise)

Change-Id: I5d41643a32ec895565406fadec04dc95e04655a4
Signed-off-by: Praveen Chavan <pchava@codeaurora.org>
2013-02-27 18:14:14 -08:00
Padmanabhan Komanduru
edce0b486d msm_fb: Pass correct device pointer to regulator_get() API
Pass the correct mipi_dsi device pointer to the regulator_get()
calls based on whether the target is 7x27A EVB or 8x25 EVB.

Change-Id: If1d7432a733dd54dc6273b91cfea2e6949493ee0
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
2013-02-27 18:14:13 -08:00
Rajesh Kemisetti
092664739e msm: kgsl: Add TLB flush for each submit in case of 8x25/7x2xa
Add TLB flush for each submit to prevent target freeze
in case of 8x25/7x27a/7x25a targets.

Change-Id: I350e72e4f71fef86c7cf9da0954ef65d5765b88f
Signed-off-by: Rajesh Kemisetti <rajeshk@codeaurora.org>
2013-02-27 18:14:13 -08:00
Niranjana Vishwanathapura
69da1f398e msm: mpq8064: Check PCIE efuse status before adding PCIE device
If the PCIE feature is disabled in hardware, then the software
should not turn on the associated regulators and clocks. Do not
add PCIE platform device if PCIE efuse status bit is set(disabled).

Change-Id: I1b07129e43888e1e4fd3c20d794e275e713c18ef
Signed-off-by: Niranjana Vishwanathapura <nvishwan@codeaurora.org>
2013-02-27 18:14:12 -08:00
Ramesh Masavarapu
d7d3d62855 qseecom: Add new ioctl call.
Currently, qseecom user-space library does not have a way to
verify if a particular secure application is loaded in the
qsee or not. This new ioctl solves this issue.

Change-Id: Ia96459f3b8aadee2f6a3af564bb1cc83695759b5
Signed-off-by: Ramesh Masavarapu <rameshm@codeaurora.org>
2013-02-27 18:14:12 -08:00
Bhalchandra Gajare
f05987035b ASoC: WCD9304: Expose all possible Gain Settings for Earpiece PA
WCD9304 supports 4 gain values for Earpiece PA. Only 2 of them are
exposed through the mixer control. Fix to add ability to program
all of the available gain levels

Change-Id: Ie768dc3aebb476ac47dd739654703f7e3cccfd5a
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2013-02-27 18:14:11 -08:00
Joonwoo Park
6d79ec99e2 ASoC: wcd9310: Fix audiable click noise with active ANC headset
If mbhc polling is active, enable mbhc path to avoid polling noise.

CRs-fixed: 347090
Change-Id: I3d9d1d6ec64620e24244091d735ef71c605c64fd
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2013-02-27 18:14:11 -08:00
Stephen Boyd
4f274ea947 msm: clock-8960/8660/9615: Fix pcm clock initial rate
If the pcm clock is not handed off via clock handoff the rate of
pcm is set to 0. In this case, clk_set_rate() of zero would not
program the hardware to select the external input. Therefore set
the rate of the clock to some large initial value so that
clk_set_rate(0) will work properly.

Change-Id: I2555cf2bd1984e8ede5a2b537a3a7dd60034fcf5
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2013-02-27 18:14:11 -08:00
Oluwafemi Adeyemi
2fa2bee596 msm: board-8064: Enable pull-up for SD card detect
On some targets, bootloaders may configure the SD
card detect GPIO as pull-down. Explicitly enable
pull-up for so we can detect card insertion and
removal.

CRs-Fixed: 371313
Change-Id: I98be563858df163e970dc26b37eb394977522772
Signed-off-by: Oluwafemi Adeyemi <aadeyemi@codeaurora.org>
2013-02-27 18:14:10 -08:00
Niranjana Vishwanathapura
b4a94eef5f msm: pcie: Fix the Root Port class code early during device configuration
Currently, the Root Port class code is fixed in header fixup stage.
This is causing the PCIE framework to throw an error message.
Move fixing the Root Port class code to early fixup stage.

Change-Id: Ie37ed555e9602d8441961c44b48e69f8b9daf6e5
Signed-off-by: Niranjana Vishwanathapura <nvishwan@codeaurora.org>
2013-02-27 18:14:10 -08:00
karthik karuppasamy
9bdc142236 msm: dsps: Revise handling of PPSS_PAUSE register.
Only modify the PPSS_PAUSE register if the apps processor controls
the DSPS power state. The Linux kernel shouldn't modify the register
if the DSPS is in control of its own power state.

Also move the definition of the PPSS_PAUSE_REG address to the devices
file, since it may be different on different platforms.

Change-Id: I58d108515806085357c66a5165ba71bb930302fa
CRs-Fixed: 370236
Acked-by: John Larkin <jlarkin@qualcomm.com>
Signed-off-by: Karthik Karuppasamy <kkaruppa@codeaurora.org>
2013-02-27 18:14:09 -08:00
Kaushal Kumar
91343c8a6d msm: socinfo: Add new MSM IDs for 7127AA and 7125AB.
Move MSM IDs incorrectly added for 7127A and 7125A
to 7127AA and 7125AB respectively.

Change-Id: Ifd8cd65bd7c40505068b16e7ca0ed316fb8888ee
Signed-off-by: Kaushal Kumar <kaushalk@codeaurora.org>
2013-02-27 18:14:09 -08:00
Amit Blay
90f47d48a4 msm: usb_bam: Change the usb bam pipe threshold to 16 bytes
In WHCK loopback test, data transfer stall is observed on DL
where A2 could not send data to USB due to hardware buffer.
Currently the pipe event threshold of A2 BAM is 16 bytes. So
A2 BAM will notify USB BAM almost as soon as it has any new
data. But the pipe event threshold of USB BAM was 512 bytes.
Change the usb bam pipe threshold to 16 bytes, so USB BAM
can tell A2 BAM as soon as USB BAM consumes a descriptor with
even small data trunk.

Change-Id: I2703b8fab4260d5da5366d0a0d9b5a309d11a7a4
CRs-Fixed: 374584
Acked-by: Amit Blay <ablay@codeaurora.org>
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
2013-02-27 18:14:09 -08:00
Ashwin Chaugule
4d8b2d4fad Perf: Upgrade perf periodic
Upgrade perf periodic to use the v3.4 perfevents API.

Change-Id: I822300e0efe405353db2d8526bb61110c0697f1f
Signed-off-by: Ashwin Chaugule <ashwinc@codeaurora.org>
2013-02-27 18:14:08 -08:00
Ido Shayevitz
4a77e8ab1d usb: gadget: Match gadget and gadget_driver according to usb_core_id
Adding new usb_core_id property which is used to match an instance
of struct usb_gadget to an instance of struct usb_gadget_driver.
This will allow constructing more then one usb periheral stack.
This new property is optional and if not specified in both the gadget
and gadget driver then it will have the default value of zero.

Change-Id: Idbab46ed76267ab4827319f2f9efe67c91b50dbd
Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
2013-02-27 18:14:08 -08:00
Matt Wagantall
598786820e msm: acpuclock-8974: Vote on the PM8941_S2 regulator for HFPLLs
PM8941_S2 is the parent of PM8941_L12, which supplies the HFPLLs.
Because the rpm_regulator_*() APIs do not manage this relationship,
it is necessary to enable both from acpuclock when the HFPLLs are
needed.

Change-Id: I1f60934f1cdfc7acfdf3dec5a793754896c8d33f
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
2013-02-27 18:14:08 -08:00
Matt Wagantall
9ffc1e623c msm: acpuclock-8974: Update vdd_dig votes to use new voltage corners
New voltage corner enums have been introduced in the RPM regulator
driver for msm8974's vdd_dig rail. Update acpuclock accordingly.

Change-Id: Id4d316b25cdc61d7a0ee330f6423f242881fca0b
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
2013-02-27 18:14:07 -08:00
Lucille Sylvester
78a419b666 msm: kgsl: Fix the graphics bandwidth requests on 8064/8930
Bandwidth requests were created to hit Apps Fabrics nominal and
SVS voltages.  They need to be updated to also hit the right
values for the MM Fabric.  This will allow the default power
level to be at nominal voltage rather than turbo voltage.

CRs-Fixed: 374734
Change-Id: I80cebd64bf62d8a40d95242f5c187dd902bb0f6a
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
2013-02-27 18:14:07 -08:00
David Collins
e901b21abb arm/dt: msm8974: Switch from native to RPM control of most regulators
Switch control of most PMIC PM8941 and PM8841 regulators from
direct native control via qpnp-regulator to indirect RPM control
via rpm-regulator-smd for MSM8974.

Also select MSM_RPM_REGULATOR_SMD for MSM8974 in the MSM8974
Kconfig file.  This is necessary because acpuclock-krait requires
that either CONFIG_MSM_RPM_REGULATOR_SMD not be defined or that
it be defined and that the rpm-regulator-smd devices are
available.  This requires that the switch from qpnp-regulator to
rpm-regulator-smd devices happen at the same time as
CONFIG_MSM_RPM_REGULATOR_SMD is defined.

Add more supply bindings in msm8974.dtsi so that the
acpuclock-krait driver may be able to successfully call
rpm_regulator_get().

Specify a qcom,consumer-supplies binding in the pm8841_s2_corner
device node for clock-8974.

Modify the voltage ranges for PM8841 SMPS 1 and SMPS 2.  The
ranges when using qpnp-regulator control were:
S1 - 900000 to 1150000 uV
S2 - 900000 to 1150000 uV
Change these ranges to:
S1 - 675000 to 1050000 uV
S2 - 500000 to 1050000 uV

When using RPM control, it is safe to allow requests all the way
down to retention voltage levels.  The max_uV change is a
correction.  1.15 V is not a supported voltage for S1 or S2.

Change-Id: I6dee530ebc20466ec740cbb07773d13912b7a728
Signed-off-by: David Collins <collinsd@codeaurora.org>
2013-02-27 18:14:06 -08:00
Joonwoo Park
f2d96e2fc6 ASoC: msm8960: Enable mbhc micbias when ANC headset is enabled
When ANC is enabled it's needed to enable mbhc's micbias to avoid mbhc
polling noise.

Change-Id: Ib9ddf28800c7c2d993089fecb20371f3d3444a52
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2013-02-27 18:14:06 -08:00
Stephen Boyd
e47ea9bd6f msm: defconfig: Disable section mismatch=y
Section mismatch shouldn't be enabled in any production builds
because it sets single use functions to be no-inline. Disable
this option. We still get section mismatch analysis, just not as
fine grained.

Change-Id: I8fc96cf8876d11a61ad067e1b75b81be307969e1
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2013-02-27 18:14:06 -08:00
Ramesh Masavarapu
ddcb03a758 qseecom: Support concurrency between QSEE apps.
Currently, if a client tries to load a secure app
in QSEE and another client tries to send a message to
another secure app, it results in a crash. Instead
of using 2 different mutex's - one for sending
messages and another for rest of the operations, now
only one mutex is used for all operations.

Change-Id: I8e1ad9ddf84cca602c6159a6f50b1abaff427b7c
Signed-off-by: Ramesh Masavarapu <rameshm@codeaurora.org>
2013-02-27 18:14:05 -08:00
Abhijeet Dharmapurikar
e9db898b3c power: pm8921-bms: remember soc between restarts
Currently the code does not have a mechanism to remember the soc
reported just before shutting down and upon restarting the new
soc reported is off from the previous soc value reported.

This change introduces
- a method to save soc in an unused coincell back register: ssbi address
  0x107 is not used on 8921 and serves the purpose of storing the soc.
  The driver reads this value and uses it to scale the reported soc.
- a method to detect that a battery was removed and perhaps replaced by a
  different one. If the battery is found replaced the driver is notified
  of the change and it disregards the soc value it read from the backup
  register. The charger driver has a battery backed bit (force vref
  therm) which it sets in its initialization sequence. Once set the
  value remains between restarts, unless the battery is removed. The
  default value of this bit is 0. Hence if a zero is detected before
  writing to it, battery was removed between restarts - this mechanism
  is used to notify the BMS to disregard the soc read from the backup
  register.

Note that for this to work correctly the bootloader needs to be updated to
not overwrite register 0x107 upon restart.

CRs-Fixed: 370287
Change-Id: If7d098552d36eb27a396ee7d37f78d3629861f6e
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2013-02-27 18:14:05 -08:00
Riaz Rahaman
32142dc8a0 msm: Add platform driver support for qseecom.
qseecom device is not registered on msm8x60 and this change helps
register qseecom device on msm8x60 targets.

Change-Id: I06ed6e5a327028694185c39eefda886c65e070e3
Signed-off-by: Riaz Ur Rahaman <riazr@codeaurora.org>
2013-02-27 18:14:04 -08:00
Stephen Boyd
513e0d2bec msm: clock-local: Initialize cdiv rates to non-rate value
cdiv clocks treat the zero rate as a special rate indicating 'use
the external source'. The initial rate of a clock's rate field is
typically zero. Combine the two facts with the addition of code
to check if the rate has changed between the last clk_set_rate()
call and you find that clk_set_rate(cdiv, 0) will not do what is
advertised (namely switch to the external source).

To solve this dilemma set the rate of the cdiv clock to ULONG_MAX so
that the check for the same rate doesn't trigger.

Change-Id: Ic6e9ed8b3cbf3d6c68ec431ad8ec077e39a175b4
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2013-02-27 18:14:04 -08:00
Helen Zeng
7b8f222571 ASoc: soc-pcm: Don't shutdown codec dai if it's used by other stream
- Remove codec dai shutdown under cpu dai check
- Don't shutdown codec dai when it's still used by
  other capture stream

Change-Id: I1b9eae17ee95d05a8feb07b2369db3936b783e3f
Signed-off-by: Helen Zeng <xiaoyunz@codeaurora.org>
2013-02-27 18:14:04 -08:00
Marek Szyprowski
b68303ab8d mm: extract reclaim code from __alloc_pages_direct_reclaim()
This patch extracts common reclaim code from __alloc_pages_direct_reclaim()
function to separate function: __perform_reclaim() which can be later used
by alloc_contig_range().

Change-Id: Ia9d8b82018d91dc669488955b20f69f1cba43147
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Michal Nazarewicz <mina86@mina86.com>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Tested-by: Rob Clark <rob.clark@linaro.org>
Tested-by: Ohad Ben-Cohen <ohad@wizery.com>
Tested-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Tested-by: Robert Nelson <robertcnelson@gmail.com>
Tested-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2013-02-27 18:14:03 -08:00
Mel Gorman
2c063ac1c8 mm: Serialize access to min_free_kbytes
There is a race between the min_free_kbytes sysctl, memory hotplug
and transparent hugepage support enablement.  Memory hotplug uses a
zonelists_mutex to avoid a race when building zonelists. Reuse it to
serialise watermark updates.

Change-Id: I31786592a8cc03e579ee01d99d7eba76e926263f
[a.p.zijlstra@chello.nl: Older patch fixed the race with spinlock]
Signed-off-by: Mel Gorman <mgorman@suse.de>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Tested-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2013-02-27 18:14:03 -08:00
Michal Nazarewicz
944e4004e2 mm: page_isolation: MIGRATE_CMA isolation functions added
This commit changes various functions that change pages and
pageblocks migrate type between MIGRATE_ISOLATE and
MIGRATE_MOVABLE in such a way as to allow to work with
MIGRATE_CMA migrate type.

Change-Id: Ib3a0b04cae49396b206a39bfced470e218ab1f90
Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Tested-by: Rob Clark <rob.clark@linaro.org>
Tested-by: Ohad Ben-Cohen <ohad@wizery.com>
Tested-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Tested-by: Robert Nelson <robertcnelson@gmail.com>
Tested-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2013-02-27 18:14:02 -08:00
Sujit Reddy Thumma
627560c305 mmc: msm_sdcc: Fix deadlock while resuming sdcc from userspace
The runtime power management of sdcc can be controlled by
userspace with auto/on modes by writing into
/sys/devices/platform/msm_sdcc.1/power/control entry.
"auto" mode allows runtime pm suspend to happen.
"on" mode forbids runtime suspend of sdcc and also take care
of resuming the device if already suspended. During this resume
process there is a deadlock as described below:

o User writes "on" into control parameter.

o The sysfs write triggers a rpm_resume() (assume sdcc is
  already suspended, hence rpm_resume() tries to wake it up).

o rpm_resume() -> msmsdcc_runtime_resume() -> mmc_claim_host()
  -> msmsdcc_enable() -> pm_runtime_get_sync() -> rpm_resume()
  -> wait for previous rpm_resume() completion which cause deadlock.

CRs-Fixed: 372071
Change-Id: I0f666b56b6db98b182b8fc828588b476fd4eef6a
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
2013-02-27 18:14:02 -08:00
Nishant Pandit
1e11a8dc54 msm: camera: Add support for concurrent Ispif interface streaming
Add support for multiple ispif interfaces streaming concurrently.
PIX abd RDI interface can stream at same time or two RDI interfaces
may stream at one time depending on usecase

Change-Id: Ib3cef418cd2816bc19891c1855e1dcae5a2a55a1
Signed-off-by: Nishant Pandit <npandit@codeaurora.org>
2013-02-27 18:14:02 -08:00
Abhimanyu Kapur
a3b70549ee msm: 8974: rename copper to 8974
The official name for copper is MSM8974.
Switch to it.

Change-Id: Ifb241232111139912477bf7b5f2e9cf5d38d0f9e
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
2013-02-27 18:14:01 -08:00
Michal Nazarewicz
269a4c9264 mm: mmzone: MIGRATE_CMA migration type added
The MIGRATE_CMA migration type has two main characteristics:
(i) only movable pages can be allocated from MIGRATE_CMA
pageblocks and (ii) page allocator will never change migration
type of MIGRATE_CMA pageblocks.

This guarantees (to some degree) that page in a MIGRATE_CMA page
block can always be migrated somewhere else (unless there's no
memory left in the system).

It is designed to be used for allocating big chunks (eg. 10MiB)
of physically contiguous memory.  Once driver requests
contiguous memory, pages from MIGRATE_CMA pageblocks may be
migrated away to create a contiguous block.

To minimise number of migrations, MIGRATE_CMA migration type
is the last type tried when page allocator falls back to other
migration types when requested.

Change-Id: I2bb0954de8be4f212b03dea0e5a508048684bda2
Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Tested-by: Rob Clark <rob.clark@linaro.org>
Tested-by: Ohad Ben-Cohen <ohad@wizery.com>
Tested-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Tested-by: Robert Nelson <robertcnelson@gmail.com>
Tested-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2013-02-27 18:14:01 -08:00
Michal Nazarewicz
629b2bf987 mm: page_alloc: change fallbacks array handling
This commit adds a row for MIGRATE_ISOLATE type to the fallbacks array
which was missing from it.  It also, changes the array traversal logic
a little making MIGRATE_RESERVE an end marker.  The letter change,
removes the implicit MIGRATE_UNMOVABLE from the end of each row which
was read by __rmqueue_fallback() function.

Change-Id: Icdbbebb9eece2468c0b963964be9a4c579cbc775
Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Tested-by: Rob Clark <rob.clark@linaro.org>
Tested-by: Ohad Ben-Cohen <ohad@wizery.com>
Tested-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Tested-by: Robert Nelson <robertcnelson@gmail.com>
Tested-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2013-02-27 18:13:59 -08:00