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
gralloc: Add allocation support for sRGB formats

Refer to graphics.h for the definition of these new formats.
The HWC doesn't yet support output to these formats.

Change-Id: Ib924e7b41ccedb808631e0a23f706f3d9a209048

Conflicts:

	libgralloc/alloc_controller.cpp
Replace sRGB_888 with sRGB_X_8888

Bug: 10357459
Change-Id: I4d462ed21a3b53dbe84319cce802ff92043e5002

Conflicts:
     bgralloc/alloc_controller.cpp
Merge "Revert "Initial bringup hardware-qcom-display"" into kk_2.7_bu
get rid of HAL pixelformats 5551 and 4444

Change-Id: I817510c3c7c0c3d95924c2ffc79e5727a6d6c48f
gralloc: Add padding byte for YUV 420

YUV 420 buffers have the chroma starting at consecutive bytes
but end at the same byte. This results in the second chroma size
being one byte shorter in size. This isn't a problem for
hardware, however, the gralloc lock_ycbcr API expects to read the
same number of bytes based on the cstride for both chroma
components. This could lead to it accessing memory beyond what is
allocated leading to a crash in the calling process especially
when the size aligns exactly to the page size. Add one byte
padding when allocating YUV buffers to make sure the users of
this gralloc API get enough bytes to read.

Bug: 10787131
Change-Id: Id18e0739f9fdc2c7a4fbe7724be668a989f1a4a1
(cherry picked from commit ca07ffae967e7137fb0d97fb9999a11c09b4a7b5)
display: Add support to HAL_PIXEL_FORMAT_NV21_ZSL format

Add Support to HAL_PIXEL_FORMAT_NV21_ZSL format in gralloc for
camera capture usecase.
This support is required because, CPP module requires 64 byte
aligned width and height to resolve corruption in bottom/left edge
of the landscape/portrait buffer.

Change-Id: Id3e0e5f3d695d5111f3469f78a1d52aad9bea4f4
(cherry picked from commit 512ee1dcef6fa47dfdcf3990fea29bd85f967f02)
hwc: Include more cases in partial MDP composition and fix bug.

Fixing bug in partial mdp composition due to layer caching when
UI layer with 90 rotation is present in layer list.

Layer not updating and a layer composed to FB are same now.

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

Conflicts:
	libhwcomposer/hwc_mdpcomp.cpp
	libhwcomposer/hwc_mdpcomp.h
hwc: Add support to smooth streaming feature.

update the source video width and height set by the video decoder
for secure video smooth streaming usecase from metadata.

Change-Id: I73a3804d90557034604142481a232787dbc08f23

Conflicts:

	libqdutils/qdMetaData.cpp
	libqdutils/qdMetaData.h
Merge "hwc: Include more cases in partial MDP composition and fix bug."
hwcomposer: Clear mVirtualonExtActive on EXTERNAL_OFFLINE

If WFD Client APK is connected and teared down and then hdmi is connecetd
Unblank Virtual display is happening instead of ext display
this results in Display not coming up on External using HDMI.

Change-Id: Id61e9e753f81e90787e2a958f75a4f84b4469f71
Merge "hwcomposer: Clear mVirtualonExtActive on EXTERNAL_OFFLINE"
Merge "hwc: Add support to smooth streaming feature."
Merge "hwc: Bump up version to 1.3"
Merge "hwc: Punt layers with non integral source crop"