hwc: Perform MDP downscaling for WFD/HDMI Scenario

  On WFD/HDMI connection, if the configured resolution is less than
  Primary Resolution, Display HAL does the following:

  1. sends hpd notification to SF with primary resolution.
  2. configures MDP pipes with configured Resolution.

  This is done to improve UI quality as MDP has better downscale
  filter options compared to GPU.

Change-Id: I33570c13016a35ed6c5d22d4c34dfe75b2c605a1
display: Add BufferMirrorMode support for External

- In Buffer mirror mode, the output on the external should be rotated
  based on the primary orientation.
- this is used for the side sync feature.
- buffermirrormode has higher precedence over external orientation
- Add binder interface to enable/disable buffermirror mode

Change-Id: Ibea0af9627d69b4d42453adc868b113d82613437
hwc: Cleanup patch for SideSync and WFD/HDMI downscale feature

    Move block of code corresponds to SideSync and WFD/HDMI downscale
    feature to a seperate function.

Change-Id: Ib07cec61abf3a7226bc4dd2ebb9f313519114fd4
hwc:Donot invoke commit when wfd is in pause state

Donot invoke commit when wfd is in pause state
in hwc_set_virtual

Change-Id: I7202237e33b1b5de11f3bb1fdece4a897d3e6434
hwc: Call commit after unset of pipes

Call commit after unset of pipes as part of handling uevents

Change-Id: Ie140bb230a53a67389288191f7907f21215df059
Merge "hwc: Perform MDP downscaling for WFD/HDMI Scenario"
Merge "display: Add BufferMirrorMode support for External"
Merge "hwc: Cleanup patch for SideSync and WFD/HDMI downscale feature"
Merge "hwc: Call commit after unset of pipes"
HWC: Check for proper MDP version to enable C2D comp

- Allow C2D composition when MDP composition fails only
  for 8960 Non Pro Device

Change-Id: I0a0f714ea10f77a09ce8aa5b5964e644d8256a38
Merge "hwc:Donot invoke commit when wfd is in pause state"
Merge "HWC: Check for proper MDP version to enable C2D comp"
hwc: Set display as active only after unblanking it

* For HDMI and non-Hybrid WFD solution, on receiving
online event, display hal sends hotplug connect to SF.
* In case of such displays, set them as active only
after receiving an unblank call.
* For Hybrid WFD solution, since display hal will not
be receiving unblank call from SF, set it as active
as part of processing online event itself.

Change-Id: I319f1576cba954da2024680568c37fedb1eb5d43
Merge "hwc: Set display as active only after unblanking it"
Initial bringup hardware-qcom-display

Change-Id: Ie669b3cfe01cdab859726b2baaa54fff0dc0dbaa
Revert "Initial bringup hardware-qcom-display"

This reverts commit ad6463a8280ced11e902fdfd472cc4051bd2400b.
display: Add support for interleaved YUY2 and YUYV format.

Add support for interleaved HAL_PIXEL_FORMAT_YCbCr_422_I and
HAL_PIXEL_FORMAT_YCrCb_422_I format in display HAL.

Change-Id: Ib87d9bf481c20bf6a92293dd04746719b1d928c1
hwc: Upgrade partial MDP composition

For secondary displays instead of using video-only composition we
now use full and partial MDP composition. This is however restricted
to 2 pipes owing to SMP and B/W limitations.

RGB layers with transform are now handled by partial MDP comp for
both displays. Layer cache and batching have been upgraded to take
care of this condition.

For example if primary is rotated and has a non-hw-accelerated volume
bar pop-up, earlier we would just fall to GLES, now we try to do
partial MDP comp.
Or if secondary has layers with transform (because there is no
pre-rotation for secondary), but non-updating and there is video
playback, we should be able to use layer cache, rather than drawing
with GPU always.

Also a layer not updating and a layer composed to FB are 2 separate
concepts. This patch now treats both differently.

Change-Id: I7eb43ba817f1081f317fefa99fa0c507344060e9

Conflicts:
	libhwcomposer/hwc_mdpcomp.cpp
	libhwcomposer/hwc_mdpcomp.h

CRs-fixed: 514448
hwc: Bump up version to 1.3

Increment hwc version to 1.3.
Create and use a converter from float source crop to integers.

Change-Id: I5e185195c975b3a9434c5d9dce9ae4757ff98739
hwc: Punt layers with non integral source crop

The MDP driver cannot handle such layers right now. Investigate
doing this with pixel phase in the future.

Change-Id: Iabbdd0285234160770ae5a799b07a5b912e5fde3