Change makefiles for qcom legacy

Change-Id: I0e70a52ce020ba107b5cb0f19746100c6766e76d
Revert "display: Add support for video rotation on Ext display"

This reverts commit 7b65335bfbf9d2b23d9ed786d7512b1eda98936e.
gralloc : apply kernel 3.4 fb screeninfo type

Since fb screeninfo type is changed in kernel 3.4,
fb ioctl is not work correctly without this patch.

Change-Id: I5d673b78bd9a1680daf77256a7d31bc78d75cda7
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
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
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
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
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
hwc: fixes for vsync and race conditions

- Fix some race conditions between hwc_eventControl and the hwcVsyncThread.
- don't call vsync-ctrl ioctl for same enable value
- move enable disable ioctls to vsync thread, this stabilizes the vsync
  signal
- read again if vsync read is interrupted

Change-Id: I4065918b352769dd9fe18bd0dff4a87053299189
CRs-Fixed: 393243
CRs-Fixed: 416487
hwc: dont return from vsync thread when read fails.

Read can return fail when the panel is off.
When read fails do not exit from the vsync thread,
continue with the vsync signal, as later there will
be correct vsync event from the driver

Change-Id: I0f145b93fe5d365eafb6b9e7661160f00f84db40
CRs-Fixed: 417529
Fix compile errors when using NO_HW_VSYNC

Change-Id: Id5436afc69e97abf8b48cc938f44ebd0f87b514b