OSDN Git Service

sagit-ice-cold/kernel_xiaomi_msm8998.git
8 years agoarm64: dma-mapping: Attach IOMMUs as groups
Mitchel Humpherys [Fri, 27 May 2016 21:58:31 +0000 (14:58 -0700)]
arm64: dma-mapping: Attach IOMMUs as groups

Some devices behind IOMMUs might end up in IOMMU groups due to DMA
aliasing.  The iommu_attach_device API expects a single device in a
group all by its lonesome, so it fails when a device is passed in that's
part of a group.  Use iommu_attach_group to accommodate these types of
devices.

CRs-Fixed: 1023180
Change-Id: I9601efd300c7f428c4576e6ecf6d31791d0b47bd
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
8 years agoARM: dts: msm: add WCN3990 BT/FM support for msmcobalt devices
Banajit Goswami [Tue, 31 May 2016 23:52:12 +0000 (16:52 -0700)]
ARM: dts: msm: add WCN3990 BT/FM support for msmcobalt devices

Pass device tree information for WCN3990 BT/FM chipset
presence on MSMCOBALT MTP and CDP targets to machine driver.

Change-Id: Iab4f544532e57682eb5dbfe7865850b8e978f1b4
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
8 years agoARM: dts: msm: Advertise SG support by rmnet_ipa on msmcobalt
Skylar Chang [Thu, 14 Apr 2016 22:08:02 +0000 (15:08 -0700)]
ARM: dts: msm: Advertise SG support by rmnet_ipa on msmcobalt

This is needed to enable segmentation pkts offload feature
in IPA-HW called GSO (Generic Segmentation Offload).

Change-Id: If43428f0eb53370ca725480b3cd13e7b53e643c3
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
8 years agoARM: dts: msm: Add Round robin ADC channels for pmicobalt
Siddartha Mohanadoss [Mon, 23 May 2016 19:24:54 +0000 (12:24 -0700)]
ARM: dts: msm: Add Round robin ADC channels for pmicobalt

Round robin ADC (RRADC) provides clients ability to read
supported channels from PMIcobalt RRADC such as battery ID,
battery thermistors, DCIN and USBIN voltage and current.

Change-Id: If4503b0e25ac151039d1743a007ba1624a2e90f4
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
8 years agomsm: rmnet_ipa3: add RMNET_IOCTL_GET_SG_SUPPORT support
Skylar Chang [Thu, 14 Apr 2016 00:27:13 +0000 (17:27 -0700)]
msm: rmnet_ipa3: add RMNET_IOCTL_GET_SG_SUPPORT support

While the transport always supports scatter-gather, the
capability advertised through this IOCTL is configured
from the device tree. Add support on ipav3.

Change-Id: Idf626cb5a22d2ed5152ab76dcc5fe56696a631a6
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
8 years agoARM: dts: msm: rename the flash/WLED devices in pmicobalt
Subbaraman Narayanamurthy [Thu, 2 Jun 2016 00:44:34 +0000 (17:44 -0700)]
ARM: dts: msm: rename the flash/WLED devices in pmicobalt

Rename the flash and WLED devices available in cobalt platform
to use the same naming convention.

Change-Id: I812f0f6b38e7e9973cc9a0c8bfd6fb5078f719ff
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
8 years agomsm: ipa: support GRO feature on msmcobalt
Skylar Chang [Fri, 20 May 2016 21:03:53 +0000 (14:03 -0700)]
msm: ipa: support GRO feature on msmcobalt

For this GRO feature, IPA-driver should not
de-aggregate the pkt received from modem, also
no need to attach status. Also netmgrd will
call ioctl to wan-driver to indicate when
this feature will be enable.

Change-Id: I1bc6fb87684ee8da6126dc331debf5880adceb4f
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
8 years agoPM / devfreq: memlat: Prevent deadlock with hotplug in start_hwmon
Rohit Gupta [Fri, 20 May 2016 00:42:04 +0000 (17:42 -0700)]
PM / devfreq: memlat: Prevent deadlock with hotplug in start_hwmon

When start_hwmon() runs with another thread trying to hotplug a
CPU the two threads can enter a deadlock situation as follows:

Thread A (start_hwmon()) Thread B (CPU down)
get_online_cpus()
|
atomic_inc(&cpu_hotplug.refcount)
     CPU down
|
     mutex_lock(&cpu_add_remove_lock)
|
     cpu_hotplug_begin() waits on
     cpu_hotplug.refcount to reset
register_cpu_notifier()
|
mutex_lock(&cpu_add_remove_lock)

With this change the notifers are registered and unregistered per
device rather than having a common notifier block for all the memlat
devices and unregistration only happens on stop_hwmon. This makes it
possible to move the registration outside the hotplug lock without
any race between multiple memlat devices.

Change-Id: I6ad561fe4967042e45190aea2c9b7fcfe05bafdd
Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
8 years agothermal: tsens: Update critical temperature threshold value
Siddartha Mohanadoss [Wed, 18 May 2016 17:40:42 +0000 (10:40 -0700)]
thermal: tsens: Update critical temperature threshold value

Existing controller health detection uses a critical
temperature threshold of -40degC. Update the value to -95degC
so that there are no false positives seen when min threshold
is disabled and temperature goes below the threshold value.

Change-Id: If27ecfbb7b080080074bfe142f493fbf8f53f673
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
8 years agomsm: ipa: enable power save to ODU
Skylar Chang [Wed, 25 May 2016 01:01:19 +0000 (18:01 -0700)]
msm: ipa: enable power save to ODU

Remove keep_awake flag from ODU bridge to allow IPA to
go to clock gating.

CRs-Fixed: 1013927
Change-Id: Ic9efb8555ec4bdad2c099719de4ed56677b194ca
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
8 years agomsm: ipa3: fix to read hw tables from debugfs
Skylar Chang [Tue, 24 May 2016 23:27:17 +0000 (16:27 -0700)]
msm: ipa3: fix to read hw tables from debugfs

Fix to IPA driver debugfs logic to read filtering
and routing directly from HW.

CRs-Fixed: 1020271
Change-Id: I6bb5f9a01e3f41107d7b5bdf7c19557546573463
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
8 years agoRevert "msm: mdss: hdmi: check clk state before power on"
Tatenda Chipeperekwa [Sat, 28 May 2016 00:20:01 +0000 (17:20 -0700)]
Revert "msm: mdss: hdmi: check clk state before power on"

This reverts commit 05f3cbbe5cc481141434a90e606ff9fc92da5e0d
("msm: mdss: hdmi: check clk state before power on"). The check
for clock state was required for earlier target's fast hot plug
use cases, and uses the clock framework for check for clock rates.
This approach does not work on msmcobalt and causes the power on
sequence for HDMI to fail.

CRs-Fixed: 1022772
Change-Id: I320427f810fd35b11335685bae95b3c5fb9c8fee
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
8 years agoARM: dts: msm: Add support for MSM8996pro v1.1
Satya Durga Srinivasu Prabhala [Tue, 12 Apr 2016 22:49:59 +0000 (15:49 -0700)]
ARM: dts: msm: Add support for MSM8996pro v1.1

Add device tree support for MSM8996pro v1.1 along with different PMIC
configurations it supports.

CRs-Fixed: 1004223
Change-Id: I46f2ec5170fb204e9e0535aca1482b5e39e21de3
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
8 years agomsm: secure_buffer: Fix possible NULL pointer dereference
Susheel Khiani [Mon, 11 Apr 2016 12:32:43 +0000 (18:02 +0530)]
msm: secure_buffer: Fix possible NULL pointer dereference

Presently we were passing NULL dma_handle while
making dma_alloc_coherent call. This is an issue
as alloc function would try to populate handle
value with dma address and would end up getting
NULL pointer error. Fix this.

Change-Id: I38ebb9bbae2d6e1e1311fe438b3c8fc3f65e5692
Signed-off-by: Susheel Khiani <skhiani@codeaurora.org>
8 years agoarm: dma-mapping: fix data types to hold size_t
Shiraz Hashim [Sun, 21 Feb 2016 07:15:34 +0000 (12:45 +0530)]
arm: dma-mapping: fix data types to hold size_t

size_t type data should not be held under variable of type
int, as this can truncate large values especially on a
64bit system. Fix it.

Change-Id: I5ad1ab321738772a99920e3fa287bda266cb05ed
Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
8 years agomsm: ipa3: Move IPA RAM mapping to DTS file
Gilad Landau [Mon, 16 May 2016 10:41:59 +0000 (13:41 +0300)]
msm: ipa3: Move IPA RAM mapping to DTS file

Use DTS configuration file to initialize IPA memory partitions
in order to allow per target configuration decoupled from code.

