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
hwc: Allow HWC to support Virtual Display

  This change allows virtual display to be composed
  by HWC for supporting Google WFD App + QCOM WFD stack.

Change-Id: If8892230256e72fa34e3fb5ae715c3ad8cbd5b64
libexternal: prefix the property name with hw

System property to be shared with the applications, they need
to have same UID.
Prefix the system property with "hw." so that it can be of system
UID and be accessed by any app.

Change-Id: Ie5db1b7e614728c53e1085089194cd8a58f9ae63
CRs-fixed: 456480
hwc: Close acquireFenceFds always.

Close acquireFenceFds always even in case of failures if a layer is either
OVERLAY or FRAMEBUFFER_TARGET to prevent leaks in case of failures.
The framework is *not* responsible for closing acquire fds, for layers
marked as above two.

Change-Id: Ia6c751d3ec25f196f5503120894fc6cc692b9d25
libhwcomposer: MDP composition for Higher Resolution panels

This patch:
       -Implements MDP composition for higher resolution
        panels of width more than 2k.
       -Adds DMA pipe support for high res. MDP composition

Change-Id: Ib7b1f822e3600eca81521294fedfe05e948b65c3
hwc: Use intermediate buffers for copybit

The earlier copybit solution involved blitting directly into
the SurfaceFlinger's framebuffer target. That solution involved
unnecessary framework changes and caused issues when the
framebuffer was being written to both by GL and copybit.
Update hwc_copybit to use our own buffers for this purpose.
We also make sure we display only the region we're interested in
so that unnecessary artifacts from previous blits do not show up
on the display. This way, we can avoid clearing the intermediate
buffers every frame.

Change-Id: I713b3fc606e0768444c621af76853ece41964da1
hwc: Enable use of copybit

 * Reenable use of copybit now that the issues are resolved.
 * Remove QCOM_BSP guards around copybit usage.
 * Add a simple dump function to hwc_copybit.
 * Fallback to MM heap when IOMMU isn't available.

Change-Id: I5ea443e7a172c54c49954038d74229882fbfc334
gralloc: Allow IOMMU memory to be uncached

The IOMMU heap can give us uncached memory, so remove this
erroneous check.

Change-Id: Ie141c55821221a1c2f75b7cf2248794d93ea6c6a
display: Add hook for triggering screen update

DSI command mode panels do not need to be refreshed on each
vsync. Due to one frame latency in CABL LUT calculation, when CABL is
enabled for DSI command mode panels, the LUT doesnt get updated for last
frame. Triggering an extra update for DSI command mode panels fixes it.

Change-Id: I7a22e338609430746dda4d3081ff199109a95035
hwc: handle blank/unblank for virtual display explicitly.

Surfaceflinger does not send Blank/unblank event to hwc for virtual
display, handle it explicitly when blank for primary is invoked, so
that any pipes unset gets committed.

Change-Id: Iec7a1611a8963408f65c8a73a1c15e47cd7faab6
CRs-Fixed: 456810