OSDN Git Service

sagit-ice-cold/kernel_xiaomi_msm8998.git
8 years agodefconfig: enable msm serial console on msmcortex perf config
Abhimanyu Kapur [Thu, 21 Apr 2016 18:19:31 +0000 (11:19 -0700)]
defconfig: enable msm serial console on msmcortex perf config

Enable serial uart console on the msmcortex perf config.

CRs-Fixed: 1008594
Change-Id: I928ddfb44dfd52e8ba70d637219e3b5fbcdf8fa7
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
8 years agosoc: qcom: add support for the socinfo v0.12 format
Se Wang (Patrick) Oh [Tue, 6 Oct 2015 23:41:47 +0000 (16:41 -0700)]
soc: qcom: add support for the socinfo v0.12 format

The v0.12 format adds three new fields:
uint32_t chip_family;
uint32_t raw_device_family;
uint32_t raw_device_number;

CRs-Fixed: 1013110
Change-Id: I1699ee96c65809a46331f94938c12fc1dd4d5384
Signed-off-by: Se Wang (Patrick) Oh <sewango@codeaurora.org>
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
8 years agoARM: dts: msm: Update the emergency hotplug threshold for MSMcobalt
Ram Chandrasekar [Thu, 5 May 2016 16:10:06 +0000 (10:10 -0600)]
ARM: dts: msm: Update the emergency hotplug threshold for MSMcobalt

As per recommendation update the emergency hotplug threshold
for MSMcobalt to 105C from 70C.

CRs-Fixed: 1010111
Change-Id: I69a5583e4e15499c54ce5b2ab0fe0538de303391
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
8 years agoARM: dts: msm: Configure low voltage restricion for msmcobalt
Ram Chandrasekar [Mon, 25 Apr 2016 22:34:18 +0000 (16:34 -0600)]
ARM: dts: msm: Configure low voltage restricion for msmcobalt

Configure thermal driver to do low voltage restriction for CX,
APSS and graphics rails, when temperature goes below 5 degree C.
This restriction will be cleared if the tsens temperature goes
above 10 degree C.

CRs-Fixed: 1010111
Change-Id: I36a1ba6adb9ce847ae552d904dff1bbd0ce3cb77
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
8 years agoARM: dts: msm: Configure lmh hardware for msmcobalt
Ram Chandrasekar [Fri, 15 Apr 2016 21:54:08 +0000 (15:54 -0600)]
ARM: dts: msm: Configure lmh hardware for msmcobalt

Configure the limits hardware with the interrupt to listen for.
limits hardware driver will interact with the trustzone to get
throttling information from the hardware.

CRs-Fixed: 1010120
Change-Id: I56a8396a12e9b96cbed554bb1aed5d6243e6240a
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
8 years agoARM: dts: msm: Remove boot frequency mitigation for msmcobalt
Ram Chandrasekar [Fri, 15 Apr 2016 18:16:30 +0000 (12:16 -0600)]
ARM: dts: msm: Remove boot frequency mitigation for msmcobalt

With the LMH-DCVSh hardware the frequency mitigation in
the HLOS is not needed. Remove the boot-up frequency mitigation
in KTM for msmcobalt.

CRs-Fixed: 1010111
Change-Id: I105e98968b911f08b67c4e686e74ae6f7555d7be
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
8 years agoARM: dts: msm: Remove wrong pop_mem sensor alias for msmcobalt
Ram Chandrasekar [Thu, 7 Apr 2016 17:20:43 +0000 (11:20 -0600)]
ARM: dts: msm: Remove wrong pop_mem sensor alias for msmcobalt

temperature sensor 1 maps to cpu1 and not pop_mem. Remove
the pop_mem alias name defined for temperature sensor 1
in msmcobalt.

CRs-Fixed: 1010111
Change-Id: I69803580c9f747a0e2e5effa43d33f7a9a0d4e73
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
8 years agodefconfig: msmcortex: Enable LMH hardware and interface driver
Ram Chandrasekar [Mon, 9 May 2016 18:37:51 +0000 (12:37 -0600)]
defconfig: msmcortex: Enable LMH hardware and interface driver

Enable the LMH hardware and the LMH interface driver.
LMH hardware driver interacts with the LMH hardware and
uses the interface driver to register with thermal core.

CRs-Fixed: 1010120
Change-Id: I2e6f6a181902bee7e3bcb0f366e6ee21f8a4c442
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
8 years agodefconfig: msmcortex: Enable thermal drivers for msmcobalt
Ram Chandrasekar [Mon, 9 May 2016 18:26:37 +0000 (12:26 -0600)]
defconfig: msmcortex: Enable thermal drivers for msmcobalt

Enable kernel thermal driver.
kernel thermal driver can monitor, mitigate and provide interface
to thermal-engine to mitigate.

CRs-Fixed: 1010111
Change-Id: I02b4bc9cf66b2734be99c986d4a200f604145e0a
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
8 years agoARM: dts: msm: define LMh SW override values for OSM device for msmcobalt
Osvaldo Banuelos [Wed, 27 Apr 2016 00:53:36 +0000 (17:53 -0700)]
ARM: dts: msm: define LMh SW override values for OSM device for msmcobalt

Define the three LMh SW override values per cluster to be used
by the OSM device.

Change-Id: I6279cdbc92d4e0d5786854722474e1dfb14e7198
CRs-Fixed: 1009097
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
8 years agoclk: msm: osm: support programming LMh SW override values in set_rate()
Osvaldo Banuelos [Wed, 27 Apr 2016 00:48:47 +0000 (17:48 -0700)]
clk: msm: osm: support programming LMh SW override values in set_rate()

To ensure stable operation, it is necessary to place LMh SW override
votes when setting the new rate of the power and performance
CPU clocks. Add support for parsing these values from Device Tree
and programming them in clk_set_rate().

Change-Id: I60d90d546f155edb6c13c46e6c59c75e95848d6c
CRs-Fixed: 1009097
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
8 years agomsm: mdss: update CSC 10 bit matrix table with appropriate values
Ramkumar Radhakrishnan [Fri, 6 May 2016 22:21:44 +0000 (15:21 -0700)]
msm: mdss: update CSC 10 bit matrix table with appropriate values

Update CSC 10 bit YUV2RGB matrix table with appropriate values to
avoid any color conversion issues.

Change-Id: Iaf740873a6814cd9211acf4de4042c7cefecd64d
CRs-Fixed: 997593
Signed-off-by: Ramkumar Radhakrishnan <ramkumar@codeaurora.org>
8 years agomsm: mdss: align yuv bitstream plane size and stride appropriately.
Ramkumar Radhakrishnan [Fri, 6 May 2016 22:19:03 +0000 (15:19 -0700)]
msm: mdss: align yuv bitstream plane size and stride appropriately.

Add align function to align the values to non power of 2 and align
yuv bitstream plane size and stride appropriately.