Change-Id: If770b9315807e51e46cd94dec6234ef186cf4fcb
CRs-Fixed: 1022125
Signed-off-by: Gilad Landau <glandau@codeaurora.org>
8 years agostaging: ion : Donnot wakeup kswapd in ion system alloc
Chen Feng [Fri, 15 Jan 2016 02:38:19 +0000 (10:38 +0800)]
staging: ion : Donnot wakeup kswapd in ion system alloc

Since ion alloc can be called by userspace,eg gralloc.
When it is called frequently, the efficiency of kswapd is
to low. And the reclaimed memory is too lower. In this way,
the kswapd can use to much cpu resources.

With 3.5GB DMA Zone and 0.5 Normal Zone.

pgsteal_kswapd_dma 9364140
pgsteal_kswapd_normal 7071043
pgscan_kswapd_dma 10428250
pgscan_kswapd_normal 37840094

With this change the reclaim ratio has greatly improved
18.9% -> 72.5%

Change-Id: I20ea0e4ad0537f6e90efbc59fb8d56d691ee3bde
Signed-off-by: Chen Feng <puck.chen@hisilicon.com>
Signed-off-by: Lu bing <albert.lubing@hisilicon.com>
Reviewed-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 2ef230531ee171a475fc3ddad5516dd7e09a8a77
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[vinmenon@codeaurora.org: Resolved minor merge conflicts]
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
8 years agomsm: camera: Add support for DPCM modes
Vijay kumar Tumati [Wed, 27 Jan 2016 09:40:21 +0000 (15:10 +0530)]
msm: camera: Add support for DPCM modes

DPCM8 and DPCM6 are 10 bit to 8 and 10 bit
to 6 bit compression formats respectively
which sensor outputs and it is decompressed
to 10 bit in CSID

Change-Id: I8ec4de7d9cfa5e9c86d97bd9cb81feddc97dc7b8
Signed-off-by: Vijay kumar Tumati <vtumati@codeaurora.org>
Signed-off-by: Sureshnaidu Laveti <lsuresh@codeaurora.org>
8 years agoplatform: qpnp-revid: add definitions for pmicobalt versions
Abhijeet Dharmapurikar [Tue, 17 May 2016 20:02:09 +0000 (13:02 -0700)]
platform: qpnp-revid: add definitions for pmicobalt versions

Some workarounds need to be applied only for v1.0 and v1.1 of
pmicobalt. For drivers to check and compare the versions, add
definitions for pmicobalt versions.

CRs-Fixed: 1018090
Change-Id: I3c6c0b470c7d15802c7cf4cb8ced85548dbb81c7
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
8 years agoclk: msm: clock: Support graphics clocks on MSMCOBALT v2
Deepak Katragadda [Sat, 7 May 2016 00:16:22 +0000 (17:16 -0700)]
clk: msm: clock: Support graphics clocks on MSMCOBALT v2

Add support for controlling the graphics clocks on
MSMCOBALT v2.

CRs-Fixed: 1015446
Change-Id: Ia94606113b112a5e363e342a0ad1d977a48b3d72
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
8 years agoARM: dts: msm: Add MSMCOBALT v2 specific gfx_stub regulator changes
Deepak Katragadda [Fri, 13 May 2016 21:41:10 +0000 (14:41 -0700)]
ARM: dts: msm: Add MSMCOBALT v2 specific gfx_stub regulator changes

Use the gfx_stub_vreg regulator node for sourcing the graphics
clocks and GDSC on the pre-silicon platforms. Note that CPR
changes are still required for the graphics rail on the actual
target.

CRs-Fixed: 1015446
Change-Id: Ib92b11c23785e737f91ad09bcbb3d0b849d3a2bf
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
8 years agoARM: dts: msm: Enable the MMSS clock driver on MSMCOBALT v2
Deepak Katragadda [Fri, 13 May 2016 21:02:32 +0000 (14:02 -0700)]
ARM: dts: msm: Enable the MMSS clock driver on MSMCOBALT v2

Enable the linux clock driver support for multimedia
clocks on MSMCOBALT v2.

CRs-Fixed: 1015446
Change-Id: Ice373ce1656f1ab045eefd57dcd700a4c20deedf
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
8 years agoclk: msm: clock: Support multimedia clocks on MSMCOBALT v2
Deepak Katragadda [Tue, 10 May 2016 19:23:35 +0000 (12:23 -0700)]
clk: msm: clock: Support multimedia clocks on MSMCOBALT v2

Add support for controlling the multimedia clocks on
MSMCOBALT v2.

CRs-Fixed: 1015446
Change-Id: I636001ea91e7be1e2adec2ea7cd3d9aadfcc39a2
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
8 years agoRevert "usb: gadget: gsi: Decrement USB gadget pm usage count on cable disconnect"
Mayank Rana [Fri, 27 May 2016 18:05:13 +0000 (11:05 -0700)]
Revert "usb: gadget: gsi: Decrement USB gadget pm usage count on cable disconnect"

'commit 3a7ce1db5661 ("usb: gadget: gsi: Decrement USB gadget pm usage
count on cable disconnect")' added decrementing USB gadget device's pm
usage count from STATE_INITIALIZED which results into multiple time
decrementing USB gadget device's pm usage count on USB cable disconnect
as below:

1. On USB cable disconnect, USB bus suspend event is being received which
post EVT_DISCONNECTED. If state is STATE_CONNECTED, ipa_work_handles()
decrements USB gadget device's pm usage count, and move state to
STATE_INITIALIZED.

2. Due to USB cable disconnect, gsi_disable() posts EVT_DISCONNECTED.
This event is processed into STATE_CONNECTED causing additional decrement
of USB gadget device's pm usage count.

Due to above case, USB goes into low power mode with dwc3's pm usage
count negative. On connecting USB host mode cable, xhci resume is failing
due to dwc3's (parent of xhci) is having negative usage count which results
into no USB host mode functionality (pm_runtime_get_sync() returns -EBUSY).
Hence revert commit to allow USB Host mode functionality.

CRs-Fixed: 1020388
Change-Id: I853aba1d2d03945ee49adde7f0ea483cd406ce2b
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
8 years agoclk: qcom: Add MSM8996 Global Clock Control (GCC) driver
Stephen Boyd [Tue, 1 Dec 2015 01:31:40 +0000 (17:31 -0800)]
clk: qcom: Add MSM8996 Global Clock Control (GCC) driver

Add support for the global clock controller found on MSM8996
based devices. This should allow most non-multimedia device
drivers to probe and control their clocks.

Change-Id: I559f5976b56bf8933df2c68fc4e29b2bd0ce1160
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Taniya Das <tdas@codeaurora.org>
8 years agoicnss: Add IPC logging
Prashanth Bhatta [Sat, 14 May 2016 00:25:02 +0000 (17:25 -0700)]
icnss: Add IPC logging

Add IPC logging mechanism so that all the driver logs can be
retrieved on the need basis.
Also use pr_fmt to format the logs so that icnss driver logs are
consistent.

Change-Id: I977b04964ac28c18f4ad85094746aa864f03d0c3
Signed-off-by: Prashanth Bhatta <bhattap@codeaurora.org>
8 years agosched: eliminate sched_enable_power_aware knob and parameter
Joonwoo Park [Wed, 25 May 2016 18:42:05 +0000 (11:42 -0700)]
sched: eliminate sched_enable_power_aware knob and parameter

Kill unused scheduler knob and parameter sched_enable_power_aware.  HMP
scheduler always take into account power cost for placing task.

Change-Id: Ib26a21df9b903baac26c026862b0a41b4a8834f3
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
8 years agosched: eliminate sched_freq_account_wait_time knob
Joonwoo Park [Wed, 25 May 2016 18:27:35 +0000 (11:27 -0700)]
sched: eliminate sched_freq_account_wait_time knob

Kill unused scheduler knob sched_freq_account_wait_time.

Change-Id: Ib74123ebd69dfa3f86cf7335099f50c12a6e93c3
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
8 years agosched: eliminate sched_account_wait_time knob
Joonwoo Park [Wed, 25 May 2016 18:24:14 +0000 (11:24 -0700)]
sched: eliminate sched_account_wait_time knob

Kill unused scheduler knob sched_account_wait_time.  With this change
scheduler always accounts task's wait time into demand.

Change-Id: Ifa4bcb5685798f48fd020f3d0c9853220b3f5fdc
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
8 years agofs/buffer.c: Revoke LRU when trying to drop buffers
Laura Abbott [Fri, 31 Aug 2012 01:01:17 +0000 (18:01 -0700)]
fs/buffer.c: Revoke LRU when trying to drop buffers

