Commit graph

570198 commits

Author SHA1 Message Date
Tatenda Chipeperekwa
af6fbb8c79 msm: mdss: send FB registered event before initializing MDP
Send the FB registered event before initializing MDP in order to
allow the panel driver to complete any internal initialization
before MDP operations begin. For example, in the case of HDMI
panels, this will ensure that the Hot Plug Detection (HPD)
circuitry is enabled and that the HDCP libraries are loaded
before data is transmitted on the link.

Change-Id: Icbf1e0abb937d4196677aa896a5386fbaa8ae034
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2016-04-26 14:38:12 -07:00
Tatenda Chipeperekwa
2adbd15068 msm: mdss: hdmi: enable scrambler during handoff
Enable scrambler during handoff scenarios in which there is no
resolution switch from the bootloader to the kernel. Furthermore,
power on the HDMI core before enabling the scrambler to ensure
that there is a smooth transition during the handoff without any
temporary blinks on the panel.

Change-Id: I94dde166dabf2b3260b6cae34bfcdf0e99fe4112
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2016-04-26 14:38:12 -07:00
Tatenda Chipeperekwa
f3d7b604a5 msm: mdss: hdmi: do not toggle power for HDMI modules
Do not toggle the power for HDMI modules during continuous splash
since the power would have been enabled in the bootloader.
Toggling power during handoff can leave the core in a bad state
especially when scrambling is enabled for 4K HDMI modes.

Change-Id: I8279b8933386db184ed2c627cef928321cbc3eea
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2016-04-26 14:38:11 -07:00
Tatenda Chipeperekwa
eb30f34bba msm: mdss: hdmi: add debug method to print panel event names
Add a method to convert panel event enumerations to actual event
names in order to aid in debugging.

Change-Id: Iffdf3b974ceaf0cade50d0589a2d5014136fbd69
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2016-04-26 14:38:10 -07:00
Jayant Shekhar
8f1887371a msm: mdss: Fix potential pipe NULL pointer dereference
NULL pointer derefernce can happen with variable pipe
struct during pipe intialization. Fix this to add a
check for NULL pointer.

Change-Id: I3241ed89979deb777ca62d0c893afb96926820ee
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
2016-04-26 14:38:09 -07:00
Veera Sundaram Sankaran
44111e6548 msm: mdss: reset WB mixercfg during WB destroy
Stale configs are left in layer mixer, when switching between
single/dual mixers. This might cause unexpected issues later.
Reset the configs during wfd destroy, so that it will have clean
LM configs for the next setup.

Change-Id: I3cd3699af1aa63b12e43a9d53ac505235b668e98
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2016-04-26 14:38:09 -07:00
Dhaval Patel
a7538355f9 msm: mdss: fix bit offset in pps configuraiton for dsc
Fix bit offset in picture parameter set configuration
in dsc based on spec.

Change-Id: I244ad4b1ae3936f4362d6b85f04985a611b82d99
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2016-04-26 14:38:08 -07:00
Veera Sundaram Sankaran
7f24e29e4f msm: mdss: fix possible race condition in mdp resource control
There might be a race condition where the early wake-up work item gets
preempted for the stop call when the resource state is already set to
off by the early wake-up. In this condition, the stop call clears the
ctx, leading to issues when the early wake-up work item runs again since
the ctx is not valid any more. Fix this condition by making sure that
stop call always waits for the early wake-up work item to finish.

Change-Id: I64aba71bb4c5602df9a524b77bd8bf3296dda012
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2016-04-26 14:38:07 -07:00
Ping Li
fd396b9e9f msm: mdss: Fix deadlock between AD lock and mdp clk lock
In AD driver, the AD lock and mdp clk lock are acquired in different
sequences which causes deadlock. This change fixes the issue by
modifying the mutex lock acquiring sequence to always acquire the
mdp clk lock before the AD lock.

