Change makefiles for qcom legacy

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

This reverts commit 7b65335bfbf9d2b23d9ed786d7512b1eda98936e.
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

Conflicts:

	libgralloc/framebuffer.cpp
fb: Remove extra PUT_VSCREENINFO call.

Remove the extra PUT call during system startup.

Change-Id: I29287af2ee5610e749ac481c2832f41d7381ca59
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
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
gralloc: ifdef allocSize with QCOM_BSP

Matching changes in native and libhardware.

Change-Id: Ifd1f3d65aad743a55193863d9f8a1b36a88435a6
Proper ifdef so other devices compile properly
Revert "hwcomposer: Store device orientation in hwc context"

This reverts commit e0aeca0469585b86aa74a6fa84d7771ed38015b4.

Change-Id: Ib4f32e6838c7db8754d04e9d88b0c0f029d6f051
hwc: Update to new API

* Updates HWC to use the Jellybean MR1 API
* Remove qcom_ui which was using parts of the old API

Change-Id: I663363547b193d2318aae88f2256a9baed1e3d4b

Conflicts:

	libhwcomposer/hwc.cpp
hwc: Calculate orientation based on framebuffer info

Change-Id: I6c2b6e2f6b5f701bea3b4e49a4e28c66f79a3f5a