When a buffer is added to the LRU list, a reference is taken which is
not dropped until the buffer is evicted from the LRU list. This is the
correct behavior, however this LRU reference will prevent the buffer
from being dropped. This means that the buffer can't actually be dropped
until it is selected for eviction. There's no bound on the time spent
on the LRU list, which means that the buffer may be undroppable for
very long periods of time. Given that migration involves dropping
buffers, the associated page is now unmigratible for long periods of
time as well. CMA relies on being able to migrate a specific range
of pages, so these these types of failures make CMA significantly
less reliable, especially under high filesystem usage.

Rather than waiting for the LRU algorithm to eventually kick out
the buffer, explicitly remove the buffer from the LRU list when trying
to drop it. There is still the possibility that the buffer
could be added back on the list, but that indicates the buffer is
still in use and would probably have other 'in use' indicates to
prevent dropping.

Change-Id: I253f4ee2069e190c1115afc421dadd27a7fa87dc
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
8 years agomsm: ADSPRPC: Validate the SMMU session count
Sathish Ambley [Thu, 19 May 2016 21:43:25 +0000 (14:43 -0700)]
msm: ADSPRPC: Validate the SMMU session count

Make sure that the session count does not exceed the maximum
sessions to avoid buffer overflow.

Change-Id: I1a9830a6f859d7d525247d27d0a143997998d997
Acked-by: Bharath Kumar <bkumar@qti.qualcomm.com>
Signed-off-by: Sathish Ambley <sathishambley@codeaurora.org>
8 years agowil6210: allow empty WMI commands in debugfs wmi_send
Lior David [Sun, 15 May 2016 11:38:26 +0000 (14:38 +0300)]
wil6210: allow empty WMI commands in debugfs wmi_send

There are many valid WMI commands with only header without any
additional payload. Such WMI commands could not be sent using
the debugfs wmi_send facility. Fix the code to allow sending
of such commands.

Change-Id: I581e099db5d2ee81be4345101aa54352b1d9564f
Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: 69218a48005d0c93b8e9ec483f42ead481a43034
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
CRs-Fixed: 1015627
Signed-off-by: Maya Erez <merez@codeaurora.org>
8 years agomsm: mdss: fix to enable danger for msmcobalt
Ingrid Gallardo [Thu, 26 May 2016 02:19:14 +0000 (19:19 -0700)]
msm: mdss: fix to enable danger for msmcobalt

Add msmcobalt revision to enable danger.

Change-Id: Ie02f67d00c8fe04bf90ded5d4a6ab85c86cf05ad
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
8 years agoleds: led-class: Retain the latest user brightness request
Ram Chandrasekar [Thu, 2 Apr 2015 16:44:57 +0000 (10:44 -0600)]
leds: led-class: Retain the latest user brightness request

Retain the latest user brightness request. This ensures
that when a max brightness limit is altered, the last
brightness request is taken into account, when restoring
the current brightness.

Change-Id: I6461e06f64abe336cabc27a3992d734f1fb745c6
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
8 years agoleds: led-class: add support for max_brightness store
Mohan Pallaka [Tue, 24 Feb 2015 00:41:47 +0000 (16:41 -0800)]
leds: led-class: add support for max_brightness store

Add store interface for max_brightness to allow users
to change the maximum brightness to be supported by
the hardware.

Change-Id: I8b65debdc52ded24227483c4db21aaec63e27927
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
8 years agomm: zcache: remove __GFP_NO_KSWAPD
Vinayak Menon [Mon, 9 May 2016 16:21:37 +0000 (21:51 +0530)]
mm: zcache: remove __GFP_NO_KSWAPD

Remove __GFP_NO_KSWAPD. It no longer exist.

Change-Id: I8b50a06bdae050b3a3c47b80e21d0d2edf18b7c5
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
8 years agomm: add WasActive page flag
Bob Liu [Tue, 6 Aug 2013 11:36:17 +0000 (19:36 +0800)]
mm: add WasActive page flag

Zcache could be ineffective if the compressed memory pool is full with
compressed inactive file pages and most of them will be never used again.

So we pick up pages from active file list only, those pages would probably
be accessed again. Compress them in memory can reduce the latency
significantly compared with rereading from disk.

When a file page is shrunk from active file list to inactive file list,
PageActive flag is also cleared.
So adding an extra WasActive page flag for zcache to know whether the
file page was shrunk from the active list.

Change-Id: Ida1f4db17075d1f6f825ef7ce2b3bae4eb799e3f
Signed-off-by: Bob Liu <bob.liu@oracle.com>
Patch-mainline: linux-mm @ 2013-08-06 11:36:17
[vinmenon@codeaurora.org: trivial merge conflict fixes, checkpatch fixes,
fix the definitions of was_active page flag so that it does not create
compile time errors with CONFIG_CLEANCACHE disabled. Also remove the
unnecessary use of PG_was_active in PAGE_FLAGS_CHECK_AT_PREP. Since
was_active is a requirement for zcache, make the definitions dependent on
CONFIG_ZCACHE rather than CONFIG_CLEANCACHE.]
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
8 years agomsm: camera: sensor: Disable IRQ in csid after few frames
Rajesh Bondugula [Wed, 11 May 2016 23:08:30 +0000 (16:08 -0700)]
msm: camera: sensor: Disable IRQ in csid after few frames

IRQ of CSID is enabled when MSM_SD_NOTIFY_FREEZE is called.
It must be disabled in MSM_SD_UNNOTIFY_FREEZE and also
after few IRQs we disbale the debug IRQ.
This prevents excess logs.

Crs-Fixed: 1011965
Signed-off-by: Rajesh Bondugula <rajeshb@codeaurora.org>
Change-Id: I10bf7ed20e7d5d29c6e5fff0ed7a8474c96acea5

8 years agomm/memblock: disable local irqs while late memblock changes
Shiraz Hashim [Sat, 16 Apr 2016 06:13:02 +0000 (11:43 +0530)]
mm/memblock: disable local irqs while late memblock changes

There is a possibility of deadlock while doing late
memblock configuration as only preemption is disabled and
irq can be serviced while seqlock is held and in turn
memblock_is_memory can be called from irq context thus
trying to claim seqlock again. Following call stack was
observed,

[<c02136d4>] memblock_search+0x1c
[<c021487c>] memblock_is_memory+0x10
[<c01e4684>] free_kmem_pages+0x44
[<c0121c04>] free_task+0x28
[<c0178b30>] rcu_process_callbacks+0x488
[<c0127e30>] __do_softirq+0x150
[<c0128284>] irq_exit+0x84
[<c010c11c>] handle_IPI+0x12c
[<c0100588>] gic_handle_irq+0x70
[<c0e9efc0>] __irq_svc+0x40
[<c0214a8c>] memblock_region_resize_late_end+0xc
[<c057010c>] removed_alloc+0x110
[<c04ab2c4>] pil_boot+0x2b0
[<c04b7700>] __subsystem_get+0xe0
[<c04b79cc>] subsys_device_open+0x74
[<c0229f20>] chrdev_open+0x12c
[<c02246e4>] do_dentry_open+0x280
[<c0232698>] do_last+0x9a4
[<c0232b8c>] path_openat+0x23c
[<c0233bf0>] do_filp_open+0x2c

Fix it by disabling irqs during late memblock
configuration. It is a one time operation which changes
memblock related data structures and doesn't carry
performance impact.

CRs-Fixed: 1003890
Change-Id: I3ff1894f0c80580920b1971cda357915665b5054
Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
8 years agolowmemorykiller: add zcache awareness
Vinayak Menon [Thu, 27 Aug 2015 10:59:37 +0000 (16:29 +0530)]
lowmemorykiller: add zcache awareness

zcache stores compressed file pages which should be
considered as reclaimable pages by lowmemorykiller
in calculating values to be compared against minfree.

Change-Id: Ia3e08bc14ba61c0a45ed54ba5cd525717a572060
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
8 years agospcom: fix modify ion addr
Amir Samuelov [Tue, 31 May 2016 07:28:27 +0000 (10:28 +0300)]
spcom: fix modify ion addr

It is expected that the 64 bit ion buffer address,
will be located on the request/response buffer at an offset
that is 64 bit aligned.
However, the user may pack the request/response on his own risk,
and the offset might not be 64 bit aligned.

Change-Id: I85e7644aa05d8c5249e2d204a61d03b5fb2f9220
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
8 years agospcom: fix lock ION buffer
Amir Samuelov [Tue, 31 May 2016 07:13:26 +0000 (10:13 +0300)]
spcom: fix lock ION buffer

Check if ION buffer is locked based on comparing the kernel ion handle,
rather than comparing the user file descriptor.

Change-Id: I7a41df3eebf22de2cc6b14327978923bcdbb7142
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
8 years agoion: destroy ion handles under client->lock
Shiraz Hashim [Mon, 9 May 2016 05:43:19 +0000 (11:13 +0530)]
ion: destroy ion handles under client->lock