Change-Id: I3aa62bf78d296cb68b10013a24816e7016acab65
Signed-off-by: Ping Li <pingli@codeaurora.org>
2016-04-26 14:38:06 -07:00
Jayant Shekhar
b9c131d741 msm: mdss: update backlight during unblank if required
Some panel don't require backlight to be updated during
unblank and only require update upon first commit. Add
support to update the backlight based on panel specific
property.

Change-Id: I43f33505be5151640ad7dc2ee1a14df8a55a6dfe
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
2016-04-26 14:38:06 -07:00
David Collins
b27c6968c6 ARM: dts: msm: add L7, L17, and L25 regulator pin control on msmcobalt
Add HW_EN2 mode pin control for PMCOBALT regulators L7, L17, and
L25.  This ensures that these LDO regulators are switched to
normal power mode when the Bluetooth chip asserts the SW_CTRL
signal.

Change-Id: I57123159b9fade665a775fe060d6cba34f0ec5ad
CRs-Fixed: 1004290
Signed-off-by: David Collins <collinsd@codeaurora.org>
2016-04-26 14:38:05 -07:00
Skylar Chang
60cb951096 ARM: dts: msm: load ipa3-uc on MSMCobalt
Enable ipa-driver on MSMCobalt to load
ipa-uc and support modem SSR.

Change-Id: I2bc9c0fedefef931ad2bf36841a0226f5dcca3d8
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2016-04-26 14:38:04 -07:00
Vinayak Menon
b6fb81015e mm: fix compile time error with !CONFIG_CMA
Fixes compile time failures because of not protecting
CMA related elements with CONFIG_CMA.

Change-Id: I930b7c0ffdce0f1bfc4f8a582a698be16ed44d1f
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
2016-04-26 14:38:03 -07:00
Nicholas Troast
90d66b6f71 gpio: qpnp-pin: Fix crash while freeing memory when probe fails
Memory is allocated for the number of available nodes while memory is
freed for the number of all nodes. The memory that is attempted to be
freed when the driver probe fails is out of bounds and leads to a crash.
Fix the looping condition to free the correct amount of allocated memory.

CRs-Fixed: 1006797
Change-Id: I331463e3de8e6ff874995b122aa7415a7da64b31
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2016-04-26 14:38:03 -07:00
Lina Iyer
f99837bc86 defconfig: msm: enable QCOM_THERMAL_LIMITS_DCVS
Enable Limits DCVS hardware driver.

Change-Id: If1c078fbb432bd9f314cd788edfab5ebb7687117
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
2016-04-26 14:38:02 -07:00
Lina Iyer
ca7a21508c ARM: dts: msm: add sensor information for LMH DCVS sensors for msmcobalt
LMH DCVS hardware exports a thermal sensor for each instance. Provide
information about this sensor to msm_thermal.

Change-Id: I59f6c2a5cb552f4462a1ebd3ff8e1c64e7519e2c
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
2016-04-26 14:38:01 -07:00
Lina Iyer
e87096d8bb ARM: dts: msm: Add LMH DCVS device bindings for msmcobalt
LMH DCVS hardware block provides hardware based thermal mitigation for
the CPU clusters. There is one block per cluster. Each block exports a
thermal zone, each with one thermal sensor through the thermal
framework.

Change-Id: Ia80616cc97737beadc1c327bcac399d9f7849f25
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
2016-04-26 14:38:01 -07:00
Lina Iyer
5132bf6146 drivers: msm_thermal: use OSM to set CPU freq limits
On SoCs that have OSM hardware, use the hardware to setup the CPU
mitigation limits. Having the OSM control CPU frequencies offloads
mitigation from the CPU, resulting in faster thermal mitigation
response.

The LMH DCVS aggregation does not do a max of the min frequency limits.
Therefore to avoid cpufreq voting any lesser than what KTM decides based
on vdd min restrictions, we update cpufreq as well, only if the min freq
has changed.

Change-Id: I2912eaf418d5e7ea4d62a9a55702e02b744a785b
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
2016-04-26 14:38:00 -07:00
Lina Iyer
abc784c00c drivers: thermal: add LMH-DCVS driver
The Limits Management Hardware (LMH-DCVS) is a hardware block for
monitoring thermal profiles and taking immediate action to control
temperature without software intervention. The h/w block can only be
configured under secure mode.

