Consolidate with upstream linaro

Fixes toro master booting

Squashed commit of the following:

commit d4c44ea5327903c0619c582a7bef81f39f56df25
Merge: a3e50bf 2681052
Author: nuclearmistake <nuclearmistake@gmail.com>
Date:   Wed Apr 3 18:22:14 2013 -0400

    Merge remote-tracking branch 'linaro/linaro_android_4.2.2' into mergelinaro

    Change-Id: I553696ca095aaad099f5c491af32a1b72a913c56

commit a3e50bfbae32c3a8101751bc9fc2ccf0f93f9978
Author: nuclearmistake <nuclearmistake@gmail.com>
Date:   Wed Apr 3 18:21:37 2013 -0400

    Revert "surfaceflinger: Handle screen timeout on hw without vsync"

    This reverts commit 6149c3fc23f6cb702d82a470fb1b5f777de8f879.

commit dbe9df10f9d9b1515144f8c3de822c8553e73d5f
Author: nuclearmistake <nuclearmistake@gmail.com>
Date:   Wed Apr 3 18:21:19 2013 -0400

    Revert "DisplayDevice: Backwards compatibility with old EGL"

    This reverts commit ae415d1c5a1ec7cb1b83620ed65dd7ba8f482dac.

commit 49826626dd0f20b066f293096ccefb26b1297334
Author: nuclearmistake <nuclearmistake@gmail.com>
Date:   Wed Apr 3 18:20:45 2013 -0400

    Revert "Revert "remove support for HWC < 1.0""

    This reverts commit f59d36935358f0b176fdfff2b13855ec45ec63c8.

    Change-Id: Ib41ded3784b86ee9eceb9da02a5c4e82142c0c02

commit 2681052e412a6ddb059202babfe13b30baa6b4de
Author: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
Date:   Wed Mar 27 14:05:29 2013 +0100

    gl_code.cpp: Remove a DOS style newline

    Change-Id: Id3edd6e511371fa8b0afef2e90baed4662ed76c4
    Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>