Change-Id: I40695e9e7a99fe7c814d26fa7b5205370b7f9f64
CRs-Fixed: 997601
Signed-off-by: Ramkumar Radhakrishnan <ramkumar@codeaurora.org>
8 years agomsm: lmh_lite: Use dynamic memory for getting sensor list
Ram Chandrasekar [Fri, 29 Apr 2016 17:38:18 +0000 (11:38 -0600)]
msm: lmh_lite: Use dynamic memory for getting sensor list

LMH lite driver allocates DMA memory for getting the
sensor list from trustzone. DMA memory is not needed for
this operation, so use dynamic memory.

CRs-Fixed: 1010120
Change-Id: Ia7ef920a0f34334e49d76efc5ba233aa58aeb273
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
8 years agomsm: lmh_interface: Support new thermal core framework APIs
Ram Chandrasekar [Mon, 25 Apr 2016 21:54:17 +0000 (15:54 -0600)]
msm: lmh_interface: Support new thermal core framework APIs

Thermal core framework allows reading negative temperature and to
support that, thermal core APIs will read temperature in integer.

Inline with thermal core changes, modify the parameters to read
temperature to integer from signed long.

CRs-Fixed: 1010120
Change-Id: I975c11aa4e63e01ee3274a577b51b37c1c0f78cd
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
8 years agokernel: Restrict permissions of /proc/iomem.
Biswajit Paul [Mon, 9 Feb 2015 23:21:12 +0000 (15:21 -0800)]
kernel: Restrict permissions of /proc/iomem.

The permissions of /proc/iomem currently are -r--r--r--. Everyone can
see its content. As iomem contains information about the physical memory
content of the device, restrict the information only to root.

Change-Id: If0be35c3fac5274151bea87b738a48e6ec0ae891
CRs-Fixed: 786116
Signed-off-by: Biswajit Paul <biswajitpaul@codeaurora.org>
Signed-off-by: Avijit Kanti Das <avijitnsec@codeaurora.org>
8 years agomsm: ipa3: drain UL data for ECM/RNDIS tethering
Skylar Chang [Thu, 5 May 2016 17:08:09 +0000 (10:08 -0700)]
msm: ipa3: drain UL data for ECM/RNDIS tethering

In some cases modem will delay USB uplink pipe
for flow control. This will happen regardless of
tethering protocol. This change sends a QMI message
to modem to remove the delay on USB pipe in case
of USB cable disconnect.

CRs-Fixed: 1009199
Change-Id: I42cd716dcb87b814256a81418fecdff020f37d9d
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
8 years agoARM: dts: msm: Add WCN3990 slimbus device tree
Sungjun Park [Wed, 6 Apr 2016 05:04:38 +0000 (22:04 -0700)]
ARM: dts: msm: Add WCN3990 slimbus device tree

Add WCN3990 slimbus slave device tree to support
bluetooth and FM audio.

Change-Id: I15a0abe365555a6695a7317e4d9cfae13a56c49e
Signed-off-by: Sungjun Park <sjpark@codeaurora.org>
8 years agomsm: mdss: hdmi: separate out hdmi panel functionalities
Ajay Singh Parmar [Wed, 20 Apr 2016 02:48:42 +0000 (19:48 -0700)]
msm: mdss: hdmi: separate out hdmi panel functionalities

Create a new file for hdmi panel related functionalities
for a cleaner approach. Move all the video, infoframe and
timing related programming to hdmi panel. Expose its
functionalities for other modules. Register the panel with
hdmi transmitter core so that it can access and program it.

Change-Id: Iff1cb13d7b42b6ecfe6fd1fc88a111875c3d6cfa
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
8 years agoARM: dts: msm: setup external clock sources for DP clock on msmcobalt
Chandan Uddaraju [Wed, 4 May 2016 22:49:26 +0000 (15:49 -0700)]
ARM: dts: msm: setup external clock sources for DP clock on msmcobalt

The DP RCGs exported by the MMSS clock controller (MMSS-CC)
can be sourced out of the DP PLL which is outside the MMSS-CC. Set up
these external clock sources to point to the DP PLL clocks.

CRs-Fixed: 1009740
Change-Id: Ia8f60ba711770c26e5b5919d2c39d7986403ece6
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
8 years agomsm: ipa3: enable rndis_ipa on msm-4.4
Skylar Chang [Thu, 5 May 2016 06:10:48 +0000 (23:10 -0700)]
msm: ipa3: enable rndis_ipa on msm-4.4

Change the feature flag to compile rndis_ipa
on cobalt target with msm-4.4 kernel, also
fix the compile warnings.

Change-Id: I82d3dd00e003d8eab63ca6bcc3bb91d51f122606
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
8 years agoARM: dts: msm: add MDSS Display-Port PLL device node for msmcobalt
Chandan Uddaraju [Wed, 27 Apr 2016 22:16:25 +0000 (15:16 -0700)]
ARM: dts: msm: add MDSS Display-Port PLL device node for msmcobalt

List all the resources needed by the MDSS DP PLL device and add the
corresponding device node for msmcobalt. The DP PLL is the source for
all the branch clocks needed to drive pixel data over the DP interface.

CRs-Fixed: 1009740
Change-Id: I1a373a7602f8dbad3fb547690a87a28aea73aadd
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
8 years agoclk: qcom: mdss: add Display-port pll clock driver support
Chandan Uddaraju [Tue, 23 Feb 2016 00:43:23 +0000 (16:43 -0800)]
clk: qcom: mdss: add Display-port pll clock driver support

Add support for new Display-port  PLL clock driver to handle
different DP panel resolutions in msmcobalt. Add separate files
to support this new PHY PLL block.

CRs-Fixed: 1009740
Change-Id: Ic282c7e14fc6e23f4d044cb6a58249bdb4c8c2d8
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
8 years agoARM: dts: msm: define primary display interface for msmcobalt CDP
Aravind Venkateswaran [Fri, 1 Apr 2016 01:24:18 +0000 (18:24 -0700)]
ARM: dts: msm: define primary display interface for msmcobalt CDP

Set the primary display interface as the DSI device and the preferred
primary panel to be nt35597 dual-DSI (non-DSC) panel on msmcobalt CDP.

CRs-Fixed: 1000724
Change-Id: I8caa21c7b6a5f1e57cbd4c2bffeaa34e1e59d9c2
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
8 years agoARM: dts: msmcobalt: update CPU DAI list with SLIMBUS_7/8 DAIs
Banajit Goswami [Sat, 23 Apr 2016 01:56:03 +0000 (18:56 -0700)]
ARM: dts: msmcobalt: update CPU DAI list with SLIMBUS_7/8 DAIs

MSMCOBALT supports SLIMBUS_7 RX/Tx and SLIMBUS_8 Tx ports.
Add these ports to the CPU DAI list for passing to machine
driver.

Change-Id: I91306af6a2376fc76d51c62497e9723e6ec716e1
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
8 years agoARM: dts: msm: add new CPU DAIs for SLIMBUS_7/8 Rx/Tx
Banajit Goswami [Wed, 20 Apr 2016 19:44:16 +0000 (12:44 -0700)]
ARM: dts: msm: add new CPU DAIs for SLIMBUS_7/8 Rx/Tx