The LMH-DCVS block reads CPU temperatures of a cluster by sensing
information from the TSENS hardware and determines the course of action.
When enabled, the h/w triggers when the high threshold is hit for any
CPU in the cluster. The mitigative action is frequency and voltage
control that is provided to the OSM hardware.

The driver registers a virtual thermal zone device for each hardware
instance. The thermal zone device is used to set the thresholds for the
hardware to work on. Once the thresholds are setup and the trip type is
enabled, the hardware functions autonomously. Mitigative action is
completely controlled in the h/w.

Writing to the actual hardware is done through the SCM call.

Change-Id: I70d4bc387717491256fec1ef6bd8cd6a28ea641b
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
2016-04-26 14:37:59 -07:00
Sudheer Papothi
f9c1246a81 ARM: msm: dts: Use msm codec pinctrl for wsa881x reset gpios
MSM codec pinctrl driver is added to handle wsa881x reset gpios
gracefully. wsa881x reset gpios uses msm codec pinctrl device
node to set the pin to valid state. Change enables wsa881x
reset gpios to use msm codec pinctrl device node.

Change-Id: I753a782a1b4587ac77c4dd6afc6b6a3ec07fcd8b
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-04-26 14:37:58 -07:00
Venkat Gopalakrishnan
32ae49b565 phy: ufs-qcom: add optional ref aux clk
phy-ufs-qcom-qmp-v3 needs an additional ref aux clk to be enabled,
add support for the new ref aux clk and make it optional as its not
needed by other phy versions.

Change-Id: I5e04980eb451b193e9c024bfe35383d10d17feff
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-04-25 17:54:14 -07:00
Arun Kumar Neelakantam
2bb44fdeb8 net: ipc_router: Fix xprt_info use after free issue
In SSR case the xprt_info pointer is freed without considering the users of
the pointer in TX path will leads to use after free of the pointer.

Use the reference count to keep track of the xprt_info structure and wait
for the all user to complete the task before free the xprt_info pointer.

CRs-Fixed: 999123
Change-Id: I894a877346ff1d395c6f1b06267dfec333cb1024
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
2016-04-25 17:54:02 -07:00
Mayank Rana
29a79eb7ca dwc3-msm: Don't perform bus voting from dwc3 driver probe
Currently dwc3 driver's probe is doing bus voting. This voting remains
until USB cable is connected and disconnected. Due to this voting, XOSD
is not happening. Fix this issue by removing voting from driver's probe
context and let USB's suspend and resume take care of bus unvoting and
voting respectively.

CRs-Fixed: 1007183
Change-Id: I34f7cbf2aa10b63712e5142f908fa77ae195f5b1
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2016-04-25 17:53:53 -07:00
Venkat Gopalakrishnan
ab02a8dd22 phy: qcom-ufs: update pll max voltage
The pll supported voltage various per platform, the min supported
is 1.2V and max supported is 1.8V, make the necessary change to
reflect that.

Change-Id: Id93509ddcf298ee076b46703d9a55a5a7ba60638
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-04-25 17:46:48 -07:00
Mayank Rana
3ee00ddf25 ARM: dts: msm: Fix used registers' offset with QUSB PHY on msmcobalt
Some of registers' offset used with QUSB PHY programming sequeunce are
incorrect. Fix these offset to make sure required registers are
programmed with QUSB PHY.

CRs-Fixed: 1005497
Change-Id: I35751afdc418cd5bd38422d90cedcfd97442a6f7
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2016-04-25 17:46:37 -07:00
Ram Chandrasekar
168629b495 msm: thermal: Support thermal driver for 4.4 kernel
Fix compilation issues. Replace deprecated APIs with
the new APIs for 4.4 kernel.