ion handles associated with a client must be destroyed
under client->lock so as to prevent race where other path
use handle while being destroyed.

One such path is when user access heap details through
debugfs.

   |rb_next()
   |ion_debug_heap_total(inline)
   |ion_debug_heap_show()
   |seq_read()

CRs-Fixed: 1000492
Change-Id: I7bc7562400df0ae08b1aa232efe00b657339fcfb
Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
8 years agodrivers: dma-removed: Don't free prohibited memmap entries
Shiraz Hashim [Mon, 11 Apr 2016 11:15:13 +0000 (16:45 +0530)]
drivers: dma-removed: Don't free prohibited memmap entries

The mm subsystem access page structs aligned to
pageblock_nr_pages and assumes that these are valid. We
must not free any memmap entries that it may inspect.

CRs-Fixed: 1000343
Change-Id: I73e0402ee72cad8df307ece1134f9e7304125cf6
Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
8 years agodefconfig: arm64: update cnss config flag
Sarada Prasanna Garnayak [Wed, 25 May 2016 14:28:45 +0000 (19:58 +0530)]
defconfig: arm64: update cnss config flag

The cnss platform driver compilation config flags
has been changed to CONFIG_CNSS_PCI to CONFIG_CNSS.

CRs-Fixed: 988871
Change-Id: Ie245ac4ad028b543916c27b015a7ba33e55958a9
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
8 years agonet: cnss: add dual cnss platform driver support for dual WiFi
Sarada Prasanna Garnayak [Fri, 11 Mar 2016 11:01:02 +0000 (16:31 +0530)]
net: cnss: add dual cnss platform driver support for dual WiFi

For dual WiFi both cnss sdio and pcie platform needs to
be enabled. Added changes below to support dual platform
driver for dual WiFi.

Refactor the common api and data structure to avoid namespace
collision compilation error. Refactor sdio and pcie bus specific
kernel api and removed conditional compilation config flag.

The platform driver at run time identifies the wlan bus type
from the PHY device pointer passed by the wlan driver through
vos api and cnss platform driver redirects the cnss api according
the bus type.

Remove conditional compilation flag from cnss common api and
update cnss makefile for dual platform driver compilation
with single config flag.

CRs-Fixed: 988871
Change-Id: I8205c2979c857c2f3845ba2dc397d2f9dd1afa3b
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
Signed-off-by: Ryan Hsu <ryanhsu@codeaurora.org>
8 years agonet: cnss: remove redundant and dead code from platform driver
Sarada Prasanna Garnayak [Wed, 20 Apr 2016 14:42:15 +0000 (20:12 +0530)]
net: cnss: remove redundant and dead code from platform driver

The cnss subsystem restart and pm qos export API has been
refactor in respective platform driver according to the bus
type SDIO/PCIe.

Remove redundant and dead code from platform driver to avoid
the namespace collision compilation error. Refactor the recovery
work handler according to bus type. This feature adds support for
dual cnss platform driver support for dual WiFi.

CRs-Fixed: 987560
Change-Id: I0e1b5ff0e9970a40ad9d0619dcb7f8cbae241656
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
8 years agonet: cnss: add bus bandwidth support for sdio wlan module
Sarada Prasanna Garnayak [Tue, 15 Mar 2016 11:49:22 +0000 (17:19 +0530)]
net: cnss: add bus bandwidth support for sdio wlan module

Add cnss sdio platform driver support to vote for bus bandwidth
as per throughput requirement from wlan driver. The cnss sdio
platform driver export bus bandwidth api for wlan host driver.

CRs-Fixed: 990173
Change-Id: Ied2e5a78487b6f6076cd19f32c959a69050e055c
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
8 years agoNFC: CE transaction failed during system suspend
Gaurav Singhal [Fri, 20 May 2016 07:31:15 +0000 (13:01 +0530)]
NFC: CE transaction failed during system suspend

IRQ was disabled at suspend so system was not able to
wake up during CE transaction.

Even after irq was enabled we were not able to wake up in irq handler
because wakeup event was not going due to is_suspended condition.

Change-Id: I5a088230786ef780cca0a3b767ad80e7b0c69f9e
Signed-off-by: Gaurav Singhal <gsinghal@codeaurora.org>
8 years agomsm: mdss: dsi: update DSI clamp configuration for msmcobalt
Aravind Venkateswaran [Thu, 26 May 2016 23:29:40 +0000 (16:29 -0700)]
msm: mdss: dsi: update DSI clamp configuration for msmcobalt

DSI clamps need not be configured for msmcobalt since the lanes
will be maintained in ULPS or LP11 through the DSI PHY. As such,
the only required programming is to disable the propagation of
the reset signal from the ahb domain. Update the SW programming
accordingly.

CRs-Fixed: 1019289
Change-Id: I0ba4858015457c971a42233c5a5f3dec9ca25ea6
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
8 years agoARM: dts: msm: add needed resources to support DSI clamps on msmcobalt
Aravind Venkateswaran [Fri, 27 May 2016 00:08:35 +0000 (17:08 -0700)]
ARM: dts: msm: add needed resources to support DSI clamps on msmcobalt

Add the register offset and the corresponding clocks to support
configuring DSI clamps on msmcobalt.

CRs-Fixed: 1019289
Change-Id: I4f9ed290416f95957b0f17424c624530f7a6794d
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
8 years agoARM: dts: msm: add spss ion heap to msmcobalt
Amir Samuelov [Sun, 29 May 2016 06:01:52 +0000 (09:01 +0300)]
ARM: dts: msm: add spss ion heap to msmcobalt

The Secure Processor Subsystem (SPSS) shall use its own ION heap
for allocation of memory shared between HLOS Applications
and SPSS Applications.

Change-Id: I05434cb559cc397c62d888e1c54c1f209765d92f
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
8 years agoARM: dts: msm: add 4k dsc panel for msmcobalt
Ingrid Gallardo [Fri, 27 May 2016 02:11:14 +0000 (19:11 -0700)]
ARM: dts: msm: add 4k dsc panel for msmcobalt

Add required settings for command mode and video
mode 4k sharp panels in msmcobalt CDP. Add panels
to the list of supported panels so they can be
selected at runtime from kernel command line.

CRs-Fixed: 1019289
Change-Id: I7e289168c04221e9e272a8c0543d66af0e233450
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
8 years agoiio: adc: Add round robin ADC driver
Siddartha Mohanadoss [Mon, 23 May 2016 19:16:57 +0000 (12:16 -0700)]
iio: adc: Add round robin ADC driver

Round robin ADC (RRADC) driver provides an interface to enable
clients to read ADC values from the RRADC controller. The ADC
values are updated in a round robin sequence among the enabled
channels.

Clients include reading voltage, current and temperature channels
such as battery ID, battery thermistors, skin temperature,
PMI die temperature, charger temperature, USB_IN and DCIN voltage
and current.

Change-Id: I927c0f6a7db654880d951729996a27310f6628cf
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
8 years agoARM: dts: msm: add mnoc_ahb clock for DSI device on msmcobalt
Aravind Venkateswaran [Thu, 26 May 2016 21:23:48 +0000 (14:23 -0700)]
ARM: dts: msm: add mnoc_ahb clock for DSI device on msmcobalt

mnoc_ahb clock should be enabled prior to enabling the mdss_ahb
clock for any register access in the DSI domain.

Change-Id: I19bd72aebd9f82596dc04fe4b3179c81ab3c162d
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
8 years agomm: swap_ratio: bail out if there aren't any other swap device
Vinayak Menon [Tue, 22 Mar 2016 09:11:57 +0000 (14:41 +0530)]
mm: swap_ratio: bail out if there aren't any other swap device

It is pointless to calculate the swap ratio when there is only
one swap device in the group. Moreover the existing code would
result in a spinlock recursion because of not taking this into
consideration. Interestingly, this check is already performed
in swap_ratio_slow by this piece of code

if (&(*si)->avail_list == plist_last(&swap_avail_head)) {
/* just to make skip work */
n = *si;
ret = -ENODEV;
goto skip;
}

But there is window where we drop the swap_avail_lock before
invoking swap_ratio() and take it back again in swap_ratio_slow.
In this period the si can get removed from swap_avail_head,
resulting in the failure of above logic. So recheck again.

Similarly, bail out from swap_ratio() if the sysctl is disabled,
and thus avoiding overhead of taking unnecessary locks.

Change-Id: I81a9dd61d24b7da55d5341c48a1f71d2b4b1978d
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
8 years agomm: vmscan: fix the page state calculation in too_many_isolated
Vinayak Menon [Fri, 26 Dec 2014 13:59:41 +0000 (19:29 +0530)]
mm: vmscan: fix the page state calculation in too_many_isolated

It is observed that sometimes multiple tasks get blocked in
the congestion_wait loop below, in shrink_inactive_list.