Support for SLIMBUS_7 and SLIMBUS_8 Rx/Tx ports added to MSM audio
drivers. Add the right devices to probe/register these ports with
kernel at device bootup.

Change-Id: Id28b3d2fc5db4ec88ddbfa20b36047804d1fbdb6
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
8 years agomsm: lmh_interface: support new sequence print functions
Ram Chandrasekar [Thu, 14 Apr 2016 18:05:27 +0000 (12:05 -0600)]
msm: lmh_interface: support new sequence print functions

New sequence print functions doesn't return error on overflow.
Use the new API to check for overflow and then return error
from LMH interface driver.

CRS-FIxed: 1010120
Change-Id: I12c496f3c72398845a9039607b27112196afe38a
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
8 years agomsm: thermal: Remove support for asynchronous cluster
Ram Chandrasekar [Tue, 3 May 2016 23:19:31 +0000 (17:19 -0600)]
msm: thermal: Remove support for asynchronous cluster

KTM has support for handling cluster with asynchronous cores within
a cluster. KTM can get the individual clock plans for the cores and
mitigate them separately. This feature is not supported in
hardware.

So remove the asynchronous cluster support from KTM.

CRs-Fixed: 1010111
Change-Id: I13348a16e2e1c11053cf5b99b921fd8ea65c7d89
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
8 years agomsm: vidc: Use Dcvs only when there is no resolution change
Rohit Kulkarni [Fri, 29 Apr 2016 20:40:32 +0000 (13:40 -0700)]
msm: vidc: Use Dcvs only when there is no resolution change

When driver detects that there is a dynamic resolution change
mid-stream it will not activate dcvs.

CRs-Fixed: 1007339
Change-Id: Ia5e5b42598b7e32360267e42665a5ce3880aaeee
Signed-off-by: Rohit Kulkarni <rkulkarn@codeaurora.org>
8 years agomsm: ipa: add a general function for assert
Amir Levy [Tue, 3 May 2016 05:54:50 +0000 (08:54 +0300)]
msm: ipa: add a general function for assert

In order to centralize IPA assert calls and add essential
data on assertion, replace some BUG calls in an ipa_assert wrapper.

CRs-fixed: 1006564
Change-Id: I6a9b679bb083c695908972b377e8779e2f1cca60
Signed-off-by: Amir Levy <alevy@codeaurora.org>
8 years agohwmon: qpnp-adc: Fix voltage scaling for VADC_HC peripheral
Siddartha Mohanadoss [Mon, 14 Mar 2016 19:43:59 +0000 (12:43 -0700)]
hwmon: qpnp-adc: Fix voltage scaling for VADC_HC peripheral

Incorrect voltage and temperature results are seen
during ADC reads from VADC_HC peripheral.

Fix setting the correct flag used to select the respective
peripherals scaling formula to return the correct voltage
and temperature readings for VADC_HC peripheral.

Change-Id: I6f4fe857996c8df996b6e4a0e4475a48740929fa
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
8 years agosoc: qcom: glink: Fix channel migration on fully open channel
Dhoat Harpal [Mon, 18 Apr 2016 15:31:02 +0000 (21:01 +0530)]
soc: qcom: glink: Fix channel migration on fully open channel

If process_open_event is delayed and glink has migrated to new transport,
process open event will be treated as a new open event and migration will
happen on fully open channel.

If channel is fully, open migration will not be allowed as client might
already be using the channel for communication.

Change-Id: I6c1760bc19f52e7d0c1c9834a72e2304f0ae28c8
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
8 years agomsm: clock: clock-gcc-cobalt: Support QSPI clocks on MSMHAMSTER
Deepak Katragadda [Wed, 4 May 2016 19:21:52 +0000 (12:21 -0700)]
msm: clock: clock-gcc-cobalt: Support QSPI clocks on MSMHAMSTER

Add programming support for the qspi_ref and qspi_ahb clocks
in the linux clocks driver.

CRs-Fixed: 1011840
Change-Id: Ic67b72b1e9341fec33bcdbde67f9e2c7e8045ec1
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
8 years agoASoC: msmcobalt: add BT/FM audio support with WCN3990
Banajit Goswami [Sat, 9 Apr 2016 02:49:50 +0000 (19:49 -0700)]
ASoC: msmcobalt: add BT/FM audio support with WCN3990

Add machine driver code to support audio on MSMCOBALT based
boards with WCN3990 BT/FM chipset.

Change-Id: Ia23572f44775a04c8f8c67e9a61d6b9be8869b82
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
8 years agoASoC: msm: qdsp6v2: add loopback volume control for SLIMBUS_8_TX
Banajit Goswami [Wed, 2 Mar 2016 01:05:56 +0000 (17:05 -0800)]
ASoC: msm: qdsp6v2: add loopback volume control for SLIMBUS_8_TX

Add a new mixer control for volume control for SLIMBUS_8_TX AFE port
loopback.

Change-Id: Ifbf1778255edbe4901bd0860216ba1dd5a786047
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
8 years agoASoC: msm: q6dspv2: add routes for SLIMBUS_7 and SLIMBUS_8
Banajit Goswami [Tue, 24 Nov 2015 18:14:23 +0000 (10:14 -0800)]
ASoC: msm: q6dspv2: add routes for SLIMBUS_7 and SLIMBUS_8

SLIMBUS_7 and SLIMBUS_8 would be used for BT-SCO and FM use
cases when using the second Slimbus instance. Add routes
to support voice call over BT-SCO and FM playbacki and capture
with these ports.

Change-Id: I5c558ee2dbe2de20b9ac3f042ae45a9431590778
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
8 years agoASoC: msm: add Hostless DAI with SLIMBUS_8
Banajit Goswami [Tue, 24 Nov 2015 07:44:34 +0000 (23:44 -0800)]
ASoC: msm: add Hostless DAI with SLIMBUS_8

SLIMBUS_8 ports can be used for hostless audio playback and
capture use cases. Add Hostless Front-end DAI definitions
with Slimbus 8 ports.

Change-Id: Idc56625bb8fea263c3d530c8a9488eeb81fdd7e5
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
8 years agoASoC: msm: q6dspv2: add support for Slimbus 7 and 8 ports
Banajit Goswami [Tue, 24 Nov 2015 17:49:29 +0000 (09:49 -0800)]
ASoC: msm: q6dspv2: add support for Slimbus 7 and 8 ports

Add support for SLIMBUS_7 and SLIMBUS_8 Rx and Tx ports for
MSM audio drivers.

Change-Id: I839ac07a3ee1e1e778c4d1e43d0bac89f01bd21a
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
8 years agoARM: dts: msm: increase OSM LLM frequency and voltage hysteresis timers
Osvaldo Banuelos [Thu, 28 Apr 2016 00:08:06 +0000 (17:08 -0700)]
ARM: dts: msm: increase OSM LLM frequency and voltage hysteresis timers

Increase the OSM LLM frequency and voltage vote hysteresis timers
to the maximum allowed value of 327675 ns. This is necessary
to ensure stable operation when LLM port is enabled as client of
OSM.

