display-legacy: clarify COPYBIT == HWC_BLIT

Change-Id: I4e531764a782a583312d3734f4fa0d3a4604b667
display-legacy: don't build when variant is requested
display-legacy: build when legacy is set
Revert "display-legacy: clarify COPYBIT == HWC_BLIT"

This reverts commit 662cd1737577fd6247bd8e6978ee9a604f9ccfc9.
hwc: Fix reserved field usage

Use the top 16 bits of reserved[3] for HDMI
and the bottom 16 for FPS. A follow up patch
in the MDP driver will get rid of reserved field
usage entirely.

Change-Id: Ic9f7a2f91b46b0dec830ea54784b7775009fbe48
fb: Remove extra PUT_VSCREENINFO call.

Remove the extra PUT call during system startup.

Change-Id: I29287af2ee5610e749ac481c2832f41d7381ca59
hwcomposer: disable vsync based on board preference

follow only the board preference instead of checking both platform and
board preference

Change-Id: I9fa5d6392f6b1677cb7b3809ee5207ada8e1fd5b

Conflicts:
	libhwcomposer/hwc.cpp
hwcomposer: fixes for hwc c2d composition

- c2d composition has to be used even the when renderArea equal
  to twice the fbArea.  This change enables this.
- set the default dynThresHold as 2

(cherry picked from commit 70e85f1d2e115203075a7bd715e7c0f763f41536)

Change-Id: I0c1e0dbc35f07a55a550e812a1ad1084168a1de1
CRs-Fixed: 396227
display/libhwcomposer: Fix memory leak in MDP Comp.

This changes fixes a memory leak by freeing up pipe alloc
structure everytime before parsing the current frame.

Change-Id: I23edefca71ec0209291be24ee9d629b4a80f0a25
display: Add support for 180 flip operation

This changes adds support for 180 degree flip operation during
MDP composition. This enables frames to get MDP composited during
270 degree orientation too (with pre rotation doing 90 degree
rotation)

Change-Id: I225088e0eed083f145a0166b06aac3d0e4355505
overlay: Consider both directions for downscaling

Since downscale in rotator is applied to both width and height, the downscaling
decision should be made based on the area rather than just the width or height.

Change-Id: Ib1c7eccc6c430a401b6d8abb1d9bb0927d05869c

Conflicts:
	liboverlay/overlayMdp.cpp
copybit: Use correct alignment in get_size()

get_size() is used to get the size required by c2d. It's alignment
should be 32 and not 16.

(cherry picked from commit 35d45d0cff5f6fe866fcb5df71444824a45e046e)

Change-Id: Iace771104ce8cea8b1672d15b2d46b6de9283868
libcopybit: draw full layer if dirty region list is long

1. Since blitting region by region by copybit is serial, if a layer has
long list of dirty regions, drawing full layer is optimal. Make blit
region same as display frame of layer.
2. Fix alpha for HWC_BLENDING_NONE layers

(cherry picked from commit 57f0723baf97d0f6499458d6764d1416baa18b4f)

Change-Id: Ib08a292e4845259cfb313ca07db34da9f9200dec
hwcomposer: Mark Video layer to GPU if any other layer is marked with GPU

Change-Id: Ib25f008ba0979f51fb811bd1c2b86199ac4216c9
CRs-fixed: 436277
Revert "hardware/qcom/display: Remove glfinish call"

This reverts commit 95bc6a5c6dd76a432baaa6554abd0f4f7ca481f1.

Without glFinish(), in few corner cases; application is trying to
lock the buffer for write, while the read lock is still held.

CRs-Fixed: 430212

Change-Id: I9e3a22ca3496ef42e8dce5d565bcfe79fd427a4d

Conflicts:
	libgralloc/framebuffer.cpp
	libhwcomposer/hwc_copybit.cpp
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

Conflicts:
	liboverlay/overlayMem.h
libgralloc : Correct the usage of pmem ioctl

Return error only if the ioctl PMEM_ALLOCATE_ALIGNED
returns negative value.

CRs-Fixed: 375513

(cherry picked from commit b1caf041824cedc268ced33e47a166070ec84f29)

Change-Id: Ie5e926648ff845dc04ce06e5c57e27dd214d1b45
hwcomposer : Synchronize EventThread, and hwcVsyncThread

Synchronization is needed,to make sure, read() is not called
by hwcVsyncThread when VSYNC is disabled.

Otherwise in usecases, where display is OFF, and still some
tasks keep running in the background; SurfaceFlinger keeps
using CPU.

Change-Id: Ic59d0c477bc8483dd731777ebde3cc9e12bb681a
CRs-Fixed: 393243
Merge branch 'cm-10.1' of https://github.com/johnnyslt/android_hardware_qcom_display-legacy into cm-10.1

Conflicts:
	Android.mk