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
Merge remote-tracking branch 'cm/cm-10.1' into cm-10.1