libcopybit: Use CM standard QCOM naming.

Change-Id: Ide4c8d36743fc23f2711e010a8f031f1bb0b7c6f
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
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
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
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
hwc: Do not set Secure flags for UI layers

Change-Id: I5116bcd93ac2a3ab034408e64aa0cd126f734692
hwc: Pass transform value while cropping dst rect

While croping destination rect values for out of bound layers
consider its transform value.

Change-Id: I1f6bf25ac8ca8a27a3402c2d946edfaf57ab23d0
display: Add support for overscan compensation for ext display

- Read scan_info sys file node to check if TV underscans
- Apply action safe parameters to avoid overscan on ext display
- Store action safe width and height ratio using system  property
- Use these to calculate the destination position on the ext display
- Remove unsed ActionSafe Class

Change-Id: Id27e6fa20966fb13fc16aa7e237cacce8caeb642
CRs-fixed: 447367
hwc: Call MSMFB_DISPLAY_COMMIT even if FB handle is null.

Call MSMFB_DISPLAY_COMMIT for primary FB even if FB handle is null.
This is already done for external FB.

Change-Id: I5c405f933ce0fd99df6813acea45169802c54226
libexternal: change the order of ioctl call for HDMI

In driver PUTVSCREEN_INFO ioctl uses the META_DATA to configure, so
change the order in which the iocts are called during setResolution

Change-Id: I79e1bcf191756b3567b3e73a8eccd50ecb8857a7
CRs-fixed: 449567
gralloc: Do not set ION_SECURE for non-contiguous heaps

The GRALLOC_USAGE_PROTECTED flag is being used for non TZ DRM
if non contiguous heaps such as IOMMU are used. Hence do not
set the ION_SECURE flag for such heaps as they cannot be secured
through trustzone.

Change-Id: I48e9460ef66abb827c9df1b3c55037e8e4214f81
overlay: Remove unnecessary lock.

Remove the unnecessary lock used in setter and getter of external.

Change-Id: If752c212e4c28a81db5c6957d0e751444e23ff93
libhwcomposer: Don't count video layers marked for SKIP

When YUV layers are marked for SKIP, it needs to be composed by
SurfaceFlinger. No need for tracking them in HWC

Change-Id: I4c8ca9710b709b9df9dcb6867681387b7507e14c
Update copyright to The Linux Foundation

Change-Id: I145b66896159ff9886ed73507f17b3165ba0266d
hwc: Don't use MDP for buffers of width less than 5

This is a software workaround for MDP hardware limitation where
DSI mode panels wont give more than 30 FPS if buffers in RGB
pipes are of width less than 5

MDP can't handle layers of width less than 3. Fail MDP
Composition for those frames.

Change-Id: If45efab19817ea9e724fd2857fcc1c5d98ce0eab