hwc: Use rotator for resolution change for all display

Rotator need to be used when resolution change happens for
primary or external display to avoid flicker or page fault.

Change-Id: If4b584c7afb7d2265b1efd7c320ac76ade199b74
hwc: send layer with non-contiguous buffers to GPU

when layer containing non-contiguous buffers are send to MDP,
flickers are observed

Conflicts:
	libhwcomposer/hwc_mdpcomp.cpp

CRs-Fixed: 624456
Change-Id: I4bcea959bd4849028368316aae39d1b0b17fa5b3
hwc: Do not use C2D composition for plane alpha

When C2D is used for plane alpha and immediately falls to GPU
   results in flicker for difference in composition

Change-Id: I2ae43c6ed22c829e952a0a4edee7f83c24645172
hwc: hwc_sync - populate correct fences for BLIT

Previously, the acquire and release fences for BLIT
composition were populated using same logic as Overlay,
but BLIT composition consists of separate BLIT step
before screen refresh, and app buffers are no longer
required after BLIT. So holding the buffers for both
the steps is unnecessary and impacts performance.

This change adds condition for BLIT in fence population
logic in hwc_sync and populates the right fences for the
App Buffers and Display Refresh during BLIT composition.

Change-Id: I9998a7052c0375acb32a174bdf0469d2a88f79e8
hwc: Correct Display Commit sequence during WFD-HDMI interaction.

When WFD is active and HDMI is plugged in, the pipes allocated
to WFD(mixer 2) are unset. Call Overlay-commit on mixer 2 to
unstage the pipes correctly. This also makes sure that a secure
WFD session is teared down correctly.

Change-Id: I7531339148e400727549decbde72096f2a7dd798
hwc: Reset previous width and height

If the current YUV count is 0 previous width and height
needs to be reset.

If FLIP is required then do not use rotator for resolution change.

Change-Id: I601cee2eddcf304b9c94d3def19d603c04b18ceb
libhwcomposer: Don't reset cached layer handle on MDP comp

Layer handle values will always be stored irrespective of the
composition type. Layer caching will choose a layer for FB
composition if it's handle has not changed.

Change-Id: Ied42d6ecafe48a9240aacc2d172b7d81b0d42a5d