(__schedule) from [<c0a03328>]
(schedule_timeout) from [<c0a04940>]
(io_schedule_timeout) from [<c01d585c>]
(congestion_wait) from [<c01cc9d8>]
(shrink_inactive_list) from [<c01cd034>]
(shrink_zone) from [<c01cdd08>]
(try_to_free_pages) from [<c01c442c>]
(__alloc_pages_nodemask) from [<c01f1884>]
(new_slab) from [<c09fcf60>]
(__slab_alloc) from [<c01f1a6c>]

In one such instance, zone_page_state(zone, NR_ISOLATED_FILE)
had returned 14, zone_page_state(zone, NR_INACTIVE_FILE)
returned 92, and the gfp_flag was GFP_KERNEL which resulted
in too_many_isolated to return true. But one of the CPU pageset
vmstat diff had NR_ISOLATED_FILE as -14. As there weren't any more
update to per cpu pageset, the threshold wasn't met, and the
tasks were blocked in the congestion wait.

This patch uses zone_page_state_snapshot instead, but restricts
its usage to avoid performance penalty.

Change-Id: Iec767a548e524729c7ed79a92fe4718cdd08ce69
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
8 years agoion: msm: add Secure Processor heap id
Amir Samuelov [Sun, 29 May 2016 05:59:42 +0000 (08:59 +0300)]
ion: msm: add Secure Processor heap id

The Secure Processor Subsystem (SPSS) shall use its own ION heap
for allocation of memory shared between HLOS Applications
and SPSS Applications.

Change-Id: I4345d14dc22ddbdc34ff98b7b16719ba760951df
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
8 years agoarm64: defconfig: update config options for msmcortex_defconfig
Satya Durga Srinivasu Prabhala [Thu, 26 May 2016 02:59:07 +0000 (19:59 -0700)]
arm64: defconfig: update config options for msmcortex_defconfig

Disable unnecessary options like KSM, ATA, VIRTUALIZATION etc.,
and enable options like IRQ_TIME_ACCOUNTING, CGROUPS, ZRAM etc.,
to match with msm_defconfig.

CRs-Fixed: 1021169
Change-Id: I11143ca9beae526c80c8b94a81c2369a7c489d11
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
8 years agomsm: mdss: dsi: enable additional clocks for register access on msmcobalt
Aravind Venkateswaran [Thu, 26 May 2016 20:58:52 +0000 (13:58 -0700)]
msm: mdss: dsi: enable additional clocks for register access on msmcobalt

MMMS mnoc_ahb clock needs to be enabled prior to enabling the mdss_ahb
clock on msmcobalt as there is a core fsm dependency between these
clocks.

Change-Id: I475b44619b68e731abc8b1a91a214c6cdf8cfc5e
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
8 years agodefconfig: msmcortex: Enable performance driver
Tapas Kumar Kundu [Fri, 27 May 2016 22:17:16 +0000 (15:17 -0700)]
defconfig: msmcortex: Enable performance driver

This module provides support to userspace entity for hotplugging
and setting cpufreq policy min/max limits. It can also detect
cpu/io workload and notify userspace via sysfs nodes.

A userspace entity can specify a CPU mask and the number of CPUs
it wants online within that mask and this module will try to make
a best effort to keep those many CPUs online. Userspace can also
specify the min and max limits on CPUs instead of writing to the
scaling_min/max nodes from sysfs so that if any CPU is offline
this module maintains a vote for it which is applied
once the CPU comes back online.

A userspace entity can also set threshold value in sysfs nodes of
this module for cpu/io workload detection and this module can notify
userspace entity when that crietia is met via sysfs nodes.

Change-Id: I2c92b689ae49af85489dbf9a6aef196f4f6abf4b
Signed-off-by: Tapas Kumar Kundu <tkundu@codeaurora.org>
8 years agomsm: ipa: add support for SMMU fastpath
Skylar Chang [Thu, 26 May 2016 22:17:06 +0000 (15:17 -0700)]
msm: ipa: add support for SMMU fastpath

Add support for SMMU fast path configuration to allow
efficient buffer DMA mapping/unmapping.

CRs-Fixed: 1014404
Change-Id: Iaaa373db29d8b53e93ae1d3bf455ee066ed90dfd
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
8 years agodefconfig: msmcortex: enable QPNP temperature alarm driver
David Collins [Mon, 23 May 2016 22:20:20 +0000 (15:20 -0700)]
defconfig: msmcortex: enable QPNP temperature alarm driver

Enable the QPNP temperature alarm driver so that software can
monitor the PMIC die temperature of the PMICs found on MSMCOBALT
boards.

Change-Id: I5c9e0bcb5bb7646a720c32af0b15ca5fa2e36b8f
CRs-Fixed: 1019272
Signed-off-by: David Collins <collinsd@codeaurora.org>
8 years agoARM: dts: msm: add TEMP_ALARM device for PMIC PM8005
David Collins [Fri, 20 May 2016 23:44:21 +0000 (16:44 -0700)]
ARM: dts: msm: add TEMP_ALARM device for PMIC PM8005

Add a temperature alarm device for the PM8005 PMIC in order to
monitor the PMIC die temperature.

Change-Id: If0a02f211243a6c8f9c771f20590c0251726425b
CRs-Fixed: 1019272
Signed-off-by: David Collins <collinsd@codeaurora.org>
8 years agoARM: dts: msm: add IPA ram mapping for msmcobalt
Gilad Landau [Sun, 15 May 2016 12:13:08 +0000 (15:13 +0300)]
ARM: dts: msm: add IPA ram mapping for msmcobalt

Add an array of unsigned integers representing addresses and sizes which
are used by the IPA driver to access IPA RAM.

Signed-off-by: Gilad Landau <glandau@codeaurora.org>
Change-Id: I02b72e8c16416ea08b143609e9b16196fb3a2879

8 years agomsm: mdss: update licence for external display header to GPLv2
Vishnuvardhan Prodduturi [Fri, 27 May 2016 09:18:14 +0000 (14:48 +0530)]
msm: mdss: update licence for external display header to GPLv2

Update the license for external display header file to GPLv2.

Change-Id: I3743cefdf2469f05535f73691da0939dcddf6d83
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
8 years agocoresight-dummy: add dummy source driver support
Shashank Mittal [Wed, 25 May 2016 23:43:04 +0000 (16:43 -0700)]
coresight-dummy: add dummy source driver support

Add dummy Coresight source driver. This driver can be used for devices
that are controlled by other subsystems but rely on Linux drivers to
configure rest of the trace path.

Change-Id: I7b68202fc6d7958fcf7ff933d7eed7e19c958ab0
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
8 years agodiag: Fix for possible memory corruption
Manoj Prabhu B [Wed, 23 Mar 2016 05:57:58 +0000 (11:27 +0530)]
diag: Fix for possible memory corruption

When peripheral supporting more ssids than apps
in a given table entry needs reallocation.
No reallocation causes slab-out-of-bounds reads seen as
bad access/memory corruption.
This patch fixes memory availability limitation.

KASAN Report
27.044086:<6> ===========================================================
27.044108:<6> BUG: KASAN: slab-out-of-bounds in
diag_cntl_process_read_data+0xeb0/0x10d4 at addr 0xffffffc033997e6c
27.044112:<6> Read of size 4 by task kworker/u8:9/671
27.044117:<6> ===========================================================
27.044123:<6> BUG kmalloc-128 (Tainted: G B W):kasan: bad access detected
27.044126:<6> -----------------------------------------------------------
27.044136:<6> INFO: Allocated in d
iag_create_msg_mask_table_entry+0x10c/0x148 age=1444 cpu=3 pid=1
27.044147:<6> alloc_debug_processing+0x118/0x170
27.044153:<6> __slab_alloc.isra.20.constprop.22+0x2a4/0x3a0
27.044159:<6> __kmalloc+0xe8/0x27c
27.044165:<6> diag_create_msg_mask_table_entry+0x108/0x148
27.044170:<6> diag_masks_init+0x30c/0xa1c
27.044184:<6> diagchar_init+0x624/0xa4c
27.044190:<6> do_one_initcall+0x250/0x278
27.044198:<6> kernel_init_freeable+0x1c4/0x268
27.044207:<6> kernel_init+0x10/0xd8
27.044212:<6> ret_from_fork+0xc/0x30
27.044219:<6> INFO: Slab 0xffffffba47b79720 objects=16 used=16 fp=0x
(null) flags=0x4080
27.044224:<6> INFO: Object 0xffffffc033997e00 @offset=7680
fp=0xffffffc033997c00
27.044232:<6> Bytes b4 0xffffffc033997df0: 5a 5a 5a 5a 5a 5a 5a 5a 5a
5a 5a 5a 5a 5a 5a 5a  ZZZZZZZZZZZZZZZZ
27.044238:<6> Object 0xffffffc033997e00: 1f 00 00 00 1f 00 00 00 1f
00 00 00 1f 00 00 00  ................
27.044244:<6> Object 0xffffffc033997e10: 1f 00 00 00 1f 00 00 00 1f
00 00 00 1f 00 00 00  ................
27.044249:<6> Object 0xffffffc033997e20: 1f 00 00 00 1f 00 00 00 1f
00 00 00 1f 00 00 00  ................
27.044255:<6> Object 0xffffffc033997e30: 1f 00 00 00 1f 00 00 00 1f
00 00 00 1f 00 00 00  ................
27.044260:<6> Object 0xffffffc033997e40: 1f 00 00 00 1f 00 00 00 1f
00 00 00 1f 00 00 00  ................
27.044266:<6> Object 0xffffffc033997e50: 1f 00 00 00 1f 00 00 00 1f
00 00 00 1f 00 00 00  ................
27.044271:<6> Object 0xffffffc033997e60: 1f 00 00 00 1f 00 00 00 1f
00 00 00 00 00 00 00  ................
27.044277:<6> Object 0xffffffc033997e70: 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00  ................
27.044283:<6> Redzone 0xffffffc033997e80: cc cc cc cc cc cc cc cc
                      ........
