Avoid ov set failures in rapid wfd pause/resume

* Avoid overlay set failures on receiving rapid wfd
pause/resume events.

* Go for videoOnlyComposition when isConfiguring is
set for external/virtual display and secure video
playback is happening instead of falling back to GPU
for composition.

* When external/virtual display is in pause state
and secure playback is happening, go for
videoOnlyComposition instead of full/partial MDP
compostion since the pipes connected to external mixer
will take atleast two vsync cycles to get unset.

* When requesting for an overlay pipe from pipebook,
give preference to the pipe which has already been
allocated to the required LayerMixer in the previous
round.

* Sometimes displayhal receives consecutive wfd-pauses
or wfd-resumes. Add a sanity check to avoid handling
unnecessary wfd pause/resume

Change-Id: Ie0cc835d921f303e1c731c70ae066c375052e5f9
Merge "Avoid ov set failures in rapid wfd pause/resume"
hwcomposer : Fix copybit render buffer fence usage.

Fixing array size to hold fence fd to count of render
buffers used in copybit, and use it to store
fence of corresponding render buffer at the index.

Change-Id: Ic5e7f264c2a81ded2a0f61ef138e59a093b0023a

Conflicts:
	libhwcomposer/hwc_copybit.cpp
Initial msm8x64 memory tracker HAL

Reads memory info from kgsl to track unaccounted for GL and ION
memory.  Right now it has to parse every allocation and then
cross-reference it against /proc/pid/smaps.  It would be faster
to modify the kgsl driver to keep counters that could just be
read directly.

Bug: 10294768
Change-Id: Icb17558f03ce53bc594fbee097e51fe82e15dc31
libmemtrack: Add correct target information

- Add correct target information to make file
- Remove incorrect target names in the src files
- replace sprintf(banned api) with snprintf

Change-Id: I846ff3d5dcc5acc843c2c83506deafadd30b4942
Merge "Initial msm8x64 memory tracker HAL"
Merge "libmemtrack: Add correct target information"
libgralloc: correct assigment of HAL_PIXEL_FORMAT_RGBA_8888

- assign correct gralloc format when format is
  HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED and usage is
  GRALLOC_USAGE_HW_COMPOSER.

Change-Id: I741504d54694ac061ecd6c870cb8f815cc61ab24
CRs-Fixed: 583142
Merge "libgralloc: correct assigment of HAL_PIXEL_FORMAT_RGBA_8888"
hwc: Do not use fb handle in hwc_prepare

Do not use fb handle in prepare. Use displayFrame for dimensions,
align them and hardcode format

Change-Id: I5c494a74a807d3a52a1c88257494b58c583700f5

Conflicts:
	libhwcomposer/hwc.cpp
	libhwcomposer/hwc_fbupdate.cpp
	libhwcomposer/hwc_fbupdate.h
Merge "hwc: Do not use fb handle in hwc_prepare"
libhwcomposer: Fence FD Count not handled for CACHED layer

- Fence FD count should not be incremented for CACHED layer

Change-Id: Ie6670bd44d2ff3ee180ee8413bf81154ee122c43
Donot compose layers if external is in pause state

* Donot compose external/virtual layer-list when
when external/virtual is in pause state.
* Marking the layers for GPU composition when external/virtual
is in pause state would update FB_TARGET layer which inturn would
affect partial mdpcomp after resume.

Change-Id: Id2806bd7156085c00158a31dff3c3dc4c2b61146
Merge "Donot compose layers if external is in pause state"
Merge branch 'kk_2.7_rb1.15' of git://codeaurora.org/platform/hardware/qcom/display into cm-11.0

Change-Id: I788b122832c65883aba6fd21e14aac67f083ed76
Merge "libhwcomposer: Fence FD Count not handled for CACHED layer"
Merge "hwcomposer : Fix copybit render buffer fence usage."
Merge branch 'kk_2.7_rb1.17' of git://codeaurora.org/platform/hardware/qcom/display into cm-11.0
HWC: Fix for use int reference in function call

To use the integer reference, declared integer
variable to get value directly in that variable.

Change-Id: I1fd1a45580be99dd95ccbc3495e28455a4c7de23
hwcomposer : Fix rotator fence for FB pre rotation.

Add framebuffer to rotator map data structure if
rotator is used for pre rotating framebuffer.

Change-Id: I496656c22b289b0bb0bf8c49056384a7fad3ac7d
CRs-fixed: 569696

Conflicts:
	libhwcomposer/hwc_fbupdate.cpp