display: Add NULL check for metadata

Add NULL pointer check for metatdata buffer before accessing its
member variable

Change-Id: I91de520b76d3c9714f357cff2de696e701811d06
CRs-Fixed: 434388
libcopybit: Add Async mode support for C2D

- flush_get_fence API to copybit.h - which is async,
  which returns the fenceFD
- flush_get_fence calls C2dflush and c2dCreateFenceFD
  signals the c2d_wait_thread which waits for
  transcation to finish and cleanup resources

Change-Id: I98d5e08ea1cbce9732970c68c1e47b6f396249ce
hwc: Add support for copybit(C2D) composition

- Add CopybitEngine to hwc_context
- draw the layer on the HWC_FRAMEBUFFER_TARGET using
  copybit(c2d) if it qualifies for C2D composition.
- use fence returned from the copybit during c2d
  composition

Change-Id: I052da015cd031f7abd6411d83d7944c335caeff7
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
Merge "display: Add NULL check for metadata"
display: use metadata ioctl to get panel frame rate

Get rid of using reserved fields

Change-Id: Ia3ada294427812e8382f744964f475403f6fb73a
Merge "overlay: mdssRot: Fix the logic for setting Rotator info flags."
Merge "display: use metadata ioctl to get panel frame rate"
Merge "Update buffer dimensions with new dimension"
Merge "libcopybit: Add Async mode support for C2D"
Merge "hwc: Add support for copybit(C2D) composition"
Merge "libcopybit: Merge copybit HAL from jb"
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
Merge "libgralloc: force 1M alignment for secure buffers"
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
gralloc: Remove update rect

SurfaceFlinger does not use this feature any more.
Removing this to avoid usage of reserved flags.
If this is needed again, it can be added with metadata
in the display commit ioctl

Change-Id: Iaf3f14a910ad64c83abb0910fad4a999b663c545
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
Merge "display: Use GRALLOC_USAGE_PROTECTED to indicate secure content"
Merge "hwcomposer: In Mdss,secure content policy applies to layer buffer"