libcopybit: Temporary buffer optimization.

Add the following optimizations for the temporary buffer:
- Initialize the temp buffer only when required.
- The temp buffer is not deallocated/released unless there is a
  change in size of the temporary buffer.

Change-Id: I833851b1feff0a7457ad6847f18a988e002d61d5
CRs-fixed: 319337
Display: Add support in libqcomui to check FB update

This change adds support in libqcomui to check if FB is updated
by a composition type

Change-Id: Ic23f24d95166cb9b1a03614f1c0fd562f321a1fd
libgralloc: Check for genlock success on all genlock calls

Change-Id: I5bb9d209f80c6b9499197cda697d1a0293b409ba
Merge "libcopybit: Temporary buffer optimization." into ics
Merge "libgralloc: Check for genlock success on all genlock calls" into ics
libQcomUI: Implement clearRegion for C2D/MDP/CPU composition.

Implement clearRegion for C2D/MDP/CPU composition. This prevents
glClear and therefore the glFinish from being called, thus
improving performance.

Change-Id: I03d9230e03cce11d9fe7e2bd34e4df8328ad2e00
Display: Use bitwise operators on HWC flags

Change-Id: I031a6510622a1e768651bcd91d3ab6f399fc81f1
liboverlay: Check the is_fg flag in checkOVState

Check the is_fg flag along with the other parameters in checkOVState.
This is done so that the is_fg flag can also be updated even if there
are no updates to the geometry.

Change-Id: I82874d01c11eb85fb444c2bdbc50f586db683481
Display/libqcomUI:Check for the clip width limit

clip width should not exceed with the render buffer width(fb0)

Change-Id: Ia927dc1e709a259910ae8f9e7d37979306eb3437
Display/libqcomUI:Choosing memset according to pixel format

For 2 bytes per pixel format the width might be not alligned to 4
So for such cases we need to use memset16

Change-Id: I22a6c673439c44447ce33faf2ed0615febd70a28
libhwcomposer: Check the number of open overlay channels

When performing the setup for bypass operations, check the number
of bypass channels that are in open state. If the count does not
match the number of bypass layers, close all the bypass channels.
This is done to prevent the overlay channels from going into an
inconsistent/undefined state.

Change-Id: If471a4b4437e25642586616461c5d745f15b3287
CRs-fixed: 323676
Merge changes If471a4b4,I82874d01 into ics

* changes:
  libhwcomposer: Check the number of open overlay channels
  liboverlay: Check the is_fg flag in checkOVState
Display/libhwcomposer:align the copybit src and dst buffer

Align the copybit source and destination buffer according
to the frame buffer pixel format.
CRs-fixed: 327687

Change-Id: I00a0a047f2f6d639202e8395d85902b821e2a65c
Display: Use new ION heaps

Use new ION heaps in gralloc
and use them in rotator

Change-Id: I4ff903fd48a90e19655a64c5a0abaeec35aa34c8
libcopybit: Disable copybit blending for opaque layers

This change disables copybit blending when surface flinger sets
HWC_BLENDING_NONE for a layer.

Change-Id: Ie86a2d5c9e3d3dab1bc7a0a3cc31bff7afe604da
gralloc: Make all pmem buffers cacheable by default

If an uncached buffer is needed from gralloc, the
client must use the flag GRALLOC_USAGE_PRIVATE_UNCACHED

Change-Id: Ie3fcfee1071a87fa0440600f4ca3e2d7ff6243ed
Overlay: Change rotator format for YV12

Change rotator output for YV12 input from CBCR_H2V2 to CRCB_H2V2.

Change-Id: I5d9711d5006dfbed5fc0b478af43e1fe673988bc
CRs-Fixed: 327956
Merge "Overlay: Change rotator format for YV12" into ics
Merge "libcopybit: Disable copybit blending for opaque layers" into ics
Refactor OverlayUI

Refactoring is necessary to attain flexibility in setting mdp overlay params
at runtime, while using composition bypass.
This change includes new APIs for setting crop rectangle, display params and
commiting mdp params, namely setCrop(), setDisplayParams() and commit(),
respectively.

Change-Id: Id57035602baabd954fd6b484be4f63fef632d74b