Change-Id: I6b53b5a6187f0ac0e68f4ed54c7ae3ba0b062222
CRs-Fixed: 1009097
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
8 years agoclk: msm: osm: increase timer resolution programming to nanoseconds
Osvaldo Banuelos [Fri, 22 Apr 2016 23:25:48 +0000 (16:25 -0700)]
clk: msm: osm: increase timer resolution programming to nanoseconds

OSM clock period is 5 ns. Therefore, the various hysteresis
timers used by OSM can be fine tuned with a granularity of
5 ns. Allow specification of timers in units of nanoseconds
to prevent losing valid timer setpoints.

Change-Id: Ice93347aaf81fe41ea7862752ac0d2d4e82d838c
CRs-Fixed: 1009097
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
8 years agoASoC: msm: audio-effects: fix stack overread and heap overwrite
Weiyin Jiang [Wed, 16 Mar 2016 04:51:03 +0000 (12:51 +0800)]
ASoC: msm: audio-effects: fix stack overread and heap overwrite

Fix overwrite of updt_params allocated in heap, and stack overread
where param pointer is passed from user space.

CRs-Fixed: 989628
Change-Id: Ida8bdb7da2fcb97023dce3b6eafe4b899a51cb66
Signed-off-by: Weiyin Jiang <wjiang@codeaurora.org>
8 years agoclk: msm: clock-osm: increase refcount of CPU clocks at probe time
Osvaldo Banuelos [Mon, 21 Mar 2016 22:29:39 +0000 (15:29 -0700)]
clk: msm: clock-osm: increase refcount of CPU clocks at probe time

Increase the refcount of CPU clocks proportionally to the number
of available CPUs to maintain the assumption that each CPU clock
has been prepared and enabled by the time cpufreq takes over.

Change-Id: Icccb28bc7a88dc76cf4ed5710623e992ba62f19c
CRs-Fixed: 994035
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
8 years agoARM: dts: msm: Update the memory map for msmcobalt
Patrick Daly [Tue, 3 May 2016 23:52:40 +0000 (16:52 -0700)]
ARM: dts: msm: Update the memory map for msmcobalt

Increase the size of the peripheral region.

Change-Id: I5af8da01a54dc6f31c93f7ad5201899c0779b661
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
8 years agopower: move QTI charger drivers to a new sub-directory again
Nicholas Troast [Mon, 28 Mar 2016 17:35:32 +0000 (10:35 -0700)]
power: move QTI charger drivers to a new sub-directory again

The original commit was reverted due to conflicts in the kernel upgrade
process. Now that the upgrade is complete we can introduce this commit
again.

Original commit:
commit 8e10bff71301 ("power: move QTI charger drivers to a new
sub-directory qcom-charger")

QTI charger drivers have outgrown their home in power and deserve their
own sub-directory. Move all QTI charger drivers and their dependencies to
a new sub-directory of power called qcom-charger.

CRs-Fixed: 1001767
Change-Id: I5465a944a79f622ddf69534075b067db0fb10c95
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
8 years agopower_supply: add INPUT_SUSPEND power supply property
Nicholas Troast [Fri, 1 Apr 2016 17:48:01 +0000 (10:48 -0700)]
power_supply: add INPUT_SUSPEND power supply property

POWER_SUPPLY_PROP_CHARGING_ENABLED has been used to indicate enabling
the charge path in some drivers and enabling the input path in others.
This leads to confusion of what charging enabled really means.

POWER_SUPPLY_PROP_BATTERY_CHARGING_ENABLED was introduced to indicate
enabling the charge path, and in this case
POWER_SUPPLY_PROP_CHARGING_ENABLED is used to indicate enabling the
input path. Since these are similarly named it leads to even more
confusion.

In an attempt to fix this confusion we introduce a new power supply
property POWER_SUPPLY_PROP_INPUT_SUSPEND which indicates suspending the
input path of the power supply. POWER_SUPPLY_PROP_CHARGING_ENABLED takes
its original definition of enabling the charge path. Then
POWER_SUPPLY_PROP_BATTERY_CHARGING_ENABLED will be retired from use.

CRs-Fixed: 1005389
Change-Id: I1ca8f5748a56a9395caa8ed8ed18f70e69f0cbe8
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
8 years agopower_supply: Add additional USB Type-C properties
Jack Pham [Mon, 29 Feb 2016 19:41:58 +0000 (11:41 -0800)]
power_supply: Add additional USB Type-C properties

Introduce the power_supply_typec_mode enum definitions which
will allow a charger to indicate the type of USB Type-C
connection that is established. Also add additional properties
for indicating CC pin orientation, changing source/sink power
role (useful for dynamic power role swap), and a flag to allow
the charger to expect VBUS changes during USB Power Delivery
power negotiation.

CRs-Fixed: 1005389
Change-Id: Iba9b652335fba4ee4f24a17eba8abdd5c85c21bb
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
8 years agoslim: msm: ngd: Add priority to DSP SSR notifier
Sagar Dharia [Fri, 1 Apr 2016 17:38:23 +0000 (11:38 -0600)]
slim: msm: ngd: Add priority to DSP SSR notifier

Currently SSR framework seems to make callbacks in the order
they were registered, or based on pririties.
Due to this, APR's callback (done in its probe) may be executed
before slimbus driver's callback (only registered after children
are probed). This still works, but may take longer since codec
may try sending some disconnection commands over slimbus if APR
is notified about SSR before codec was notified by slimbus.
This failure may result in some delay in SSR handling which is
more than the KPI numbers expected for this recovery mechanism.
Priority is added to slimbus SSR notifier registration to make
sure its callback is called before APR's.

CRs-Fixed: 996871
Change-Id: Ib7f002d52310dc13b60a18972a6899ebae21ba24
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
8 years agosoc: qcom: q6dspv2: add priority to ADSP SSR notifier for APR
Banajit Goswami [Tue, 29 Mar 2016 20:48:00 +0000 (13:48 -0700)]
soc: qcom: q6dspv2: add priority to ADSP SSR notifier for APR

Currently ADSP SSR notifications to APR come much earlier
than ADSP SSR notifications to SLIMbus. This causes audio
playback resume to take more time than expected, as code in WCD
codec driver has dependency on the sequence at which SSR
notifications are received. Add a priority to the notifier
block for APR, so that the APR has lower priority compared
to SLIMbus.

CRs-fixed: 989828
Change-Id: Idb089ec8d036d441e32bc927d7294121a1d2735d
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
8 years agoASoC: codec: micb ref count decrement check
dojha [Thu, 31 Mar 2016 10:42:44 +0000 (16:12 +0530)]
ASoC: codec: micb ref count decrement check

In SSR with recording, race condition which reduces micb_ref to -1
is seen. SSR sets micb_ref to 0, further recording widgets power
down can reduce it to -1. During power up, it is increased to 0,
micbias is not getting enabled for recording since micb_ref is 0.
To prevent this micb_ref is checked for non zero value before
decrementing it.

