Revert "hwc: call eglSwapBuffers even when there is no list"

This reverts commit 7b060c9cab2553f39ff18b7bfad652146afecbdf.
*causes blank draws, revisit someday
hwc: qbuf: Add API to unlock all

Add API to unlock all current and previous buffers.
This is essential in suspend cases.

CRs-fixed: 382332

(cherry picked from commit d24eb9e70480f89561108078f68cbbd9b20e4bb5)

Change-Id: I54fcded7cabc79d991d4b28a248867d860ec6b08
copybit : Add support for NV12_ENCODABLE format

Change-Id: I7087dcad2238a3c35cc15c28d75b76a9e3ca6718
display: Add binder interface between hwcservice and its clients.

Add hwc_service.cpp and ihwc.cpp file to enable direct communication
to hwcomposer by the clients to set hwc system wide properties.

Create hwcomposer service singleton object in hwc_context_t structure.

Change-Id: I0d0879475951a618a453a23ee254ea651e8c6b88
libhwcomposer: Support swap interval zero

Change-Id: I4732263c86bb28b4c7135bad9768b8690f7f60e0
hardware/qcom/display: tile rendering with fbo boundaries

support for application tiling  with fbo boundaries

Change-Id: I1f4abb5a386847c965518b58cb13966defcf7670
hwcomposer: Handle MPQ WFD support

    1. Code clean up to handle WFD feature

Change-Id: I36170c3424f9250dc39c2c249a757d508b2abdfa
hwcomposer: Make file changes

create separate lib for hwcexternal and ihwcservice

Change-Id: Ie55b9e98eaf62d4aa2cb9f422a75f8195bfd6060
display: Copyright Fix

Add Copyright information to the top of the added new files.

Change-Id: Ifd878445ef6b89120f761d51254ab2a553b6a6c3
libgralloc: Add support to custom buffer sizes.

Init allocSize hook function with alloc_size function

CRs-fixed: 379299
Change-Id: I514d47928f10b6c41404aa19d8b704f64327211b

Conflicts:
	libgralloc/gpu.cpp
hwc/fb/overlay: wait for fbpost and pan display

Draw sequence in hwc_set
--eglSwapBuffers
--wait for fb_post. Its ok to draw to External only at this point.
--draw to external   | Parallel with PAN
--commit to external | Parallel with PAN
--wait for pan (happening in fb_post) to finish.

Call MSMFB_OVERLAY_SET ioctl only when params change.

These thing together ensure a correct sequence and should fix tearing and
stuttering, the latter assuming there are no other display pipeline delays.

Change-Id: Ibb0ad8485fa6b30dc6ac07ae8b25a760941c08ce
(cherry picked from commit c50c90863e41e31ecfe6963396b5def35e9dca34)
libqdutils::Replace USE_MDP3 with getMDPVersion() method

Change-Id: Id602c8ab8d8ba140a379ba0e475c73806d17b527
libqdutils::Add support for qcomuiClearRegion

Add support for qcomuiClearRegion for draw
wormhole regions via CPU.

* Added separate singaltone class for getting
eglGetRenderBufferANDROID handle that can be
used by both copybit and clear_regions modules

CRs-Fixed: 383115

Change-Id: Ibeb5bdda87a60950889416e5b4d53e6eb5a3682e

Conflicts:
	libqdutils/Android.mk
liboverlay: Adjust values to align with MDP requirement

For YUV only:
Crop rectangle (src_rect) needs to be even for x/y and w/h
Destination dst_rect w/h need to be even (x/y can be odd).

Change-Id: Ib0c1b7d31773e71d60f080b4beacaa68e32a990e
hwcomposer: delay starting the uevent thread

- There is a race condition window between initializing hwcomposer as a
  whole and registering callback functions for when the uevents arrive. We
  can fix this issue by delaying the uevent thread kick off until the
  callback functions are registered.
- Add thread name to uevent thread

Change-Id: I30e23b411b92b6578f186b641f562462a8f23179
hwcomposer : Disable bypass, when connected to external display

disable bypass, when connected to external display

Change-Id: I57edc8fc1b9254b3c60c229aabb2515f320c9de4
display : Do not use copybit for composition when YUV layer is present.

Do not use copybit for composition when YUV layer is present only in
overlay targets & use copybit in non-overlay targets.

CRs-Fixed : 385992
Change-Id: I671bc5f37b924160e32e900207fb81634dee0929
(cherry picked from commit 1f05b5ef18723bc73a21259ca7c5f112228a5c85)
hwc: Unlock prev. buffers in N+1th draw round.

Unlock previously locked overlay buferrs in N+1th draw round, rather than N+2th.
This is now possible because of wait for PAN.
Provides an opportunity to improve genlock behavior and makes it more ICS like.

(cherry picked from commit b3a4cd7944397565388b4e940fb41d2af8882687)

Change-Id: I48f937b77d59b31f3bf04c5a2eb35500bd5d76d6
qdutils: Add MDP v3.0.2 detection.

Change-Id: I22ad1f7fe3c2c03518e192b44f8f0f7018d8ff34
hwc: Enable MDP_BACKEND_COMPOSITION

 * Add MDP_BACKEND_COMPOSITION flag to resolve flicker

Change-Id: I3dfa680e0c74ccbac69f40dc15e014153ce0b530