Revert "msm_fb: Fix blending logic for formats with per-pixel alpha"

This reverts commit 337cdb74518b438f5fbfd33ebdb7507727c51857.
Revert "msm_fb: HACK: wait until completing  backlight control"

This reverts commit 6eb34281076f5efefed321161b8cd39c3367deb4.
msm_fb : Avoid wait for vsync when Timing Generator is off

Add checks for Timing Generator enable status before waiting
for vsync from it. This will avoid race conditions during
suspend-resume scenarios.

CRs-fixed: 406752

Signed-off-by: Pradeep Jilagam <pjilagam@codeaurora.org>
(cherry picked from commit 282a601efdb0a74b5f65a881f4e4b638d0ef9cee)

Change-Id: I9c0c2bf5e48f59c69c6928c15779b172e9ed2dc1
Signed-off-by: Gopal Goberu <ggober@codeaurora.org>
msm_fb: display: fix the hang issue caused by solidfill pipe

When mdp pipe solidfill mode is disabled, the staled pipe info is used
to update mdp pipe regs. This caused mdp hang. Since
mdp4_overlay_rgb_setup function already resets solidfill mode, this
patch removes any pipe register updates that are related to disabling
solidfill mode.

CRs-fixed: 467555
Change-Id: I23f4b29731c9097ab0cc38baa00cd35bc536d2ba
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
msm_fb: display: fix the underrun issue when playing interlaced videos

Interlaced videos require higher mdp clk rate and the current code
sets mdp clk to max and return. However mdp clk calculation may still
give a result higher than max mdp clk, for this case the result is
kept and used later to enable blt mode to avoid underrun.

Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
(cherry picked from commit 5dcea9b4522d3bdc1a0fe38406881b264ce074b8)

Change-Id: I0dd27c5be093fe009b161618d0f32b402558a508
Signed-off-by: Gopal Goberu <ggober@codeaurora.org>
msm_fb: call the backlight control before FB_BLANK_POWERDOWN

You might see the white line while lcd off. You should turn lcd backlight
off before lcd off to avoid that issue. So call the notifier for backlight
before handling of FB_BLANK_POWERDOWN in msm_fb.

Change-Id: I3bd08025a949ec02a1fba7cef98a13d8977c135b
msm_fb: display: fix division-by-zero bug

Panel v_back_porch could be zero for virtual panels, so the check for
zero is added to fix the bug.

Change-Id: I6a29f3d8d771092bca2374cc9a1c11dd77ad569e
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: lakshmi narayana p <lpatib@codeaurora.org>
msm_fb: Check for panel power on after Unblank.

In Overlay_play , panel power on check was at wrong place
it has to be after Unblank.

Change-Id: If910f83ef57499b5f771bc7d3d1bdfa814d5c019
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
Signed-off-by: lakshmi narayana p <lpatib@codeaurora.org>
msm_fb: display: Program source address registers correctly

Scale filter FIR uses the adjacent pixels as part of the
processing. Source address registers should be program such that
they point to the first valid pixel so that non-ROI pixels are
ignored. This is done by making source x,y offsets to zero and
adding the computed offset to source address.

CRs-Fixed: 380020
Change-Id: I998fdd46f39dc67f32c422ec209da59d1add2e95
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay.c

Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
Signed-off-by: lakshmi narayana p <lpatib@codeaurora.org>
ext4: use atomic64_t for the per-flexbg free_clusters count

commit 90ba983f6889e65a3b506b30dc606aa9d1d46cd2 upstream.

A user who was using a 8TB+ file system and with a very large flexbg
size (> 65536) could cause the atomic_t used in the struct flex_groups
to overflow.  This was detected by PaX security patchset:

http://forums.grsecurity.net/viewtopic.php?f=3&t=3289&p=12551#p12551

This bug was introduced in commit 9f24e4208f7e, so it's been around
since 2.6.30.  :-(

Fix this by using an atomic64_t for struct orlav_stats's
free_clusters.

[Backported for 3.0-stable. Renamed free_clusters back to free_blocks;
fixed a few more atomic_read's of free_blocks left in 3.0.]

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Lingzhu Xiang <lxiang@redhat.com>
Reviewed-by: CAI Qian <caiqian@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ext4: fixup 64-bit divides in 3.0-stable backport of upstream fix

Replace C division operators with div64_u64 for divides introduced in:
commit 503f4bdcc078e7abee273a85ce322de81b18a224
ext4: use atomic64_t for the per-flexbg free_clusters count

Specific to the 3.0-stable backport of the upstream patch.

Change-Id: Id10180ed16f54f58fc18531092e88f52fc6de31c
Reviewed-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
msm: timer: Don't check state of clock while setting next timer event

The commit fd6681cd4d0782f6e6ac918ab337016f59c2520b introduced
a silent bug that incorrectly checks state of the clock while
setting the next timer event. The bug manifests only during
failure code path of msm idle operation, which is very rare.
Due to the bug, the driver isn't be able to reprogram the timer
device.

CRs-fixed: 468902
Change-Id: I4ec14ea9c3a5d318ef98d2b13bd55efd89538df5
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
Update defconfigs
Revert "msm_fb : Avoid wait for vsync when Timing Generator is off"

This reverts commit 2045261de3d6b54bd127c3513906a874eaa6e5f7.
Squashed update of kernel from 3.0.72 to 3.0.73
cpufreq: interactive: Fix uninitialized spinlock

Change-Id: I9959669e0f643ccd2bd1072fae440d8c20f1c9cc
msm: qdsp5v2: Add support for variable rate in MVS driver

Add support for configuring encoder min and max rate
 as per client need.

CRs-Fixed: 367973
Signed-off-by: Vinay Vaka <vvaka@codeaurora.org>
(cherry picked from commit 40ea09e0e1195cb9fbc01ece07fe4746078dd6da)

Change-Id: Iee99e8efe653f0cc3a78b3b31b9236d0227611e2
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
Squashed update of kernel from 3.0.73 to 3.0.74
Updated defconfigs
ariesve: Restore original lcdc_gipo code