SurfaceComposerClient: bring back getDisplayWidth, Height & Orientation

enable it with either ICS_CAMERA_BLOB or MR0_CAMERA_BLOB CFLAG

Change-Id: Ieb5d36ad2a87ed1f0aa28ae3afbd5d48c880d6ab
native: point includes to correct display repos

Change-Id: Idcf615de2751d373e6239ff55b659bc93ec04405
libgui: Add pre-MR2-compatible symbol for setPosition

SurfaceControl::setPosition now takes floats instead of integers as
arguments, which breaks linkability from pre-MR2 blobs. Add a direct
compatibility wrapper, since the values are treated in the same
way.

Change-Id: I0fd0708faeb4495a2dbbb659997d6500f165ec98
Signed-off-by: Arnav Gupta <championswimmer@aokp.co>
libgui: Add ICS/MR0-compatible client::createSurface constructors

Change-Id: Ia5b04d93320c65ac32a92cbd93daa6a64e6cee1c
Signed-off-by: Arnav Gupta <championswimmer@aokp.co>
libEGL: workaround for google bug 10194508

Some of device's older blobs don't have EGL_KHL_gl_colorspace extension
and need this workaround

Change-Id: I811538e7d595f18055d13ca608098c049b4cb9b9
Revert "Revert "Compatibility work around for bad graphics driver dependency.""

This reverts commit 38b657265ccc5ae45bd7860a68b0d9373b47a2f3.

Change-Id: If350d73839f1ed5e01af4299d44837e619d14d66
Revert "get rid of MemoryHeapPmem"

This reverts commit 7a7524810a0950c1c2b18014a8f1c637275165c4 and
makes MemoryHeapPmem conditioned to BOARD_NEEDS_MEMORYHEAPPMEM

Change-Id: I2f38340984ba87d6970d17ec944e3faded4132c8
exynos4: getphys implementation on buffermanager for samsung omx

Change-Id: Iee665f56aaf601479d796703db983ca5fce9c5c3
exynos4: ui: define USAGE_HW_FIMC1 to support gralloc

Source:
http://git.insignal.co.kr/samsung/exynos/android/platform/frameworks/native/commit/?h=exynos-jb&id=5179fef67cadaa10d72cfe6764629565bc9a1e4e

Change-Id: Id194446eb332869f677dfb7e94c73aa3f52ee4b0
surfaceflinger: Reimplement hwrotation

Change-Id: Ia26bb36b5b6de132af49c272c4472ad2703afbda
ui: exynos4: getphys is common

Change-Id: I1dc9c2ced0700072e7c30c8435676873b10c7026
GraphicBuffer: exynos4: set FIMC1 usage bit on samsung specific formats

Change-Id: Ia8cde7e594f8be464ef15eaae453872ee5aa2768
libui: exynos4: apply FIMC usage flag on format HAL_PIXEL_FORMAT_YCbCr_420_SP_TILED

Change-Id: I8a98e593cb60d0843e83a5e431142410e26d82e7
Sensor: Add RotationVectorSensor2

(ported from 4.1)

Some ICS apps (namely, Google Maps) expects a rotation vector to be
available. Newer devices, this is provided by either Android's
sensor fusion (requires Gyro) or by hardware sensor fusion (MPL).

Older devices will lack this virtual sensor and compass in Google
Maps will not work. To fix this, we can provide our own rotation
vector sensor by converting the values from the orientation sensor.
(They are basically the same information in different formats.)

Thanks to Unhelpful for the help with related math.

Change-Id: I39489b3a5ce7c7d890768614357f32cc491bd6d9
DisplayDevice: Backwards compatibility with old EGL

From 4.1 to 4.2, the display subsystem was reworked to
use SurfaceTextureClient/BufferQueue instead of
FramebufferNativeWindow for the framebuffer itself.

Unfortunately, some legacy EGL libraries make assumptions
that any framebuffer device will be FramebufferNativeWindow.

These EGL libraries will fail when used in 4.2 as if the
framebuffer is not FramebufferNativeWindow, they will
try to dequeue more than one buffer at a time, which
will cause a hang of the graphics subsystem.

This allows use of FramebufferNativeWindow to keep
legacy EGL implementations happy.  Confirmed EGL
implementations that need this include but are
not limited to:

Set BOARD_EGL_NEEDS_LEGACY_FB to use

Tegra2/3 ICS EGL
Mali400 ICS EGL (Allwinner A10)
Mali400 Jellybean (4.1) EGL (Samsung Exynos4)

Original implementation by OndraOrg of XDA:
http://forum.xda-developers.com/showpost.php?p=34469675&postcount=19

Change-Id: I74005cf6753b3c9bfb4c1e32fb641f5167787917
surfaceflinger: odd hw rotation (90/270) patch for swapping width/height

This patch works in addition to the following commit
re-implementing ro.sf.hwrotation:
https://github.com/CyanogenMod/android_frameworks_native/commit/7d283431efffc4402cb1a6cacf5da64729c883bb

When using values of 90 and 270 for ro.sf.hwrotation the
LCD width and height also need to be swapped to display properly.

NOTE: This patch does not fix the initial startup of bootanimation

Change-Id: Iab9de66348967a378dd73a41bc96d632f750386c
Signed-off-by: Hashcode <hashcode0f@gmail.com>
binder: Add MemoryHeapBaseIon

Source:
http://git.insignal.co.kr/samsung/exynos/android/platform/frameworks/native/commit/?h=exynos-jb&id=dc4cd25cc41e4358debd0c7d1a2706d208a58df6

Change-Id: Ib06cc37a2a25c78a061ee2bad48eec2d01b07833
dumpstate: Squash fixes from CM 10.0

commit ba3723de8d13126027706bbbe6f9657da231b9bd
Author: Mike Kasick <mike@kasick.org>
Date:   Wed Oct 31 20:31:05 2012 -0400

    dumpstate: Fix calls to su to specify a shell command

    Superuser's su requires that shell commands be specified with the "-c"
    option.  Fix calls to su to explicitly specify this option.

commit 78cd73fce82fd0b5ee98a6136c847932ba8c636b
Author: Mike Kasick <mike@kasick.org>
Date:   Wed Oct 31 18:53:58 2012 -0400

    dumpstate: Skip subsequent showmaps if the first run fails.

    dumpstate takes over six minutes to run as each call to "su" (which
    dumpstate uses opportunistically on states that require root privileges to
    access) takes approximately one second to process.

    The vast majority of these "su" calls are made to "showmap", which is
    called for every running process.  These calls nearly always fail, either
    because dumpstate is denied root access, or because "showmap" isn't
    installed.

    This greatly speeds up the dumpstate process by skipping subsequent
    "showmap" attempts if the first run (on process init) fails.

Change-Id: Ibdfa996afff541dc30251da7ab01ac4987ae2ebc
Add setOrientation back

	this is needed for some tegra ICS and JB_MR0 prebuilts
sensors: Add dummy light sensor

Some devices have a sysfs toggle for the lightsensor instead of
passing the LUX values for userspace processing; for those,
use BOARD_SYSFS_LIGHT_SENSOR:=<sysfs path>

This is necessary for the rest of userspace to recognize its existence
and toggle it for auto-brightness. It doesn't generate actual light
values, though; all backlight adjustments are made in-kernel.

Change-Id: I0e546b4740720bd34d1e1d85a96b295fcc697106

sensors: dummy ls: set unique handle

handles and types are usually the same, but it's not mandatory.
Sony DASH use custom handles, and the previous assumption broke
Proximity sensor on Sony devices.

Change-Id: I954e13765f42341e6b5393a12556f6a007c4e494