wcnss: Configure WLAN MAC addr through user control interface

wcnss userspace service will use user control interface to configure
certain parameters required by wcnss driver. This interface is required
to configure the WLAN MAC address. These parameter was earlier written
thru module parameters from wcnss service, however that required the
wcnss userspace daemon to have the root permission.

Change-Id: I6e928a44c7f1f9ba7ab193c882bad102d8c2bd5a
CRs-fixed: 636953
Signed-off-by: Hardik Kantilal Patel <hkpatel@codeaurora.org>
stereo call recording support

Patch that allows for call recording in
stereo (left channel: TX; right channel:
RX). Tested on Nexus 5 (MSM8974). Likely
works on other recent MSM chipsets as
well.

Change-Id: I934c252283d1346f9c1f6cf786ce2f661f20a049
Squashed upstream CAF optimizations

msm: mdss: Program unpack pattern for pipes with solidfill

When a pipe is staged with a solidfill color, we need to also
program the correct unpack pattern for the color format. If the
unpack pattern is not specified, the corresponding color layer may
not be display correctly.

Change-Id: Ic52fe29235813faa788745dd72f82edaca2635f1
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>

msm: mdss: set pipe to solid fill when releasing it

There are cases where pipe can remain active for additional vsync after
unstaging from mixer, if this ever happens it will keep fetching from
memory. In order to avoid this, we can setup the pipe in solid fill mode
so there is no memory access after pipe is released by software and
avoid potential iommu page fault or underrun since pipe is no longer
considered for bandwidth calculations.

Change-Id: I4b5a5deda8c854c504ef523df434509fa5567186
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>

msm: mdss: Notify userspace of idle screen case

Expose two new sysfs nodes - idle_time and idle_notify - that
are used to notify userspace whenever the display is idle with
no screen updates. The idle_time node needs to be configured
with the duration in milliseconds to detect no screen updates.
The userspace app can poll on the idle_notify node to get
notifications of the idle state.

Change-Id: I7435a084ad2c928d952c5d106ff9ef92aaa385b9
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>

msm: mdss: Add update notify for backlight change in static screen

Previously, the change of backlight sysfs node value will not trigger
notify updates if display is in static screen case. This will cause
delay or wrong configuration for assertive display. This patch fixes
the above issue by adding an update notify if backlight changes when
there are no display updates.

Change-Id: I1475896214a50dc1fa71739aa751b2e626d27adb
Signed-off-by: Ping Li <quicpingli@codeaurora.org>

msm: mdss: fix race condition between shutdown thread and fb ioctl

Currently all entires into fb driver are synchronized with shutdown
context except fb ioctl context. fb ioctl is an asynchronous entry to
fb driver which can be called simultaneously from two different user
processes. Synchronize these fb ioctls and shutdown context to prevent
race condition.

Change-Id: I81ce48159fce69caabc3336d70df2bd15c4ee44b
CRs-Fixed: 640199
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>

msm: display: reduce display commit prepare waiting time

Unblock overlay_set, prepare and buffer sync ioctls when
commit thread finishes hardware programming.
Use wait_for_kickoff nstead of pan_idle for these ioctls.

Change-Id: Iefb6cbc390d2130926fdcb93688b4d92bfb26937
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Neti Ravi Kumar <ravineti@codeaurora.org>

msm: mdss: Clear the previous state of pipe during SOLID_FILL

Clear the previous state of pipe when it is being used in SOLID_FILL
operation to prevent wrong register configuration. For ex: Use case
when DMA pipe was used in BLOCK mode in previous frame, then it is
being used in LINE mode for SOLID_FILL operation in current frame.

CRs-Fixed: 655993
Change-Id: I0ed257276428b96c10a92457a16df4dfdc42c1f8
Signed-off-by: Sushil Chauhan <sushilchauhan@codeaurora.org>

msm: mdss: Don't call pan_idle for MSMFB_OVERLAY_PREPARE ioctl

We keep calling MSMFB_OVERLAY_PREPARE for each composition
cycle, even if there are no changes in params. Because of this
we can hit performance degradation due to pan idle wait.
This change removes pan_idle wait for prepare call.

CRs-Fixed: 600539
CRs-Fixed: 608848
Change-Id: Ie99f4dbc4671caf9bfbd49bd9b200c3180002d56
Signed-off-by: Radhika Ranjan Soni <rrsoni@codeaurora.org>
[media] media-device: fix infoleak in ioctl media_enum_entities()

This fixes CVE-2014-1739.

Change-Id: I15c2fe25bf4bf8ec93aadc9d430c854d8bb3c0d2
Signed-off-by: Salva Peiró <speiro@ai2.upv.es>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Revert "OC/UV interface"

This reverts commit 2b4b27cc6bafb37bb423500ea296875c2a797722.

Conflicts:

	arch/arm/configs/liquid_m8_defconfig
dts: msm8974pro: initial Krait 8974AB overclocking

Signed-off-by: Paul Reioux <reioux@gmail.com>

Conflicts:
	arch/arm/boot/dts/msm8974pro.dtsi
DTS: adjust the regulator settings to support OC

Signed-off-by: Paul Reioux <reioux@gmail.com>
dts: msm8974pro: overclocking tweak for 3.0 GHz

Signed-off-by: Paul Reioux <reioux@gmail.com>
dts: reduce OC to 2.88 GHz max

