hwc: Add DMA pipe support in MDP composition.

This change adds support to MDP composition to use DMA pipes when
layer scaling is not needed. Also makes sure not to invoke
MDP rotator when DMA pipes are configured since MDP rotator will
expect both the DMA pipes to available for performing rotation.
In such cases, we let the first frame of rotated video frame to
fall back to FB.

Change-Id: Icf9dbd55bcc516335a8c9ede5ed0498fdd08a929
hwc: NULL check on buffer handle

In some cases it is seen that we receive a NULL handle on
suspend/resume. One such test case is open browser, suspend
device, resume device, unlock screen. Since we rely on the handle
to get the format, make sure it is not null.

Change-Id: Ia476887a831df33a50b2939a46c143b9c207ea9b
hwc: Add debug logging for fps

This is indicative of how many frames are posted to the display
by SurfaceFlinger. Set debug.gr.calcfps to 1 and restart the
framework to enable.

Change-Id: Ic503c14380fd7d8a5b062aa5da0d61bfc3991cb2
CRs-Fixed: 462010
hwc: clean up overlay on external display blank

- On suspend, SurfaceFlinger calls hwc_blank on primary and
  external separately, inbetween these calls there might be a
  update, which leads to acquiring overlay pipes for external
  which will not be cleared and results in showing up stale
  frame on external display
- This change clears all the overlay pipes used on every blank

Change-Id: I44d62b7d0fcd992cf8a26bb0c21df77952bc1381
CRs-fixed: 464070
Merge "hwc: NULL check on buffer handle"
Merge "hwc: Add debug logging for fps"
libexternal: clean up HDMI modes

- Userspace was maintaining its own display mode timing table
- Change that to include the header from kernel

Change-Id: I19823e60d188b5a30445866c7df1860e269975bc
CRs-fixed: 470335
libexternal: Add support for vesa format

This change adds support for 1280x1024@60Hz
with pixel clock of 108MHz

Change-Id: Idb2c752554bfb130bba8db2b29444afcacc40fee
CRs-fixed: 438028
hwc: Add support for new resolutions

This change adds support for following resolutions.
* 2560x1260 @ 60Hz (DVI)
* 3840x2160 @ 30Hz (HDMI)
* 3840x2160 @ 25Hz (HDMI)
* 3840x2160 @ 24Hz (HDMI)
* 4096x2160 @ 24Hz (HDMI)

Change-Id: Ibd6fbaf20ac9c9557e738057f2a990eea1de928d
Merge "hwc: clean up overlay on external display blank"
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 "hwc: Add DMA pipe support in MDP composition."
Merge "libcopybit: protect all c2d copybit API's"
Merge "libexternal: clean up HDMI modes"
Merge "libexternal: Add support for vesa format"
Merge "hwc: Add support for new resolutions"
liboverlay: round off rotator downscale factor to nearest integer.

This reduces the MDP clock and bandwidth requirements and
avoids falling back to GPU composition.

CRs-fixed: 457295

Change-Id: I4408ee0485248987342df63669f1a6894ea0dd73
Merge "liboverlay: round off rotator downscale factor to nearest integer."
qcom_display: add TARGET_PROVIDES_LIBLIGHT

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

Change-Id: I273b9e16afa011445e185fdaf1e7cf2f029b077c