CRs-Fixed: 994268
Change-Id: I6ea23fdf8b119cfd178c4f5b79b9d1c01c267a82
Signed-off-by: dojha <dojha@codeaurora.org>
8 years agoASoC: msm8996: Add delay to check ADSP state during SSR
Sudheer Papothi [Mon, 11 Apr 2016 18:16:42 +0000 (23:46 +0530)]
ASoC: msm8996: Add delay to check ADSP state during SSR

During SSR(subsystem restart), add a delay when ADSP state
is not yet ready. This will avoid excessive logging when
ADSP state is not ready.

CRs-Fixed: 1001242
Change-Id: I2f3d1bdb3ca1ba05c014c26bbc87879f549098d8
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
8 years agoASoC: msm: Update the Slmbus6 downlink hostless routing
Kuirong Wang [Wed, 30 Mar 2016 21:58:14 +0000 (14:58 -0700)]
ASoC: msm: Update the Slmbus6 downlink hostless routing

Update the Slmbus6 downlink hostless routing so it can connect
to Slimbus0 Hostess FE.

Change-Id: Iaeb3e148af57e9d484a31820993cf7e5b6466dd2
CRs-fixed: 991759
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
8 years agoASoC: wsa881x-analog: Fix warning in bandgap and clock control
Laxminath Kasam [Fri, 15 Apr 2016 08:11:20 +0000 (13:41 +0530)]
ASoC: wsa881x-analog: Fix warning in bandgap and clock control

During temperature read, resource acquire can fail
if mclk is not enabled successfully. In such case,
clock and bandgap control counters are not incremented.
But resource release is still happening resulting
in counters going negative and warn_on messages.
Fix it by handling resource acquire failure case.

CRs-Fixed: 1003365
Change-Id: If2371e06866a615ca7d7dad64a5d7a17f258b3b6
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
8 years agoASoC: msm: qdsp6v2: DAP: Fix buffer overflow
Ashish Jain [Fri, 15 Apr 2016 10:03:14 +0000 (15:33 +0530)]
ASoC: msm: qdsp6v2: DAP: Fix buffer overflow

Add check to avoid out of bound access.
Check return value of get_user api.

CRs-Fixed: 997025
Change-Id: Ibbace116ac206007fa1928555838285304737737
Signed-off-by: Ashish Jain <ashishj@codeaurora.org>
8 years agoASoC: msm: qdsp6v2: update external EC reference logic
Venkata Narendra Kumar Gutta [Wed, 20 Apr 2016 06:12:46 +0000 (11:42 +0530)]
ASoC: msm: qdsp6v2: update external EC reference logic

VOC_EXT_EC MUX kcontrol, which is being used for external EC
reference, returning incorrect values when requested. Update
the logic to fix this issue.

CRs-Fixed: 999158
Change-Id: If05a54ca2539ef452312548bfcaf7f3fadd1de87
Signed-off-by: Venkata Narendra Kumar Gutta <vgutta@codeaurora.org>
8 years agoARM: dts: msm: Update vrail comp factor for mdp masters
David Dai [Sun, 1 May 2016 08:40:57 +0000 (01:40 -0700)]
ARM: dts: msm: Update vrail comp factor for mdp masters

Use a vrail_comp factor of 25 for clients voting on mdp masters

CRs-Fixed: 1011135
Change-Id: I213bc12a089bdad75934959d0ccc8a6243f6124e
Signed-off-by: David Dai <daidavid1@codeaurora.org>
8 years agoASoC: msm: qdsp6v2: update quinary rx controls for voice path
Venkata Narendra Kumar Gutta [Wed, 6 Apr 2016 11:25:09 +0000 (16:55 +0530)]
ASoC: msm: qdsp6v2: update quinary rx controls for voice path

Voice calls are not working over quinary rx path. Required rx
controls are not present, hence it's not working. Fix this
by updating quinary rx controls and routing map.

CRs-Fixed: 999811
Change-Id: Id566359e381b69acfccff406c7448708701530e7
Signed-off-by: Venkata Narendra Kumar Gutta <vgutta@codeaurora.org>
8 years agoARM: dts: msm: Increase USB BAM device address space on msmcobalt
Mayank Rana [Tue, 3 May 2016 23:18:48 +0000 (16:18 -0700)]
ARM: dts: msm: Increase USB BAM device address space on msmcobalt

USB BAM device is having 4 pipes. USB BAM global register address
space size is 0x13000, whereas each USB BAM pipe register address
space size is 0x1000. Due to insufficient register address space
mapping, there is unpaging related crash seen while trying to
access USB BAM pipe 0 related register. Fix this issue by
increasing size to 0x17000 (i.e. 0x13000 + 4 * 0x1000).

CRs-Fixed: 1011319
Change-Id: I6654d9eec5a849bcce6d812166d6696347458169
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
8 years agoASoC: msm: q6dspv2: initialize private data before using it
Banajit Goswami [Sat, 2 Apr 2016 02:41:16 +0000 (19:41 -0700)]
ASoC: msm: q6dspv2: initialize private data before using it

During Compress offload session open, a private data structure
is allocated and registered as parameter for a callback to the
compressed offload driver. All parameters inside the structure
must be initialized before the structure is passed to ASM driver.
This private data structure is sent back as param to the callback
function registered with ASM. The initialization is needed to avoid
NULL pointer dereference inside the callback function, in case ADSP
SSR is triggered right after registering the callback with ASM and
before rest of the initialization of the private data is complete.

CRs-fixed: 989822
Change-Id: I8a64539a6a64fb8c75d06f933a735c70049bce7b
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
8 years agoASoC: msm: qdsp6v2: Fix mute in WFD playback during ADSP SSR
Venkata Narendra Kumar Gutta [Thu, 31 Mar 2016 10:27:13 +0000 (15:57 +0530)]
ASoC: msm: qdsp6v2: Fix mute in WFD playback during ADSP SSR

Mute observed in WFD playback during ADSP SSR. This is due to
playback session isn't being restarted post SSR. Fix this by
listening to reset events and propagate the appropriate error
back to userspace in case of SSR.

CRs-Fixed: 986757
Change-Id: I4c2fdf70e518310157d81d527afff4436dd42140
Signed-off-by: Venkata Narendra Kumar Gutta <vgutta@codeaurora.org>
8 years agomsm: ultrasound: Various static analysis fixes
Vidyakumar Athota [Thu, 3 Mar 2016 18:05:09 +0000 (10:05 -0800)]
msm: ultrasound: Various static analysis fixes

Remove potential null dereference.
Remove dead code from impossible error check.
Set upper bound for user-provided buffer size.

Change-Id: I212f3edfa31e9168d11e0782da7f3fd8c2b98c5d
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
8 years agoASoC: msm: qdsp6v2: set token for stereo_to_custom_stereo command
Shiv Maliyappanahalli [Thu, 17 Mar 2016 23:31:20 +0000 (16:31 -0700)]
ASoC: msm: qdsp6v2: set token for stereo_to_custom_stereo command

Set token value with port index and copp id so that
correct wait queue handle can be deduced in the
callback of adm_set_stereo_to_custom_stereo command.

