display: Enable vsync

* Use the vsync uevents from the kernel to start
surfaceflinger composition.
* This patch also does some code cleanup
    - Move copybit specific functions to copybit files.
    - Cleanup verbose logging.
Change-Id: I8ca3cd7a7ceb53655ed0fcf39ac2cb35e6cbe890

Conflicts:

	libhwcomposer/Android.mk
	libhwcomposer/hwc_external.cpp
hwc: enable vsync for external display

- wait for hdmi vsync when connected to hdmi
- add commit to call PANDISPLAY for updating ext display
- add functions to close fb and reset info

Change-Id: Icdd3620bd9d15240a88a26a3f1bf9c07d58d011b
display: Add support for MDP Composition

This change
   1) implements MDP Composition upto 3 layers
   2) adds invalidator support to fall back to FB
      composition during idle screen condition.

Change-Id: I8d724f905c943f986b68596e2548a7f5a8ce6588

Conflicts:

	libhwcomposer/Android.mk
	libqdutils/Android.mk
display: Get panel type from framebuffer

Change-Id: I5dc16125bbb7d864dcb7106166e91b950a44d686
hwc: Disable HW vsync for some targets

7x27A, 8x25 and 8x55 do not support HW vsync yet.
This change checks for their MDP version and disables HW vsync
on them. This change should be reverted once hardware vsync is
available on these targets.

Change-Id: I0cb884f571346b3595169cb4b3c01bbdb7ecaaee
overlay: Refactor State Transitions.

Refactor transitions by templatizing to have default behavior for most cases
and full specializations for specific cases.
Partial specialization of functions is not allowed, so create templatized
intermediate functions for those use cases.
For ex: if we have 8 states, we don't need 8x8 transition handlers.

Add and define OV_DUAL_DISPLAY state.
Add a GenericPipe for subtitles to OV_2D_VIDEO_ON_PANEL_TV state.
Add a 2D_VIDEO_ON_TV state and its transitions.

Change-Id: I53b017b9a41db5894c263ccb446b7ec8875ef3aa
hwc: Add support for external-only layers

Add support for different types of external-only layers
EXTERNAL_ONLY: General purpose
EXTERNAL_BLOCK: Blocks the display of other ext-only layers
EXTERNAL_CC: Used for closed captions with videos.

Change-Id: I7cb531a55a2f0015e3a51673faf08941bcea1923

Conflicts:

	libhwcomposer/Android.mk
HDMI: Fallback to MM heap.

- IOMMU heap is not available for all targets. we should
  have a fallback heap always as IOMMU can be disabled.

Change-Id: I7e987ac69ba5e5fdd6228b50930e064a4420a472
libhwcomposer: Add C2D support to copybit

Change-Id: Icb1a010f8079bb3f2122d8520c87d60b757d73bd

Conflicts:

	libhwcomposer/hwc_copybit.cpp
liboverlay: Remove waitForVsync, getOvPipeType APIs

Remove waitForVsync support.
Vsync will be done explicitly by clients outside of overlay.

Remove support for the unused getOvPipeType API.
Remove redundant state checks in class Overlay

Change-Id: I34f00e1334bbd9fad130bdefeaf0426ebbd638a1
liboverlay: Update format translation.

Update format translation from HAL to MDP.
Add support for RGB_888, YCbCr_444_SP, YCrCb_444_SP formats.

Change-Id: I6323cd07bfe74c7cc60bf2b59dd81e2ae8a2ce27
display: Clean up gralloc

* Remove pmem and ashmem implementations
* Remove usage of RefBase
* Reduce log verbosity

Change-Id: If8ef543d236e5305bd5430f4f9c62c51b3a13787

Conflicts:

	common.mk
	libgralloc/alloc_controller.cpp
	libgralloc/pmem_bestfit_alloc.cpp