commit a3ee2a06804b0baf8f5e6aeb984730f5259a7449
Author: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
Date:   Wed Mar 27 14:04:34 2013 +0100

    frameworks/native/opengl: Fix build with gcc 4.8

    In gcc 4.8, the warning for unused parameters (such as JNIEnv* pointers
    in JNI functions that don't need it) is enabled by default - causing
    -Werror to break the build.

    Change-Id: Ib91721f2cb9912b79c2ac19b4210b1309b08304f
    Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>

commit 991196ca2d1cc72c702fccb326a32cfcfe361650
Author: Fahad Kunnathadi <fahad.k@linaro.org>
Date:   Thu Mar 21 18:09:36 2013 +0530

    surfaceflinger: HDMI Samsung Soc Origen_quad path change

    This code changes path for vendor file copy path of
    origen_quad.

    Change-Id: I100fd7a5c3bbbd45c0c8f4019df07c8ca9a34f66
    Signed-off-by: Fahad Kunnathadi <fahad.k@linaro.org>

commit fe0871ee557ece23681448f73c62d43abbaf444c
Author: Vishal Bhoj <vishal.bhoj@linaro.org>
Date:   Thu Nov 22 07:21:51 2012 +0000

    surfaceflinger: Handle screen timeout on hw without vsync

    timeout currently at 1 second waiting for vsync. With
    this change timeout happens at 16ms.

    Change-Id: I785a2ff2bd15710c1b36466a298379adcf0ae936
    Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>

commit 9b00177d2111233679c2fc040693e7e5d17a46b5
Author: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Date:   Thu Nov 22 00:26:17 2012 +0100

    surfaceflinger: Don't crash on missing functions in hwcomposers

    Some hwcomposers -- most notably hwcomposer.default.so -- don't
    implement blank() or eventControl().
    Don't crash when trying to use them.

    Change-Id: I2b2c3e17f254e3c5e3706bd43de8a244d22a9bb6
    Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

commit fcbff967aed02a640c6fe9a4999abccbfa70b81c
Author: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Date:   Thu Nov 15 22:52:10 2012 +0100

    surfaceflinger: Work around aliasing violations

    Change-Id: I22e758390c1312e60bb4adac2365be201ba6f161
    Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

commit 652c256a249086a26735c2c801a974dac2b70141
Author: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Date:   Thu Nov 15 11:35:34 2012 +0100

    frameworks/native: Fix build with ISO C++11 compilers

    Fix macro definitions so they can't be confused with C++11 string
    literals

    Change-Id: I2856933291d08eed789188ea9be036324384e67f
    Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

commit 3fcfe8df701757c43dbe7c34ccb2e3a3a386e11a
Author: Fahad Kunnathadi <fahad.k@linaro.org>
Date:   Wed Oct 17 11:10:24 2012 +0530

    surfaceflinger: HDMI Samsung Soc Origen HDMI Enabling Code

    This code enables HDMI in origen board.

    Change-Id: I9c95b9a0aa6ed9dae077cff59104e2f95efe9327
    Signed-off-by: Fahad Kunnathadi <fahad.k@linaro.org>

commit 2a214b609a39634fd38f62570d92afa06127a338
Author: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Date:   Mon Oct 15 00:55:50 2012 +0200

    binder: Fix ABI incompatibility between older and newer compilers

    Parcel::writeString16's first parameter was a char16_t - defined to
    uint16_t somewhere else.

    With ISO C++11 compatible compilers, however, char16_t is a
    compiler-defined-type that is not necessarily unsigned.

    This causes the symbol to be different, breaking support for talking
    to binary blobs built with pre-ISO C++11-compilers, such as the
    Galaxy Nexus RIL.

    Change-Id: Ibaa57fbd7d9fc4a95649d3b45d28d29963a9548b
    Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

commit 07411782efd9bb648c5b25be68ef48841625d1bc
Author: ST-Ericsson <void@stericsson.com>
Date:   Mon Aug 20 17:20:39 2012 +0200

    Graphics: Add support for YUV bitmap formats

    Support for the proprietary YCBCR42XMB and other YUV/YVU bitmap
    formats has been added to PixelFormat and CameraParameters.

    Change-Id: I88ed8153c2f1c4f772ef3496e1d4a637154ef420
    Signed-off-by: Patrik Ryd <patrik.ryd@stericsson.com>
    Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/70893

commit 7d9a96e035edebcc59c21de0282c0234c7227163
Author: ST-Ericsson <void@stericsson.com>
Date:   Mon Aug 20 17:19:22 2012 +0200

    Remove unused NVidia egl extensions

    Change-Id: I5cb718426c4c3d261f7ef723e8d5be9b2e61b6e3
    Signed-off-by: Patrik Ryd <patrik.ryd@stericsson.com>
    Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/70892

commit 2a6e24530b5e0b4dc42f200e6b4e35042d22830e
Author: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Date:   Fri Aug 24 21:14:09 2012 +0200

    frameworks/native: Fix build in ISO C++11 mode

    Change-Id: Icc19cde1bf9c72397ed8bda545e9056483d83e8d
    Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

commit b3432c50737dc6c12cce8e8f3c70eba25dc3efa9
Author: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Date:   Fri Aug 24 11:52:53 2012 +0200

    frameworks/native: Fix build in ISO C++ 11 mode

    Fix constructs that are considered new string literals in C++ 11 mode

    Change-Id: Iadcad5f83c79e6726ca66ced5fc1e038b7587069
    Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

commit 2758b78d148b533e2dc370c99f3a785e22cd21c6
Author: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Date:   Thu Jul 12 00:33:35 2012 +0159

    frameworks/base: Make sure Singleton instantiations are exported

    This fixes using Singletons across shared library borders
    with gcc 4.7+

    Change-Id: I84b9cc99add4ace64c16e4fa8414a4fc7e4693c7
    Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>

Change-Id: I8e00fe86947c2c0ac5a79d45f5a2e506377d532b
"plugged out"? how about "unplugged"

Change-Id: Ic9ae41d7f572960176601ddf3ab661c6cb80e9ae
Reconcile with carbon

Change-Id: I20a196761d6e7097149a594d5f5b02bcc44c3aca
Forward-port surface dithering from CM10

This allows the use of 16-bit color displays without excessive color
banding; behavior can be controlled by the persist.sys.use_dithering
property.

Incorporates http://review.cyanogenmod.org/19532 from CM10 as well as
code removed in upstream commit 1b03149.

Change-Id: I290ca4ed4787dc81ac756d9af92cd6a690865a08
PROPERLY reenable forcing partial strict aliasing in flinger

Change-Id: Ia99ff01449e7a1a790f0396bda09a67231f37169
build/phone-xhdpi-1024-dalvik-heap.mk Revert AOSP heapgrowthlimit change from 64 to 96

This reverts part of AOSP change at

https://android.googlesource.com/platform/frameworks/native/+/c84e9844d621223d14178be521

Possible performance issues have arisen because of it. Discussion at

http://code.google.com/p/android/issues/detail?id=40961

Patch Set 2: Clean up commit message

Change-Id: Id7e3324607f92553a98e4d47da58a322e4fba657
A swift kick in the nards

This reverts commit f1096f9089ffbd427bf16522010bdd41dd3cb981.

Change-Id: Ifcc471cf8f77f314ae5c070d8d833efa41099f50
Merge branch 'master' into HEAD

Conflicts:
	services/surfaceflinger/DisplayHardware/HWComposer.cpp

Change-Id: Idc8d1ac7d31ec25a223cda7bf529902c37b1440d