hwc: Ensure borderfill pipe is setup only after unblank

MDP operations should not be done in blank mode. Ensure that the
borderfill pipe is configured in prepare which happens after
unblank.

Change-Id: I97e75ab732015e0f02d12a24af37e4ed86b6b090
Merge "hwc: Ensure borderfill pipe is setup only after unblank"
hwc: Reset Layer cache on idle timeout

In the case where MDP composition is possible but we fall back to
the idle timeout, there is a possibility that all of the layer
handles that were cached in the _earlier_ idle timeout are the
same in the _next_ idle timeout. This could cause us to display a
stale frame. Reset LayerCache in prepare if we are in the idle
frame.

Change-Id: I3ab1b0f28044975978a32e082976b038242697d0
hwc: Sync for rotator

Implement sync for rotator.
If a buffer is rotated, it can be used by producer soon after
rotation (and it wont have to wait until vsync).

Mdp waits for the rotator buffer's release fence to signal
to start display.

Hwc waits for previous access to rotator buffer by MDP to finish
before using it.

Change-Id: I5664806a17c44d58af62a2825ce454089fcd31cf
Merge "hwc: Sync for rotator"
Merge "hwc: Reset Layer cache on idle timeout"
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