libQcomUI: update isGPUSupportedFormat

update isGPUSupportedFormat to include all the S3D formats and
interlaced content.

Change-Id: I737ae2f282092de97bd1f945fb66bc6e8e3dda49
Fix swapinterval 0 support in class OverlayUI

Fix swapinterval 0 support in class OverlayUI. The missing property
check for swapinterval is added to the new setDisplayParams API.

Change-Id: I3a7cb843f79afa213eb2f88b80e21249f64d61d0
Make SurfaceFlinger respect swapinterval property

A Google modification to eglCreateWindowSurface was
causing SurfaceFlinger to set its swap interval
value back to 1, regardless of the value set in the
debug.gr.swapinterval property.

This patch modifies the fb_setSwapInterval function
in gralloc to check the debug.gr.swapinterval
property and not change the swap interval if a value
is set there.

CRs-fixed: 329524
Change-Id: I80463c1209addbff227db7832dd0023e94eb06ac
libhwcomposer: Mark all layers below the SKIP layer for GPU composition.

If there is a SKIP layer present, the SKIP layers are first composited
using the GPU. If there any layer below the SKIP layer that performs
any operations on the FrameBuffer, it results in undesireable results
on the screen e.g. artifacts, since SurfaceFlinger draws the SKIP layers
before the HWComposer.

Change-Id: I198236673e2a0bd19a6087ff01049061547abb47
CRs-fixed: 327392
libgralloc: Store the correct fd when mapping the framebuffer.

Store the actual and not the dup'd fd when mapping the framebuffer.

Change-Id: Ibca65a8f4c4db374dc23e8fee216ec5c36a9c01c
display: Add support for protected heaps

Change-Id: Id5ade8a0f261db41dfaab19dbe3593c1042a8041
qcom/display: add true mirroring support on HDMI

Change-Id: I7e884e5dde2a08048a28610eb88760fcdd24d558

CRs-fixed: 316397
display: Standardize debug logging for all memory types

Change-Id: I96c93b8925ea9b3da8214823a7f821e0760aa82d
libhwcomposer: Fix dynamic composition for 2 overlapping layers

This change allows composition to fall back to c2d even if the second
layer overlaps the base full screen layer.

Change-Id: I4818344fe1d0c3bc748635d139446f9402a5b23a
CRs-Fixed: 326413
add GRALLOC_USAGE_PRIVATE_UNSYNCHRONIZED for explicit synchronization

Change-Id: I3d78f0517f7eeafc58ec5b0edfc6a04901ad48b2
hwcomposer: Enable dithering if FB format is  RGB565

CRs-fixed: 329362

Change-Id: Icc6f9a1184725fd110430b2815b40789428d159e
qcomui: Let the client decide the reallocation size

Always set the size the client wants, even if the
gralloc calculated size is larger

Change-Id: I31231f36ed0752db350d4fe62f8b04c7a84c6155
Dump PMEM usage in out of memory cases for debugging

Change-Id: I53612c5b5bc1d9eda83ec7e723d60ec9f1c15723
Display/libhwcomposer:Add intermediate stretch for low resolution clips

Copybit module has a limited stretch to scale a clip.
Hence we need to do a intermediate stretch before going
to final stretch.

Change-Id: Iedcfd5407299a8e34758dc6cd7586c19889488ff
hardware/qcom/display: Add debug feature to display FPS for both bypass,fb

Change-Id: Ib4991200db9bc64c823c57ed1fba43f836142957
libgralloc: don't IonAlloc::close_device() on error

It is possible to use this object from multiple threads
and there could be a race between a failure in one thread
and another method call from a different thread which would
result in system calls being called with an invalid fd.

Change-Id: I79f4ec3841334e6d2d50e277e66230ad9982a6d4
Copybit: Fix for source x and y calculation.

The x and y coordinates are derived properly from clip and dest rect with this fix.

- Even if rotation is involved, we need to start reading from the same point.
- Do scaling operation on the delta, and then add the source left and top values.
- If we scale the result of addition, we will not be reading source correctly.

CRs-fixed: 324782

Change-Id: I2876c6a8e48acbf03f80713338f9a17c57863aaa
libgralloc: fix libgralloc error codes

Several ioctl calls were returning -1 instead of -errno,
which may confuse upper layers, especially when the error
is -ENOMEM.  Also move some existing "err = -errno" calls
to the top of if statements so that errno cannot change
by libc calls in the error handling code.

Change-Id: I5bef433d21cfc2ce79cea45f425f0659c5dce305
Revert "Bypass: Turn off only after FB content is displayed."

This reverts commit f2dbabe786a12e7e9ae15328550b5ba581c5492e.

This change is not needed any more because we are caching the MDP pipe
contents when closing the channel. So no need to wait for postFB finish.

Change-Id: Ia6f01c33953762cb7a97e0b2b795d9afeb60d2d9
libhwcomposer: Add support for 3 layer bypass

This change allows 3 or less layer use cases to get bypassed completely via MDP pipes.
If more than 3 layers, all of them gets composited on FB.

Intended FB fallback cases:
  1) 4 or more layers
  2) Any MDP pipe is in use
  3) Any layer needs rotation
  4) Any layer is allocated from non-pmem

Change-Id: Ieb2b30b8ab9893fd68c7fc61ec889ac9a01cb7dd