27.044288:<6> Padding 0xffffffc033997fc0: 5a 5a 5a 5a 5a 5a 5a 5a
5a 5a 5a 5a 5a 5a 5a 5a  ZZZZZZZZZZZZZZZZ
27.044294:<6> Padding 0xffffffc033997fd0: 5a 5a 5a 5a 5a 5a 5a 5a
5a 5a 5a 5a 5a 5a 5a 5a  ZZZZZZZZZZZZZZZZ
27.044299:<6> Padding 0xffffffc033997fe0: 5a 5a 5a 5a 5a 5a 5a 5a
5a 5a 5a 5a 5a 5a 5a 5a  ZZZZZZZZZZZZZZZZ
27.044305:<6> Padding 0xffffffc033997ff0: 5a 5a 5a 5a 5a 5a 5a 5a
5a 5a 5a 5a 5a 5a 5a 5a  ZZZZZZZZZZZZZZZZ
27.044315:<6> CPU: 1 PID: 671 Comm: kworker/u8:9
Tainted: G    B   W  3.18.20-g2c703ee #2
27.044319:<6> Hardware name: Qualcomm Technologies, Inc.
MSM 8996 v3.0 + PMI8994 MTP (DT)
27.044332:<2> Workqueue: DIAG_SOCKMODEM_CNTL socket_read_work_fn
27.044335:<6> Call trace:
27.044343:<2> [<ffffffc00008a168>] dump_backtrace+0x0/0x1c4
27.044350:<2> [<ffffffc00008a33c>] show_stack+0x10/0x1c
27.044359:<2> [<ffffffc00129a850>] dump_stack+0x74/0xc8
27.044366:<2> [<ffffffc000213d8c>] print_trailer+0x19c/0x1b0
27.044372:<2> [<ffffffc000214788>] object_err+0x3c/0x50
27.044378:<2> [<ffffffc000219918>] kasan_report+0x34c/0x504
27.044385:<2> [<ffffffc000218928>] __asan_load4+0x20/0x74
27.044392:<2>[<ffffffc0006f1594>] diag_cntl_process_read_data+0xeac/0x10d4
27.044399:<2> [<ffffffc0006e67f0>] diagfwd_cntl_read_done+0x78/0xf0
27.044407:<2> [<ffffffc0006e7b38>] diagfwd_channel_read_done+0x154/0x184
27.044414:<2> [<ffffffc0006ebdd4>] diag_socket_read+0x480/0x534
27.044420:<2> [<ffffffc0006e85cc>] diagfwd_channel_read+0x348/0x368
27.044427:<2> [<ffffffc0006eabc4>] socket_read_work_fn+0x20/0x30
27.044437:<2> [<ffffffc0000cabf8>] process_one_work+0x394/0x64c
27.044444:<2> [<ffffffc0000cbfb8>] worker_thread+0x3bc/0x550
27.044450:<2> [<ffffffc0000d256c>] kthread+0x180/0x194
27.044753:<6> coresight-tmc 3028000.tmc: TMC aborted
27.044765:<6> Kernel panic - not syncing: kasan: bad access detected

CRs-Fixed: 993725
Change-Id: I90a6a560900d6c1c3694cce460ae8f772dc3434e
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
8 years agoARM: dts: msm: add TEMP_ALARM device for PMIC PMICOBALT
David Collins [Fri, 20 May 2016 23:42:43 +0000 (16:42 -0700)]
ARM: dts: msm: add TEMP_ALARM device for PMIC PMICOBALT

Add a temperature alarm device for the PMICOBALT PMIC in order
to monitor the PMIC die temperature.

Change-Id: I494af44d5107603b94fb06a282246c091ebd429f
CRs-Fixed: 1019272
Signed-off-by: David Collins <collinsd@codeaurora.org>
8 years agoARM: dts: msm: add TEMP_ALARM device for PMIC PMCOBALT
David Collins [Fri, 20 May 2016 23:36:39 +0000 (16:36 -0700)]
ARM: dts: msm: add TEMP_ALARM device for PMIC PMCOBALT

Add a temperature alarm device for the PMCOBALT PMIC in order
to monitor the PMIC die temperature.

Change-Id: Ifaf2980cfc38083f450fa383d9c91777d2297415
CRs-Fixed: 1019272
Signed-off-by: David Collins <collinsd@codeaurora.org>
8 years agothermal: qpnp-temp-alarm: add support for GEN2 PMIC peripherals
David Collins [Mon, 23 May 2016 22:53:31 +0000 (15:53 -0700)]
thermal: qpnp-temp-alarm: add support for GEN2 PMIC peripherals

Add support for the TEMP_ALARM GEN2 PMIC peripheral subtype.  The
GEN2 subtype adds clock rate control and defines an over
temperature state with hysteresis instead of stage in the status
register.  There are two GEN2 states corresponding to stages 1
and 2.

Change-Id: Ic4ad048259eb3a356333e0529d52f39c39fc915f
CRs-Fixed: 1019272
Signed-off-by: David Collins <collinsd@codeaurora.org>
8 years agowil6210: add oob_mode module parameter
Lior David [Wed, 9 Mar 2016 08:08:17 +0000 (10:08 +0200)]
wil6210: add oob_mode module parameter

Add module parameter oob_mode. Takes effect the next time
the interface is brought up and FW is loaded. Puts the FW
in special "out of the box" (OOB) mode which is used for
diagnostics and certification.

Change-Id: I561e4ab26c8ac74d6fbcf19492b01751033b64d9
Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: 1f1a361abf73edfb94ca010c51587de378bc7c68
Git-repo: https://github.com/kvalo/ath.git
CRs-Fixed: 982931
Signed-off-by: Maya Erez <merez@codeaurora.org>
8 years agowil6210: pass is_go flag to firmware
Lior David [Wed, 9 Mar 2016 08:07:19 +0000 (10:07 +0200)]
wil6210: pass is_go flag to firmware

When starting a PCP, pass the is_go flag to firmware in
wmi_pcp_start. This flag indicates whether we started
a PCP which is also a GO(P2P group owner) or just a regular
PCP.

Change-Id: I619abba9ef6e6fda3ea5fecd5ee87652b8ef37a5
Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: b4944f2c081ea0e2fa7bc8bb510e1e6e5667f30b
Git-repo: https://github.com/kvalo/ath.git
CRs-Fixed: 982931
Signed-off-by: Maya Erez <merez@codeaurora.org>
8 years agowil6210: fix no_fw_recovery mode with change_virtual_intf
Lior David [Wed, 9 Mar 2016 08:06:12 +0000 (10:06 +0200)]
wil6210: fix no_fw_recovery mode with change_virtual_intf

When FW crashed with no_fw_recovery mode enabled, user space
could still call wil_cfg80211_change_iface quickly to change
interface type, and this would cause recovery to proceed and
FW crash logs may be lost.
Fix this problem by not resetting the FW in case no_fw_recovery
is enabled.

Change-Id: I139a5e846555e30666f96675400c6db6e1999e05
Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
git-commit: 375a173fc1524eb569c7e8f9cf331126a9d29033
Git-repo: https://github.com/kvalo/ath.git
CRs-Fixed: 982931
Signed-off-by: Maya Erez <merez@codeaurora.org>
8 years agowil6210: clean ioctl debug message
Lior David [Wed, 9 Mar 2016 08:30:37 +0000 (10:30 +0200)]
wil6210: clean ioctl debug message

