hwc: Fix unchecked return value

Check the return value of uevent_init function
and return on error.

Change-Id: I9dfca0ed84cbe5f1abf5716c5deed7808aa046ea
hwc: Add support for Secure display

- Identify secure display layer in the hwc_list
- Need to set both SECURE_OVERLAY and SECURE_DISPLAY flags for the secure
  display layer
- Disable idle timeout for secure display usecase, as GPU should not be
  accessing secure display layer

Change-Id: I555910db77c466b5e103b24b4f0ec7f47bb210a5

Conflicts:
	libhwcomposer/hwc_utils.h
hwc: use sourceCropF instead of sourceCrop from hwc_layer_t

- Always use sourceCropF instead of sourceCrop
- This was missed as part of commit 14089e

Change-Id: Ia64050a41a174f3f038c9b88d527d70c2240f2d9
libexternal: Restrict external mdp downscale to 1080p

Enable MDP downscale feature on External display upto 1080p.
If primary is 2560x1600 and hdmi is 1080p, do not perform
MDP downscale for hdmi.

Change-Id: Icf069b2d916a68c81796f4004752407e1badfd1b
gralloc: Set default value for implementation defined formats

For implementation defined formats which go via HWC, set the
default value to RGBA8888

Change-Id: I7f8c46bc47746dcf1c4a03438b8f93d7bab78bb1
Merge "libexternal: Restrict external mdp downscale to 1080p"
Merge "hwc: use sourceCropF instead of sourceCrop from hwc_layer_t"
Merge "gralloc: Set default value for implementation defined formats"
Merge "hwc: Fix unchecked return value"
hwc: handle actionsafe with downscale on ext enabled

during actionsafe calculations, if downscale on ext is enabled, we need
to consider the physical display attributes.

Change-Id: Ia07218b0b8e47b91b0bf575c66478ebaeab2e2a4
CRs-fixed: 569152
hwc: Listen fb0 event for panel status

Listen fb0 status change event for panel status. fb0 will receive
"PANEL_ALIVE=0" when panel is not responding to status call.
Call blank and unblank to reset the panel in next hwc_prepare
call.

Change-Id: I941a501a82d9f3b725660ad09631c1d8602b7325
hwc: Fix for MDP Downscaling limitation

  For HDMI/WFD downscaling scenario, if the downscale factor is
  >=2, MDP cannot do downscaling without BLT mode. Since BLT mode
  is disabled, overlay_set_failure occurs when downscale factor
  is >=2 (Ex: primary resolution 1920 x 1080, External resolution
  640 x 480). To fix this, do MDP downscaling only when downscale
  factor is < 2.

Change-Id: I6361d0290ad75abc1f39662377e590cd288a48a8

Conflicts:
	libexternal/external.cpp
qcom_display: add TARGET_PROVIDES_LIBLIGHT

Change-Id: Ifa4984a3dc4b938fb89d6c65c8cda931d643f3c6
Only build CAF display variant when requested.

Change-Id: I273b9e16afa011445e185fdaf1e7cf2f029b077c
Update include paths

Change-Id: I463eb0a6693ec5da41118f132d8dcdb0d11e4be8
overlay: Bring back debug.mdpcomp.maxlayer

 * We're having underrun issues with 4-layer composition. It generally
   works, but when the system CPU ramps down and the device is mostly
   idle, underrun is happening.
 * Limiting to 3 layers solves the problem temporarily on these devices.
 * Readd the option so that the issue can be debugged without afflicting
   our current users with massive amounts of flickering.

Change-Id: I7ab7d013f65eaf12a3d21a91229dcaad6a815069
display: Add support for MDP 4.1

 * MDP 4.1 does not support the borderfill pipe and the baselayer logic
   should not be used.
 * Only use 3 pipes for MDP 4.1.

Change-Id: Ide542079902f35818300619f8eefd3d188342b5d
Fix ION_IOC_MAP error on old ion api during drm video playback

Video playback in the Google Play Video app would
result in an ION_IOC_MAP invalid argument error and
the app to display error 22.

This fixes some old ion api code left out with the
"display: Reconcile display HALs" commit which resulted
in the invalid arugment or an out of memory error.

This was found using a Nexus 4 (mako) and the Google Play Movies
app while attempting DRM video playback.

Change-Id: I2f7724515cbb7449086611fb79d042ea71d6eb39
qcomBSP:  put check on new ionalloc

* prevent compile error when trying to init the same thing over
Tiny changes to support media codecs with vanilla driver.

Change-Id: I5415b6af1b13c4d9e95dfe4199325274b1d0f3eb