libgralloc: force 1M alignment for secure buffers

Align secure buffers to 1M alignment as TZ expects this for
protecting the buffers, MDP5 onwards.
Update the buffer-size to the same alignment used.

Change-Id: I369932a4a72b28c05a3ea216a8bba681de1f9dad
display: use metadata ioctl to get panel frame rate

Get rid of using reserved fields

Change-Id: Ia3ada294427812e8382f744964f475403f6fb73a
libexternal: set hw.hdmiON system property

- hw.hdmiON property is set to 1 when cable is connected
  and 0 otherwise
- This property can be queried by other modules to know
  if HDMI is connected

Change-Id: Id513711a676e6cb4eb9a99b3b208b05f6e021047
liboverlay: Enable secure content flag in Mdss Rotator.

- Secured contents shared with hardware should be uncached.
- Secure heap needs to be contiguously allocated & aligned to 1MB,
  which is not supported by IOMMU heap.

Change-Id: I6c7c00d5363319f9a6db6e52c1e78e1b16ecd9aa

Conflicts:
	liboverlay/overlayMem.h
display: Use GRALLOC_USAGE_PROTECTED to indicate secure content

For secure content, use GRALLOC_USAGE_PROTECTED flag instead of
the obsolete flag GRALLOC_USAGE_PRIVATE_CP_BUFFER.

Change-Id: I69bf8cfd3a978fd472608beb44056e1bf55c1414
hwcomposer: In Mdss,secure content policy applies to layer buffer

In Mdss, mSecureMode is never set, instead the secure content flag
has been set/unset on each layer buffer.

Change-Id: I3283533c11206e189ce70dbc84776b2cff3a909d
external: use metadata ioctl to set vic

Get rid of reserved field usage

Change-Id: Icad81d4065f559066a2722fa3227bddab75d665b
libhwcomposer: Allow 2 YUV layer frames to use MDP composition

This change introduces the following changes:
- Frames having 2 yuv layer can be bypassed
- if not handled by MDP comp, video path will not
  handle any such frames and will be FB rendered

Change-Id: Id211dbc185608c482badbca00a2708fa6138a8e5
Update buffer dimensions with new dimension

Add case GRALLOC_MODULE_PERFORM_UPDATE_BUFFER_GEOMETRY in
gralloc_perform function to update the new buffer dimensions.

Change-Id: I7a855dc017dd042dda2abdc28c51ce5ec919fceb
display: Add support for Venus color format for newer platforms

Change-Id: I4c9a327bd30d1321e1f8383ffc1ca978efc8e9b9

Conflicts:

	liboverlay/overlayUtils.h
	libqdutils/gpuformats.h
	libqdutils/qcom_ui.cpp
mdssRotator:For Venus, rotator buffer size depends on rotated w/h

Due to alignment requirements on venus format, rotator buffer size
calculation needs to be performed according to destination buffer
dimensions. Due to these alignments, the buffer can be different
when width and height are swapped due to 90 degree rotation.

Change-Id: I8eb0f1ece22946e6c3b2106623c3457e6871fd9c
liboverlay: Mdss Rotator secure buffer needs to be aligned to 1M.

It is TZ requirement, xpu needs the buffer size to be 1MB aligned
for protection.

Change-Id: Icd9047a54d5706c321445e7970fb0f455d0c130b
overlay: mdssRot: Fix stale rotation flag values.

When moving from a non-zero to 0 orientation rot flags are not cleared.
This change resets the flag to 0 after every commit.

Change-Id: I2fb9759921c36620c53bf2ac92d9473a42919d8c
overlay: mdssRot: Fix the logic for setting Rotator info flags.

Set the required flags instead of considering SECURE flag only.

CRs-Fixed: 423045

Change-Id: I82699d23de97c5276cac8f3b614b5d0463d7b06a
overlay: mdssRot: Do not reset non-rotation flags.

Reset only rotation flags to fix stale orientation flag values.
Resetting non-rotation flag breaks secure-playback using rotator.

CRs-Fixed: 440417

Change-Id: Ia35c6258cfd26358b3dfe5cb006e9245d51e3dfc
liboverlay: Fix stride alignment issue for s/w decoded video.

1. Due to alignment requirements on HAL_PIXEL_FORMAT_YV12 format,
rotator buffer size calculation needs to be performed based on
rotated width and height because buffer size can be different when
width & height are swapped due to 90 degree rotation.

2. Input and output color formats are same for MDSS Rotator.

Change-Id: I0a06ef9bb7bdceb951e7ab5160dac3e92a28bcda
CRs-Fixed: 451871
display: Add target specific flag to support Venus color format

Venus color format is not supported on older platforms. Add target
specific flag in display hal and define Venus macros to zero for
older platforms.

Change-Id: I38141ae870e255a0e54ce9fde46fe6cc3415f179
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
display: Add display metadata in buffer handle

Allocate extra space for metadata in buffer handles
Provide api to map this space in client process and set the metadata

Change-Id: I8bca8448670d4aa88d439320faf402dae30458f8

Conflicts:
	libgralloc/gralloc_priv.h
	libgralloc/mapper.cpp
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