hal: adding support for DRC on WiFi display

    When Dynamic Resolution Change (DRC) is triggered in the WiFi display
    stack, it results in a PAUSE and a RESUME event. During DRC, the
    dimensions of the framebuffer are changed. To support DRC we need to:
    1. Check if a RESUME event is the result of a valid DRC event
    2. Reconfigure the display's attributes to reflect resolution change
    3. Enable MDP downscaling when necessary (Valid DRC cases)

Change-Id: Idc3cbc94de99a4a7299e2f6b26c3e35937c1d6c8
hwc: remove gpu fallback when there is rotation

A sw workaround was created in mdp3 so composition of layers with
rotation and roi that is not divisible by 16 is now possible to
be done by ppp.

Change-Id: Iada3707da1b85e58dad398b8271d7a26725e0d22
hwc: Use ib instead of ab for bandwidth checks

The ab (average bandwidth) is just the average and there could be
underruns when ib (instantaneous bandwidth) is attempted to be used.
Add additional factor to use ib instead of ab. This means we need to
assume that all the layer contents could be requested together, rather
than one after another.

Also use the trimmed layer dimensions for calculations.

Change-Id: I771f964e1c80b5db564faa01cdfb75d75b54f97a
libqdutils: initialize split char array to 0

Initialize split char array to 0

Change-Id: Ib3eb579a5a96dbd121bf6f65b09fa19ec7e274f3
CRs-Fixed: 546662
libhwcomposer: Optimize layer crops when possible.

With in hwc list of layers if a layer above is opaque,
deduct the opaque layers crops from all the layers below
in z-order if deduction is possible with out creating
any hole.

Change-Id: I6391a13b0501cb972b134f72b58514cb807c7613
Merge "hwc: Use ib instead of ab for bandwidth checks"
hwc: prevent MDP bytes calculation in GPU fall-back case

    In prepare, we check if MDP can handle the number of layers
    given to it. If it cannot, we fall-back. Additionally, we must
    not proceed with any MDP bytes calculations otherwise we will
    see out of bounds errors.

Change-Id: Ifae45aefbc8732a7f21f5652758ece3a7639be9a
libexternal: remove mEDIDs string

Remove mEDIDs string from the External class as it not needed
after parsing the string.

Change-Id: I0a624857894a0b5401b33408c09b32ceb4f8a0d4
CRs-fixed: 549578
display: Add support for interleaved YUY2 and YUYV format.

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

Change-Id: Ib87d9bf481c20bf6a92293dd04746719b1d928c1
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
hwc: Add needsScalingWithSplit for high resolution display.

- needsScaling does not check for scaling required in left & right
  mixers when the crop values are sanitized. So it leads to issue
  if DMA pipes are picked-up as high resolution layer does not need
  scaling but left or right mixer configuration needs scaling after
  the split.
- needsScalingWithSplit takes care of this with checking for the
  sanitized cropped values.

Change-Id: I1f5b1952a59a84f5ccbaef123251b3c8cd46e4dd
hwc: Add vpu client

Stub implementation of VPU in HWC.
This commit passes through binder calls from HWC
to the VPU library. It also has stub prepare/draw calls
in the VPU client object which can be used to configure
VPU in the composition cycle.

Change-Id: I2606f2884e870448d29ef26e02faac92e157e2c6
Merge commit 'ef8d53950a324191b68c95f8d7b384ae8cdf1dbd' into HEAD
Merge "Merge commit 'ef8d53950a324191b68c95f8d7b384ae8cdf1dbd' into HEAD"
hwc: mdpcomp: split: Count total pipes needed per display also

When checking for pipes needed for each mixer, the pipes completely
unused are counted twice.
Add a per display check on top of per mixer check to make sure this
is taken care of.

For example: Each mixer needs 4 pipes, and total completely unused
pipes are 6. Each mixer will get 6 as available pipes, which is ok
at a mixer level, but at a display level 8 pipes are needed and 6
available. Need to account for that.

Change-Id: I9811255aab96c7fe47331f8aa125fef2a4a2f704
hwc: Handle multiple videos with priority to secure

In video handling this patch makes sure:
1) Sufficient VG pipes are available, not just any pipes
2) If VG pipes are insufficient in multi-video scenarios
    preference is given to secure videos.

Change-Id: I170592463a1c28348108a1b12d60908cf3063d7d
hwc: Include more cases in partial MDP composition.

When MDP cannot support a layer, we send the whole list of layers to
GPU. If such layers are not updating they can be cached on FB while
allowing the rest to take the MDP route.

Example # 1: Volume bar on video in 90 rotated mode. Since volume bar
is not h/w accelerated, there is no prerotation and we invoke the GPU
for redraws each round. With this change we won't because of caching.

Example # 2: If prerotation is applied to layers on primary, the
secondary layers would show a transform and the whole list is redrawn
with GPU. Now we could make use of caching.

This change also imposes a 1 layer limit on secondary, but now allows
full and partial MDP comp, thus benefiting secondary-only content.

Change-Id: I7eb43ba817f1081f317fefa99fa0c507344060e8
Merge "hwc: prevent MDP bytes calculation in GPU fall-back case"
Merge "libhwcomposer: Optimize layer crops when possible."
Merge "libexternal: remove mEDIDs string"