qcom: copybit: build proper for qsd8k

Change-Id: Ic4ab7ec7105e45b8e09b232ae8096f3c7ea75ede
Display/libhwcomposer:align the copybit src and dst buffer

Align the copybit source and destination buffer according
to the frame buffer pixel format.
CRs-fixed: 327687

Change-Id: I00a0a047f2f6d639202e8395d85902b821e2a65c
Display: Use new ION heaps

Use new ION heaps in gralloc
and use them in rotator

Change-Id: I4ff903fd48a90e19655a64c5a0abaeec35aa34c8
libcopybit: Disable copybit blending for opaque layers

This change disables copybit blending when surface flinger sets
HWC_BLENDING_NONE for a layer.

Change-Id: Ie86a2d5c9e3d3dab1bc7a0a3cc31bff7afe604da
gralloc: Make all pmem buffers cacheable by default

If an uncached buffer is needed from gralloc, the
client must use the flag GRALLOC_USAGE_PRIVATE_UNCACHED

Change-Id: Ie3fcfee1071a87fa0440600f4ca3e2d7ff6243ed
Overlay: Change rotator format for YV12

Change rotator output for YV12 input from CBCR_H2V2 to CRCB_H2V2.

Change-Id: I5d9711d5006dfbed5fc0b478af43e1fe673988bc
CRs-Fixed: 327956
Refactor OverlayUI

Refactoring is necessary to attain flexibility in setting mdp overlay params
at runtime, while using composition bypass.
This change includes new APIs for setting crop rectangle, display params and
commiting mdp params, namely setCrop(), setDisplayParams() and commit(),
respectively.

Change-Id: Id57035602baabd954fd6b484be4f63fef632d74b
display: Fix blending on MDP 3.0

Assign the correct blending value
for MDP 3.0, earlier it was
incorrectly assigned to zero
for cases where blending was not needed.

Change-Id: Icec6541616c8a9dc6ffc0e99c5b2936389799656
qcom display: qsd8k hwcomposer

hwcomposer:
         rewrite from default template.
         specific for qsd8k
         put a hack in to fix screen off animation
         builds without liboverlay include which qsd8k doesnt support

Change-Id: Ica8df89be4dba4e92ed4e879e8e821b841e2ef93
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: Store the correct fd when mapping the framebuffer.

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

Change-Id: Ibca65a8f4c4db374dc23e8fee216ec5c36a9c01c
libgralloc: Check if w and h are odd only for the YV12 format.

The mandate for the width and height to be even is only for the YV12
format. Add this check only for the YV12 format.

Change-Id: I1e8d2de174ecf2e62cd33cc40dfd8e97d70a3a59
gralloc: Clean kernel allocated pmem buffers after memset

Change-Id: I1a13c38c38a9f321e3f163545d0331529d2f7e6f
qsd8k-hwcomposer: update drawLayerUsingCopybit, revise prepare/set

apply:
Author:     Ramakant Singh <ramaka@codeaurora.org>
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.

and cleanup loops in hwc_prepare/set

Change-Id: Ice32e12051c5c4367d1fafe17e804679e6e727c9
libQcomUI: update isGPUSupportedFormat

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

Change-Id: I737ae2f282092de97bd1f945fb66bc6e8e3dda49
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
libqcomui: add function to find if GPU supports a format in hardware

This is a helper function that will return false if the given format is
supported by adreno drivers but not supported in GPU HW. For these
formats, adreno will use software color conversion routines to convert
them to acceptable format by the GPU HW. This may be required if we
want to avoid creating texture for certain formats when not absolutely
necessary. Could be defaulted to return true depending on a compile
time flag.

Change-Id: Idb2200b5ed13bb8c184288d44340ed1aefeaa8df
libqcomui: Select texture target based on pixel format

Do not choose GL_EXTERNAL_TEXTURE_OES for all formats, instead,
select between GL_EXTERNAL_TEXTURE_OES, and GL_TEXTURE_2D based
on the pixel format.

This change is done to reduce composition times.

Change-Id: I17edd78cdfa051f88ed6bd4e585c7a9b0705aa3a
CRs-fixed: 328074
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