display: Don't enable pixel repeat for YUV buffers

 * This can cause horrible things to happen on msm8660 like clock rates
   going to a zillion hz, hard lockups, artifacts, and the smell of
   fresh ozone in the air. Don't do it.

Change-Id: Ic3b8541fc149c593e46ca5ed0c1ee14cab6af71a
Revert "Revert "libhwcomposer: Don't count video layers marked for SKIP""

This reverts commit 5b9ee9522eff9f43eb13692e2d15f8d500b680a2.
libhwcomposer: Only 4 pipes can be used per display for MDP Comp.

Although 6 pipes are available in total but only up to 4 pipes are
available per display (single mixer) for MDP Composition.

CRs-Fixed: 450985

Change-Id: I99df91ab955a1a7110dfbea2aaf790ba26058a78
display: Close 0 fds

0 can be a valid file descriptor, make sure 0 fds are closed

Change-Id: I2bf2280d70eda74fa0b0a886ea54ecefc6854b24
display: Do not align down input rotator src height

Aligning down the input rotator source height value introduces
green line in the output of the rotator. Remove aligning down the
input rotator source height for YV12 format.
For 1/8th downscale use aligndown instead of alignup.

Change-Id: I9152ee873c5ee79877653c78f33eb0cf7e2f9871
CRs-Fixed: 453033
overlay: Fix rotator output buffer size.

Fix rotator output buffer size for mdp and mdss rotators.
Output size is based on rotated width & height.
Output format can be different than source format.
It could be same if using mdss rot or using fastyuv mode in mdp rot.
Deprecate the static mapping of rotator input and output formats.
Driver will be responsible for correctly populating the dest format that its
wishes to use.

Change-Id: I17352d6d460cac24eb97083aed38668929c66807
overlay: Add support for pipe dumps.

Add support for pipe state dump useful in dumpsys.
Reduce debug log spam when mdp state changes.

Change-Id: Ie27ad00698085e2ffd6166ad2f7503fe16a571f8
liboverlay : Update magnification limit for MDP 400

Update liboverlay to address magnification limit for MDP 400.

MDP 400 has magnification limit of 8, and MDP 410 or later has a
magnification limit of 20.

CRs-Fixed: 413535
(cherry picked from commit df48275230f359af834d7292518aac2566aff524)

Conflicts:

	liboverlay/overlayCtrl.cpp
	liboverlay/overlayUtils.cpp

Change-Id: I809460080c467d60279aacdbd1e46e094a1fd525
hwc: Only perform the yuv+composition workaround on MDP < 4.2

Change-Id: Ie69376b282b9eda58b0e8e010ead14b31367c1a0
display: Reset metadata pointer to NULL during unmap.

Initialize metadata pointer in the buffer handle to NULL after
unmapping the buffer pointer

Change-Id: I930a2d21a6f259426949d7aa58bd07f1f58839c0
CRs-Fixed: 434388
Revert "display: Reset metadata pointer to NULL during unmap."

This reverts commit 49be4c74d90d377210aa7231451094110eea407e

Change-Id: I307b99d51d723842dd204d083a864e37fedc422e
libcopybit: update the target config_mask for transformation

With the new C2D optimization, the layer transformation is
passed through the config_mask.  If two layers had same
transform then the transform info was lost, fix that by
updating the config_mask when the layer has transformation info

Change-Id: Idecb5b16a65269fd13eead9a2de27a4756435583
CRs-fixed: 453083
libgralloc: Import header for Venus buffer size calculation

Import the common header file with Venus alignment requirements
to calculate venus buffer size.

Change-Id: I86cba91de8f7a3845a4592243b4f21e7cda03315
libgralloc: Calculate aligned width & height using common header

For Venus, calculate aligned width & height using common header.

Change-Id: I622fee19693cfc550796d5949185c146c6a7f173
libgralloc: Add Perform function to get the stride.

- Introduce a new class to Get the Adreno computed stride information.
This class has been added to allow adreno library computed strides to
be propagated to the allocation function as well as those clients
requesting it.
- Add a new Perform function to get the stride. The width and the format
can be passed from the calling functions (like EGL) to get the stride of
the buffer.

Change-Id: I4c2b4a02deff327f0ea5558c478997527fe9d3cf
libgralloc: Get the stride information from libadreno_utils.so

libadreno_utils.so is an adreno utility library. It computes the
optimal stride required for a surface of a particular width and
bpp. Using this computed stride allows us to efficiently use the
dual memory channels and increase performance.
Currently the utility library only computes the optimal stride
for RGB surfaces.

Change-Id: I0f70bd11602a5144515ab07c3bd2b80a01586a06
FIX: "display: Reset metadata pointer to NULL during unmap."

This reverts commit 4502e424d7b9d25da95ff3078f9842385234240a.

Change-Id: I8c357b466f6b9192e76c01d4dc4df4a682d45572
qdutils: Default to GPU composition

If composition type is not set, default to GPU composition.
This is because CPU composition is not supported from MR1 onwards

Change-Id: I951dcb5586a8dbcfbe73cd7292d0f1690d6528ba
libqservice: Add a client interface.

Add a client interface which interfaces with hwc.
qservice upon receiving IPC, provides a callback notification to the qclient
which does appropriate stuff in hwc.

In future, qservice can safely be even made a separate process with no changes
to exisiting code. This was not true earlier owing to the hwc pointer held by
qservice forcing it to be in the same process that hwc is in.

CRs-fixed: 452977
Change-Id: I05838c213f5d4606a6573693de1bacbc5876107e
hwc: Get notified on media player death.

Add support to get notified of media player death.
This is useful in reseting secure sessions initiated by mediaserver.

Change-Id: I215b5b552a0874c86a07426cd7d16ed48f307b5d