Change-Id: Ica4c1442c1143f46de2baa6eaf1890ad0cb4b742
Signed-off-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org>
8 years agosoundwire: Add API to control slave device data path
Phani Kumar Uppalapati [Wed, 23 Mar 2016 04:16:44 +0000 (21:16 -0700)]
soundwire: Add API to control slave device data path

Add soundwire API to control slave device data path
enable or disable. This gives slave device drivers
more flexibility for data path control during device
path enablement.

CRs-fixed: 996586
Change-Id: Ic0ab015098035418458a5ba7c2ffad9df20f933c
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
8 years agoASoC: msm: qdspv2: Add tertiary MI2S ports support
Deven Patel [Wed, 9 Mar 2016 21:53:26 +0000 (13:53 -0800)]
ASoC: msm: qdspv2: Add tertiary MI2S ports support

APQ8096 target uses tertiary MI2S interface for
voice call. Add this support in routing driver.

CRs-fixed: 987739
Change-Id: Idecbe2f072e4315e180d25583b6d1b1237d06071
Signed-off-by: Deven Patel <cdevenp@codeaurora.org>
8 years agoASoC: msm: qdsp6v2: Fix memory allocation issues in audio_cal_utils
Karthik Reddy Katta [Wed, 24 Feb 2016 06:13:40 +0000 (11:43 +0530)]
ASoC: msm: qdsp6v2: Fix memory allocation issues in audio_cal_utils

Incorrect pointer is used while allocating memory
for 'cal_block' pointer. Use proper pointer in kzalloc().

Memory of 'cal_block->cal_info' is not initialized to ZERO.
Use kzalloc() instead of kmalloc() to initialize this memory.

CRs-Fixed: 983585
Change-Id: Ifbe1d91d68da81d058197af2a403c4b832b019fb
Signed-off-by: Karthik Reddy Katta <a_katta@codeaurora.org>
8 years agoASoC: msm: qdsp6v2: compress passthrough fixes
Mingming Yin [Fri, 22 Jan 2016 21:54:32 +0000 (13:54 -0800)]
ASoC: msm: qdsp6v2: compress passthrough fixes

- Ignore stream volume and pp params calls
  for compress passthrough playback.
- Use correct COPP index for compress passthrough
  playback in adm_send_compressed_device_mute.

Signed-off-by: Mingming Yin <mingming@codeaurora.org>
Change-Id: I10d1aaf3bb6cbf6358378667f93970e9eb21be1d

8 years agoASoC: msm: qdsp6v2: Update set_params to avoid use before set
Dhananjay Kumar [Wed, 23 Mar 2016 15:21:33 +0000 (20:51 +0530)]
ASoC: msm: qdsp6v2: Update set_params to avoid use before set

In function msm_compr_set_params few codec parameters are getting
used before being updated with values received in the call.
Prevent usage of incorrect param values by updating params before
they are accessed.

CRs-Fixed: 993882
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
Change-Id: Ia3d3e13d4bd7975a11cbeb96929fb224e8271916

8 years agoASoC: wcd-mbhc: correct headphone detection
Yeleswarapu Nagaradhesh [Wed, 23 Mar 2016 06:40:37 +0000 (12:10 +0530)]
ASoC: wcd-mbhc: correct headphone detection

Characteristics of 3pole extn cable is, MIC is grounded
and HPHL and HPHR are floating. In current SW, if
there is GND_MIC SWAP with button press cable is reported
as unsupported. Hence report cable as headset if there is
GND_MIC SWAP with button press.

CRs-Fixed: 963833
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
Change-Id: Ie6b467292661358699fcab6263653139cda87c33

8 years agoASoC: wcd-mbhc: Fix special headset detection issue
Yeleswarapu Nagaradhesh [Tue, 22 Mar 2016 11:58:02 +0000 (17:28 +0530)]
ASoC: wcd-mbhc: Fix special headset detection issue

Even if the first measurement of hs_comp_result is 0 after
micbias is increased to 2.7v, it should be reported as special
headset. Fix the condition in driver to handle this scenario.

CRs-Fixed: 993103
Change-Id: I859e9de29436af12ef1af0e2ed85bcbb51d2e27a
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
8 years agoASoC: codecs: use correct subsystem status check
Deven Patel [Thu, 10 Mar 2016 01:09:11 +0000 (17:09 -0800)]
ASoC: codecs: use correct subsystem status check

Audio subsystem could reside in different DSP processor based on
architecture design. Use subsystem status check instead of explicitly
check for modem status.

CRs-fixed: 988942
Change-Id: I7c28a11f67517e5072e67c9bc2b99900a79879c1
Signed-off-by: Deven Patel <cdevenp@codeaurora.org>
8 years agomsm: camera: sensor: Validate step_boundary
Rajesh Bondugula [Wed, 13 Apr 2016 21:31:58 +0000 (14:31 -0700)]
msm: camera: sensor: Validate step_boundary

step_boundary can take values upto the total_steps
Validate the step_boundary before consuming it.
Convert the type of step_index and region_index to uint16_t
step_index and region_index cannot be negative.

CRs-Fixed: 1001092
Change-Id: I1f23fd6f28bb897824a1ef99a8873b9f986eee70
Signed-off-by: Rajesh Bondugula <rajeshb@codeaurora.org>
8 years agodefconfig: enable qseecom and tzlog drivers for msmcobalt
Zhen Kong [Thu, 5 May 2016 22:29:27 +0000 (15:29 -0700)]
defconfig: enable qseecom and tzlog drivers for msmcobalt

Enable qseecom and tzlog drivers on msmcobalt to support
secure communication between HLOS and TZ.

Change-Id: I930b1883e167dcf25c43b417a2e66f5ed86d5ac1
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
8 years agoMerge "ARM: dts: msm: Add tzdbg driver support for msmcobalt" into msm-4.4
Linux Build Service Account [Fri, 6 May 2016 16:56:19 +0000 (09:56 -0700)]
Merge "ARM: dts: msm: Add tzdbg driver support for msmcobalt" into msm-4.4

8 years agoMerge "ARM: dts: msm: add qseecom flag commonlib64-loaded-by-uefi on msmcobalt" into...
Linux Build Service Account [Fri, 6 May 2016 16:56:19 +0000 (09:56 -0700)]
Merge "ARM: dts: msm: add qseecom flag commonlib64-loaded-by-uefi on msmcobalt" into msm-4.4

8 years agoMerge "qseecom: add a new flag commonlib64-loaded-by-uefi" into msm-4.4
Linux Build Service Account [Fri, 6 May 2016 16:56:19 +0000 (09:56 -0700)]
Merge "qseecom: add a new flag commonlib64-loaded-by-uefi" into msm-4.4

8 years agoMerge "ARM: dts: msm: Add qseecom driver support for msmcobalt" into msm-4.4
Linux Build Service Account [Fri, 6 May 2016 16:56:18 +0000 (09:56 -0700)]
Merge "ARM: dts: msm: Add qseecom driver support for msmcobalt" into msm-4.4

