copybit: Enable HAL_PIXEL_FORMAT_RGB_888 support in c2d

Enable HAL_PIXEL_FORMAT_RGB_888 pixel format support in c2d library.

Change-Id: I2316357adb3fef8007bdab4791c94e53d12fa00f
copybit: Enable RB Swap for RGB_888

Enable swapping of R & B color components
for RGB_888 format, otherwise C2D renders
wrong output.

Change-Id: Ib1670418a588e09e8168a04c9f8b8022a84e65e8
CRs-fixed: 672033
hwc: Full MDP Composition mode with overlap region removal

MDP bandwidth limitations can be avoided, if the overlapping region
covered by the smallest layer at a higher z-order, can be composed
on a render buffer using Copybit, and then it can be queued to MDP
along with other layers. It helps to improve performace by avoiding
GPU Composition in use cases like Home Screen pan. To enable this
feature, set system prop "persist.hwc.ptor.enable" to "true" or '1'
and enable Copybit HAL compilation.

Change-Id: I7a241d04316ce24999669a80cd382a7df643c2fb
hwc: Map dirtyRect to layer destination before using.

DirtyRect for a layer is generated w.r.t to its buffer
coordinates. It needs to be mapped for layer destination
(display) coordinates before using it to calculate the frame's
ROI.

Change-Id: Id86f495b2016da2cfd5aed4d86bff6d3035abf10
hwc: source split: Enable BWC for video with width <= mixer width

Enable BWC for videos with crop and position widths <= mixer width.
Source split was earlier used on split panels only, and BWC was
never enabled (It should at least have been for eligible content).
When source split was enabled for all panels, automatically BWC got
disabled for rotated videos. This change fixes that.

Change-Id: I349e782fb6de515ff42fcb137f02cf27c425da56
libgralloc: Set Alignment to 1M only for Secured buffers.

Set Data alignment to 1M only for secureed buffers which
are allocated via MM heap. IOMMU heap allocated buffers
should have buffer alignment of 4k.

Change-Id: I501b35ab103b687f1081338e0c100c29e0b9c4bf
display: Fix binder parcel position

If we call binder APIs from within the same process, the parcels
read position will not be reset at the client end. Also there is
no interface token. Reset the parcel position to zero if the
calling process is the same as the current one.

Change-Id: I6c4499f453dba3ec89b203ce9c86150edaefdbec
overlay: Request specific pipe type

Request driver for a specific pipe type instead of
notifying the type request using mdp flags.

Change-Id: I83fffc7c0e1f24d903b7dd6d52a58b87c70f3d4f
hwc: Avoid MDP draw if prepare is not successful.

If #AppLayers are 0 or exceed MAX_NUM_APP_LAYERS
return early from MDP draw.

Change-Id: I834c7b04a295fbd9b98374cade880992d995ad1f
hwc: Align left and top before aligning width and height

- Align left, top, width and height values based on
panel ROI alignment restrictions and in the same order
as the ROI values of left and top are used for right and
bottom calculations.
- Modify LeftAlign sysfs name to xalign instead of xstart
to align with driver.

Change-Id: I3b815ac5efffe243e7c2f66197d0fb19e6d963bd
hwc: Calculate DPI values according to changed resolution

If dynamic FB feature is enabled, calculate xdpi, ydpi
values based on new resolution.

Change-Id: Icbc8d2161082f60983532d1a57d9142653c65e9a
hwc: On downscale check swap on 90 transform

While checking for valid dimensions, take 90 transform into
account while calculating downscales.

b/14225977

Change-Id: Ie8b527c8263a5eb366ae2a4adaa2ffbbf270ba50
hwc: Extend PTOR feature for two layers

- Consider two smallest layers for PTOR feature which uses MDP comp.
- These two layers are rendered on a buffer and are queued to MDP
  to acheive full MDP Composition
- This helps to acheive performance enhancement

Change-Id: I43d9306ff19cd2d7a410c885316523965a44cbd4
libmemtrack: Use kgsl memory flag to determine usermapped buffers

Instead of using useraddr from kgsl memory allocations to be
matched against proc/<pid>/smaps file to be used to determine
usermapping of a buffer, use the newly added flag which directly
indicates whether a given gpubuffer entry is usermapped or
not. The flag is the last character in the "flags" field.

CRs-fixed: 634962
Change-Id: I1f82f7a2ff207eb780f1938a3b1347451b1e3d77
libmemtrack: Use correct format specifier

Remove warnings by using the correct format specifier

Change-Id: I93a1f0a38355d4b501376ed7da2fed41893ac371