Change-Id: I0cd5adc5c9c6ff9979b6d3a626541e6755029d2f
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
2016-04-25 17:46:25 -07:00
Andrey Markovytch
d9d0ee4b78 scsi: ufs: qcom-ice: block further requests until ICE config is complete
Requests that need to go through the ICE must be setup with a key
before and have a key index ready. In cases where the key is not
ready as it is not in the key cache, the ICE 'config_start' callback
returns -EAGAIN and we need to block further requests and call
'config_start' again from a non-atomic context until key setup
is ready and then resume requests handling.

Change-Id: I51ff1e99240386ce533b5ab3f5f024043532b0ad
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
Signed-off-by: Andrey Markovytch <andreym@codeaurora.org>
2016-04-25 17:46:15 -07:00
Andrey Markovytch
fe9cbb77bf crypto: ice: split the config callback
The requests configuration has to be split so clients can inform
ICE laeyr when the request is completed.
Rename the 'config' callback to 'config_start' and add
'config_end' callback.

Change-Id: Ife0b5b62805b827449a1bb1002348db445f03c60
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
Signed-off-by: Andrey Markovytch <andreym@codeaurora.org>
2016-04-25 17:45:49 -07:00
Andrey Markovytch
e29851c910 PFK: fix race between key set and key invalidate in TZ
When working with multiple files and multiple threads, the following
scenario can occur:
1. File Close -> Key cache removal -> context switch
2. Open new file -> occupy the entry cleaned in 1
   -> TZ_ES_SET_ICE_KEY -> context switch
3. Back to 1 -> TZ_ES_INVALIDATE_ICE_KEY
4. Back to 2 -> ICE uses the key that is already invalid
5. Crash due to PARTIALLY_SET_KEY_USED

To fix this, pfk must know when requests using some key are completed.
Only then key removal shall be allowed and until then key invalidation
must wait.
A new callback was added to let clients inform PFK when requests end.

Change-Id: Id7f8a3302fac9fafd1203d8d56ca13d59b45bbd5
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
Signed-off-by: Andrey Markovytch <andreym@codeaurora.org>
2016-04-25 17:45:36 -07:00
Andrey Markovytch
03a29a9ee5 md: dm-req-crypt: Increase mempool size for dm-req-crypt data
DM layer allocates pool size of 256 for request based module while
dm-req-crypt internally allocates pool for minimum 16 requests.
Increasing pool size of dm-req-crypt to be consistent with DM layer.
Also, changing GFP mask for allocation from pool, depending upon
whether call is made from atomic context or not.

Change-Id: I9dfeb46520e0d1b1fc6f850a007fce35bdc60d35
Signed-off-by: Dinesh K Garg <dineshg@codeaurora.org>
Signed-off-by: Andrey Markovytch <andreym@codeaurora.org>
2016-04-25 17:45:24 -07:00
Andrey Markovytch
0fb5a0c53e crypto: ice: add stub bus scaling functions
Bus scaling might be disabled in the kernel configuration of
some platforms, in which case initialization will fail due
to the lack of bus scaling support.
Add stub functions to allow initialization without bus scaling.

Change-Id: Ib1edeac145ef1696e657f775cd938839b79dbac0
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
Signed-off-by: Andrey Markovytch <andreym@codeaurora.org>
2016-04-25 17:45:12 -07:00
Andrey Markovytch
07d9b132b4 crypto: ice: update ICE HCI v3
ICE HCI has been updated to v3 so some registers and sequences
were changed. Update the driver to reflect the updated HCI.

Change-Id: I59ba98d86bf0532a7e4c2cfa03d65e57e6a7fdcf
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
Signed-off-by: Andrey Markovytch <andreym@codeaurora.org>
2016-04-25 17:45:01 -07:00
Aravind Venkateswaran
2dc00c9bd7 ARM: dts: msm: add MDSS DSI device node for msmcobalt
Add MDSS DSI device node for msmcobalt which is needed to drive the
primary display no the DSI interface.

