libcopybit: protect all c2d copybit API's

- Each client API exposed by the copybit C2D needs
  to be protected.
- Add protection for clear_copybit and blit_copybit
- This is needed as clear_copybit was overriding the
  mapped gpuaddr while copybitwaitthread was waiting
  for transaction to finish and unmap
- After waitforTimestamp, the new addresses were
  unmapped leading to GPU Page fault

Change-Id: Ieeac10e73b05d3b47e602b2de4b4e64892737c9c
CRs-fixed: 470430
Merge "libcopybit: protect all c2d copybit API's"
qcom_display: add TARGET_PROVIDES_LIBLIGHT

Change-Id: Ifa4984a3dc4b938fb89d6c65c8cda931d643f3c6
Only build CAF display variant when requested.

Change-Id: I273b9e16afa011445e185fdaf1e7cf2f029b077c
Update include paths

Change-Id: I463eb0a6693ec5da41118f132d8dcdb0d11e4be8
overlay: Bring back debug.mdpcomp.maxlayer

 * We're having underrun issues with 4-layer composition. It generally
   works, but when the system CPU ramps down and the device is mostly
   idle, underrun is happening.
 * Limiting to 3 layers solves the problem temporarily on these devices.
 * Readd the option so that the issue can be debugged without afflicting
   our current users with massive amounts of flickering.

Change-Id: I7ab7d013f65eaf12a3d21a91229dcaad6a815069
hwcomposer: 7x30: disable overlays for video playback

check MDP revision and disable overlays for video playback usecase
on 7x30.

Change-Id: I8b179512b4aff136834dd80e4da7227a6b2aff4e
liboverlay: Use camera heap for targets without mm heap.

for 7x30 MM heap is not available. Use camera heap instead.

CRs-fixed: 407303
Change-Id: Ie94937fb59c40b49d7f5bb30d12b4ddea497a6fc
libcopybit: Use CM standard QCOM naming.

Change-Id: Ide4c8d36743fc23f2711e010a8f031f1bb0b7c6f
display: Add support for MDP 4.1

 * MDP 4.1 does not support the borderfill pipe and the baselayer logic
   should not be used.
 * Only use 3 pipes for MDP 4.1.

Change-Id: Ide542079902f35818300619f8eefd3d188342b5d
gralloc: Add TARGET_USES_QCOM_BSP flag for non-AOSP features

 * Also add additional ifdefs for metadata feature.

Change-Id: Iba1430a34a7123a7bcda3bf89ea2a0deb85fb334
Fix ION_IOC_MAP error on old ion api during drm video playback

Video playback in the Google Play Video app would
result in an ION_IOC_MAP invalid argument error and
the app to display error 22.

This fixes some old ion api code left out with the
"display: Reconcile display HALs" commit which resulted
in the invalid arugment or an out of memory error.

This was found using a Nexus 4 (mako) and the Google Play Movies
app while attempting DRM video playback.

Change-Id: I2f7724515cbb7449086611fb79d042ea71d6eb39
qcomBSP:  put check on new ionalloc

* prevent compile error when trying to init the same thing over
Tiny changes to support media codecs with vanilla driver.

Change-Id: I5415b6af1b13c4d9e95dfe4199325274b1d0f3eb
gralloc: Let gralloc_priv.h be overloaded by device trees

Adjustments to private_handle_t may be necessary for device-specific
blob compatibility, so don't enforce usage of the local header

Change-Id: I588ca59ed76b1a063a4b663ac2c98589865b7738
display: Conditionally restore genlock support

 * Enable genlock support when QCOM_BSP is not defined, as older drivers
   still depend on it.

Change-Id: Idd1df589516534a683e0fa1ef0cfbb7f0e411f67
copybit: Fallback to SF heap when IOMMU isn't available

Change-Id: I0baa43a84fa12f8dbde8e958f1bb37f7a46f388b
Revert "overlay: Use correct downscale for rotator."

 * This breaks 1080p -> 720p rotator-assisted downscale.

This reverts commit e129e660aa7efd2b7d6d9ff32d790e45be8f1c6a.
Revert "gralloc: Align protected allocations with the spec"

This reverts commit 77f89bea0145f67588ca95b2f55c52b393f70f60.
hwc: Fix the copybit threshold comparison

Change-Id: Ife9d54d4592e2427e8de6e67b4c8f62b676b2679