Binder: Disable attemptIncStrongHandle

The driver does not support BC_ATTEMPT_ACQUIRE and will return an error.
IPCThreadState does not handle driver errors, and will resend the failed
command blocking all other commands.

Change-Id: I643986037341821b27b62dc82df933844f4842b8
Binder: Don't cast directly from a pointer to binder_uintptr_t

When using the 64 bit binder interface from a 32 bit process the
pointer may get sign extended and cause the kernel to fail to read
from it.

Change-Id: I90fcf53880e2aa92e230a9723f9b3f7696170e32
Binder: Fix some valgrind errors.

When using 64 bit binder pointers, only initializing the 32 bit
handle, in a stack allocated struct, will pass uninitialized stack
data to the kernel and other processes.

Change-Id: I3432d9d36bb251d8ddb0a863661aeb80aabb3d92
Update EGL codegen to be in sync with frameworks/base

Patch from Takeshi Aimi with commit-id f9337377 changed
core/jni/android_opengl_EGL14.cpp in the frameworks/base.
However the corresponding code snippet in frameworks/
native was not updated. This patch addresses the issue.

Change-Id: I40bcc43d36d7ab4e0db4a73556a4f7480c7431c1
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Update GLES codegen to be in sync with frameworks/base

Patch from synergydev with commit-id 01994c79 changed
core/jni/com_google_android_gles_jni_GLImpl.cpp in the
frameworks/base. However the corresponding code snippet
in frameworks/native was not updated. This patch addresses
the issue.

Change-Id: I89c3d88de832efc8cbbe682c8a7ff7dfbef99db3
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
surfaceflinger: add BoardConfig.mk variable to force 32-bit

Individual devices may need to force surfaceflinger to compile for
32-bit if they don't have 64-bit GL libraries.

Change-Id: I3703b2f8e36e90cf125d9ed5e6318c3506861948
Merge "surfaceflinger: add BoardConfig.mk variable to force 32-bit"
Merge "Update GLES codegen to be in sync with frameworks/base"
Merge "Update EGL codegen to be in sync with frameworks/base"
Merge changes I3432d9d3,I90fcf538,I64398603

* changes:
  Binder: Fix some valgrind errors.
  Binder: Don't cast directly from a pointer to binder_uintptr_t
  Binder: Disable attemptIncStrongHandle
Use long for pointers in opengl/EGL classes

EGL classes in frameworks/base have to be updated to support
64-bit platforms. Key changes in the EGL classes include

[x] EGLObjectHandle class - EGLObjectHandle class has two public
    methods (constructor and getHandle) that assume handles are
    32-bit. They have not been changed. Instead, two new hidden
    methods (EGLObjectHandle(long) and getNativeHandle) have been
    added.

[x] EG14 class - Two public methods eglGetDisplay and
    eglCreatePbufferFromClientBuffer assume that handles are 32-bit.
    They have been changed to throw unsupported operation exception
    on non 32-bit machines. Two new methods eglGetDisplay(long)
    and eglCreatePbufferFromClientBuffer(...long buffer..) have
    been added to support 64-bit handles.

To allow the above changes in frameworks/base EGL classes,
corresponding code generation mechanism in frameworks/native has
been updated.

Change-Id: I5d0a62e10c20ccf05f610d6608b8dfb6414b5116
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Use reinterpret_cast when an integer is cast to a pointer

Change-Id: I5adcd59f58c029f7b2b596f4826d8ea69fb9bba6
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Binder: Make sure binder objects do not overlap

Fixes crashing part of bug 11355082.
The driver still leaks references.

Change-Id: Ibc6a63b151c1fc1f7666237f25255ba781e02071
Merge "Binder: Make sure binder objects do not overlap"
Merge "Use long for pointers in opengl/EGL classes"
Merge "Use reinterpret_cast when an integer is cast to a pointer"