Signed-off-by: Paul Reioux <reioux@gmail.com>
dts: introduce 268MHz clock
intelli_plug: intelligent hotplug cpu driver with eco mode

Sync with faux123's latest, it's very good. :)

Signed-off-by: Paul Reioux <reioux@gmail.com>

Conflicts:

	arch/arm/mach-msm/Kconfig
	arch/arm/mach-msm/Makefile
Voltage Control: generic voltage control for DTS based kernels

Signed-off-by: Paul Reioux <reioux@gmail.com>

Conflicts:
	arch/arm/mach-msm/Kconfig
	arch/arm/mach-msm/clock-krait-8974.c
	arch/arm/mach-msm/cpufreq.c
	drivers/cpufreq/cpufreq.c

Conflicts:
	arch/arm/mach-msm/cpufreq.c
Update defconfig
Enable eco mode based on eco_mode=0/1 in cmdline
Squashed Faux powersuspend driver

powersuspend: new PM kernel driver for Android w/o early_suspend

Android early_suspend/late_resume PM kernel driver framework has been
deprecated by Google. This new powersuspend PM kernel driver is a replacement
for it and existing early_suspend drivers can be easily adapted to use this
new replacement driver

Signed-off-by: Paul Reioux <reioux@gmail.com>

powersuspend: fix logci derps :p

Signed-off-by: Paul Reioux <reioux@gmail.com>

Conflicts:
	kernel/power/Kconfig

kernel/power/powersuspend: remove userspace dependency from powersuspend

make powersuspend not depend on a userspace initiator anymore, but use a hook
in autosleep instead.

Signed-off-by: Paul Reioux <reioux@gmail.com>

kernel/power/powersuspend: add back userpace control w/ default kernel control

make kernel / userspace mode switchable

Signed-off-by: Paul Reioux <reioux@gmail.com>

kernel/power/powersuspend: default to userspace for now

Signed-off-by: Paul Reioux <reioux@gmail.com>

kernel/power/powersuspend: LCD screen on/off hooks (Yank555.lu)

- add an alternative hook for screen on / off detection in the display
  pannel driver
- sleeps  ~0.1s sooner, wakes up ~1s later then autosleep
- clean up source formatting a bit (Paul Reioux)

Signed-off-by: Paul Reioux <reioux@gmail.com>

mdss_dsi_panel.c: add powersuspend hooks

Signed-off-by: Paul Reioux <reioux@gmail.com>

Conflicts:
	drivers/video/msm/mdss/mdss_dsi_panel.c

Update defconfig
Enable advanced TCP control options and set westwood as default
m8: enable LCD KCAL sysfs support

Change-Id: I873eab08a57783972add30782160ebfa34f510ee
Revert "msm: memutils: memcpy, memmove, copy_page optimization"

This reverts commit d2de8da3fc3573eec9441edae99eb54c75758841.

Conflicts:

	arch/arm/mach-msm/Kconfig
	arch/arm/mach-msm/Makefile
msm8974: Adapt memutils optimizations from msm8960pro

Preload farther to take advantage of the memory bus, and assume
64-byte cache lines.  Unroll some pairs of ldm/stm as well, for
unexplainable reasons.

Future enhancements should include,

- #define for how far to preload, possibly defined separately for
  memcpy, copy_*_user
- Tuning for misaligned buffers
- Tuning for memmove
- Tuning for small buffers
- Understanding mechanism behind ldm/stm unroll causing some gains
  in copy_to_user

BASELINE (msm8960pro):
======================================================================
memcpy 1000MB at 5MB       : took 808850 usec, bandwidth 1236.236 MB/s
copy_to_user 1000MB at 5MB : took 810071 usec, bandwidth 1234.234 MB/s
copy_from_user 1000MB at 5M: took 942926 usec, bandwidth 1060.060 MB/s
memmove 1000GB at 5MB      : took 848588 usec, bandwidth 1178.178 MB/s
copy_to_user 1000GB at 4kB : took 847916 usec, bandwidth 1179.179 MB/s
copy_from_user 1000GB at 4k: took 935113 usec, bandwidth 1069.069 MB/s
copy_page 1000GB at 4kB    : took 779459 usec, bandwidth 1282.282 MB/s

THIS PATCH:
======================================================================
memcpy 1000MB at 5MB       : took 346223 usec, bandwidth 2888.888 MB/s
copy_to_user 1000MB at 5MB : took 348084 usec, bandwidth 2872.872 MB/s
copy_from_user 1000MB at 5M: took 348176 usec, bandwidth 2872.872 MB/s
memmove 1000GB at 5MB      : took 348267 usec, bandwidth 2871.871 MB/s
copy_to_user 1000GB at 4kB : took 377018 usec, bandwidth 2652.652 MB/s
copy_from_user 1000GB at 4k: took 371829 usec, bandwidth 2689.689 MB/s
copy_page 1000GB at 4kB    : took 383763 usec, bandwidth 2605.605 MB/s

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Simple GPU Algorithm: Initial coding for devfreq based Adreno Drivers

This is an open source user configurable simple GPU Control Algorithm used to
replace the closed sourced Qualcomm TrustZone GPU controller

Signed-off-by: Paul Reioux <reioux@gmail.com>

Conflicts:
	drivers/devfreq/Kconfig
	drivers/devfreq/Makefile

Conflicts:
	drivers/devfreq/Kconfig
	drivers/devfreq/Makefile