Fix a debug message related to IOCTL that was incorrectly logged
with the MISC category, and move it inside wil_ioctl so it will
always be logged even if we call wil_ioctl from other places.

Change-Id: I3cf69b18f195e5db01a1f5832013342c9f481286
Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: 6777e71ca91ea488488362a919900488e0ade3f2
Git-repo: https://github.com/kvalo/ath.git
CRs-Fixed: 982931
[merez@codeaurora.org: fixed conflict due to android private ioctl]
Signed-off-by: Maya Erez <merez@codeaurora.org>
8 years agowil6210: fix race conditions in p2p listen and search
Lior David [Wed, 9 Mar 2016 08:02:04 +0000 (10:02 +0200)]
wil6210: fix race conditions in p2p listen and search

Fix 2 race conditions found during test runs of P2P discovery:
1. Because wil_p2p_cancel_listen was not protected, user space
could start a new P2P listen/search before wmi_stop_discovery
completed. This caused a crash in the firmware.
2. In P2P listen, when listen timer expires and user space calls
cancel_remain_on_channel at the same time, code could send the
cfg80211_remain_on_channel_expired notification twice.

Added protections with wil->mutex to several places that call
wmi_stop_discovery.

Change-Id: I692113c222f278d6c4d4c282b4df0e28b0933556
Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: 280ab987ef21d1c196acb3af4663a99f94d9da00
Git-repo: https://github.com/kvalo/ath.git
CRs-Fixed: 982931
Signed-off-by: Maya Erez <merez@codeaurora.org>
8 years agowil6210: P2P_DEVICE virtual interface support
Lior David [Thu, 31 Mar 2016 12:56:46 +0000 (15:56 +0300)]
wil6210: P2P_DEVICE virtual interface support

Added support for the P2P_DEVICE virtual interface. This interface
is intended for P2P management operations such as discovery and
GO negotiation. Normally it is implemented by drivers to allow
a separate interface for P2P management with its own MAC address,
but for 11ad drivers it is needed to support P2P search, since it
cannot otherwise be separated from normal scan.

Since we only support a single interface/MAC address, we can't
easily separate between primary and P2P_DEVICE interfaces.
For example when a management packet arrives we can't tell for
which interface it is intended. To work around this, we store
a pointer to the interface where the last "radio operation" was
triggered such as scan or remain on channel, and we forward
management packets and scan results to this interface.

Change-Id: Ief04b007c0507f9240d8f0b02b98fe7712213a0e
Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: 4332cac17b5c0cb80d8b99fda33a0faad3238b0e
Git-repo: https://github.com/kvalo/ath.git
CRs-Fixed: 982931
[merez@codeaurora.org: conflict in wil_cfg80211_add_iface definition]
Signed-off-by: Maya Erez <merez@codeaurora.org>
8 years agowil6210: p2p initial support
Dedy Lansky [Wed, 9 Mar 2016 07:58:45 +0000 (09:58 +0200)]
wil6210: p2p initial support

supporting p2p_find, p2p_listen and p2p_connect
Use updated cfg80211_get_bss API (additional argument)

Change-Id: I847ccd10da574bdc83c7eec8c8315c4e0d207d8b
Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Git-commit: e6d68341e7286386451adf14cebb635a52b0effe
Git-repo: https://github.com/kvalo/ath.git
CRs-Fixed: 982931
Signed-off-by: Maya Erez <merez@codeaurora.org>
8 years agoclk: msm: mdss: fix DP register configurations
Chandan Uddaraju [Wed, 11 May 2016 18:46:49 +0000 (11:46 -0700)]
clk: msm: mdss: fix DP register configurations

This change provides the below updates:

- Current DP PLL driver uses the pll_base and the base
  address for the TXn registers instead of phy_base address.
  Fix this by using the correct base address.

- Disable handoff for vco_divided_clk
  by implementing handoff function for this clock.

- Update the PLL settings to fix PLL locking issues.

CRs-Fixed: 1009740
Change-Id: Iea46c5b0482bceb841309175ede42ec3be3e20fd
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
8 years agoclk: msm: mdss: fix dp_link_2x_clk_mux clock ops for DP PLL on msmcobalt
Chandan Uddaraju [Wed, 11 May 2016 02:00:14 +0000 (19:00 -0700)]
clk: msm: mdss: fix dp_link_2x_clk_mux clock ops for DP PLL on msmcobalt

The DP link clock path in the DSI PLL has a mux clock (dp_link_2x_clk_mux)
which allows the pixel clock to be either sourced out two divider clocks.
In the current code, the ops for this mux clock is overloaded
incorrectly which results in the link clock being always sourced
out of the first divider clock. Fix this by using
the default mux clock ops for this clock.

CRs-Fixed: 1009740
Change-Id: Ie12d5ab272dbd79fe97225864c2360fdde7325a7
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
8 years agoclk: msm: clock: Add the non_local_control setting for video clocks
Deepak Katragadda [Fri, 8 Apr 2016 18:53:43 +0000 (11:53 -0700)]
clk: msm: clock: Add the non_local_control setting for video clocks

The video subcore RCGs should be force enabled during rate
scaling to workaround video firmware potentially disabling
the branch clock at the same time on MSMCOBALT.

CRs-Fixed: 1020896
Change-Id: I45a119591efc36fa05ee7009d938e596b015e70c
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
8 years agoclk: msm: clock-local2: Enable sources before force turning on RCG
Deepak Katragadda [Fri, 8 Apr 2016 18:40:58 +0000 (11:40 -0700)]
clk: msm: clock-local2: Enable sources before force turning on RCG

Make sure that the RCG parents are turned on before force enabling
it and changing its configuration.

CRs-Fixed: 1020896
Change-Id: Ia633c4dcbab62fc6a4407c5896e36a7bbef48579
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
8 years agoarm64: defconfig: update config options for msm_defconfig
Satya Durga Srinivasu Prabhala [Tue, 24 May 2016 04:39:30 +0000 (21:39 -0700)]
arm64: defconfig: update config options for msm_defconfig

update config options for msm_defconfig to match with options on 3.18.

CRs-Fixed: 1020931
Change-Id: I3223c1f335e2f0e2b2401a5cd4b961fd5279ac8d
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
8 years agodefconfig: msm8996: Enable LMH hardware and interface driver
Manaf Meethalavalappu Pallikunhi [Tue, 10 May 2016 15:25:55 +0000 (20:55 +0530)]
defconfig: msm8996: Enable LMH hardware and interface driver

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

CRs-Fixed: 1019086
Change-Id: I2d1ed8aa618c4ba8780f55fcc47add10edea3ba9
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
8 years agodefconfig: msm: Enable thermal driver for msm8996
Manaf Meethalavalappu Pallikunhi [Tue, 10 May 2016 15:22:00 +0000 (20:52 +0530)]
defconfig: msm: Enable thermal driver for msm8996

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

CRs-Fixed: 1019086
Change-Id: Ifb47f300c4e73f7816f96c061ac5c1829bcd5491
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
8 years agomsm: camera: sensor: Add support for 3B read
Rajesh Bondugula [Tue, 10 May 2016 22:16:01 +0000 (15:16 -0700)]
msm: camera: sensor: Add support for 3B read

Newer I2C slaves have 3bytes read address.
Add support to read the data from slaves that
support 3 byte address.

CRs-Fixed: 1013787
Change-Id: Ieb0a7aa1b1b5f23220854092dcc2119d29c57146
Signed-off-by: Rajesh Bondugula <rajeshb@codeaurora.org>
8 years agonet: rmnet_data: Fix use after free when sending MAP command ACK
Subash Abhinov Kasiviswanathan [Fri, 20 May 2016 23:33:13 +0000 (17:33 -0600)]
net: rmnet_data: Fix use after free when sending MAP command ACK

Following stack trace was seen while doing a data transfer