8 years agoARM: dts: msm: Add tzdbg driver support for msmcobalt
Zhen Kong [Thu, 7 Apr 2016 18:08:36 +0000 (11:08 -0700)]
ARM: dts: msm: Add tzdbg driver support for msmcobalt

Add tzdbg driver support for msmcobalt, so tzlog and hyplog
can be obtained from hlos side.

Change-Id: I417a2e66f5ed86d5ac1930b1883e167dcf25c43b
Acked-by: Raj Jarang <rjarang@qti.qualcomm.com>
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
8 years agoARM: dts: msm: add qseecom flag commonlib64-loaded-by-uefi on msmcobalt
Zhen Kong [Fri, 25 Mar 2016 00:07:52 +0000 (17:07 -0700)]
ARM: dts: msm: add qseecom flag commonlib64-loaded-by-uefi on msmcobalt

add qseecom dtsi flag commonlib64-loaded-by-uefi to indicate commonlib64
is loaded by uefi already.

Change-Id: I8370cc414d95067d4e30da0f53ddb15070ed4d05
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
8 years agoqseecom: add a new flag commonlib64-loaded-by-uefi
Zhen Kong [Fri, 25 Mar 2016 00:04:31 +0000 (17:04 -0700)]
qseecom: add a new flag commonlib64-loaded-by-uefi

Add flag commonlib64-loaded-by-uefi to indicate commonlib64
is loaded by uefi already.

Change-Id: I9dd3f6bf92e178f1207424b09f39f2e08164df17
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
8 years agoARM: dts: msm: Add qseecom driver support for msmcobalt
Zhen Kong [Thu, 24 Mar 2016 20:21:36 +0000 (13:21 -0700)]
ARM: dts: msm: Add qseecom driver support for msmcobalt

Add qseecom driver support for msmcobalt, which is required
for secure communication between HLOS and Trustzone.

Change-Id: Ia87c3686ad09a80d965545c76f50ce4245d5477f
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
8 years agomsm: kgsl: Remove harmless preemption log message
Harshdeep Dhatt [Fri, 29 Apr 2016 15:25:48 +0000 (09:25 -0600)]
msm: kgsl: Remove harmless preemption log message

This message is logged when we receive a preemption
interrupt after we have already detected that preemption
has been finished in hardware by reading the preemption
status register. This is a harmless condition so remove
it.

CRs-Fixed: 993480
Change-Id: I61a48353428b3faa042fbc85e259b33c7f23bdb0
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
8 years agomsm: kgsl: Fix overflow in sharedmem read/write functions
Sunil Khatri [Fri, 29 Apr 2016 15:22:49 +0000 (09:22 -0600)]
msm: kgsl: Fix overflow in sharedmem read/write functions

There could be possibility of integer overflow on adding
sizeof(uint32_t) with uint64_t maximum offset bytes and result
in a value smaller than uint64_t maximum memdesc size.

CRs-Fixed: 988861
Change-Id: Ifc3ec45297c2a29ad6f7d70dd0bd59238ac8cc3d
Signed-off-by: Sunil Khatri <sunilkh@codeaurora.org>
8 years agomsm: kgsl: Add MMU offset mapping functions
Carter Cooper [Fri, 29 Apr 2016 15:22:39 +0000 (09:22 -0600)]
msm: kgsl: Add MMU offset mapping functions

Allow MMU mappings to take offsets rather than only allowing
full range mappings.

CRs-Fixed: 971174
Change-Id: Iaa113c8414a2d2d8f92b3cb21eaf2e422f273454
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
8 years agomsm: kgsl: Dump 64KB of preemption record in snapshot
Harshdeep Dhatt [Fri, 29 Apr 2016 15:22:29 +0000 (09:22 -0600)]
msm: kgsl: Dump 64KB of preemption record in snapshot

Dumping only the ctxt_record structure in a snapshot
is not enough. For a more meaningful snapshot, dump 64KB
of preempt record. Also, move the code to device specific
snapshot function.

Change-Id: I43e08ccefbf2d3911191b2aad5168979956e1626
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
8 years agomsm: kgsl: Clean up adreno trace code
Carter Cooper [Fri, 29 Apr 2016 15:22:16 +0000 (09:22 -0600)]
msm: kgsl: Clean up adreno trace code

Give trace code for IRQs a simpler format that moves
around where some logic lives.

CRs-Fixed: 971172
Change-Id: If426fb7599be0a79b6f37b8008a2310b1c006e93
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
8 years agomsm: kgsl: Don't spam kmsg due to invalid IOCTL requests
Carter Cooper [Fri, 29 Apr 2016 15:21:03 +0000 (09:21 -0600)]
msm: kgsl: Don't spam kmsg due to invalid IOCTL requests

When the IOCTL is called with invalid data, don't log to kmsg. The
returned error code should be enough to tell the UMD what they did wrong.

CRs-Fixed: 987074
Change-Id: Iae380e0f44dd53bee8ff4cec347a6b9a632b1f84
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
8 years agomsm: kgsl: Remove superfluous NULL checks when reading timestamps
Carter Cooper [Fri, 29 Apr 2016 15:20:49 +0000 (09:20 -0600)]
msm: kgsl: Remove superfluous NULL checks when reading timestamps

There is no way for the UMD to pass in NULL pointers for reading
timestamps. The KGSL driver also always has valid pointers
for storing the readpointer. Remove the checks that are not needed.

Change-Id: Id5f244a57a2b991a10b603ef7236193d4282fd0f
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
8 years agomsm: kgsl: Purge unused #defines
Carter Cooper [Fri, 29 Apr 2016 15:20:13 +0000 (09:20 -0600)]
msm: kgsl: Purge unused #defines

Remove unused #defines, structs and members that are no longer used.

CRs-Fixed: 971156
Change-Id: Ibdf6fef6f3f700f3c5315c228c0473e47fb62163
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
8 years agomsm: kgsl: Use a page pool to reduce allocation time
Deepak Kumar [Fri, 29 Apr 2016 15:16:51 +0000 (09:16 -0600)]
msm: kgsl: Use a page pool to reduce allocation time

Use a mempool to reduce the allocation time. When memory allocated
from pages is freed, put it in a page pool. At allocation time, try
to allocate from the page pool before getting pages from the system.
Make sure that the pool does not grow too big by enforcing a
maximum limit.

Change-Id: Icac7fb4355ee1fd07e7127ea5c2721665e279272
Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
8 years agomsm_11ad: keep rf_clk3 on during wil6210 activity
Maya Erez [Wed, 4 May 2016 18:40:07 +0000 (21:40 +0300)]
msm_11ad: keep rf_clk3 on during wil6210 activity

wil6210 FW needs to control rf_clk3 in order
to allow the host to disable it.
Keep rf_clk3 always on, as the current FW code
doesn't support handling of rf_clk3.

Change-Id: I552094c64bd9fb360ddd73022fe21a403c245b2f
CRs-Fixed: 986130
Signed-off-by: Maya Erez <merez@codeaurora.org>
8 years agomsm: thermal: Make boot-up mitigation optional
Ram Chandrasekar [Fri, 29 Apr 2016 15:51:33 +0000 (09:51 -0600)]
msm: thermal: Make boot-up mitigation optional