CRs-Fixed: 1000724
Change-Id: Ib2fe58e6c4f0da7a14c10b74328c17fc5abaa7c8
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2016-04-25 17:44:50 -07:00
Joonwoo Park
f8bf0307bc sched: revise sched_boost to make the best of big cluster CPUs
At present sched_boost changes scheduler to place tasks on the least
loaded CPU under the assumption both big and little clusters capacities
are same at the same level of frequency.  This is suboptimal for the
big.Little system that doesn't have such a symmetrical capacity between
big and little CPUs.

Fix sched_boost to place tasks on the big CPUs for the non-symmetrical
capacity target.

CRs-fixed: 1006303
Change-Id: I752f020acf1a76580edb5cd0e5ad283b62edfeed
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2016-04-25 17:44:39 -07:00
Sagar Dharia
6ad949a126 ARM: dts: Add slimbus instance entries for msmcobalt
Add QCA and audio slimbus instance entries. QCA entry is disabled
by default and will need to be enabled on applicable boards where
QCA slimbus slave is present.

CRs-Fixed: 998162
Change-Id: I3255322fe3ee9784c688dd4ec6eea69974a4d684
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-04-25 17:44:32 -07:00
Aravind Venkateswaran
250367b21b ARM: dts: msm: add MDSS DSI PLL device node for msmcobalt
List all the resources needed by the MDSS DSI PLL device and add the
corresponding device node for msmcobalt. The DSI PLL is the source for
all the branch clocks needed to drive pixel data over the DSI interface.

CRs-Fixed: 1000576
Change-Id: If851190cc2ec863d8d8a556e1002d7a9f08668d1
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2016-04-25 17:44:15 -07:00
Aravind Venkateswaran
cffac32b87 clk: msm: mdss: add support for dsi pll on msmcobalt
Add support to program the DSI PLL on msmcobalt which is needed to drive
the DSI byte and pixel clocks.

CRs-Fixed: 1000576
Change-Id: Ic11a3747a0e008e1f71df91a1a79d33242d2a2a4
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2016-04-25 17:44:03 -07:00
Sungjun Park
e1cbb2f68d bluetooth: Fix populating issue for no DT node
In case no DT node name, it return error and doesn't go
through other DT node for Bluetooth regulators. To support
multiple Bluetooth chipset, it need to continue to check
remaining DT node since some DT node maybe not available for
some Bluetooth Chipset.

Change-Id: I2427f674ef4889c39580dc2568a6b9566f03f8f2
Signed-off-by: Sungjun Park <sjpark@codeaurora.org>
2016-04-25 17:43:52 -07:00
Abhimanyu Kapur
d6c0557cb7 ARM: dts: msm: Move QUSB PHY device node from dt to st on msmcobalt
This change moves QUSB PHY device node from dt source file to st
include file for msmcobalt.

CRs-Fixed: 1003142
Change-Id: I113c42a906b2b455026326a98e4d68bb85c5b10b
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
2016-04-25 17:43:41 -07:00
Deepak Katragadda
ac6a03867d clk: msm: clock-gcc-cobalt: Source HMSS RCGs off cxo ao input
The hmss_gpll0_clk_src is being sourced off the gpll0 which
uses the cxo_clk_src RPM resource. This causes XO shutdown
to fail. Use the gpll0_ao source instead.
The hmss_ahb_clk_src RCG frequency table is also updated to
use the cxo_clk_src_ao to generate XO frequency.

CRs-Fixed: 1001330
Change-Id: Ic5cba530ea22cd19a20a21f0c33433c5e023debc
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
2016-04-25 17:43:29 -07:00
Subbaraman Narayanamurthy
d0d54f4a11 ARM: dts: msm: add LPG and LABIBB devices to pmicobalt
Add the following devices that are present in pmicobalt.

- 6 LPG channels from address 0xb100-0xb600 along with LPG_LUT
  @ address 0xb000.
- LABIBB regulator device that can support configuring LAB and
  IBB modules @ address 0xde00 and 0xdc00.

CRs-Fixed: 1005724
Change-Id: Ic252e83f8a7273796ddc0e42c0ae37f339931499
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-04-22 15:06:51 -07:00
David Dai
30add65348 soc: qcom: msm_bus: remove legacy msm_bus support
Remove unused legacy bus code and APIs

