Update and clean makefiles for building in CM-10.1

Also make Mdss rotator support optional, as it's
not present in pre MR1 kernels, and will cause
compile errors.

Change-Id: I6c42b99b86f7ebb30961f73c0f4ba74ab510c957
pmem: Fix compile error due to wrong type used

Change-Id: Id838089c9e713eb1674c3ba4e1bb4a811864d292
libgralloc : Correct the usage of pmem ioctl

Return error only if the ioctl PMEM_ALLOCATE_ALIGNED
returns negative value.

CRs-Fixed: 375513

(cherry picked from commit b1caf041824cedc268ced33e47a166070ec84f29)

Change-Id: Ie5e926648ff845dc04ce06e5c57e27dd214d1b45
hwc: Avoid MDP composition with alpha scaling

MDP4 supports scaling with alpha, only in RGB pipes.
In some cases this scaling happened with video pipes.
We now fall back to GLES composition for layers that have
alpha and need scaling.

Change-Id: I084355bad1cdb17c7308077b56006c59e75d2042
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Bug: 7648647
overlay: Do not clean up pipes at bootup for MDSS

The MDSS driver takes care of this cleanup itself.
Also - MDSS driver does not export the mixer info ioctl

Change-Id: I3b736dfaaf355d71fe999b89027aced75ca1e248
hwc: changes for hdmi hotplug and hpd

This commit has the following changes:
1. Use hdmi switch node for hdmi hotplug
   - uses /devices/virtual/switch/hdmi switch_state to determine
     the hdmi connect/disconnect
   - this switch will be set to 1 on connect and 0 on disconnect
   - on connect, open framebuffer device, will trigger the hdcp
     authentication.
   - the driver will set the hdmi_audio switch to indicate that
     the HDMI sink supports audio
2. Enable HDP on unblank
   - this will resolve the device freeze during the bootup with hdmi
     connected

Change-Id: Id7a656d548a31178e31dcb9aea8acf38a56c9e0c
(cherry picked from commit 953b04b3cbba2f91d25795e5b0560c13d47844b0)
hwc: support WFD external display

Change-Id: I3d24ff1757e79c4b41ff6c6db17d0274cd665671
(cherry picked from commit f8942672226a7af26218aa8d325c1677ae2b83dd)
overlay: Do not unset overlay for MSMFB_NEW_REQUEST

Change-Id: I40c21964db91e098f6f445e7860fefd09dcad768
display: Standardize log-tags for qcom display logs.

Change-Id: I75bc2d8db8d64994097d6b744f357c29c9a5717a
Out of memomy issue on HDMI

(cherry picked from commit 0ca5c43d5f50ab7fa63818f9685c6e54f711a45f)

Change-Id: Ica2c9196026935b02e2f79399c2574e21faa4771
liboverlay : Update magnification limit for MDP 400

Update liboverlay to address magnification limit for MDP 400.

MDP 400 has magnification limit of 8, and MDP 410 or later has a
magnification limit of 20.

CRs-Fixed: 413535
(cherry picked from commit df48275230f359af834d7292518aac2566aff524)

Conflicts:

	liboverlay/overlayCtrl.cpp
	liboverlay/overlayUtils.cpp

Change-Id: I809460080c467d60279aacdbd1e46e094a1fd525
hwc: commit changes for ext display on blank

- When the device is suspended, the overlay pipes will be unset,
  but they wont be unstaged as there is no DISPLAY_COMMIT ioctl
  called for ext display, as a result the fence wont be signalled
  by the MDP.
- This is needed as we dont turn off the External display(HDMI)

(cherry picked from commit ba9eed56530c3a050e5c7c5041baae21bccc05ee)

Change-Id: Ic144ae9c55ba57c70ae3fa5505785d60d158f9f7
CRs-fixed: 425483
display_hal: Do not allow to free framebuffer

Change-Id: Ic3a07d3a7db1dd1b5dd07d1d4303926d9e09b650
Update copyright to The Linux Foundation

Change-Id: If8b75e2bef687f27cdef7e3b8535ff112aef01f3
HWC : Enable HPD core only once after SurfaceFlinger is initialized

Power measurements are taken by disabling HPD core through sysfs
write. If we keep on enabling HPD core everytime, after every
suspend/resume, HPD core generates unwanted interrupts, and power
numbers go bad.

Change-Id: I7cc174a3aafbb1f4a8e73baa39b348d8060a8e9f
liboverlay: consider rotation for scaling limits check.

Change-Id: I8a62c7ae7fa2ce3dd87a548059af34dd8ba555f8