sched: provide per cpu-cgroup option to notify on migrations

On systems where CPUs may run asynchronously, task migrations
between CPUs running at grossly different speeds can cause
problems.

This change provides a mechanism to notify a subsystem
in the kernel if a task in a particular cgroup migrates to a
different CPU. Other subsystems (such as cpufreq) may then
register for this notifier to take appropriate action when
such a task is migrated.

The cgroup attribute to set for this behavior is
"notify_on_migrate" .

Change-Id: Ie1868249e53ef901b89c837fdc33b0ad0c0a4590
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
msm: vidc: enhance resolution capability check

The video firmware can support WxH as well as
HxW resolutions. Without this check, supported
video clips will be rejected as unsupported.

Change-Id: I9f4ccc89ad4d0ad56527f98c7188012508138f05
Signed-off-by: Arun Menon <avmenon@codeaurora.org>
msm: kgsl: Add fault count to snapshot debugfs

Additional faults can occur between when a snapshot is frozen
and the snapshot is read.  Keep track of the total number of
faults encountered to keep track of how the GPU is actually
doing on multi-hour test cases.

Change-Id: I392fce74e7d215aa7bd0e1a7ce5c9f340413cd53
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
ASoC:msm: Enabling TTY for VoLTE call

Enabled TTY for VoLTE call. Earlier TTY feature is not
supported for VoLTE call.

Change-Id: If5e3436504f40c3e782bf79a16547be068f6b27e
Signed-off-by: Sidipotu Ashok <sashok@codeaurora.org>
msm: camera2: Add gemini driver

Copies the driver for the Gemini JPEG hardware encoder engine from
camera_v1 to camera_v2. Resolves the introduced build errors resulting
from interface changes.

Change-Id: I3a8779b2c1e6f67f085ff919aaa3721b28bbcfc4
Signed-off-by: Kamen Kirov <kkirov@codeaurora.org>
msm: clock-mdss: Fix clock warnings during DSI panel probe

clk_set_rate is called with the incorrect rates causing
clock warnings during bootup.

Change-Id: Ica2fb94c2ec9b006dedcec1a64920bda2f8719bc
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
ASoC: wcd9xxx: adjust MBHC thresholds upon micbias source change

When ACDB has relatively high voltage in the button detection threshold,
it's possible the high voltage is higher than mic voltage during playback
since during playback mic bias's source changes to VDDIO from CFILT.
Adjust relevant thresholds upon micbias source change to avoid false MBHC
button press and release detection.

CRs-fixed: 484436
Change-Id: I1937e35d0123e642e2247ae92367b64ac31fc030
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
misc: tspp: Vote for the CX rail to workaround a HW bug

On the MSM8974V2, there is a hardware bug that requires the TSPP
driver to elevate the voltage on the CX rail before enabling the
TSIF clocks.

CRs-Fixed: 460557
Change-Id: I6a1bb0db3af86fba210dcaaa7b4b0a17cdd3d6a9
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
arm/dt: msm8974: Add the vdd-cx property to tspp only on V2

MSM8974V2 hardware requires the CX rail to be elevated to a
higher voltage before the TSIF clocks are enabled.
Add the vdd_cx-supply property to the tspp node,
allowing the msm_tspp driver to set the voltage.

Change-Id: Ia05b8d5992122c742729039203c89617aeab5afa
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
msm: camera: Ignore composite done irq 3

In dual vfe usecase, composite done irq 3 is reserved
for microcontroller to trigger scaler configuration
update. Microcontroller will read and clear the mask.
By ignoring the irq from VFE side, we avoid a race
condition where VFE clear the mask before microcontroler
read it and miss scaler configuration.

Change-Id: Iae934915e0c29c8fe6a87d6c066572165eab3512
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
msm: kgsl: Add a ftrace event for active_cnt

Add a new ftrace event for watching the rise and fall of active_cnt:

  echo 1 > /sys/kernel/debug/tracing/events/kgsl/kgsl_active_count/enable

This will give you the current active count and the caller of the function:

  kgsl_active_count: d_name=kgsl-3d0 active_cnt=8e9 func=kgsl_ioctl

Change-Id: Ic0dedbadc80019e96ce759d9d4e0ad43bbcfedd2
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm: mdss: allocate SMP blocks for worst case

SMP allocations are not shadowed at vsync, this can mean that any
changes in SMP allocation may cause unexpected behavior such as tearing
in screen. In order to avoid this, reserve enough SMP blocks for the
worst possible configuration expected for UI layers.

Change-Id: I7d50b73e91391d3729907e7353d1d3c8167c5c5d
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
msm: subsystem_restart: Bypass error ready handler when there is no PIL

If a subsystem is not loaded by PIL, return from the error ready handler
without doing the completion, since PIL doesn't powerup the modem and
there is no thread waiting on the completion.

Change-Id: I5ba30c04c751acc13d85890a4e8fe505d48b6303
Signed-off-by: Seemanta Dutta <seemanta@codeaurora.org>
msm: vidc: Add NV21 support for encoder

Encoder is now able to handle NV21 input.  Client can
configure it by setting V4L2_PIX_FMT_NV21 on the OUTPUT_PLANE as part of
VIDIOC_S_FMT.

Change-Id: If35451aae68e18ede1e33a470c925856dd0d3a3f
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
msm: smsm: Fix compile error when CONFIG_MSM_SMD isn't selected

Fix the return value of a function that currently returns NULL
(which is identified as a pointer) but is supposed to return
unsigned integer.

Change-Id: Ief97b3a1aa9640539756e88f78f6eed4e019e317
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
msm; mdss: increase max sync fence fd count

Current sync fence number is based on the maximum ammount of layers that
MDP can support, however application may send more than one fence
associated to a single layer. Increase the maximum ammount of sync
fences to allow most use cases.

Change-Id: I9b04ea7c864501433af86fe57c742634abfd7872
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
mdss: hdmi: correct timeout value

This change corrects the timeout decrement logic to enter
the error handling in case of timeout during HDCP authentication.

Change-Id: I2dabed5285768e801af27686abc26e6df19949c8
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
msm: ipc: Return -ENODEV when remote port is not found

Current implementation returns -ENOMEM when look up for a remote port
fails.

Return -ENODEV instead of -ENOMEM.

Change-Id: I7022e760631b3faaf7f1ba7952c8569905c4ee5a
Signed-off-by: Zaheerulla Meer <zmeer@codeaurora.org>
media: dvb: Fix Out-of-Band for PES type decoder filters

Demux plugin only handled OOB commands for decoder filters of type video
or PCR and secure filters.
Setting a pes filter with output other than decoder (not DMX_OUT_DECODER)
is handled as a decoder filter nevertheless in case the pes type is one
that is associated as being of decoder class (such as DMX_PES_AUDIO).
In such case the demux plugin would ignore the OOB command.
This changes corrects this behaviour.

Change-Id: Ic3d1b6d0297fa7500e599b3d3677a5941a449c61
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
msm: camera: Enhance CCI error handling

Handle all error interrupts in CCI by calling HALT followed by RESET
on corresponding CCI MASTER. Validate queue before performing I2C
read and write to ensure that queue is empty.

Change-Id: I336e6563e7430b50d41311c0e275315e87e82174
Signed-off-by: Sreesudhan Ramakrish Ramkumar <srramku@codeaurora.org>