Unable to handle kernel paging request at virtual address
6b6b6b6b6b6b6ef3
pgd = ffffffc01c7c5000 [6b6b6b6b6b6b6ef3] *pgd=0000000000000000,
*pud=0000000000000000
Internal error: Oops: 96000004 [#1] PREEMPT SMP
Call trace:
[<ffffffc000f669ac>] rmnet_map_command+0x19c/0x238
[<ffffffc000f6504c>] _rmnet_map_ingress_handler+0x3c/0x264
[<ffffffc000f65500>] rmnet_ingress_handler+0x1b4/0x3a4
[<ffffffc000f65704>] rmnet_rx_handler+0x14/0x2c
[<ffffffc000d8b5ac>] __netif_receive_skb_core+0x514/0x71c
[<ffffffc000d8c270>] __netif_receive_skb+0x30/0x98
[<ffffffc000d8d3bc>] process_backlog+0xb0/0x184
[<ffffffc000d8d1f8>] net_rx_action+0xfc/0x210
[<ffffffc00016a2e0>] __do_softirq+0x1c0/0x39c
[<ffffffc00016a824>] irq_exit+0x88/0xf4
[<ffffffc0001565e8>] handle_IPI+0x340/0x4b4
[<ffffffc0001455e8>] gic_handle_irq+0xc4/0xec

This is because an invalid MAP command was received and was freed
and rmnet_data was trying to send the freed skb as an ACK. Fix this
by returning if an invalid MAP command is detected.

CRs-Fixed: 1019188
Change-Id: Ib52e6551ac67215dab2bc5770ddcf037568f8b77
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
8 years agomsm: mdss: fix amortized prefill calculations
Ingrid Gallardo [Thu, 12 May 2016 02:44:45 +0000 (19:44 -0700)]
msm: mdss: fix amortized prefill calculations

Fix wrong calculation for the amortized prefill
parameters to use destination coordiates as well
as adjust ts_count denominators for the correct
units, also make sure vsync clock is enabled.
It was causing problem when feature was enabled.

Change-Id: I62a3bd31997be05181de98307089e2a69d98ab7b
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
8 years agodefconfig: msmcortex: enable qrng drivers
Zhen Kong [Tue, 24 May 2016 18:22:32 +0000 (11:22 -0700)]
defconfig: msmcortex: enable qrng drivers

Enable qrng drivers for msmcortex

Change-Id: I1a8241c1e0a349394351be2ef98381e24f0c4ff4
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
8 years agomsm: mdss: Fix qseed3 clk calculation overflow
Abhijit Kulkarni [Wed, 25 May 2016 18:07:16 +0000 (11:07 -0700)]
msm: mdss: Fix qseed3 clk calculation overflow

Use u64 variables to store intermediate results while calculating
mdp clock for qseed3 scaling scenarios, using u32, results in overflow
and incorrect mdp clock setting.

Change-Id: I4fbc9aa1f30d36d35a9ad181185761e697cbbef7
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
8 years agoARM: dts: msm: Add v4l2 rotator node to msm8996
Alan Kwong [Tue, 17 May 2016 01:46:29 +0000 (21:46 -0400)]
ARM: dts: msm: Add v4l2 rotator node to msm8996

Add mdss_rotator node with smmu subnodes.

Change mdss_mdp to interrupt controller so rotator can receive interrupt
routed by mdp handler.

Also, reserve control 4 and writeback 0/1 and their associated mixers
for v4l2 rotator driver.

CRs-Fixed: 1017182
Change-Id: I32f312f11fcbebbff0799120448d6e8f0d9ec98d
Signed-off-by: Alan Kwong <akwong@codeaurora.org>
8 years agoARM: msm: dts: fix register dump offsets/ranges for msmcobalt
Abhijit Kulkarni [Tue, 10 May 2016 20:29:02 +0000 (13:29 -0700)]
ARM: msm: dts: fix register dump offsets/ranges for msmcobalt

Fix register offsets for top, ctl_path, qseed3 in reg-dumps for
capture of these registers in ram dump.

Change-Id: I312444176373f73f02aa0ceddf5e114a39702641
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
8 years agoARM: dts: msm: Support partial goods for msmcobalt
Abhijit Kulkarni [Mon, 23 May 2016 18:00:50 +0000 (11:00 -0700)]
ARM: dts: msm: Support partial goods for msmcobalt

Adding support in mdss and pll drivers for such hardwares where
mdss part is not functional.

CRs-Fixed: 993024
Change-Id: I32b0e57c8e958b7e5f1d647e37e46fda052b3d1e
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
8 years agosched: Aggregate for frequency
Srivatsa Vaddagiri [Tue, 12 May 2015 09:31:15 +0000 (15:01 +0530)]
sched: Aggregate for frequency

Related threads in a group could execute on different CPUs and hence
present a split-demand picture to cpufreq governor. IOW the governor
fails to see the net cpu demand of all related threads in a given
window if the threads's execution were to be split across CPUs. That
could result in sub-optimal frequency chosen in comparison to the
ideal frequency at which the aggregate work (taken up by related
threads) needs to be run.

This patch aggregates cpu execution stats in a window for all related
threads in a group. This helps present cpu busy time to governor as if
all related threads were part of the same thread and thus help select
the right frequency required by related threads. This aggregation
is done per-cluster.

Change-Id: I71e6047620066323721c6d542034ddd4b2950e7f
Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
[joonwoop@codeaurora.org: Fixed notify_migration() to hold rcu read
 lock as this version of Linux doesn't hold p->pi_lock when the
 function gets called while keeping use of rcu_access_pointer() since
 we never dereference return value.]
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
8 years agousb: pd: Update power_supply type to USB_PD after PD is established
Jack Pham [Wed, 25 May 2016 17:03:17 +0000 (10:03 -0700)]
usb: pd: Update power_supply type to USB_PD after PD is established

The USB power_supply now allows PROP_TYPE to be modified. Update it
to 'USB_PD' only after PD communication has been established. This
can happen only in a couple places:

   - in sink mode, when a source capabilities message is received

   - in source mode, when GoodCRC is received after sending the
     source capabilities message successfully

Since PD_ACTIVE=1 is required to be set, also update it in source
mode prior to sending out the capabilities, and clear it if all the
attempts fail. Remove the unreachable/dead code found there as well.

Change-Id: I77c5875ee8514395a82fac0109b7cff1d507250b
Signed-off-by: Jack Pham <jackp@codeaurora.org>
8 years agoqcom-charger: Don't automatically set USB_PD type when PD_ACTIVE=1
Jack Pham [Mon, 23 May 2016 18:15:15 +0000 (11:15 -0700)]
qcom-charger: Don't automatically set USB_PD type when PD_ACTIVE=1

The POWER_SUPPLY_PROP_PD_ACTIVE property is intended to be a flag
set whenever the PD PHY is in use. But this includes attempts to
establish communication, which may involve trying to perform a hard
reset to see if the port partner responds. Thus updating the
psy_desc.type field to 'USB_PD' right when PD_ACTIVE=1 is premature
as the port partner may not be PD-capable and it could be un-set.
Instead allow the PD driver to directly update POWER_SUPPLY_PROP_TYPE
only after it is sure PD communication has succeeded.

Change-Id: Iae6804bcb3121e0852ec5d14d0939623b97a6e67
Signed-off-by: Jack Pham <jackp@codeaurora.org>
8 years agoicnss: Add API to return the CE IRQ number
Sameer Thalappil [Tue, 8 Mar 2016 01:12:47 +0000 (17:12 -0800)]
icnss: Add API to return the CE IRQ number

API retrieves the IRQ number for the CE ID passed.

Change-Id: I87cca1215134e6d406f60d54f6d0430978eeae9c
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
8 years agomsm: kgsl: Defer adding the mem entry to a process
Jordan Crouse [Tue, 3 May 2016 20:11:03 +0000 (14:11 -0600)]
msm: kgsl: Defer adding the mem entry to a process

If we add the mem entry pointer in the process mem_idr too early
other threads can do operations on the entry by guessing the ID
or GPU address before the object gets returned by the creating
operation.

Allocate an ID for the object but don't assign the pointer until
right before the creating function returns ensuring that another
operation can't access it until it is ready.

CRs-Fixed: 1002974
Change-Id: Ic0dedbadc0dd2125bd2a7bcc152972c0555e07f8
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
8 years agodefconfig: msm: sde: Add config for v4l2 sde rotator driver.
Alan Kwong [Tue, 17 May 2016 01:45:20 +0000 (21:45 -0400)]
defconfig: msm: sde: Add config for v4l2 sde rotator driver.

Enable v4l2 sde rotator driver, a replacement for mdss rotator driver.

CRs-Fixed: 1017182
Change-Id: I6fc5f90512d8024439d56d7c72ae2160df460f7a
Signed-off-by: Alan Kwong <akwong@codeaurora.org>
8 years agomsm: mdss: Export rotator interrupt and share rotator smmu
Alan Kwong [Tue, 17 May 2016 01:43:18 +0000 (21:43 -0400)]
msm: mdss: Export rotator interrupt and share rotator smmu

Existing rotator block is serviced by fbdev rotator driver.
This change enables usermode to use external v4l2 rotator driver by
exporting rotator interrupts (WB0 & WB1) thru interrupt domain,
and share smmu access for writeback and rotator.

mdp_irq_export is only set if has_separate_rotator is specified
in device tree and MDSS version is prior to 2.0.

mdp_irq_export is set to zero otherwise, and will effectively
disable mdp irq export and will introduce only minimal overhead
to interrupt processing.  This is the default behaviour for
MDSS newer than 2.0.

CRs-Fixed: 1017182
Signed-off-by: Alan Kwong <akwong@codeaurora.org>
Change-Id: If634894768b02d124ceab071a9eca1c36f258600