CRs-Fixed: 1006336
Change-Id: I15811b787b54004e1aaba859e4c911be8f9eb285
Signed-off-by: David Dai <daidavid1@codeaurora.org>
2016-04-22 15:06:40 -07:00
Ujwal Patel
866cf4aab9 msm: mdss: remove obsolete code related to write-back and rotator
Remove write-back and rotator related obsolete code in order to reduce
dead code maintenance.

CRs-Fixed: 987777
Change-Id: I917d9b5b777fb41f3f87213d8d9e6e7ddf73f92c
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
2016-04-22 15:06:30 -07:00
Ramesh V
3e1bedddbd msm: camera: Disable CSIPHY IRQ after sof freeze
Issue: CSIPHY IRQ enabled when kernel recivies possible sof freeze
and will not disable if there is no csiphy release call from backend
which inturn leads watchdog bark.

Resolution: Dump the CISPHY IRQ at the time of possible sof freeze
and disable them.

CRs-Fixed: 996571

Change-Id: I3c6040b81c04660d3a0ac7ed707e1f4b22498dbd
Signed-off-by: Ramesh V <ramev@codeaurora.org>
2016-04-22 15:06:18 -07:00
Venkat Gopalakrishnan
82e1a184e6 scsi: ufs-qcom: Fix bus scaling usage in UFS driver
Use QCOM_BUS_SCALING as opposed to MSM_BUS_SCALING

Change-Id: I23945a040914d55aa483cfec6ef81e7342421f2e
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-04-22 15:06:07 -07:00
Joonwoo Park
9e41199889 defconfig: msmcortex: Enable CONFIG_SCHED_HMP_CSTATE_AWARE
Enable CONFIG_SCHED_HMP_CSTATE_AWARE in order to optimize task
placement with CPUs C-state.  This brings better system performance.

CRs-fixed: 1006303
Change-Id: I18e62015371143bca56396c747eaad3b22c5e3a3
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2016-04-22 15:05:56 -07:00
Joonwoo Park
0af7da0589 ARM: dts: msm: update CPU efficiency property
Update CPU efficiency property for msmcobalt so that scheduler can utilize
for task placement decision.

CRs-fixed: 1006303
Change-Id: Ifb59d6b1fcb1207053438786df2472417a2db93f
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2016-04-22 15:05:45 -07:00
Joonwoo Park
16c433e4c5 sched: fix excessive task packing where CONFIG_SCHED_HMP_CSTATE_AWARE=y
At present among the same power cost and c-state CPUs scheduler places
newly waking up task on the most loaded CPU which can incur too much of
task packing on the same CPU.  Place onto the most loaded CPU only when
the best CPU is in idle cstate, otherwise spread out by placing onto the
least loaded CPU.

CRs-fixed: 1006303
Change-Id: I8ae7332971b3293d912b1582f75e33fd81407d86
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2016-04-22 15:05:34 -07:00
Joonwoo Park
2e0ebb0155 sched: add option whether CPU C-state is used to guide task placement
There are CPUs that don't have an obvious low power mode exit latency
penalty.  Add a new Kconfig CONFIG_SCHED_HMP_CSTATE_AWARE which controls
whether CPU C-state is used to guide task placement.

CRs-fixed: 1006303
Change-Id: Ie8dbab8e173c3a1842d922f4d1fbd8cc4221789c
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2016-04-22 15:05:24 -07:00
Syed Rameez Mustafa
d4ca4d767f sched: update placement logic to prefer C-state and busier CPUs
Update the wakeup placement logic when need_idle is not set. Break
ties in power with C-state. If C-state is the same break ties with
prev_cpu. Finally go for the most loaded CPU.

CRs-fixed: 1006303
Change-Id: Iafa98a909ed464af33f4fe3345bbfc8e77dee963
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
[joonwoop@codeaurora.org: fixed bug where assigns best_cpu_cstate with
 uninitialized cpu_cstate.]
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2016-04-22 15:05:13 -07:00