For the targets with the LMH DCVSh mitigation, HLOS boot-up
mitigation is not required. So make the devicetree properties
related to boot-up mitigation as optional.

CRs-Fixed: 1010111
Change-Id: I7f254f579182effbc1f1a3d49c3c917d3c7af162
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
8 years agomsm: mdss: hdmi: refactor event handler
Ajay Singh Parmar [Tue, 19 Apr 2016 07:12:23 +0000 (00:12 -0700)]
msm: mdss: hdmi: refactor event handler

HDMI driver handles many MDP events. Currently all the events
are handled in one function. Create different functions for
each event for a cleaner approach.

Change-Id: Ib48c02b2b89f7fdb347afd3a02d8b6b7c1c03e85
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
8 years agomsm: mdss: hdmi: refactor initialization of features
Ajay Singh Parmar [Mon, 18 Apr 2016 23:08:47 +0000 (16:08 -0700)]
msm: mdss: hdmi: refactor initialization of features

HDMI driver initializes many features like EDID (Extended Display
Identification Data), CEC (Consumer Electronics Control), HDCP (
Hight-Bandwidth Digital Content Protection) and related sub-modules.
Initialize them in separate functions for cleaner approach.

Change-Id: I5b73d3b558af576b5114c42b63260bb688f2d8d1
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
8 years agoicnss: Enable SMMU BYPASS mode
Yuanyuan Liu [Wed, 4 May 2016 01:38:21 +0000 (18:38 -0700)]
icnss: Enable SMMU BYPASS mode

The plan was to use bypass mode till fastpath API's
are available. Hence enable SMMU BYPASS mode.

Change-Id: I53bcd8293f7587ddba64ed0e019b77eee62b5e72
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
8 years agomsm: mdss: hdmi: add dynamic fps support
Ajay Singh Parmar [Wed, 23 Mar 2016 02:00:52 +0000 (19:00 -0700)]
msm: mdss: hdmi: add dynamic fps support

Add dynamic fps support for hdmi to update the resolution
timings on the interface by either changing the clock rate
or by modifying the porch values or both. Dynamic fps feature
can by used for hdmi to support different use cases like
matching input stream fps with hdmi out.

Change-Id: Ia305e1eb5d3da1dfbf868650e5ee84018255476b
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
8 years agomsm: mdss: fb: reconfigure panel if output format has changed
Ajay Singh Parmar [Fri, 8 Apr 2016 16:49:49 +0000 (09:49 -0700)]
msm: mdss: fb: reconfigure panel if output format has changed

User modules can switch to same resolution with different format like
RGB or YUV. In cases where just the format is changing, reconfigure
the panel to switch to new format.

Change-Id: I52b11f19f576e13e197e8c576a9c5ada54416f5e
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
8 years agomsm: kgsl: Check for failure in coresight initialization
Sunil Khatri [Fri, 29 Apr 2016 15:16:27 +0000 (09:16 -0600)]
msm: kgsl: Check for failure in coresight initialization

We need to check for both NULL pointer and error condition
in coresight initialization and return with proper error.

CR's-Fixed: 971398
Change-Id: Id1e3e0f756ac1c9a0ff4f4e6ce073e80e31473b8
Signed-off-by: Sunil Khatri <sunilkh@codeaurora.org>
8 years agomsm: mdss: hdmi: check for scrambler override
Ajay Singh Parmar [Fri, 8 Apr 2016 16:59:50 +0000 (09:59 -0700)]
msm: mdss: hdmi: check for scrambler override

In some cases, scrambling may need to be forced on or off based on
sink requirements. To support such requirements, scrambler override
may be imposed. If scrambler override has been enabled, use
override value to enable or disable scrambler.

Change-Id: I9556c6457258598e6b6758573bb0263d53e612da
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
8 years agomsm: mdss: hdmi: update switch node on hpd off
Ajay Singh Parmar [Thu, 7 Apr 2016 04:56:15 +0000 (21:56 -0700)]
msm: mdss: hdmi: update switch node on hpd off

During framework reboot, keep the switch nodes in sync with
user modules to make sure hdmi cable notification mechanism
works after reboot.

Change-Id: I22696b17ec6ff11b1a378df9611eb8ab4be01358
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
8 years agodefconfig: msmcortex: Enable workqueue watchdog
Trilok Soni [Sat, 23 Apr 2016 19:15:11 +0000 (12:15 -0700)]
defconfig: msmcortex: Enable workqueue watchdog

Enable workqueue hang detection through workqueue watchdog feature.

CRs-Fixed: 1007459
Change-Id: Ic9dd60923198f38117843e9e087287fac294c197
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
8 years agoworkqueue: implement lockup detector
Tejun Heo [Tue, 8 Dec 2015 16:28:04 +0000 (11:28 -0500)]
workqueue: implement lockup detector

Workqueue stalls can happen from a variety of usage bugs such as
missing WQ_MEM_RECLAIM flag or concurrency managed work item
indefinitely staying RUNNING.  These stalls can be extremely difficult
to hunt down because the usual warning mechanisms can't detect
workqueue stalls and the internal state is pretty opaque.

To alleviate the situation, this patch implements workqueue lockup
detector.  It periodically monitors all worker_pools periodically and,
if any pool failed to make forward progress longer than the threshold
duration, triggers warning and dumps workqueue state as follows.

 BUG: workqueue lockup - pool cpus=0 node=0 flags=0x0 nice=0 stuck for 31s!
 Showing busy workqueues and worker pools:
 workqueue events: flags=0x0
   pwq 0: cpus=0 node=0 flags=0x0 nice=0 active=17/256
     pending: monkey_wrench_fn, e1000_watchdog, cache_reap, vmstat_shepherd, release_one_tty, release_one_tty, release_one_tty, release_one_tty, release_one_tty, release_one_tty, release_one_tty, release_one_tty, release_one_tty, release_one_tty, release_one_tty, release_one_tty, cgroup_release_agent
 workqueue events_power_efficient: flags=0x80
   pwq 0: cpus=0 node=0 flags=0x0 nice=0 active=2/256
     pending: check_lifetime, neigh_periodic_work
 workqueue cgroup_pidlist_destroy: flags=0x0
   pwq 0: cpus=0 node=0 flags=0x0 nice=0 active=1/1
     pending: cgroup_pidlist_destroy_work_fn
 ...

The detection mechanism is controller through kernel parameter
workqueue.watchdog_thresh and can be updated at runtime through the
sysfs module parameter file.

v2: Decoupled from softlockup control knobs.

CRs-Fixed: 1007459
Change-Id: Id7dfbbd2701128a942b1bcac2299e07a66db8657
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Don Zickus <dzickus@redhat.com>
Cc: Ulrich Obergfell <uobergfe@redhat.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Chris Mason <clm@fb.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Git-commit: 82607adcf9cdf40fb7b5331269780c8f70ec6e35
Git-repo: git://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>