gralloc: Add workaround for Jellybean camera drivers

* Arcee is smarter than I am, and discovered that we can simply swap
  two fields to ensure compatibility with Jellybean camera drivers
  having the metadata fields in the private_handle_t struct.
* Enable this by defining QCOM_BSP_CAMERA_ABI_HACK.

Change-Id: I2cd267dd5550404cf2e61d76fb805e780cd99d3c
hwc: Clear rotator map if overlay allocation fails

This fixes the GPU fallback path in case overlay set fails.

Bug: 9322550
Change-Id: I515204f41169debd8428b4fc48be392ecdd9ff48
Signed-off-by: Iliyan Malchev <malchev@google.com>
overlay: Add tolerance to downscale factor

In certain corner cases for 1080p panels, round doesn't get us
the right downscale factor resulting in MDP attempting to go into
blt mode. Add a tolerance for failure.

Bug: 9322550
Change-Id: I2be4715955d9e248fc63e408dc4a2cdf493152f6
Signed-off-by: Iliyan Malchev <malchev@google.com>
hwc: Add support for smooth streaming feature.

Update the source video width and height set by the video decoder
for the secure video smooth streaming usecase from the gralloc
metadata.

Change-Id: I73a3804d90557034604142481a232787dbc08f23
Acked-by: Ramkumar Radhakrishnan <ramkumar@codeaurora.org>
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 9533458
hwc: Punt video layers with plane alpha

This fixes a transition issue when exiting youtube while the
video is playing.

Bug: 9486278
Change-Id: I0259b2dc9ccbf302b13d8ae40e62765820d94860
Signed-off-by: Iliyan Malchev <malchev@google.com>
hwc: Don't lock eventControl for vsync events

Locking here can lead to a delay in vsync disable/enable
where prepare/set is not yet completed. The HWC spec says
that eventControl needs to take effect immediately.
This lock was earlier present when we waited for
SF to unblank primary at startup and the vsync control
ioctls could fail. This is no longer necessary as we unblank
primary on startup now.

Bug: 9669813
Change-Id: I2bf18ae9235f8dd428a495a9a23af7f00f34ff1d
Signed-off-by: Iliyan Malchev <malchev@google.com>
Merge "gralloc: Add workaround for Jellybean camera drivers" into cm-10.2
Merge remote-tracking branch 'cm/cm-10.2' into HEAD